Skip to content

feat(atenet): tell the actor why a credential was refused - #112

Merged
QuentinBisson merged 1 commit into
giantswarmfrom
feat/credential-provider-errors
Oct 2, 2026
Merged

QuentinBisson merged 1 commit into
giantswarmfrom
feat/credential-provider-errors

Conversation

@QuentinBisson

@QuentinBisson QuentinBisson commented Oct 2, 2026 •

Copy link
Copy Markdown

Problem

A credential the egress gateway cannot fetch fails the request closed, but every refusal reached the actor as egress denied, and a provider bug answered 403 like a refusal. kagent's caller credential provider refuses for reasons a person can act on (no turn running, no grant at the token broker), and the coding agent never sees them.

Change

The FetchSecret contract in credprovider.proto now specifies what the actor sees, and atenet applies it: NotFound, PermissionDenied, FailedPrecondition and Unauthenticated deny as 403 with the provider's message (escaped, cut to 512 bytes, printed by git as remote: lines), Unavailable, DeadlineExceeded and ResourceExhausted as 503, anything else and an unusable secret as 502. No body carries transport detail, and no answer becomes 404 or 400. The 502 departs from upstream's 403 for unexpected answers. The agentgateway dataplane gets the same table in giantswarm/agentgateway-upstream#39. Towards giantswarm/giantswarm#38056.

A credential the egress gateway cannot fetch fails the request closed. Every
refusal reached the actor as "egress denied", and a provider bug answered
403 like a refusal, which an agent reads as a permission problem.

The FetchSecret contract now specifies what the actor sees, as a text/plain
body git prints as "remote:" lines: NotFound, PermissionDenied,
FailedPrecondition and Unauthenticated deny as 403 with the provider's
message, escaped and cut to 512 bytes; Unavailable, DeadlineExceeded and
ResourceExhausted fail as a retryable 503; anything else, and an empty or
unusable secret, is a 502. Every body names the provider and nothing of the
transport; the full error stays in the gateway's log. No answer becomes 404
or 400, which clients read as a missing destination or a malformed request.

Signed-off-by: QuentinBisson <quentin@giantswarm.io>
@QuentinBisson
QuentinBisson force-pushed the feat/credential-provider-errors branch from 5ef0ce8 to 0925bae Compare October 2, 2026 10:33
@QuentinBisson
QuentinBisson marked this pull request as ready for review October 2, 2026 13:04
@QuentinBisson
QuentinBisson requested a review from a team as a code owner October 2, 2026 13:04
@QuentinBisson
QuentinBisson merged commit a347c6f into giantswarm Oct 2, 2026
14 checks passed
@QuentinBisson
QuentinBisson deleted the feat/credential-provider-errors branch October 2, 2026 13:04
@teemow

teemow commented Oct 5, 2026

Copy link
Copy Markdown
Member

@QuentinBisson this change is in v1.4.0-rc.7, which I'm about to promote to 1.4.0 stable: an agent run on a kind lab with kagent 1.3.0-rc.15 boots and serves on rc.7, but that run doesn't exercise a refused credential. Is #112 ready to go out as stable, or should it wait? (Written by Timo's agent.)

@QuentinBisson

Copy link
Copy Markdown
Author

#112 is fine for stable, but please do not promote rc.7. The re-pin (#119, kagent-dev/substrate v0.3.0-alpha3) carries it and everything on the branch and goes out as 1.4.0 itself: the force-push cuts 1.4.0-rc.8, stable follows after CI. Nothing stable pins rc.7, the fleet is on the 1.3 range, and kagent's one 1.3.0 tag (#159) runs on that 1.4.0.

@QuentinBisson

Copy link
Copy Markdown
Author

@teemow Both tags exist: Substrate 1.4.0 on e27ae95 (the re-pin, promoted from rc.8) carries #112, and kagent 1.3.0 on f7bf3dafd and 1.3.1 on 1b166604d run on it.

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.

2 participants