Skip to content

refactor: Add agent audience and code cleanup - #64

Merged
mrsabath merged 28 commits into
rossoctl:mainfrom
mrsabath:add-authproxy-audience
Jan 13, 2026
Merged

mrsabath merged 28 commits into
rossoctl:mainfrom
mrsabath:add-authproxy-audience

Conversation

@mrsabath

@mrsabath mrsabath commented Jan 7, 2026

Copy link
Copy Markdown
Member

Description

Fixes # (issue)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test addition or update
  • CI/CD update

How Has This Been Tested?

  • Test A
  • Test B

Test Configuration:

  • Kubernetes version:
  • Toolhive webhook version:
  • OS:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Screenshots (if appropriate)

Additional Notes

@mrsabath mrsabath changed the title Add agent audience and cleanup refactor: Add agent audience and code cleanup Jan 7, 2026
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

@maia-iyer maia-iyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I think documentation should be reorganized a little - a demo doc should be separated somewhat from an overview documentation, which should come first. Open to discussion on this

Comment thread AuthBridge/README.md Resolved
Comment thread AuthBridge/README.md Outdated
| `proxy-init` | init | Sets up iptables to intercept outgoing traffic (excludes port 8080 for Keycloak) |
| `client-registration` | container | Registers workload with Keycloak using SPIFFE ID, saves credentials to `/shared/` |
| `caller` (netshoot) | container | The application making requests (has curl and jq) |
| `agent` (netshoot) | container | The agent application receiving tokens from Callers |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another reason I'm in favor of separating "overview" from "demo" is that I think there's easy potential for confusion that the agent here is part of AuthBridge - but it is not. Same as when we talk about auth-target everywhere, this has been a source of confusion for us that it sounds like it's part of AuthBridge, but is also a demo application

Comment thread AuthBridge/README.md Resolved
Signed-off-by: Mariusz Sabath <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request refactors the AuthBridge demo to introduce an "agent audience" architecture, where tokens include the Agent's SPIFFE ID as the audience, enabling the AuthProxy to exchange tokens using the same dynamically registered credentials.

Key changes include:

  • Replacing static "authproxy" client with dynamic credential loading from the auto-registered agent client
  • Adding "agent-spiffe-aud" scope as a realm default to include the Agent's SPIFFE ID in all token audiences
  • Renaming "caller" terminology to "agent" throughout the codebase to better reflect the architecture
  • Moving configuration from separate files into deployment manifests

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
AuthBridge/setup_keycloak.py Removes authproxy client creation, adds agent-spiffe-aud scope, sets hardcoded AGENT_SPIFFE_ID constant, and updates documentation
AuthBridge/k8s/authbridge-deployment.yaml Renames caller to agent, adds namespace/ServiceAccount, moves auth-proxy-config into deployment, adds CLIENT_ID_FILE/CLIENT_SECRET_FILE env vars, adds shared-data volume mount
AuthBridge/k8s/authbridge-deployment-no-spiffe.yaml Same changes as authbridge-deployment.yaml for non-SPIFFE deployment
AuthBridge/k8s/auth-proxy-config.yaml Deleted - configuration moved into deployment files
AuthBridge/demo.md New comprehensive demo guide with step-by-step instructions, testing procedures, and troubleshooting
AuthBridge/README.md Updates documentation to reflect agent architecture, updates diagrams, adds demo guide reference
AuthBridge/AuthProxy/go-processor/main.go Adds dynamic credential loading from files, implements waitForCredentials for race condition handling, adds configuration management with mutex
AuthBridge/AuthProxy/create-secret.sh Deleted - no longer needed with dynamic credentials
AuthBridge/AuthProxy/README.md Updates documentation with agent terminology and correct references
.github/spellcheck/.wordlist.txt Adds new terms (AgentPod, creds, ExtProc, proc, Proc) with minor alphabetization inconsistencies

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/spellcheck/.wordlist.txt Resolved
Comment thread AuthBridge/README.md Resolved
Comment thread AuthBridge/README.md Resolved
Comment thread AuthBridge/setup_keycloak.py Resolved
Comment thread AuthBridge/demo.md Resolved
Comment thread .github/spellcheck/.wordlist.txt Resolved
mrsabath and others added 8 commits January 8, 2026 09:46
Signed-off-by: Mariusz Sabath <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

Co-authored-by: Copilot <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

Co-authored-by: Copilot <[email protected]>
@mrsabath
mrsabath marked this pull request as ready for review January 8, 2026 15:29
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>

@maia-iyer maia-iyer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM! Thanks for the work @mrsabath !

@mrsabath
mrsabath merged commit 4df349a into rossoctl:main Jan 13, 2026
@mrsabath
mrsabath deleted the add-authproxy-audience branch January 13, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants