-
Notifications
You must be signed in to change notification settings - Fork 394
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
🐛 Correctly check original groups against system:masters
in scope filter
#3263
Conversation
c6fd133
to
5ea1c47
Compare
/lgtm |
LGTM label has been added. Git tree hash: 3a320cf9e326e7e14c51c2dd26e45e2d0be154ee
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold just ... checking some things. |
/retest |
On-behalf-of: SAP <[email protected]> Signed-off-by: Marvin Beckers <[email protected]>
5ea1c47
to
222d1ca
Compare
/hold cancel |
/lgtm |
LGTM label has been added. Git tree hash: c45562224102853cff8bdcb68b3b2f72d2cd0f09
|
Summary
We discovered that the
WithImpersonationScoping
filter had a flaw: It was checking the already impersonated user identity to determine whether adding a scope should be skipped forsystem:masters
impersonators. But this check needs to run against the original user identity, not the impersonated identity (since that will never includesystem:masters
).This PR stores the user identity during
WithImpersonationGatekeeper
in the request context to fetch it at a later stage inWithImpersonationScoping
.As a bonus, I discovered that the check for extra impersonation headers is not correct: It was checking the HTTP header values, but it should be checking the name/key of the header. So the list of extra impersonations was always empty. The tests didn't check this.
Related issue(s)
Fixes #
Release Notes