Nishanth Mathew Joy
09/22/2025, 1:28 PMAsk Inkeep
09/22/2025, 1:28 PMAsk Inkeep
09/22/2025, 1:28 PMOPAL_INLINE_OPA_CONFIG, you need to pass an OpaServerOptions model encoded as a JSON string (1) .
The OPAL_INLINE_OPA_CONFIG environment variable accepts a JSON-encoded configuration that affects how OPA starts when running opa run --server inline (2) .
Here's how to set it up:
1. Create your OPA configuration as a JSON object
2. Encode it as a string for the environment variable
For decision logs specifically, you can configure OPA to send logs to an HTTP endpoint. While the exact decision log configuration structure isn't detailed in the OPAL docs, the PDP configuration shows that decision logs are controlled through these settings (3) :
• PDP_OPA_DECISION_LOG_ENABLED - Set to True to enable decision logs
• PDP_OPA_DECISION_LOG_CONSOLE - Set to True to also print logs to console
• PDP_OPA_DECISION_LOG_INGRESS_ROUTE - The route for uploading logs (default: /v2/decision-logs/ingress)
• PDP_OPA_DECISION_LOG_INGRESS_BACKEND_TIER_URL - The URL logs will be uploaded to
The OPAL configuration guide indicates that OPAL_INLINE_OPA_CONFIG should be formatted as (2) :
OPAL_INLINE_OPA_CONFIG='{}'
You'll need to structure your JSON configuration to include the decision log settings that OPA expects for HTTP reporting endpoints.
For troubleshooting which PDP version and configuration you're running, you can check the logs with appropriate verbosity settings (4) .Ask Inkeep
09/22/2025, 1:29 PMAsk Inkeep
09/22/2025, 1:32 PMNishanth Mathew Joy
09/22/2025, 1:33 PMThomas
09/22/2025, 1:35 PMAsk Inkeep
09/22/2025, 1:35 PMAsk Inkeep
09/22/2025, 1:35 PMOPAL_INLINE_OPA_CONFIG configured for the OPAL client (1) :
services:
opal_client:
image: permitio/opal-client:latest
environment:
- OPAL_SERVER_URL=<http://opal_server:7002>
- OPAL_LOG_FORMAT_INCLUDE_PID=true
- OPAL_INLINE_OPA_LOG_FORMAT=http
- OPAL_INLINE_OPA_CONFIG={}
ports:
- "7766:7000"
- "8181:8181"
depends_on:
- opal_server
command: sh -c "./wait-for.sh opal_server:7002 --timeout=20 -- ./start.sh"
The OPAL_INLINE_OPA_CONFIG environment variable accepts a JSON object that configures OPA server options when running opa run --server inline (2) . You need to watch escaping quotes when setting this configuration .
For a complete working example, the docker-compose file typically includes three main services (3) :
1. *Broadcast Channel* - Using Postgres, Redis, or Kafka
2. *OPAL Server* - The policy management server
3. *OPAL Client* - Runs OPA inline with the configuration
The OPAL client configuration shows OPAL_INLINE_OPA_LOG_FORMAT can be set to none, minimal, http, or full for different log verbosity levels (1) , (4) .
Note that when OPAL_INLINE_OPA_ENABLED=True (the default) , OPAL runs OPA inside the same container (2) , (4) .Ask Inkeep
09/22/2025, 1:35 PMNishanth Mathew Joy
09/22/2025, 1:40 PMThomas
09/22/2025, 4:09 PMversion: '3.8'
services:
opal-server:
image: permitio/opal-server:latest
environment:
- OPAL_BROADCAST_URI=<redis://redis:6379>
- REDIS_HOST=redis
- OPAL_POLICY_REPO_URL=<https://github.com/your-org/your-policies.git>
ports:
- "7002:7002"
depends_on:
- redis
opal-client:
image: permitio/opal-client:latest
environment:
- OPAL_SERVER_URL=<http://opal-server:7002>
- OPAL_BROADCAST_URI=<redis://redis:6379>
- OPAL_INLINE_OPA_CONFIG={"decision_logs":{"plugin":"http","plugin_config":{"url":"<http://log-server:8080/logs>","headers":{"Authorization":"Bearer my-secret-token"},"batch":{"max_wait_time_seconds":10,"max_size_bytes":1048576}},"reporting":{"min_delay_seconds":300,"max_delay_seconds":600}}}
ports:
- "7000:7000"
volumes:
- ./policies:/opal-client/policies
depends_on:
- opal-server
- redis
log-server:
image: your-log-server-image:latest
ports:
- "8080:8080"
redis:
image: redis:alpine
ports:
- "6379:6379"Thomas
09/22/2025, 4:09 PMNishanth Mathew Joy
09/24/2025, 7:57 PMpermit support automation2
09/24/2025, 7:57 PM