Skip to content

feat: add federated identity credential client authentication - #837

Open
jaredtbates wants to merge 1 commit into
auth0:masterfrom
sightsoundtheatres:feat/federated-client-assertion
Open

feat: add federated identity credential client authentication#837
jaredtbates wants to merge 1 commit into
auth0:masterfrom
sightsoundtheatres:feat/federated-client-assertion

Conversation

@jaredtbates

@jaredtbates jaredtbates commented Jun 25, 2026

Copy link
Copy Markdown

Description

Our team was looking to implement Microsoft Entra ID / Azure AD authentication with express-openid-connect using federated identity credentials from AWS IAM roles. Documentation on this request type is available on Microsoft's website.

In this implementation, I was trying to keep things completely agnostic so any provider can be used, whether on the issuer or resource server side. This flow is very similar to the private_key_jwt assertion but does not require a local certificate to function.

I did use Claude Opus 4.8 to help generate this - I was not sure if AI-generated contributions are allowed in this project, so feel free to close this if not. But I figured since this was valuable to us, I would contribute it back to upstream. Happy to make tweaks as you see fit as well.

Testing

We are using AWS's GetWebIdentityCommand with Outbound Identity Federation enabled, and the issuer added in our Entra ID account.

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not the default branch

@jaredtbates
jaredtbates requested a review from a team as a code owner June 25, 2026 20:15
@jaredtbates
jaredtbates force-pushed the feat/federated-client-assertion branch 3 times, most recently from 52da12b to 48dc235 Compare June 25, 2026 20:20
Add a `client_assertion` clientAuthMethod that authenticates to the token
endpoint with a federated identity credential. Instead of signing the client
assertion locally with a private key (`private_key_jwt`), the assertion JWT is
issued by a trusted external identity provider (e.g. AWS STS/IAM, GitHub
Actions OIDC) and supplied via a new `clientAssertion` callback.

The callback is invoked on every token endpoint request so that short-lived
federated tokens stay fresh. clientAuthMethod defaults to `client_assertion`
when `clientAssertion` is configured, mirroring the existing
`clientAssertionSigningKey` -> `private_key_jwt` behavior. The implementation
is provider-agnostic and pulls in no cloud SDK dependencies.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QuaDs4RvCnLyvX1SakbNQu
@jaredtbates
jaredtbates force-pushed the feat/federated-client-assertion branch from 48dc235 to 0d4040d Compare June 25, 2026 20:22
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