Docs: document the access-token vs ID-token aud convention #30
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
rust
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/anz#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Background
anz uses two different
audconventions across the two JWTs it issues:aud = "https://auth.example.com/realms/<realm>"(the realm URL, i.e. the resource-server identifier). This follows RFC 9068 (JWT Profile for OAuth 2.0 Access Tokens).aud = "<client_id>"(the relying party). This is the standard OIDC convention.Both are correct. Both are common. But the difference is a foot-gun for anyone configuring a resource server's audience check, because the natural assumption ("aud is just the client_id") is wrong for access tokens.
Encountered
During the navinote integration I configured the resource server with
audiences=["navinote-pwa", "navinote-sync"]. Every authenticated request returned 401. The fix was changing the audience allow-list to the realm URL — the navinote-server is now configured with a single audience:https://auth.navicore.tech/realms/homelab. Cost about 30 minutes of decoding tokens to figure out.Proposed
A two-line note in
docs/ARCHITECTURE.mdnear the JWT contract section (or in the README under "OIDC Endpoints") clarifying:That's enough to save the next integrator.
#32