Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
API failure handling
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  20 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Kristian  
View profile  
 More options Sep 28 2007, 7:41 pm
From: John Kristian <jkrist...@netflix.com>
Date: Fri, 28 Sep 2007 16:41:08 -0700
Local: Fri, Sep 28 2007 7:41 pm
Subject: API failure handling
http://groups.google.com/group/oauth/browse_thread/thread/b65778aca47...

Let's specify how API failures MAY be reported, in enough detail to
enable the Consumer to act appropriately.  There are several possible
outcomes that a Consumer should probably handle differently; for
example:

- request accepted and service performed: rejoice and move on
- unsupported signing algorithm: try a different one, or inform the
user that this isn't going to work
- invalid timestamp: read the Service Provider's clock and try again
with a fresh timestamp
- expired token: get a fresh token and try again
- invalid consumer key: try a different one

An HTTP response header could convey this information.  Specifying
another way seems harder, but worth a try.

It would be good if these were locale-independent, so that the Service
Provider need not be internationalized.

What else might a Consumer need to know?

How will this information be transmitted?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Messina  
View profile  
 More options Sep 29 2007, 1:59 pm
From: "Chris Messina" <chris.mess...@gmail.com>
Date: Sat, 29 Sep 2007 10:59:13 -0700
Local: Sat, Sep 29 2007 1:59 pm
Subject: Re: [oauth-extensions] API failure handling
I also started this page on the wiki:

http://oauth.pbwiki.com/ErrorCases

It might need to some work/restructuring, but it'd be great if we
could capture these ideas there.

Chris

On 9/28/07, John Kristian <jkrist...@netflix.com> wrote:

--
Chris Messina
Citizen Provocateur &
  Open Source Advocate-at-Large
Work: http://citizenagency.com
Blog: http://factoryjoe.com/blog
Cell: 412 225-1051
IM: factoryjoe
This email is:   [ ] bloggable    [X] ask first   [ ] private

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Kristian  
View profile  
 More options Oct 4 2007, 8:46 pm
From: John Kristian <jkrist...@netflix.com>
Date: Thu, 04 Oct 2007 17:46:03 -0700
Local: Thurs, Oct 4 2007 8:46 pm
Subject: Re: API failure handling
I wrote up an OAuth extension to help with this, in
http://oauth.pbwiki.com/ProblemReporting
Feedback is welcome.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Messina  
View profile  
 More options Oct 5 2007, 2:38 am
From: "Chris Messina" <chris.mess...@gmail.com>
Date: Thu, 4 Oct 2007 23:38:35 -0700
Local: Fri, Oct 5 2007 2:38 am
Subject: Re: [oauth-extensions] Re: API failure handling
Awesome! I cleaned up the formatting a little. Hope it helps some.

Chris

On 10/4/07, John Kristian <jkrist...@netflix.com> wrote:

> I wrote up an OAuth extension to help with this, in
> http://oauth.pbwiki.com/ProblemReporting
> Feedback is welcome.

--
Chris Messina
Citizen Provocateur &
  Open Source Advocate-at-Large
Work: http://citizenagency.com
Blog: http://factoryjoe.com/blog
Cell: 412 225-1051
IM: factoryjoe
This email is:   [ ] bloggable    [X] ask first   [ ] private

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Praveen Alavilli  
View profile  
 More options Dec 5 2007, 2:43 am
From: Praveen Alavilli <ppalavi...@gmail.com>
Date: Tue, 4 Dec 2007 23:43:02 -0800 (PST)
Local: Wed, Dec 5 2007 2:43 am
Subject: Re: API failure handling
So I am sending this after suggestions from the OAuth Extensions
session at IIW today. Basically the idea is to not reinvent some thing
new again. We already have a way of reporting errors in OpenID - so
why don't we use the same format in OAuth too.

In OpenID protocol, the error responses are clearly defined in the
spec for both direct and indirect responses.

Indirect Error Responses: http://openid.net/specs/openid-authentication-2_0-12.html#indirect_error
Direct Error Responses: http://openid.net/specs/openid-authentication-2_0-12.html#refuse_assoc

