Commit Graph
1 Commits
Author SHA1 Message Date
viyatb-oai 2c13cb27f5 Add test-only JWT claim disclosure for network proxy aliases (#64826)
## Why

A guest alias needs to expose only the claims selected by policy. Refresh
also needs a way to detect changes to claims the guest never sees.

## What changed

Add a test-only helper that reads expiry from a trusted source JWT and
builds fresh JWT-shaped aliases containing only selected scalar claims.
Each alias uses a random placeholder in the signature segment.

Hash all stable claims, including undisclosed ones, in deterministic JSON
order. Exclude `exp`, `nbf`, `iat`, and `jti` so changes to those fields
during refresh preserve the digest.

## Testing

Cover selective disclosure, alias freshness, and refresh comparisons.
Exercise rejection of malformed tokens, duplicate keys, invalid validity
fields, ambiguous numbers, and disallowed disclosures.

GitOrigin-RevId: 48bc19ac57601e28d5c2cb8881f0ac0f5563aca9
2026-11-30 23:21:06 +00:00