-
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
✨ Add user warrants #3156
✨ Add user warrants #3156
Conversation
00dd36e
to
ebb5114
Compare
4b188ca
to
2ca96c3
Compare
In general just a questions. looks good, |
49ead38
to
a4296e0
Compare
d2cc358
to
4c6b0ed
Compare
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
…for the target workspace Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
…nts and scoping Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
b0e31b3
to
30834fe
Compare
/retest looks like a flake to me. |
@@ -173,6 +173,7 @@ func (s *Authorization) ApplyTo(ctx context.Context, config *genericapiserver.Co | |||
if err != nil { | |||
return err | |||
} | |||
authorizer = authz.WithWarrantsAndScopes(authorizer) |
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.
For my understanding here: We are only wrapping the (optional) webhook authorizer because the RBAC-based ones (the whole chain
thing) got warrant support by amending the rule resolver in the kube fork, correct?
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.
Correct. And we don't want that external, third party authorizers have to understand scopes and warrants.
/retest |
LGTM label has been added. Git tree hash: ec0e8108e30e6e12d6320ecebdfc209511d4b631
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjudeikis 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 cancel |
TODO:
[ ] add request user warrant to initializer VW.moved to feature: add supplementary group toinitializingworkspaces
impersonation #3271Summary
Needs kcp-dev/kubernetes#145.
From Slack:
🧵 long ago @sur presented a problem (if I remember right) in our current auth model of serviceaccounts only being valid locally, and with that the inability to create workspaces through an APIExport virtual workspace. The steps are these:
system:masters
user with a fakesystem:kcp:admin
serviceaccount (S1) for L1 namedsystem:serviceaccount:default:rest
.Now assume a modified system that
The steps from above would turn into:
system:masters
user as U with a warrant for a fakesystem:kcp:admin
serviceaccount (S1) for L1 namedsystem:serviceaccount:default:rest
.By giving use permission to everybody, tThis goes through.denies access because S1 is a foreign service accountgrants access because U with warrant S1 is admin in L2.Now assume in addition that U is actually a controller serviceaccount S0 in workspace root. Step (7) would 💥 because S0 is foreign for L2. We further modify the system to authenticate serviceaccount as
system:kcp:serviceaccount:<logicalcluster>:<ns>:<name>
with a warrant forsystem:serviceaccount:<ns>:<name>
restricted to their defining logicalcluster.Now, U becomes
system:kcp:serviceaccount:root:default:controller
with warrantsystem:serviceaccount:default:controller
restricted to root. With that (4) becomessystem:kcp:serviceaccount:root:default:controller
with warrantsystem:serviceaccount:default:controller
restricted to root with warrant S1 as owner on the workspace object, to be used by initialization later.I.e. the user has two warrants. With that (7) becomes:
system:kcp:serviceaccount:root:default:controller
with the TWO warrants including S1 is admin in L2.Related issue(s)
Fixes #
Release Notes