You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 12, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 12, 2026. It is now read-only.
fix: Remove built-in identity/auth logic from agents — AuthBridge handles it #129
When agents are deployed with AuthBridge, the agent container logs show unnecessary warnings and performs redundant identity checks at startup:
SVID JWT file /opt/jwt_svid.token not found.
SVID JWT file /opt/jwt_svid.token not found.
CLIENT_SECRET file not found at /shared/secret.txt
DEBUG: AUDIENCE or CLIENT_ID not set. No audience check will be performed.
DEBUG: ISSUER env var not set. No issuer check will be performed
These messages come from the agent's built-in auth code that probes for SVID files, client secrets, and JWT validation settings. With AuthBridge, all of this is handled by the sidecars:
The agent should not need to know about identity, tokens, or auth at all.
Affected agents
a2a/git_issue_agent — confirmed
Other agents may have similar built-in auth logic (needs audit)
Proposed changes
Remove SVID/client-secret file probing from agent startup code. The agent container does not mount svid-output or use /shared/secret.txt — those are sidecar-only volumes.
Remove built-in JWT validation middleware (the JWKS_URI-based middleware). When AuthBridge is present, inbound JWT validation is done by the Envoy ext_proc before requests reach the agent. The agent's own middleware is redundant and can cause confusion (e.g., AUDIENCE or CLIENT_ID not set warnings).
Remove or make optional the JWKS_URI, ISSUER, AUDIENCE, CLIENT_ID, CLIENT_SECRET env vars from .env.ollama / .env.openai. These are AuthBridge sidecar concerns, not agent concerns.
Audit other agents (a2a/ and mcp/ directories) for similar built-in auth logic and apply the same cleanup.
When deployed with AuthBridge, the agent should start cleanly without identity-related warnings:
INFO: Started server process [17]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
Identity, authentication, and authorization are fully transparent — handled by the AuthBridge sidecars.
Additional Finding: authlib crash with Keycloak JWKS
During end-to-end testing with the kagenti realm, we discovered that the agent's built-in JWT validation middleware crashes with an AttributeError when parsing the Keycloak JWKS:
File "/app/git_issue_agent/auth.py", line 95, in authenticate
claims = jwt.decode(s=token, key=jwks, claims_options=self.claims_options)
...
File "/app/.venv/lib/python3.12/site-packages/authlib/jose/rfc7517/_cryptography_key.py", line 13, in load_pem_key
if ssh_type and raw.startswith(ssh_type):
AttributeError: 'NoneType' object has no attribute 'startswith'
The Keycloak JWKS contains two keys: an RS256 signing key and an RSA-OAEP encryption key. The authlib library cannot properly handle the encryption key, causing the crash.
Workaround: Set GITHUB_TOKEN to a dummy value (e.g., authbridge-managed) and remove JWKS_URI from the agent's environment. This bypasses the agent's internal JWT validation entirely, relying on AuthBridge for all inbound token validation.
This further reinforces the need to remove the agent's built-in auth logic when AuthBridge is present.
Activity
mrsabath commentedon Feb 27, 2026
Additional Finding: authlib crash with Keycloak JWKS
During end-to-end testing with the
kagentirealm, we discovered that the agent's built-in JWT validation middleware crashes with anAttributeErrorwhen parsing the Keycloak JWKS:The Keycloak JWKS contains two keys: an
RS256signing key and anRSA-OAEPencryption key. Theauthliblibrary cannot properly handle the encryption key, causing the crash.Workaround: Set
GITHUB_TOKENto a dummy value (e.g.,authbridge-managed) and removeJWKS_URIfrom the agent's environment. This bypasses the agent's internal JWT validation entirely, relying on AuthBridge for all inbound token validation.This further reinforces the need to remove the agent's built-in auth logic when AuthBridge is present.
fix: remove built-in identity/auth logic from agents