Skip to content

feat(mcp): support workload JWT assertion authentication - #304

Merged
danielkov merged 5 commits into
mainfrom
feat/workload-oidc-assertion-auth
Oct 23, 2026
Merged

danielkov merged 5 commits into
mainfrom
feat/workload-oidc-assertion-auth

Conversation

@danielkov

@danielkov danielkov commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add generic RFC 7523 workload JWT assertion authentication for MCP servers. This change does not add workload authentication for inference.

Configure auth.type: workload_identity with tokenFile, expectedIssuer, tokenEndpoint, and resource in the existing MCP configuration. Kit validates HTTPS issuer metadata, reopens the assertion file on exchange, and caches resource-scoped access tokens until shortly before expiry. Acquisition is bounded and serialized, with no browser or saved-credential fallback.

The issuer must explicitly permit repeated use of an unchanged assertion when the deployment needs it. Process-memory restores require restarting Kit and resuming its transcript.

@danielkov
danielkov marked this pull request as ready for review October 23, 2026 19:50
@danielkov danielkov changed the title feat(auth): support workload JWT assertions for MCP and inference feat(mcp): support workload JWT assertion authentication Oct 23, 2026

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two workload-token cache issues can interrupt MCP authentication: delayed rejections discard replacement tokens, and bare POST authentication failures leave rejected tokens cached.

Took 27 min

Comment thread src/workload_auth.rs Outdated
Comment thread src/tools/mcp/workload.rs

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workload MCP POSTs construct a fresh HTTP client per operation, preventing connection reuse and repeatedly loading native trust roots on Linux. This adds avoidable handshake and certificate-loading overhead to repeated tool calls.

Took 12 min

Comment thread src/tools/mcp/workload.rs Outdated
@danielkov
danielkov enabled auto-merge (squash) October 23, 2026 21:05

@kit-code-agent kit-code-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found. The changes look good to merge.

Took 64 min

@danielkov
danielkov disabled auto-merge October 23, 2026 21:47
@danielkov
danielkov merged commit c309f89 into main Oct 23, 2026
5 checks passed
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.

1 participant