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

Add 403 Forbidden to STANDARD_ERRORS #1362

Merged
merged 2 commits into from
Mar 14, 2020
Merged

Conversation

pedro2555
Copy link
Contributor

This isn't actually an error the Eve Framework will ever raise. As far
as I could tell.

However, separation between authentication and authorization is a must
even for less complex applicatons. 403 is the most adequate response a
server can provide to client whose authentication was accepted, yet for
some reason or another the server will not comply with the request.

The Eve Framework documentation suggests the usage of 403 in, at least
two instances:

This isn't actually an error the Eve Framework will ever raise. As far
as I could tell.

However, separation between authentication and authorization is a must
even for less complex applicatons. 403 is the most adequate response a
server can provide to client whose authentication was accepted, yet for
some reason or another the server will not comply with the request.

The Eve Framework documentation suggests the usage of 403 in, at least
two instances:

 * `abort(403)` in: https://docs.python-eve.org/en/stable/features.html#database-event-hooks
 * The actual documentation for the `STANDARD_ERRORS` config variable,
describes 403 as a supported code, in: https://docs.python-eve.org/en/stable/config.html#global-configuration
Copy link
Contributor Author

@pedro2555 pedro2555 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one other possible change is to actually include all error codes defined in RFC7231 section 6.1 or the official registry https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml

@nicolaiarocci nicolaiarocci added this to the 1.1.1 milestone Mar 2, 2020
@pedro2555 pedro2555 closed this Mar 12, 2020
@pedro2555 pedro2555 reopened this Mar 12, 2020
nicolaiarocci added a commit that referenced this pull request Mar 14, 2020
@nicolaiarocci nicolaiarocci merged commit ab21f0c into pyeve:master Mar 14, 2020
@nicolaiarocci
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants