Skip to content

feat(auth): tell UpstreamAuth which A2A call it is authorizing - #3178

Draft
codyhartsook wants to merge 1 commit into
kagent-dev:mainfrom
codyhartsook:codyhartsook/upstreamAuthMethod
Draft

codyhartsook wants to merge 1 commit into
kagent-dev:mainfrom
codyhartsook:codyhartsook/upstreamAuthMethod

Conversation

@codyhartsook

@codyhartsook codyhartsook commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

UpstreamAuth now learns which A2A call it is authorizing, so an AuthProvider can treat a message send differently from a subscribe or a cancel. Providers read auth.UpstreamCallFrom(r.Context()), which returns UpstreamCallSend, UpstreamCallSubscribe, UpstreamCallCancel or UpstreamCallUnknown. The gateway derives the value from the a2a request type, so it does not depend on method name strings. The AuthProvider interface does not change.

Related Issues

None required.

Testing

go test -race ./core/pkg/auth/ ./core/internal/a2agateway/

TestRuntimeDialerRoutesUnaryAndStreamingCalls checks the call UpstreamAuth sees for a send, a streaming send, a subscribe, a get and a cancel.

Change Type

/kind new_feature

Changelog

AuthProvider implementations can now see which A2A call UpstreamAuth is authorizing, such as a message send or a task cancel.

@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 13, 2026
@codyhartsook
codyhartsook marked this pull request as ready for review October 13, 2026 14:42
@codyhartsook
codyhartsook requested a review from a team as a code owner October 13, 2026 14:42
@codyhartsook
codyhartsook force-pushed the codyhartsook/upstreamAuthMethod branch from 3cc36fa to 72e0bb0 Compare October 13, 2026 18:20
@codyhartsook codyhartsook changed the title feat(auth): pass the outgoing a2a request to UpstreamAuth feat(auth): tell UpstreamAuth which A2A call it is authorizing Oct 13, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 13, 2026
Signed-off-by: Cody Hartsook <cody.hartsook@solo.io>
@codyhartsook
codyhartsook force-pushed the codyhartsook/upstreamAuthMethod branch from 72e0bb0 to 6bb2934 Compare October 13, 2026 18:43
@codyhartsook
codyhartsook requested review from Charlesthebird and EItanya and removed request for Charlesthebird October 13, 2026 20:40
@codyhartsook
codyhartsook marked this pull request as draft October 14, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant