Skip to content

Expose expires on in attestation token #5739#5741

Merged
gladjohn merged 1 commit intomainfrom
gladjohn/maa_expires_on
Mar 2, 2026
Merged

Expose expires on in attestation token #5739#5741
gladjohn merged 1 commit intomainfrom
gladjohn/maa_expires_on

Conversation

@gladjohn
Copy link
Copy Markdown
Contributor

@gladjohn gladjohn commented Feb 9, 2026

Fixes #5739

Changes proposed in this request
This pull request enhances the attestation result returned by the attestation client to include structured token expiry information, making it easier for caching based on the expiration of attestation JWTs without manual decoding. The main changes introduce a new AttestationToken type, extract expiry from JWTs, and update code and tests to use the new structure.

Attestation result structure and expiry extraction:

  • Introduced a new AttestationToken record that encapsulates the raw JWT and its expiration (ExpiresOn), allowing structured access to expiry metadata.
  • Updated the AttestationResult record to include the new Token property, and updated all usages and documentation to reflect this addition. The original Jwt string is retained for backward compatibility. [1] [2]
  • Implemented a new JwtClaimExtractor utility class to extract the exp (expiration) claim from JWT payloads using existing MSAL utilities.

Attestation client and error handling updates:

  • Modified AttestationClient.Attest to extract the expiry from the JWT, populate the new AttestationToken, and update all error paths to use the new result structure. [1] [2] [3]
  • Updated error handling in PopKeyAttestor and unit tests to construct AttestationResult with the new Token property, ensuring consistency across the codebase. [1] [2]

Testing
Updated existing tests.

Performance impact
none

Documentation

  • All relevant documentation is updated.

@gladjohn gladjohn requested a review from a team as a code owner February 9, 2026 17:20
@gladjohn gladjohn merged commit 6013281 into main Mar 2, 2026
11 checks passed
@gladjohn gladjohn deleted the gladjohn/maa_expires_on branch March 2, 2026 18:29
This was referenced Mar 9, 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.

[Engineering task] Expose expires on in attestation token

3 participants