Repository navigation
refactor: Add agent audience and code cleanup - #64
Conversation
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
left a comment
There was a problem hiding this comment.
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
| | `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 | |
There was a problem hiding this comment.
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
Signed-off-by: Mariusz Sabath <[email protected]>
There was a problem hiding this comment.
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.
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]>
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]>
Signed-off-by: Mariusz Sabath <[email protected]>
Signed-off-by: Mariusz Sabath <[email protected]>
Description
Fixes # (issue)
Type of Change
How Has This Been Tested?
Test Configuration:
Checklist
Screenshots (if appropriate)
Additional Notes