Can OPAL sever scopes work with http endpoints del...
# opal
n
Can OPAL sever scopes work with http endpoints delivering policy bundle?
a
Hi @Nishanth Mathew Joy, I'm an AI assistant for Permit.io. I'll analyze available sources and get back to you shortly.
Yes, OPAL server scopes can work with HTTP endpoints delivering policy bundles. The documentation shows that OPAL supports both Git repositories and API bundle servers as policy sources. When using scopes, you can configure each scope to use an API bundle server as its policy source (1) (2) . The OPAL server is configured to get its data from API bundle server, extract the bundle, and sync it to the clients (1) . The API server must have a
bundle.tar.gz
file and be able to serve it to the OPAL server . For authentication with bundle servers, you can configure the following environment variables (1) (3) : • `POLICY_BUNDLE_SERVER_TYPE`: Set to
HTTP
(authenticated with bearer token) or
AWS-S3
(1) • `POLICY_BUNDLE_SERVER_TOKEN_ID`: The Secret Token Id • `POLICY_BUNDLE_SERVER_TOKEN`: The Secret Token • `POLICY_BUNDLE_SERVER_AWS_REGION`: The AWS Region if using AWS-S3 The OPAL server provides endpoints for retrieving policy bundles for specific scopes, as shown in the
/scopes/{scope_id}/policy
endpoint (4) , which returns policy bundles in the same format as the general
/policy
endpoint (5) . OPAL server supports two ways to detect changes in the tracked bundle server (1) : • ​*Polling by fixed intervals*​ - checks periodically if there's a new bundle file • ​*Webhook*​ - trigger the OPAL server to fetch a new bundle by issuing an HTTP REST request to
<opal-server-url>/webhook