-
Notifications
You must be signed in to change notification settings - Fork 42
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
Disambiguate 403 Forbidden #218
Comments
|
ISTM that the phrase "authorize it" in the first sentence of 6.5.3 is the root of the issue. I note that 2616 used "fulfill it" instead; we should dig around and see if that was an intentional change. |
|
I agree "authorize it" is the root issue, but think it's exacerbated by the following paragraph. It would be good to clarify the entire section to make it obvious that the presence of an |
|
Discussed in Montreal; ok to change. |
|
The change from “authorize” to “fulfill” helps to resolve the ambiguity, although I would like to see a
|
|
I don't think a "MAY" helps here. The current text is:
That's a statement of fact. If the credentials would have been sufficient, there wouldn't be an error. (It does not necessarily imply that things would have worked with different credentials). |
|
I think that’s exactly what the current text implies: That sufficient credentials would have lead to a successful request, regardless of the state of the resource. If we take the example from RFC 7807, there is nothing that a change of credentials can do to make the request succeed — the credit is out regardless of the authorisation. |
|
Question: this change makes 429 a specialization of 403, right? |
|
But that proposed "MAY" isn't permissive. This is a statement, not necessarily of fact, but of one likely possibility. Perhaps "the server considers" => "the server might consider" |
In its current wording, I interpret RFC 7231 §6.5.3 to allow
403 Forbiddento be used in the following two situations:This ambiguity is established in the following paragraph:
The ambiguity is somewhat lifted (but not entirely) by the last sentence:
However, I believe the ambiguity exists and causes a lot of developers to believe that
403 Forbiddenis only applicable to authorization errors. I think the wording in the previous paragraph:…the example given in RFC 7807:
…and the wording in RFC 7807 §4:
…as well as existing practice establishes that
403 Forbiddenis the correct status code to respond with when the requested operation is not allowed in the current state of the application (use-case 1 above), regardless of theAuthorizationheader provided.Introducing the ambiguity of
403only being applicable to the provided authorization when authorization is available makes the status code harder to reason about and therefore harder to use in practice. Would it be possible to remove this ambiguity somehow? Here's some suggested wording:The text was updated successfully, but these errors were encountered: