feat: add gateway tokenreview rbac initializer#592
Open
philtk79 wants to merge 1 commit into
Open
Conversation
Add a TokenReviewRBAC subroutine that grants the GraphQL gateway scoped identity permission to perform TokenReview in org and account workspaces. The subroutine resolves the gateway home logical cluster ID and binds system:cluster:<id> to both tokenreviews:create and system:kcp:workspace:access in target workspaces, including account sub-workspaces and parent root:orgs. Signed-off-by: Till <253026766+philtk79@users.noreply.github.com>
13a7c21 to
ba0a1d8
Compare
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.
Summary
This adds the RBAC required for
kubernetes-graphql-gatewayto validate user bearer tokens with a scoped provider kubeconfig.The new
TokenReviewRBACsubroutine creates the required ClusterRole and ClusterRoleBindings in org/account workspaces, binding the gateway home workspace identity group totokenreviews:createandsystem:kcp:workspace:access.Test Plan
root:orgs, missing annotation, and retry behavior.root:orgs:<org>:<account>returns HTTP 200 after the gateway routing fix is deployed.