feat: add federated identity credential client authentication - #837
Open
jaredtbates wants to merge 1 commit into
Open
feat: add federated identity credential client authentication#837jaredtbates wants to merge 1 commit into
jaredtbates wants to merge 1 commit into
Conversation
jaredtbates
force-pushed
the
feat/federated-client-assertion
branch
3 times, most recently
from
June 25, 2026 20:20
52da12b to
48dc235
Compare
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
force-pushed
the
feat/federated-client-assertion
branch
from
June 25, 2026 20:22
48dc235 to
0d4040d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Our team was looking to implement Microsoft Entra ID / Azure AD authentication with
express-openid-connectusing 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_jwtassertion 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.
Checklist