Skip to content

feat: add gateway tokenreview rbac initializer#592

Open
philtk79 wants to merge 1 commit into
mainfrom
feat/add-gateway-tokenreview-rbac-initializer
Open

feat: add gateway tokenreview rbac initializer#592
philtk79 wants to merge 1 commit into
mainfrom
feat/add-gateway-tokenreview-rbac-initializer

Conversation

@philtk79
Copy link
Copy Markdown

Summary

This adds the RBAC required for kubernetes-graphql-gateway to validate user bearer tokens with a scoped provider kubeconfig.
The new TokenReviewRBAC subroutine creates the required ClusterRole and ClusterRoleBindings in org/account workspaces, binding the gateway home workspace identity group to tokenreviews:create and system:kcp:workspace:access.

Test Plan

  • Added unit tests for org, account, nested account, parent root:orgs, missing annotation, and retry behavior.
  • Verified on local Kind that real JWT TokenReview succeeds.
  • Verified GraphQL against root:orgs:<org>:<account> returns HTTP 200 after the gateway routing fix is deployed.

@philtk79 philtk79 requested review from a team as code owners May 27, 2026 13:51
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant