Skip to content

feat(models): Vertex AI credentials at the egress gateway through a configurable credential authority - #3259

Open
QuentinBisson wants to merge 1 commit into
kagent-dev:mainfrom
giantswarm:feat/vertex-gateway-credentials
Open

QuentinBisson wants to merge 1 commit into
kagent-dev:mainfrom
giantswarm:feat/vertex-gateway-credentials

Conversation

@QuentinBisson

@QuentinBisson QuentinBisson commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Vertex AI ModelConfigs with apiKeySecret put the service account key into the runtime, which Substrate actors can't mount and the credential compiler rejects (#2873, Vertex row of #3258).

Change

The gateway now sets the Vertex token: both Vertex providers bind Authorization: Bearer on the location's Vertex host, and the Go ADK, Python ADK and Claude Code skip their own Google auth and send a placeholder the gateway replaces. Which credential provider resolves a ModelConfig's Secret is a new controller setting, runtimeDefaults.modelCredentialAuthorities, per provider and k8s.io by default. Vertex needs a provider that mints access tokens, so a Vertex apiKeySecret that resolves to k8s.io fails compilation; the Secret then holds whatever that provider expects, typically a service account key. The gateway routes provider classes other than k8s.io with kagent-dev/substrate#90.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 18, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 18, 2026
@QuentinBisson
QuentinBisson marked this pull request as ready for review October 23, 2026 09:25
@QuentinBisson
QuentinBisson requested review from a team and supreme-gg-gg as code owners October 23, 2026 09:25
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Oct 23, 2026
@QuentinBisson
QuentinBisson force-pushed the feat/vertex-gateway-credentials branch from ee15113 to 2b0eb19 Compare November 2, 2026 09:58
@QuentinBisson

Copy link
Copy Markdown
Contributor Author

@EItanya I rebased this on main now that #3359 is in. The runtime part is needed whatever ends up minting the Vertex token: the Go ADK, Python ADK and Claude Code skip their own Google auth and send a placeholder, and the compiler binds Authorization: Bearer on the location's Vertex host.

The open question is where the token comes from. This PR adds a controller setting that picks the credential provider per model provider (runtimeDefaults.modelCredentialAuthorities). We use it with a provider that mints the token from a service account key. The other option I see is the RFC 8693 exchange coming to the Substrate egress (agent-substrate/substrate#3349, Workload Identity Federation docs in #2911): the gateway exchanges the actor JWT for a Google token and no key is stored anywhere. Today only the atenet dataplane does that exchange, not agentgateway.

Which one would you rather have? If it's the exchange, I can cut this down to the runtime part and drop the setting.

QuentinBisson added a commit to giantswarm/kagent-upstream that referenced this pull request Nov 2, 2026
… headers

kagent-dev#3359 and kagent-dev#3362 merged: the agent and session rows move from kagent-dev#2901 to the Actor JWT and the Agent lookup, the Codex half is dropped, U6 is open, the Vertex row records the token-source question on kagent-dev#3259 and the labels row cites substrate#3208.

Signed-off-by: QuentinBisson <quentin@giantswarm.io>
@QuentinBisson
QuentinBisson force-pushed the feat/vertex-gateway-credentials branch from 2b0eb19 to c2e7b7e Compare November 3, 2026 14:07
…onfigurable credential authority

A GeminiVertexAI or AnthropicVertexAI ModelConfig with apiKeySecret binds
authorization: Bearer on the Vertex AI origin of its location, so the Secret
never enters the runtime. The ADK translation drops the Secret volume and
GOOGLE_APPLICATION_CREDENTIALS and renders KAGENT_SKIP_VERTEX_AUTH; the Go
ADK, the Python ADK and Claude Code (CLAUDE_CODE_SKIP_VERTEX_AUTH) skip their
own Google auth and send a placeholder bearer the gateway replaces.

The ate-secret:// authority of a ModelConfig credential is the controller
setting runtimeDefaults.modelCredentialAuthorities, keyed by ModelConfig
provider, default k8s.io (Helm: config.runtimeDefaults). Vertex AI needs a
credential provider class that mints access tokens, so a Vertex apiKeySecret
that resolves to k8s.io fails compilation. The egress binding check accepts
any DNS name without a port as the authority and refuses IP addresses. MCP
and EgressPolicy credentials keep k8s.io. Vertex AI providers reject actorJwt.

Co-authored-by: Timo Derstappen <teemow@gmail.com>
Signed-off-by: QuentinBisson <quentin@giantswarm.io>
@QuentinBisson
QuentinBisson force-pushed the feat/vertex-gateway-credentials branch from c2e7b7e to 83f2d43 Compare November 3, 2026 20:46
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