Skip to content

Commit

Permalink
AA: fix CoCoAS Token getter
Browse files Browse the repository at this point in the history
The API should include `policy_ids` (which will be parsed on the CoCoAS
side into `default` if no value is given). Also, `tee_type` being
serialized would contain extra `"` chars.

Signed-off-by: Xynnn007 <[email protected]>
  • Loading branch information
Xynnn007 committed Nov 13, 2024
1 parent 4310a8a commit 35fe543
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion attestation-agent/attestation-agent/src/token/coco_as.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ impl GetToken for CoCoASTokenGetter {
let evidence = attester.get_evidence(vec![]).await?;

let request_body = serde_json::json!({
"tee": serde_json::to_string(&tee_type)?,
"tee": tee_type,
"evidence": URL_SAFE_NO_PAD.encode(evidence.as_bytes()),
"policy_ids": [],
});

let client = reqwest::Client::new();
Expand Down

0 comments on commit 35fe543

Please sign in to comment.