openhcl/attestation: Generify JWT code#2591
Merged
stunes-ms merged 4 commits intomicrosoft:mainfrom Jan 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.rsmodule with generic JWT parsing, validation, and error handling - Refactored
key_release.rsto 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 |
chris-oo
reviewed
Jan 5, 2026
Member
chris-oo
left a comment
There was a problem hiding this comment.
Mainly looks fine just a few comments
chris-oo
approved these changes
Jan 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.