Return 404 when unauthorised to access resources#1494
Merged
Conversation
dc91177 to
018fe3b
Compare
b40356f to
77b7fbf
Compare
tobias-urdin
previously approved these changes
Apr 10, 2026
tobias-urdin
left a comment
Contributor
There was a problem hiding this comment.
LGTM, let me know if it's good to merge
77b7fbf to
34d0960
Compare
When a user is not authorised to access a specific resource (e.g. did not create the resource, or not part of the project that owns the resource, or the project that created the resource), they should not be able to enumerate the resource in any way. To prevent such users from inferring the existence of resources they should not have access to, change the policy enforcement for `get resource` such that it returns `404 Not Found` instead of `403 Forbidden` in these cases.
34d0960 to
6f2cf1a
Compare
rafaelweingartner
approved these changes
May 7, 2026
Contributor
Author
|
Project the resource is located in: Resource accessed by an admin: Accessed by a normal user inside the project: Access denied for a normal user outside the project (before): Access denied for a normal user outside the project (after): Debug logs: Note that the policy in our deployment does not allow anyone except admins and users part of the project to access resources. Creators are not allowed. |
Contributor
Author
|
@tobias-urdin Sorry for the delay, I'm satisfied this is ready to go. |
tobias-urdin
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a user is not authorised to access a specific resource (e.g. did not create the resource, or not part of the project that owns the resource, or the project that created the resource), they should not be able to enumerate the resource in any way.
To prevent such users from inferring the existence of resources they should not have access to, change the policy enforcement for
get resourcesuch that it returns404 Not Foundinstead of403 Forbiddenin these cases.