Skip to content

openhcl/attestation: Generify JWT code#2591

Merged
stunes-ms merged 4 commits intomicrosoft:mainfrom
stunes-ms:user/mikestunes/jwt
Jan 6, 2026
Merged

openhcl/attestation: Generify JWT code#2591
stunes-ms merged 4 commits intomicrosoft:mainfrom
stunes-ms:user/mikestunes/jwt

Conversation

@stunes-ms
Copy link
Copy Markdown
Contributor

OpenHCL's JWT-handling code is currently used only for AKV key release, but some upcoming work will add more uses for it. In preparation, this change pulls the generic parts of the JWT handling into their own module.

Copilot AI review requested due to automatic review settings December 18, 2025 22:38
@stunes-ms stunes-ms requested a review from a team as a code owner December 18, 2025 22:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors JWT handling code to make it more generic and reusable. The specific JWT parsing and validation logic previously tied to Azure Key Vault (AKV) key release has been extracted into a new jwt.rs module to support future JWT use cases.

Key changes:

  • Created new jwt.rs module with generic JWT parsing, validation, and error handling
  • Refactored key_release.rs to use the new generic JWT infrastructure
  • Updated Cargo.toml metadata for unused dependency tracking

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
openhcl/underhill_attestation/src/lib.rs Added jwt module declaration
openhcl/underhill_attestation/src/jwt.rs New generic JWT module with parsing, signature verification, and certificate chain validation
openhcl/underhill_attestation/src/igvm_attest/key_release.rs Refactored to use generic JWT helper instead of AKV-specific implementation
openhcl/underhill_attestation/Cargo.toml Updated unused-deps metadata

Comment thread openhcl/underhill_attestation/src/jwt.rs Outdated
Comment thread openhcl/underhill_attestation/Cargo.toml Outdated
Comment thread openhcl/underhill_attestation/src/jwt.rs Outdated
Comment thread openhcl/underhill_attestation/src/jwt.rs Outdated
@stunes-ms stunes-ms changed the title Generify JWT code openhcl/attestation: Generify JWT code Jan 5, 2026
Copy link
Copy Markdown
Member

@chris-oo chris-oo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly looks fine just a few comments

Comment thread openhcl/underhill_attestation/src/jwt.rs
Comment thread openhcl/underhill_attestation/src/jwt.rs Outdated
@stunes-ms stunes-ms merged commit ae78657 into microsoft:main Jan 6, 2026
56 checks passed
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.

4 participants