Skip to content

Commit

Permalink
Merge pull request #35 from CanDIG/daisieh/var-safety
Browse files Browse the repository at this point in the history
DIG-1165: fix var safety issue
  • Loading branch information
daisieh authored May 15, 2023
2 parents 81d4845 + 9350041 commit c0e496f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions permissions_engine/authz.rego
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ allow {

decode_verify_token_output[issuer] := output {
some i
issuer := data.keys[i].iss
cert := data.keys[i].cert
output := io.jwt.decode_verify( # Decode and verify in one-step
input.identity,
{ # With the supplied constraints:
"cert": data.keys[i].cert,
"iss": data.keys[i].iss,
"cert": cert,
"iss": issuer,
"aud": "CLIENT_ID"
}
)
Expand Down
6 changes: 4 additions & 2 deletions permissions_engine/idp.rego
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ package idp
#
decode_verify_token_output[issuer] := output {
some i
issuer := data.keys[i].iss
cert := data.keys[i].cert
output := io.jwt.decode_verify( # Decode and verify in one-step
input.token,
{ # With the supplied constraints:
"cert": data.keys[i].cert,
"iss": data.keys[i].iss,
"cert": cert,
"iss": issuer,
"aud": "CLIENT_ID"
}
)
Expand Down

0 comments on commit c0e496f

Please sign in to comment.