Does OPA support headers? #196
Answered
by
srenatus
kotyara85
asked this question in
OPA and Rego
-
Per docs
I tried to pass a bearer token but headers are nil
|
Beta Was this translation helpful? Give feedback.
Answered by
srenatus
May 14, 2022
Replies: 1 comment 2 replies
-
I'm afraid those docs are for the system policy that can be used to protect OPA's REST API, https://www.openpolicyagent.org/docs/latest/security/#authentication-and-authorization. For queries, i.e. requests to /v1/data/some/package/rule, request headers are not available. If you want something to be available there, you need to provide it as input. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
peteroneilljr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm afraid those docs are for the system policy that can be used to protect OPA's REST API, https://www.openpolicyagent.org/docs/latest/security/#authentication-and-authorization.
For queries, i.e. requests to /v1/data/some/package/rule, request headers are not available. If you want something to be available there, you need to provide it as input.