Skip to content

Commit

Permalink
verifier: Rename user_data to report_data in SeAttestationClaims
Browse files Browse the repository at this point in the history
The EAR token broker does not insert the `report_data` for SE attestation claim
because there is no matching field in `SeAttestationClaims`.
The absence leads to `TokenVerifierError(NoTeePubKeyClaimFound)`
after successful attestation.

As an interim solution, this commit renames the existing `user_data` to
`report_data`, enabling the token broker to perform its task correctly.

Signed-off-by: Hyounggyu Choi <[email protected]>
  • Loading branch information
BbolroC authored and fitzthum committed Jan 10, 2025
1 parent 9eff705 commit 4cc5575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deps/verifier/src/se/ibmse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub struct SeAttestationResponse {
pub struct SeAttestationClaims {
#[serde_as(as = "Hex")]
cuid: ConfigUid,
user_data: String,
report_data: String,
version: u32,
#[serde_as(as = "Hex")]
image_phkh: Vec<u8>,
Expand Down Expand Up @@ -217,7 +217,7 @@ impl SeVerifierImpl {

let claims = SeAttestationClaims {
cuid: se_response.cuid,
user_data: String::from_utf8(se_response.user_data.clone())?,
report_data: String::from_utf8(se_response.user_data.clone())?,
version: AttestationVersion::One as u32,
image_phkh: image_phkh.to_vec(),
attestation_phkh: attestation_phkh.to_vec(),
Expand Down

0 comments on commit 4cc5575

Please sign in to comment.