fix: Correct authproxy-routes host pattern and add Keycloak scope ass…#188
Conversation
…ignment for agent client The route host pattern used a non-existent service name (github-issue-tool) instead of the actual Kubernetes service name (github-tool-mcp), preventing token exchange from matching outbound requests to the GitHub tool. Also add scope assignment to setup_keycloak.py so dynamically-registered agent clients get the required scopes for client_credentials grants: - agent audience scope as default (for inbound audience validation) - github-tool-aud and github-full-access as optional (for token exchange) Relates to rossoctl/rossoctl#882 Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Mariusz Sabath <mrsabath@gmail.com>
0e515d1 to
9aec10e
Compare
Code reviewFound 1 issue:
The PR changes the route host from The correct host pattern should likely be Evidence:
🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
|
The automated code review misread the file line references. The Kubernetes Service name is The route pattern The referenced lines 84-86 in the review actually point to the Service metadata block ( |
Summary
**.github-issue-tool**.svc.cluster.local(non-existent service name) togithub-tool-mcp(actual Kubernetes service name), so outbound token exchange matches requests to the GitHub toolsetup_keycloak.pyfor the agent's dynamically-registered client: agent audience scope as default (for inbound validation),github-tool-audandgithub-full-accessas optional (for client_credentials token exchange)These bugs were discovered while testing the passthrough-by-default outbound policy from PR #185.
Related issue(s)
Relates to rossoctl/rossoctl#882
Testing Instructions
AuthBridge/demos/github-issue/demo-ui.mdsetup_keycloak.py(now assigns scopes to the agent client automatically)configmaps.yaml(route now matchesgithub-tool-mcp)github-tool-mcp: token exchanged via client_credentials withaud: github-tool