If we just use the OpenID error response formats, all we need to
define in this extension are the values for the "error_code" param and
let the SP/OP/IDPs to provide additional information (what ever that
they think would be useful for trouble shooting) in the
"error"/"openid.error" params.

We can just use the values for oauth_problem that are already defined
on the wiki (http://oauth.pbwiki.com/ProblemReporting) for this.

thanks
Praveen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Praveen Alavilli  
View profile  
 More options Jul 10 2008, 9:51 am
From: "Praveen Alavilli" <ppalavi...@gmail.com>
Date: Thu, 10 Jul 2008 09:51:20 -0400
Local: Thurs, Jul 10 2008 9:51 am
Subject: Re: [oauth-extensions] Re: API failure handling

So while thinking about how to use OAuth for Javascript Consumers, one thing
I realized is that there is no way for the Javascript Consumers (even Flash
Apps have the same problem) running inside browsers to read the HTTP headers
in the response when the HTTP status code is not 200.

But on the other hand since we want to make use of the www-authenticate
header when denying access with a 401 unauthorized HTTP response, may be we
need to define another input parameter that indicates how the consumer wants
to get the errors back. (for ex. return_error_in_response_body=1).

Thoughts ?

This would be a stopper for us because we need to support Javascript
consumers for some of our AOL Open Services.

thanks
Praveen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Blaine Cook  
View profile  
 More options Jul 10 2008, 12:38 pm
From: "Blaine Cook" <rom...@gmail.com>
Date: Thu, 10 Jul 2008 09:38:57 -0700
Local: Thurs, Jul 10 2008 12:38 pm
Subject: Re: [oauth-extensions] Re: API failure handling

My understanding is that the error will always be returned in the body.

On Thu, Jul 10, 2008 at 6:51 AM, Praveen Alavilli <ppalavi...@gmail.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Allen Tom  
View profile  
 More options Jul 10 2008, 1:57 pm
From: Allen Tom <a...@yahoo-inc.com>
Date: Thu, 10 Jul 2008 10:57:26 -0700
Local: Thurs, Jul 10 2008 1:57 pm
Subject: Re: [oauth-extensions] Re: API failure handling

Doesn't that mean that browser based JS consumers will require that the
response be in JSON?

Also, how do browser based JS consumers protect their Consumer Secret?

Allen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Blaine Cook  
View profile  
 More options Jul 10 2008, 2:12 pm
From: "Blaine Cook" <rom...@gmail.com>
Date: Thu, 10 Jul 2008 11:12:03 -0700
Local: Thurs, Jul 10 2008 2:12 pm
Subject: Re: [oauth-extensions] Re: API failure handling

On Thu, Jul 10, 2008 at 10:57 AM, Allen Tom <a...@yahoo-inc.com> wrote:
>  Doesn't that mean that browser based JS consumers will require that the
> response be in JSON?

I don't see why that would be a requirement. JSON is useful if you want to
eval() the response into JavaScript variables, but you can also parse
responses without any problem.

Also, how do browser based JS consumers protect their Consumer Secret?


They don't, but that's fine. SPs should treat JS consumer keys / secrets
with roughly the same trust metrics as user-agent strings.

b.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Praveen Alavilli  
View profile  
 More options Jul 10 2008, 2:22 pm
From: "Praveen Alavilli" <ppalavi...@gmail.com>
Date: Thu, 10 Jul 2008 14:22:26 -0400
Local: Thurs, Jul 10 2008 2:22 pm
Subject: Re: [oauth-extensions] Re: API failure handling

Yes - in fact custom response formats (json,xml,yaml, php, amf0/3, etc.)
might be a useful feature too.

I don't think the JS consumers would even have a Consumer Secret. Probably
the only possible option is to use the referer provided by the browser to
make sure the token and token_secret are used from the same web site for
which they are originally granted. The SP can also use a cookie if it wants
to make sure the token and secret are used from the same browser instance.
But again the security for such consumers is so low that the SP should
anyway restrict the kind of access allowed for them.

- Praveen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Panzer  
View profile  
 More options Jul 11 2008, 1:41 am
From: John Panzer <jpan...@acm.org>
Date: Thu, 10 Jul 2008 22:41:09 -0700
Local: Fri, Jul 11 2008 1:41 am
Subject: Re: [oauth-extensions] Re: API failure handling
Praveen Alavilli wrote:
> So while thinking about how to use OAuth for Javascript Consumers, one
> thing I realized is that there is no way for the Javascript Consumers
> (even Flash Apps have the same problem) running inside browsers to
> read the HTTP headers in the response when the HTTP status code is not
> 200.

To clarify, are you thinking about cross-domain JSONP-based JS clients
which get nothing on a non-200 response?  Those would not be able to see
anything at all, not even a body, unless you return a 200 response.  I
think you need a slightly different protocol for dealing with JSONP.

For JS clients using XmlHttpRequest, they certainly can see response
headers: http://www.w3schools.com/dom/met_http_getresponseheader.asp.

Flash is another (complicated and changing) story; I'm not sure what the
latest capabilities are but there certainly are odd limitations.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Praveen Alavilli  
View profile  
 More options Jul 11 2008, 7:29 am
From: "Praveen Alavilli" <ppalavi...@gmail.com>
Date: Fri, 11 Jul 2008 07:29:02 -0400
Local: Fri, Jul 11 2008 7:29 am
Subject: Re: [oauth-extensions] Re: API failure handling

On Fri, Jul 11, 2008 at 1:41 AM, John Panzer <jpan...@acm.org> wrote:

> Praveen Alavilli wrote:
> > So while thinking about how to use OAuth for Javascript Consumers, one
> > thing I realized is that there is no way for the Javascript Consumers
> > (even Flash Apps have the same problem) running inside browsers to
> > read the HTTP headers in the response when the HTTP status code is not
> > 200.
> To clarify, are you thinking about cross-domain JSONP-based JS clients
> which get nothing on a non-200 response?  Those would not be able to see
> anything at all, not even a body, unless you return a 200 response.  I
> think you need a slightly different protocol for dealing with JSONP.

yes (a most common usecase for standalone gadgets - not container based like
iGoogle that has an OAuth proxy).
When you say slightly different protocol for dealing with JSONP, it's
nothing more than adding couple new request parameters (one for indicating
it needs errors in response body, format of the response -
json/php/amf0/amf3/yaml and the other the jsonp callback). Everything else
remains the same (no change to the Core spec). Am I missing anything that we
need to consider ?

> For JS clients using XmlHttpRequest, they certainly can see response
> headers: http://www.w3schools.com/dom/met_http_getresponseheader.asp.

> Flash is another (complicated and changing) story; I'm not sure what the
> latest capabilities are but there certainly are odd limitations.

Yup - they can't read any headers or response body when the response code is
not 200.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Allen Tom  
View profile  
 More options Jul 11 2008, 2:35 pm
From: Allen Tom <a...@yahoo-inc.com>
Date: Fri, 11 Jul 2008 11:35:46 -0700
Local: Fri, Jul 11 2008 2:35 pm
Subject: Re: [oauth-extensions] Re: API failure handling

Is there a recommended way for Flash and cross-domain JSONP (script tag)
consumers to make 2 or 3 legged OAuth requests?

Specifically, I'm interested in the case where the Consumer was already
authorized as if it were a server based web application, but then runs
in the browser as a JS/Flash type application that circumvents the XHR
same-host restriction by either writing cross-domain script tags
(javascript) or using XHR with crossdomain.xml (Flash).

Is there a recommended way for these hybrid server/browser consumers to
natively call OAuth without leaking their secrets? Is this the scenario
that John Kristian's Accessor Secret extension is supposed to solve? At
the OAuth summit, there was mention of an Open Social Security Token
that apparently a transient credential that is issued to the browser
when the JS is loaded which maps to an Access Token.

Allen


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Kristian  
View profile  
 More options Jul 12 2008, 5:31 pm
From: John Kristian <jkrist...@netflix.com>
Date: Sat, 12 Jul 2008 14:31:07 -0700 (PDT)
Local: Sat, Jul 12 2008 5:31 pm
Subject: Re: API failure handling
Yes, the Accessor Secret extension is aimed squarely at the hybrid
server/browser use case.
http://oauth.pbwiki.com/AccessorSecret
http://groups.google.com/group/oauth/browse_thread/thread/3a8797054ed...

On Jul 11, 11:35 am, Allen Tom <a...@yahoo-inc.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Praveen Alavilli  
View profile  
 More options Jul 12 2008, 7:24 pm
From: "Praveen Alavilli" <ppalavi...@gmail.com>
Date: Sat, 12 Jul 2008 19:24:49 -0400
Local: Sat, Jul 12 2008 7:24 pm
Subject: Re: [oauth-extensions] Re: API failure handling

I am not sure how Accessor secret would help here. We are not just talking
about JS consumers that have trusted server side components (the basic
requirement of the Accessor secret extension) - we are talking about any
simple JS Consumers (typically widgets that can be inserted on any web site)
that do not have a server side component.
Ex. http://dev.aol.com/aim/tutorials/add_blist_widget or even a Yahoo widget
or a Mac Dashboard widget - that are all self contained. They don't need
access to their own servers before acceesing user data from some where else.

That said I am not sure even if the Accessor Secret would really buy
anything given that it's just pushing the problem from one place to other.
Instead of SP now the Trusted server needs to make sure it exposes the
access token, secret and accesor secret to it's own legitimate untrusted
consumers. In your example in the old email thread even if there is an
accessor secret, voyeur.example.org can make a server side call to the
trusted component running on printer.example.com to obtain it's access
token/secret and accessor secret right - unless printer.example.com is some
how making sure the request is coming from it's own consumer (by checking
the referer). And the problem with flash apps is that the referer header is
not even available.

