Dai Zhang
11/28/2025, 7:53 AMsystem.rego file like below to limit the url.
# system.rego
allow if {
input.method == "POST"
input.path == ["v1", "data", "token"]
}
however, this would block the data update for that url. we know that the best benefit would be real-time data update in opal. so would there be any problem to trigger using curl --request POST '<https://opa.xxx.xxx/data/config>' . great thanks!Ask Inkeep
11/28/2025, 7:54 AMAsk Inkeep
11/28/2025, 7:54 AMopal-client publish-data-update --src-url <https://api.country.is/23.54.6.78> -t policy_data --dst-path /users/bob/location
This publishes updates through OPAL's pub/sub system without exposing the data directly .
For sensitive data configuration, you can use the OPAL_DATA_CONFIG_SOURCES environment variable with authentication headers (2) (3) :
{
"config": {
"entries": [
{
"url": "<http://host.docker.internal:8000/permissions.json>",
"topics": [
"permissions"
],
"dst_path": "/course_permissions"
}
]
}
}
(4)
If you need to include authentication for secure data sources, you can add headers to the configuration (3) :
"config": {"headers": {"Authorization": "Bearer glpat-tx5AxRcPgT1VKt37HPrz"}}
OPAL sends instructions to clients on how to fetch data directly rather than sending the data itself through the pub/sub channel (4) . This approach maintains security while enabling real-time updates.
For your specific concern about blocking data updates with system.rego, the recommended approach is to use OPAL's built-in data update mechanisms rather than directly posting to OPA endpoints, as this maintains both security and real-time update capabilities (1) (4) .Ask Inkeep
11/28/2025, 7:54 AMDai Zhang
11/28/2025, 9:53 AM"authorization":"basic" in OPAL_INLINE_OPA_CONFIG, the client could not be able to start successfully.Or Weis
11/28/2025, 10:01 AMAsk Inkeep
11/28/2025, 10:01 AMAsk Inkeep
11/28/2025, 10:01 AMOPAL_INLINE_OPA_CONFIG with authorization settings, the configuration needs to be properly formatted as a JSON object (1) .
The OPAL_INLINE_OPA_CONFIG setting controls how OPA starts when running inline with OPAL, and the default value is {} . This configuration affects the server options that are passed to opa run --server .
If the client isn't starting successfully with authorization settings, ensure:
1. The JSON is properly escaped and formatted
2. The configuration matches OPA's expected server configuration format
For authentication between OPAL client and the policy store (OPA) , you should use OPAL_POLICY_STORE_AUTH_TYPE instead, which supports options: none, oauth, token . If using token authentication, set OPAL_POLICY_STORE_AUTH_TOKEN with the bearer token .
Additionally, if you're having startup issues with your configuration, please share:
1. Which Workspace / Project / Env you are using
2. What calls you are performing (as SDK code or CURL)
3. Which PDP version you are running
4. Relevant logs from your PDP
This will help our engineers investigate the specific issue you're encountering.Ask Inkeep
11/28/2025, 10:01 AMDai Zhang
11/28/2025, 10:51 AMdata to store some credentials used by policy but I don't want it to be directly accessed by public. how could i achieved that. great thanks!Or Weis
11/28/2025, 11:03 AMDai Zhang
11/28/2025, 11:36 AMsystem.rego, the data will disappear in all his parent url. I will try to find some solutions. thanks!