Skip to content

Feat: Role-based scope gating for github-issue demo#410

Closed
omerboehm wants to merge 3 commits into
mainfrom
fix/github-issue-demo
Closed

Feat: Role-based scope gating for github-issue demo#410
omerboehm wants to merge 3 commits into
mainfrom
fix/github-issue-demo

Conversation

@omerboehm

Copy link
Copy Markdown
Contributor

Adds per-user access differentiation to the github-issue demo by moving
scope gating from the AuthProxy into Keycloak, using realm roles, client
roles, and a declarative policy mapping.

  • New authbridge/demos/github-issue/config.yaml — declares clients,
    client roles, realm roles (regular, privileged), audience targets,
    and demo users (alice → regular, bob → privileged).
  • New authbridge/demos/github-issue/policy.yaml — maps realm roles to
    the client roles each user is allowed to assume.
  • authbridge/demos/github-issue/setup_keycloak.py — rewritten to drive
    Keycloak 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 — reduces
    token_scopes from "openid github-tool-aud github-full-access" to
    "openid". Keycloak now decides which scopes land in the exchanged
    token based on the requesting user's roles.
  • authbridge/demos/github-issue/demo-manual.md — updated walkthrough
    to reflect the new ordering and the role/scope model.

Net effect: with the same proxy configuration, alice receives a token
limited to github-tool-aud while bob additionally receives
github-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_FORWARDING in
the 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

  1. Follow authbridge/demos/github-issue/demo-manual.md from a clean
    cluster through Step 7 (Configure Keycloak), running:
    python authbridge/demos/github-issue/setup_keycloak.py

Comment thread authbridge/demos/github-issue/setup_keycloak.py Fixed
Comment thread authbridge/demos/github-issue/setup_keycloak.py Fixed
Signed-off-by: Omer Boehm <omerboehm@gmail.com>
@omerboehm
omerboehm force-pushed the fix/github-issue-demo branch from 83cdd06 to be45721 Compare May 14, 2026 15:19
@huang195

Copy link
Copy Markdown
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.

@davidhadas

Copy link
Copy Markdown
Contributor

relates to rossoctl/rossoctl#931

@davidhadas

Copy link
Copy Markdown
Contributor

@omerboehm, @huang195
Is this ready for merge? If so, can we merge it? If not, can anyone summarize here the status and gaps?

@omerboehm

Copy link
Copy Markdown
Contributor Author

It’s not ready for merge yet , I am working on it

@omerboehm omerboehm closed this Jun 24, 2026
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Jun 24, 2026
@omerboehm

Copy link
Copy Markdown
Contributor Author

replaced with #619

@omerboehm
omerboehm deleted the fix/github-issue-demo branch June 24, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat: Add scope forwarding to go-processor for per-user access control

5 participants