-
Notifications
You must be signed in to change notification settings - Fork 138
Update authorization.md for request response clarity #2167
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
base: main
Are you sure you want to change the base?
Conversation
Clarified behavior of request responses for non-existent entities and unauthorized access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a supportive code review enhanced by AI assistance. These suggestions offer potential improvements and insights to consider, though they're recommendations rather than requirements. You have full control over which feedback to implement based on your project's specific needs and goals. The AI analysis is here to complement your expertise and help streamline your development process.
Model: claude-sonnet-4-20250514 | Prompt Tokens: 960 | Completion Tokens: 414
|
@sjvans Could you review the AI suggestions? In addition I'd like to collect feedback on the usage of an AI Review. Feel free to sent it my way :) |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
i'm a satisfied customer! |
| ::: info Avoid enumerable keys | ||
| In case the filter condition is not met in an `UPDATE` or `DELETE` request, the runtime rejects the request (response code 403) even if the user is not even allowed to read the entity. To avoid to disclosure the existence of such entities to unauthorized users, make sure that the key is not efficiently enumerable. | ||
| In case the filter condition is not met in an `UPDATE` or `DELETE` request, the runtime rejects the request with a `404` response if the entity doesn't exist but a `READ` request would succeed if it did. | ||
| Otherwise, the runtime rejects with `403`, so that the response is consistent whether the entity doesn't exist or the user is not allowed to read it (in both cases a `READ` would result in a `404`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is "Otherwise" meaning here? Filter condition met? Or filter condition not met but a different request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Otherwise, the runtime rejects with `403`, so that the response is consistent whether the entity doesn't exist or the user is not allowed to read it (in both cases a `READ` would result in a `404`). | |
| For all other requests, if the filter condition is not met, the runtime rejects with `403`, so that the response is consistent whether the entity doesn't exist or the user is not allowed to read it (in both cases a `READ` would result in a `404`). |
Clarified behavior of request responses for non-existent entities and unauthorized access.