Repository navigation
Use the called entity's identifier as client assertion audience (§8.8) - #212
Merged
Merged
Conversation
OpenID Federation 1.1 §8.8 requires the audience of a client authentication JWT to be the Entity Identifier of the entity whose federation endpoint is called, and the endpoint must not accept any other audience. The library used the endpoint URL, so a compliant endpoint rejected its authenticated fetch, list, trust mark and resolve requests. httpFederationEndpointRequest(Ctx) now takes the audience. Callers pass the fetch issuer, the listing authority, or the trust mark issuer. SimpleRemoteMetadataResolver gets an EntityID field, set by SmartRemoteMetadataResolver to the trust anchor; without it the resolve endpoint URL is still used. Fixes go-oidfed#210 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QYDqsx3UGxpCKvCiUxShZq
Contributor
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Go | Nov 12, 2026 3:01a.m. | Review ↗ | |
| Code coverage | Nov 12, 2026 3:31a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
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.
Fixes #210.
The audience of a client authentication JWT is now the Entity Identifier of the entity whose federation endpoint is called, as OpenID Federation 1.1 §8.8 requires, instead of the endpoint URL:
issIDofFetchEntityStatement(Ctx));fetchList/httpFetchListtake its entity ID);c.TrustMarkIssuerinrefreshExternal;SimpleRemoteMetadataResolver.EntityID, set bySmartRemoteMetadataResolver.remoteResolverForTAto the trust anchor. ASimpleRemoteMetadataResolverbuilt with onlyResolveEndpointstill uses the URL as the audience.httpFederationEndpointRequest(Ctx)takes the audience as a new parameter. The public API is otherwise unchanged.Tests:
clientauth_audience_test.gochecks that fetch, list, trust mark and remote resolve each sendaud= the called entity's ID, using endpoint URLs that differ from the entity IDs.clientauth_test.gois updated for the new parameter. The new tests fail onmainand pass with this change;go test ./...passes.I added the changelog entry under a new "Unreleased" heading; please move it wherever you prefer. #211 has a separate PR, and the two changelog entries will need a trivial merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01QYDqsx3UGxpCKvCiUxShZq