The security bar is so low for JS consumers that I don't think there can be
anything done expect for restricting the access (scope, time, resources,
etc.) and enforcing strict rate limits on the calls with potential use of
some human check challenge methods like Captcha.

- Praveen

On Sat, Jul 12, 2008 at 5:31 PM, John Kristian <jkrist...@netflix.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Kristian  
View profile  
 More options Jul 14 2008, 12:45 pm
From: John Kristian <jkrist...@netflix.com>
Date: Mon, 14 Jul 2008 09:45:13 -0700 (PDT)
Local: Mon, Jul 14 2008 12:45 pm
Subject: Re: API failure handling
Let's move to another discussion, perhaps
http://groups.google.com/group/oauth-extensions/browse_thread/thread/...
or
http://groups.google.com/group/oauth-extensions/browse_thread/thread/...
This discussion is about API failure handling.

On Jul 12, 4:24 pm, "Praveen Alavilli" <ppalavi...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George Fletcher  
View profile  
 More options Jul 14 2008, 5:23 pm
From: George Fletcher <gffle...@aol.com>
Date: Mon, 14 Jul 2008 17:23:40 -0400
Local: Mon, Jul 14 2008 5:23 pm
Subject: Re: [oauth-extensions] Re: API failure handling
John Panzer wrote:
> Praveen Alavilli wrote:

