feat: OIDC token validation policy for portal/MCP access control#13
Merged
Conversation
Validates JWT claims from Keycloak / Red Hat SSO before allowing access to AAC compliance operations. Four roles: viewer, analyst, auditor, admin. OT frameworks require auditor+ regardless of resource type. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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
Adds
governance/oidc/oidc_token_validation.rego— a cross-cutting OIDC governance policy that validates JWT claims from Keycloak / Red Hat SSO before allowing access to AAC compliance operations.Policy:
governance.oidcEndpoint:
POST :8182/v1/data/governance/oidcInput schema:
{ "input": { "token": { "claims": { "sub": "user-uuid", "preferred_username": "jsmith", "realm_access": { "roles": ["analyst"] } } }, "resource": { "type": "oscal", "framework": "cis_rhel9", "hostname": "web-01.example.com" } } }Role model:
vieweranalystauditoradminFramework restrictions: OT/critical infrastructure frameworks (
nerc_cip,iec_62443,ami_nist_ir7628,nist_800_82) requireauditor+regardless of resource type.Why it belongs in the library
This is a cross-cutting governance concern reusable by:
Placing it in the library alongside
governance/mcp/mcp_governance.regoandgovernance/ai/keeps all access control policies in one versioned, auditable location.🤖 Generated with Claude Code