Skip to content

Add an unverified audience reader for routing and diagnostics#7

Merged
PeterSR merged 1 commit into
mainfrom
unverified-audience
Jun 8, 2026
Merged

Add an unverified audience reader for routing and diagnostics#7
PeterSR merged 1 commit into
mainfrom
unverified-audience

Conversation

@PeterSR

@PeterSR PeterSR commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Expose a way to read a JWT-SVID's aud claim without verifying the signature, for routing and diagnostics — e.g. choosing which trust context to verify under before an expected audience is known.

Python TypeScript Go
unverified_audiencestr | None unverifiedAudiencestring | null UnverifiedAudience(string, error)

All three implementations behave identically:

  • Missing aud → reported as empty (None / null / ""), no error.
  • Array aud → rejected, never silently coerced to a single audience.
  • Malformed token → rejected.

The result is attacker-controlled and must always be followed by verify; the docstrings and CHANGELOG say so explicitly.

Verification

  • Tests pass: Go, Python (13), TypeScript (15)
  • go vet, tsc --noEmit, ruff check all clean
  • Parity table in the check-parity skill and the [Unreleased] CHANGELOG entry updated

Expose a way to read a JWT-SVID's aud claim without verifying the
signature, for routing and diagnostics — e.g. choosing which trust
context to verify under before an expected audience is known:
unverified_audience (Python), unverifiedAudience (TypeScript),
UnverifiedAudience (Go).

All three reject an array aud rather than silently coercing a
multi-audience token, and report a missing aud as empty
(None/null/""). The result is attacker-controlled and must always be
followed by verify.
@PeterSR PeterSR merged commit bd5acd0 into main Jun 8, 2026
4 checks passed
@PeterSR PeterSR deleted the unverified-audience branch June 8, 2026 15:07
@PeterSR PeterSR mentioned this pull request Jun 8, 2026
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