[v13] fix: return OpaqueAccessDenied for NotFound remote cluster errors#40683
Merged
nklaassen merged 1 commit intobranch/v13from Apr 19, 2024
Merged
[v13] fix: return OpaqueAccessDenied for NotFound remote cluster errors#40683nklaassen merged 1 commit intobranch/v13from
OpaqueAccessDenied for NotFound remote cluster errors#40683nklaassen merged 1 commit intobranch/v13from
Conversation
…errors Backport #40571 to branch/v13 This commit modifies OpaqueAccessDenied to return an identical generic NotFound error whether the input error is NotFound or AccessDenied. The commit also updates all call sites of OpaqueAccessDenied to use it in the paths where there is any error fetching the resource as well as when access is denied. It doesn't do much good to return AccessDenied errors as NotFound, if they don't match the NotFound error you would get if the resource really didn't exist. It's trivial to tell the errors apart and discover the existence of a resource you shouldn't be allowed to access. The commit attempts to mitigate that issue and properly hide the existence of resources the user should not be allowed to list. Changelog: generic "not found" errors are returned whether a remote cluster can't be found or access is denied. Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
espadolini
approved these changes
Apr 19, 2024
marcoandredinis
approved these changes
Apr 19, 2024
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.
Backport #40571 to branch/v13
This commit modifies OpaqueAccessDenied to return an identical generic NotFound error whether the input error is NotFound or AccessDenied. The commit also updates all call sites of OpaqueAccessDenied to use it in the paths where there is any error fetching the resource as well as when access is denied.
It doesn't do much good to return AccessDenied errors as NotFound, if they don't match the NotFound error you would get if the resource really didn't exist.
It's trivial to tell the errors apart and discover the existence of a resource you shouldn't be allowed to access.
The commit attempts to mitigate that issue and properly hide the existence of resources the user should not be allowed to list.
Changelog: Generic "not found" errors are returned whether a remote cluster can't be found or access is denied.