-
Notifications
You must be signed in to change notification settings - Fork 382
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
✨ PoC: Implement user warrants #3156
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
user: user1 | ||
groups: ["group1"] | ||
extra: | ||
authentication.kcp.io/scope: cluster:logical-cluster-1 |
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.
Should this be a scopes
as it can contain multiple?
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.
yes, extra is map[string][]string
. But the keys are traditionally singular.
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.
fixed
user: user1 | ||
groups: ["group1"] | ||
extra: | ||
authorization.kcp.io/warrant: | |
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.
authorization.kcp.io/warrants
as It can the list?
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.
fixed
This warrant allows `user1` to act under the permissions of `user2` in | ||
`logical-cluster-1` if `user1` is not allowed to act as `user2` in the first place. |
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.
We talking here about local user? This is not a problem if external/oidc identity is used? What is user type here?
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.
Any user. You can use scopes to scope it down to a workspace.
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
…for the target workspace Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
@sttts: The following tests failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Summary
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