Hi, I am trying to play around with OPAL locally a...
# opal
j
Hi, I am trying to play around with OPAL locally and am able to evaluate policies as expected but the result field doesn't return a decision id. I tried adding the following in the opal-client but didn't work. Can you please help troubleshoot what I am missing
Copy code
- OPAL_INLINE_OPA_CONFIG={"decision_logs":{"console":true},"plugins":{"decision_logs":{"reporting":{"min_delay_seconds":1,"max_delay_seconds":5}}},"default_decision_id_enabled":true,"default_authorization_decision_id_enabled":true}
a
Hi @Jaieu Sheil, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Let me help troubleshoot your OPAL configuration. Based on the available documentation, the OPAL client runs OPA inline and manages its configuration (1) . Looking at your configuration attempt, you're trying to enable decision IDs through
OPAL_INLINE_OPA_CONFIG
. However, the OPAL client documentation shows that it uses OPA with specific configuration files :
Copy code
./wait-for.sh opal_server:7002 --timeout=20 -- ./start.sh
The OPAL client runs OPA as an inline process with this command (2) :
Copy code
/app/bin/opa run --server --addr=:8181 --authentication=token --authorization=basic --config-file=/home/permit/opa/config.yaml --log-level=info --v0-compatible=False /home/permit/opa/basic-authz.rego
The key here is that OPA is configured via a config file (
--config-file=/home/permit/opa/config.yaml
) . To enable decision IDs, you would need to modify this OPA configuration file rather than passing it through environment variables. For debugging purposes, you can verify OPA is running correctly by checking if it's accessible on port 8181 (1) :
Copy code
ports:  
 - "7766:7000"  
 - "8181:8181"
If you're still not seeing decision IDs in your responses, ensure: 1. OPA is fully started and accessible before making requests 2. The OPA configuration file includes the decision ID settings 3. You're querying the correct OPA endpoint that returns decision metadata Could you share which version of OPAL you're running and any logs from the OPAL client startup? This would help identify if there
To learn more, see the sources I considered: [[1] OPAL Client](https://docs.opal.ac/getting-started/quickstart/docker-compose-config/opal-client) [[2] Unable to push the policy data since OPA is not ready yet in sidecar pattern](https://github.com/permitio/PDP/issues/266)
j
Anybody having the same query - this discussion in github helped me resolve the issue - https://github.com/permitio/opal/discussions/93
💜 1
p
Hey, thanks for reaching out ! It seems our team is a little busy right now, a human will be with you within the next hour or so. In the meantime, can I help you ?