Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong error code returned from protected resource #164

Closed
jricher opened this issue Jul 15, 2015 · 4 comments
Closed

Wrong error code returned from protected resource #164

jricher opened this issue Jul 15, 2015 · 4 comments
Labels
core Related to (original UMA1) core spec scope; may use obsolete language V1.0.1
Milestone

Comments

@jricher
Copy link

jricher commented Jul 15, 2015

The protected resource is directed to return a 403 code when no token is presented, but this should be a 401 code as the client is immediately directed at what to do to gain access. However, see #163 for notes on handling other error codes.

@xmlgrrl
Copy link

xmlgrrl commented Jul 20, 2015

For reference: This appears in Core Sec 3.1.1 (https://docs.kantarainitiative.org/uma/rec-uma-core.html#rfc.section.3.1.1): "It SHOULD respond with the HTTP 403 (Forbidden) status code, providing the authorization server's URI in an "as_uri" property in the header, along with the just-received permission ticket in the body in a JSON-encoded "ticket" property. Responses that use any code other than 403 are undefined by this specification; any common or best practices for returning other status codes will be documented in the [UMA-Impl]."

@xmlgrrl
Copy link

xmlgrrl commented Jul 20, 2015

For background: A long time ago, we tried to align with OAuth 1, and then OAuth 2, as best we could. But our designs diverged significantly enough that we stepped back and went our own way. After using a mix of 401 and 403, ultimately we unified on 403.

And FWIW: I found the following thread potentially helpful:

http://stackoverflow.com/questions/3297048/403-forbidden-vs-401-unauthorized-http-responses

@jricher
Copy link
Author

jricher commented Jul 21, 2015

From the stack overflow response linked above, this is very clearly a 401: it's a temporary condition that the RS is telling the client how to fix.

@xmlgrrl xmlgrrl added the core Related to (original UMA1) core spec scope; may use obsolete language label Jul 22, 2015
@xmlgrrl xmlgrrl added this to the V1.0.1 milestone Jul 31, 2015
@xmlgrrl xmlgrrl added the V2.0 label Aug 15, 2015
xmlgrrl added a commit that referenced this issue Aug 20, 2015
The WG reviewed proposed wording and decided on changes to several
stretches of text from the last week’s worth of issue closures. Text
related to #163 is just newly proposed, and affects #164 as well.
@xmlgrrl
Copy link

xmlgrrl commented Aug 28, 2015

As discussed on UMA telecon 2015-08-27: The decision taken on #163 / #168 renders this issue moot, so it can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Related to (original UMA1) core spec scope; may use obsolete language V1.0.1
Projects
None yet
Development

No branches or pull requests

2 participants