Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Fix: Base64 encode Padding of Policy should be STANDARD
Browse files Browse the repository at this point in the history
Signed-off-by: Jiale Zhang <[email protected]>
  • Loading branch information
jialez0 committed Oct 27, 2023
1 parent e050dd8 commit 190f290
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion attestation-service/src/policy_engine/opa/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl PolicyEngine for OPA {
bail!("OPA Policy Engine only support .rego policy");
}

let policy_bytes = base64::engine::general_purpose::URL_SAFE_NO_PAD
let policy_bytes = base64::engine::general_purpose::STANDARD
.decode(input.policy)
.map_err(|e| anyhow!("Base64 decode OPA policy string failed: {:?}", e))?;
let mut policy_file_path = PathBuf::from(
Expand Down

0 comments on commit 190f290

Please sign in to comment.