Skip to content

Document Cedar claims filled from the upstream ID token - #1376

Merged
tgrunnagle merged 4 commits into
mainfrom
docs-cedar-id-token-claims
Nov 25, 2026
Merged

tgrunnagle merged 4 commits into
mainfrom
docs-cedar-id-token-claims

Conversation

@tgrunnagle

@tgrunnagle tgrunnagle commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

stacklok/toolhive#6054 changes which claims Cedar policies see when the embedded authorization server is in use. Cedar reads the primary upstream provider's access token and fills any claim that token omits from the same provider's stored ID token. The docs said Cedar reads the access token only, which sends readers to the wrong token when a group or role claim is missing. This PR describes the fill, as the toolhive review requested.

The rules live in one place, the new "Claims from the upstream ID token" section of concepts/cedar-policies.mdx. It covers which claims are filled, why ToolHive's client registration decides the filled group and role claims, the one-token rule for groups and roles, how fresh filled claims are, and revoking a user's last group. The page carries the single :::info[Changed in v0.70.0] admonition, which tells upgraders to review their permit and forbid rules. "Designing secure policies" gains advice on guarding claim access.

The other pages state what their reader needs and link to that section:

Page Change
reference/authz-policy-reference.mdx The full list of claims that are never filled, the JSON types of claims, and the one-token rule under "How groups are resolved"
concepts/embedded-auth-server.mdx When Cedar sees group changes from a new ID token, and that refreshTokenLifespan ends only idle sessions
guides-vmcp/embedded-auth-server-vmcp.mdx Cedar reads the first upstream's tokens by default
integrations/vmcp-okta.mdx Groups in the ID token (ID Token and Always) as an alternative in Step 4; Step 1 gives the real reason for a custom authorization server (a backend that needs the Okta access token), and a new section covers the Org authorization server with groups in the ID token
integrations/vmcp-entra-id.mdx A note on keeping app roles consistent across separate registrations
integrations/vmcp-idp-overview.mdx, _partials/_auth-troubleshooting.mdx Check the upstream ID token when the access token has no group claim

It also fixes two errors in existing text that the code contradicts. An opaque upstream access token makes Cedar evaluate the ToolHive-issued token's claims rather than deny the request, and JSON numbers map to Decimal, not Long.

Type of change

  • Documentation update

Related issues/PRs

Points for review

  • Release version: Changed in v0.70.0 assumes #6054 ships in v0.70.0, since v0.69.0 and v0.69.1 shipped without it. Merge this PR with or after that release, and bump the version if it slips.
  • Okta Org authorization server: documented from code and Okta's docs (Cedar parses the upstream access token unverified; the Org AS adds groups to the ID token in the authorization code flow) but not yet tested against a live Okta org.
  • Empty groups: the revocation warning names only Keycloak, because the toolhive review found that Entra ID only appears to omit an empty groups claim. Keycloak rotates the ID token on refresh, so the warning describes the stale case as a provider that doesn't, or a failed refresh.
  • #6052: the rule shared by the JWT and opaque-token paths is still open, so the pages don't describe the Google hd claim as usable.

Submitter checklist

Content and formatting

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

Reviewer checklist

Content

  • I have reviewed the content for technical accuracy
  • I have reviewed the content for spelling, grammar, and style

🤖 Generated with Claude Code

Cedar now fills claims the upstream access token omits from the same
provider's id_token (stacklok/toolhive#6054). Update the pages that said
Cedar reads the access token only, frame ToolHive's client registration
as authoritative for those claims, and add the upgrade, freshness and
policy-authoring guidance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs-website Ready Ready Preview Nov 25, 2026 8:42pm UTC

Request Review

Keep the fill rules in one place on the Cedar concepts page and link to
it from the guides, trim the how-to notes to what the reader acts on,
and replace bolded bullet lists with prose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Target v0.70.0, correct the last-group revocation warning for providers
that rotate the ID token, require Always for Okta ID-token groups, and
add the type-error upgrade risk and decimal example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@jhrozek jhrozek 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.

Checked this against toolhive#6054 at e0f3387d4 and it holds up: the never-filled list matches the code exactly, the one-token rule matches groupClaimsToWithhold, and the two fixes to existing text (opaque tokens fall back to the ToolHive token's claims, numbers map to Decimal) are right. A question on the Okta guide and three small things inline.

Addresses #1376 review comments:
- vmcp-okta.mdx (4700454933): give the real reason for a custom
  authorization server and document the Org authorization server
- embedded-auth-server.mdx (4700454941): name the client refresh that
  renews refreshTokenLifespan
- cedar-policies.mdx (4700454951): forbid rules can start matching
- cedar-policies.mdx (4700454960): the fill needs an ID token and a JWT
  access token

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tgrunnagle
tgrunnagle merged commit 16110eb into main Nov 25, 2026
22 checks passed
@tgrunnagle
tgrunnagle deleted the docs-cedar-id-token-claims branch November 25, 2026 21:12

This branch was successfully deployed

1 active deployment
Preview — 46ffca2c Deployed Nov 25, 2026 by vercel[bot]
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