Skip to content

Reframe authserver README around agentic auth challenges - #7316

Merged
jhrozek merged 2 commits into
mainfrom
as-readme
Nov 26, 2026
Merged

jhrozek merged 2 commits into
mainfrom
as-readme

Conversation

@jhrozek

@jhrozek jhrozek commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Review feedback on "Add README for pkg/authserver" (#7301) asked for the README to make it obvious why someone building agent-aware applications or deployments should use the auth server: why it helps, how it helps, and what it saves. The merged README listed features by mechanism, so a reader had to work out which problem each one solves.

  • Lead the opening with the agentic framing: workload identity (such as SPIFFE) answers who is this agent?, and pkg/authserver answers what may it do, and for whom? General-purpose embedding is still mentioned, second.
  • Add "Common challenges and how pkg/authserver helps", six problem-first entries, each ending with what you would otherwise have to build:
    • keeping upstream credentials (GitHub, Google, corporate IdP) out of agents
    • narrowing tokens to a resource or a single action (RFC 8707, RAR, carrying issuer-signed details from an ID-JAG for the vMCP's call-bound tokens)
    • keeping both user and agent identity (RFC 8693 act, client_id, SPIFFE act.sub)
    • crossing trust domains with Cross-App Access / ID-JAG
    • authenticating agents without static secrets (SPIFFE, private_key_jwt)
    • putting an MCP-ready OAuth server in front of an existing IdP (CIMD, DCR, PKCE, RFC 8707)
  • Replace the old "Why use" bullets with a shorter "Capabilities at a glance", and remove prose that the new section and the standards tables now cover.

Type of change

  • Documentation

Test plan

  • Manual testing (describe below)

Checked the claims in the new section against the code on this branch: 1h default access token lifespan, the client_id claim on issued tokens, act construction for exchanged and SPIFFE tokens, consent-exempt client eligibility, and the merged call-binding PRs ("Process the ID-JAG authorization_details claim" (#7290), "Enforce call-bound access tokens at the vMCP" (#7302), "Add a per-client access token lifespan for ID-JAG redemption" (#7284)). Read the rendered Markdown.

Special notes for reviewers

  • The single-call token wording only claims what is on main: the server carries issuer-signed authorization_details from a redeemed ID-JAG into the access token, and the vMCP enforces them. Signing those details into ID-JAGs this server mints is "Sign authorization_details into minted ID-JAGs" (Sign authorization_details into minted ID-JAGs #7305), still open, so the README does not claim it yet.
  • The terms used follow the ones common in agent identity and MCP writing (token passthrough, on-behalf-of, Cross-App Access), so readers recognise their problem. Specs are linked from the existing standards tables rather than inline.
  • Deliberately no limitations section. The existing "not registered / not exposed" notes in the standards tables stay.

jhrozek and others added 2 commits November 25, 2026 23:11
Rework the opening and why-use sections of pkg/authserver/README.md around the common challenges in agentic and MCP authorization so prospective adopters can quickly evaluate why it helps and what it replaces, while keeping a concise Capabilities at a glance summary and trimming low-level package details.

Co-authored-by: Mecatl <[email protected]>
Tighten pkg/authserver/README.md after the agentic-auth rework so it leads clearly with the AI agent and MCP problem statement while staying concise:

- Lead the opening paragraph with the agentic authorization framing, clarify the Fosite/production-server sentence, and position general-purpose Go embedding positively.
- Remove duplicate prose across the opening, architecture subsections, and standards tables without dropping substantive details.

Co-authored-by: Mecatl <[email protected]>
@jhrozek
jhrozek requested a review from ChrisJBurns as a code owner November 25, 2026 22:11
@github-actions github-actions Bot added the size/S Small PR: 100-299 lines changed label Nov 25, 2026
@codecov

codecov Bot commented Nov 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.15%. Comparing base (352fe5a) to head (f9b9c4e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7316   +/-   ##
=======================================
  Coverage   82.14%   82.15%           
=======================================
  Files         930      930           
  Lines       94288    94288           
=======================================
+ Hits        77455    77462    +7     
+ Misses      16828    16821    -7     
  Partials        5        5           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rdimitrov rdimitrov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The challenge-first framing is a good rewrite of the README, but several new claims don't match the code and docs/arch, so I'd fix them before merge.

Design: a README is the right place for this and nothing links to the removed section anchors, so the restructure is safe. The risk is that a pitch-style doc now states things as defaults that are opt-in, Go-embedder-only or single-replica, and drops caveats the old README carried.

Findings:

  1. README.md (Upstream identity providers, consent paragraph): "pre-registered clients only, not dynamically registered ones" is wrong. internal/consentpolicy/consentpolicy.go IsEligibleClient only requires a confidential client with the code response type and a redirect URI, and docs/arch/11-auth-server-storage.md:350-352 says allowlisted DCR-issued clients can qualify. Say "confidential clients only; URL-shaped (CIMD) IDs excluded", and note ConsentExemptClientIDs has no config tag, so it is Go/runner-option only.
  2. README.md:37-38: "vMCP builds on these hooks to enforce single-call, single-use MCP tool tokens" overclaims. Enforcement lives in pkg/vmcp/callbinding, nothing registers the mcp_tool_call details type by default (docs/arch/17), ID-JAG still refuses the parameter, and the default single-use record is in-memory and covers one replica only (callbinding/binding.go:47). Say vMCP can enforce it when an embedder registers the type and mints such tokens.
  3. README.md:34-36: "per-client lifespans down to 2 seconds" reads as applying to RAR tokens generally. config.go:410-416 says access_token_lifespan applies only to tokens redeemed from an ID-JAG (2s to 24h, server/provider.go:51).
  4. Challenge 6: "discovery, CIMD, DCR, PKCE, and consent out of the box" overclaims. CIMD is opt-in (CIMDRunConfig.Enabled) and the README's own standards table says "Opt-in, partial draft".
  5. README.md:13-16: the old caveat that AllowedAudiences is required for MCP compliance is gone, but startup still fails without it (config.go:2446), and the generic-OAuth-server pitch will mislead. Restore that sentence and the list of shared packages the server imports.
  6. Dropped accurate content: Redis is needed for multi-replica deployments and restart continuity, and key/HMAC rotation keeps tokens valid across restarts and scaling. The storage section now only calls Memory "single-instance". Also restore the "Go embedders only" qualifiers for sub_id (SubjectIdentifierAudiences is not a RunConfig field, config.go:3634) and ActorTokenValidator.

🤖 Reviewed with Claude Code

@jhrozek
jhrozek merged commit 05cb704 into main Nov 26, 2026
48 checks passed
@jhrozek
jhrozek deleted the as-readme branch November 26, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Small PR: 100-299 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants