Skip to content

feat(authserver): remove client_credentials grant - #54

Merged
tronghn merged 10 commits into
mainfrom
feat/remove_client_credentials
Nov 19, 2026
Merged

tronghn merged 10 commits into
mainfrom
feat/remove_client_credentials

Conversation

@tronghn

@tronghn tronghn commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Token exchange is now the only grant. Clients without user context send their own service account token as both client_assertion and subject_token.

  • Subject tokens are accepted from client authentication issuers (Kubernetes) and from configured external issuers, and both are treated the same way. Token exchange works without any external issuers.
  • Issued tokens identify the subject token's issuer in urn:nais:idp and urn:nais:idp_alias. The alias for client authentication issuers is configured per environment with clientAuthIssuerAlias (default kubernetes). External issuers cannot reuse an environment's issuer or alias.
  • Recipients authorize the caller with client_id and urn:nais:call_chain. Claims copied from the subject token describe that token, not the caller. See docs/usage.md.
  • Config defaults now come from struct tags, and the config loader moved to the sts package.
  • The m2m and obo token tasks are renamed to internal and external.

Breaking changes:

  • client_credentials is no longer supported.
  • subjectTokenIssuers is renamed to externalIssuers.
  • urn:nais:idp_name is renamed to urn:nais:idp_alias.

tommytroen and others added 10 commits November 17, 2026 14:35
Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
Require client authentication audience checks for service account subject
tokens, and machine token exchange without external subject token issuers.
Treat Kubernetes client authentication issuers like configured external
issuers when verifying subject tokens, and set urn:nais:idp_name to nais
for them. Token exchange no longer requires external issuers.

Co-authored-by: Tommy Trøen <tommy.troen@nav.no>
Co-authored-by: Tommy Trøen <tommy.troen@nav.no>
…n issuers

Internal issuers are always accepted as subject token issuers with the
reserved name nais. Stop configuring the cluster issuer as an external
issuer in Feature.yaml, which validation now rejects.
Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
Co-authored-by: Trong Huu Nguyen <trong.huu.nguyen@nav.no>
@tronghn
tronghn added this pull request to stack #55 November 19, 2026 07:54
@tronghn
tronghn enabled stacked auto-merge (squash) November 19, 2026 10:03
@tronghn
tronghn merged commit 7e5a4c4 into main Nov 19, 2026
13 checks passed
@tronghn
tronghn deleted the feat/remove_client_credentials branch November 19, 2026 10:04
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