>> So while thinking about how to use OAuth for Javascript Consumers, one
>> thing I realized is that there is no way for the Javascript Consumers
>> (even Flash Apps have the same problem) running inside browsers to
>> read the HTTP headers in the response when the HTTP status code is not
>> 200.

> To clarify, are you thinking about cross-domain JSONP-based JS clients
> which get nothing on a non-200 response?  Those would not be able to see
> anything at all, not even a body, unless you return a 200 response.  I
> think you need a slightly different protocol for dealing with JSONP.

Do we really want another protocol to deal with client's invoking
identity based web services because of the way they can (or can't)
process the transport layer? In the current case of HTTP, OAuth is using
the transport layer to return application level errors. It mixes
application level errors with transport errors.

I really like Praveen's idea about an extension for supporting
environments that can't process transport level errors. As he suggested,
there just needs to be a couple of extension parameters and the existing
specification will work fine.
    xoauth_error_in_body=1 -- if present or set to 1, this parameter
means that the HTTP response code should be 200 and a http_code response
parameter should be returned. Note that if a special header is being
returned to signify authorization required, that header can be included
in the body as well
    xoauth_response_format={json,xml,amf3,...} -- specifies the desired
format of the response. If the SP doesn't support this format it should
just return the data with the appropriate Content-Type value
    xoauth_jsonp_callback=... -- this parameter is unique to JSON and
specifies the browser js function to call

It doesn't seem like the processing rules for dealing with these
parameters are that complicated. They would be optional and it's the
client that's triggering them. So, if the SP doesn't support a
parameter, it can just ignore it.

Thanks,
George


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John Kristian  
View profile  
 More options Jul 15 2008, 12:27 pm
From: John Kristian <jkrist...@netflix.com>
Date: Tue, 15 Jul 2008 09:27:58 -0700 (PDT)
Local: Tues, Jul 15 2008 12:27 pm
Subject: Re: API failure handling
In addition to JSON, XML etc., let's support the OAuth core format; I
mean percent encoded name value pairs.  To encourage interoperability,
let's require support for at least this format, or some extremely
simple format.  OAuth is more apt to be widely adopted if it can be
implemented with simple software.  An XML parser isn't really simple.

On Jul 14, 2:23 pm, George Fletcher <gffle...@aol.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph A Holsten  
View profile  
 More options Jul 16 2008, 3:57 am
From: Joseph A Holsten <jos...@josephholsten.com>
Date: Wed, 16 Jul 2008 02:57:11 -0500
Local: Wed, Jul 16 2008 3:57 am
Subject: Re: [oauth-extensions] Re: API failure handling

Hardly. Authentication & authorization are totally within the scope  
of HTTP. There is precedent and oauth should be scoped to mirror  
hoyle for those existing auth protocols. Saying that JS handling of  
oauth is broken is akin to saying JS handling of HTTP-Digest auth is  
broken.

Asserting that oauth is an application level protocol is erroneous.  
Resource access is application level. This isn't a SOAP request  
encapsulating a SAML assertion describing a failed SQL transaction.  
It's an HTTP auth protocol.

I'm not saying this isn't a legitimate problem. But we need to accept  
that this is javascript's fault, and create an encapsulation  
protocol.  I guess this wouldn't really be better than  
xoauth_error_in_body, xoauth_response_format=json &  
xoauth_jsonp_callback params. So the important thing is that this  
"solution" is always called a hack, no better than the tantek box  
model hack or other frustrating/required workarounds.

http:// Joseph Holsten.com


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
George Fletcher  
View profile  
 More options Jul 17 2008, 8:39 am
From: George Fletcher <gffle...@aol.com>
Date: Thu, 17 Jul 2008 08:39:07 -0400
Local: Thurs, Jul 17 2008 8:39 am
Subject: Re: [oauth-extensions] Re: API failure handling
Good points.

Joseph A Holsten wrote:

> Hardly. Authentication & authorization are totally within the scope of
> HTTP. There is precedent and oauth should be scoped to mirror hoyle
> for those existing auth protocols. Saying that JS handling of oauth is
> broken is akin to saying JS handling of HTTP-Digest auth is broken.

Fair enough; especially when modeled in a RESTful way. However, there
are times when http-rpc makes sense and OAuth in this case is more of a
"framework" layer (like WS-Security in the SOAP <Header>). If OAuth is
being treated as a framework that the application layer is building on
top of, then to me the "application space" is OAuth+Application and HTTP
is the transport. I suppose it's some what arbitrary where the
boundaries are drawn.

> Asserting that oauth is an application level protocol is erroneous.
> Resource access is application level. This isn't a SOAP
> request encapsulating a SAML assertion describing a failed SQL
> transaction. It's an HTTP auth protocol.

True. I wasn't trying to assert that OAuth is an application level
protocol, just that it is a framework for securing application level
service calls.

> I'm not saying this isn't a legitimate problem. But we need to accept
> that this is javascript's fault, and create
> an encapsulation protocol.  I guess this wouldn't really be better
> than xoauth_error_in_body, xoauth_response_format=json
> & xoauth_jsonp_callback params. So the important thing is that this
> "solution" is always called a hack, no better than the tantek box
> model hack or other frustrating/required workarounds.

Not just browser+javascript but other application environments that
restrict access to HTTP as well (e.g. flash).

> http:// Joseph Holsten.com

--
Chief Architect                   AIM:  gffletch
Identity Services                 Work: george.fletc...@corp.aol.com
AOL LLC                           Home: gffle...@aol.com
Mobile: +1-703-462-3494
Office: +1-703-265-2544           Blog: http://practicalid.blogspot.com

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google