Feat: Role-based scope gating for github-issue demo#410
Closed
omerboehm wants to merge 3 commits into
Closed
Conversation
Signed-off-by: Omer Boehm <omerboehm@gmail.com>
omerboehm
force-pushed
the
fix/github-issue-demo
branch
from
May 14, 2026 15:19
83cdd06 to
be45721
Compare
…ities Signed-off-by: Omer Boehm <omerboehm@gmail.com>
Member
|
@omerboehm thanks for working on this. This is something we need, not only just for the github-issue demo but as a general security layer. We have a call next week, and we can discuss this then. |
Contributor
|
relates to rossoctl/rossoctl#931 |
This was referenced Jun 8, 2026
Contributor
|
@omerboehm, @huang195 |
Contributor
Author
|
It’s not ready for merge yet , I am working on it |
Contributor
Author
|
replaced with #619 |
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.
Adds per-user access differentiation to the
github-issuedemo by movingscope gating from the AuthProxy into Keycloak, using realm roles, client
roles, and a declarative policy mapping.
authbridge/demos/github-issue/config.yaml— declares clients,client roles, realm roles (
regular,privileged), audience targets,and demo users (
alice→ regular,bob→ privileged).authbridge/demos/github-issue/policy.yaml— maps realm roles tothe client roles each user is allowed to assume.
authbridge/demos/github-issue/setup_keycloak.py— rewritten to driveKeycloak setup from the two config files above, creating realm roles,
client roles, role mappings, and client-scope/role bindings so scopes
are only issued to users whose roles authorize them.
authbridge/demos/github-issue/k8s/configmaps.yaml— reducestoken_scopesfrom"openid github-tool-aud github-full-access"to"openid". Keycloak now decides which scopes land in the exchangedtoken based on the requesting user's roles.
authbridge/demos/github-issue/demo-manual.md— updated walkthroughto reflect the new ordering and the role/scope model.
Net effect: with the same proxy configuration,
alicereceives a tokenlimited to
github-tool-audwhilebobadditionally receivesgithub-full-access— without any change to the go-processor.Related issue(s)
This is an alternative approach to the problem described in #139
(closed as not-planned). Instead of implementing
SCOPE_FORWARDINGinthe go-processor, scope decisions are centralized in the IdP via
Keycloak roles and client-scope bindings. See the discussion on the
issue for the trade-off between the two approaches.
Fixes #139
(Optional) Testing Instructions
authbridge/demos/github-issue/demo-manual.mdfrom a cleancluster through Step 7 (Configure Keycloak), running: