My rego policy always returns false #612
Replies: 4 comments 2 replies
-
If you provide the policy and data loaded in OPA and the input you use to query OPA, we could help investigate. |
Beta Was this translation helpful? Give feedback.
-
Thanks for reply! I have updated my question |
Beta Was this translation helpful? Give feedback.
-
Your policy says bearer_token := split(input.event.identitySource[0], " ")[1] but your input doesn't have bearer_token := split(input.dentitySource[0], " ")[1] Also, some payload
[true, _, payload] = io.jwt.decode_verify(...) Also, I don't think passing in your Unrelated -- if you're not using envoy, import input.attributes.request.http as http_request has no effect whatsoever. |
Beta Was this translation helpful? Give feedback.
-
I think my updated policy is not used by OPA server inside docker . HOw to update policy OPA is using
This is my updated policy
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is how I set up OPA in docker

I am trying to validate AWS cognito access token . Its not working , and dont know how to debug or add more logging .
input.json
Not sure how to debug why its not working . Do I need to add --authentication=token when I start OPA as service ?
Beta Was this translation helpful? Give feedback.
All reactions