Repository navigation
feat(auth): add auth command and credential flags - #114
Merged
Merged
Conversation
edenreich
force-pushed
the
feat/issue-4-20260914-2039
branch
from
September 16, 2026 15:23
535e75f to
49515ea
Compare
`a2a auth` now verifies a credential the way the A2A spec describes it: the token is sent on an authenticated request (tasks/list) and a 401 means rejection, while any JSON-RPC error proves the request was dispatched. The extended card is fetched only when the public card advertises it, so the command works against agents without one. The example gains an `auth` compose profile with Keycloak (service-account client, client credentials grant, pinned KC_HOSTNAME) and an auth-enabled mock agent that needs only the issuer and client ID, mirroring the gateway's auth-keycloak example.
inference-gateway-releaser Bot
added a commit
that referenced
this pull request
Oct 3, 2026
## [0.11.0](v0.10.0...v0.11.0) (2026-10-03) ### ✨ Features * **auth:** add auth command and credential flags ([#114](#114)) ([b40e02a](b40e02a)) ### ♻️ Improvements * adopt A2A v1.0.1 method names via adk v0.31.0 ([#133](#133)) ([18f5323](18f5323)) ### 👷 CI * **claude:** centralize claude.yml via reusable workflow ([#123](#123)) ([c64f10f](c64f10f)) * **claude:** centralize claude.yml via reusable workflow ([#126](#126)) ([d2c0b71](d2c0b71)) ### 📚 Documentation * **agents:** refresh AGENTS.md for current code layout ([#118](#118)) ([efee952](efee952)) ### 🔧 Miscellaneous * **deps:** bump claude-code 2.1.245 -> 2.1.266 ([#112](#112)) ([2c185f0](2c185f0)) * **deps:** bump claude-code 2.1.266 -> 2.1.278 ([#121](#121)) ([8a66dea](8a66dea)) * **deps:** bump claude-code 2.1.278 -> 2.1.280 ([#124](#124)) ([de903b9](de903b9)) * **deps:** bump claude-code 2.1.280 -> 2.1.283 ([#127](#127)) ([9fc5ace](9fc5ace)) * **deps:** bump claude-code 2.1.283 -> 2.1.285 ([#131](#131)) ([b2b57c2](b2b57c2)) * **deps:** bump infer CLI v0.183.0 -> v0.192.0 ([#113](#113)) ([58338f7](58338f7)) * **deps:** bump infer CLI v0.192.0 -> v0.205.3 ([#122](#122)) ([dcc41b7](dcc41b7)) * **deps:** bump infer CLI v0.205.3 -> v0.208.0 ([#125](#125)) ([921b772](921b772)) * **deps:** bump infer CLI v0.208.0 -> v0.218.0 ([#128](#128)) ([b1dbfed](b1dbfed)) * **deps:** bump infer CLI v0.218.0 -> v0.221.1 ([#130](#130)) ([775c18c](775c18c)) * **lint:** enforce Go import grouping and named imports with gci and importas ([#117](#117)) ([ca24b08](ca24b08)), closes [#116](#116) ### 🔨 Miscellaneous * **deps:** bump docker/setup-buildx-action in the github-actions group ([#120](#120)) ([2c42a52](2c42a52)) * **deps:** bump github.com/inference-gateway/adk in the gomod group ([#115](#115)) ([479f614](479f614)) * **deps:** bump github.com/inference-gateway/adk in the gomod group ([#119](#119)) ([e8bf20c](e8bf20c)) * **deps:** bump github.com/inference-gateway/adk in the gomod group ([#129](#129)) ([d1b7019](d1b7019))
Contributor
|
🎉 This PR is included in version 0.11.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
a2a auth <token>plus the global--token/--auth-headerflags so every command can talk to an auth-enabled A2A server.--token/--auth-headerare viper-bound persistent flags;initA2AClient()injects the credential intoclient.Config.HeadersviaauthHeader()(Bearerprefix only for theAuthorizationheader), sotasks *,interactiveandagent-cardinherit it.a2a config set token ...and theTOKENenv var work for free.a2a auth <token>verifies a credential the way spec 7.3/7.4 describe it: fetch the public card, send one authenticated request (tasks/list), treat a401as rejection and any JSON-RPC error as "dispatched, therefore accepted". When the card advertisessupportsExtendedAgentCardthe authenticated extended card is fetched and printed too. Output goes throughprintFormatted, non-zero exit on failure.handleA2AErrormaps-32004,-32007and HTTP401to actionable messages.example/gains anauthcompose profile: Keycloak with a service-account client (client credentials grant, access-token audience mapper, pinnedKC_HOSTNAME) and an auth-enabled mock agent configured with only the issuer and client ID, mirroring the gateway'sauth-keycloakexample.example/README.md,AGENTS.mdandCLAUDE.mddocument the command, the flags, how to obtain a token out of band and the example.Depends on
404on/a2awhen it failed). The example needs amock-agentimage built with that ADK release; until thendocker compose --profile auth upshows the old behaviour.Tests
task testgreen (cli/auth_test.go: happy path, no extended card,401on the probe,-32004/-32007/401on the extended card RPC, header composition).mock-agentpinned to the ADK branch:Closes #4