Policy service
Policy service is used for management and evaluation of dynamic policies in OSDU.
Dependencies
Policy service has a runtime dependency on Open Policy Agent OPA. It also has a runtime dependency on OSDU entitlements service for API authorization.
Environmental variables
ENTITLEMENTS_BASE_URL and LEGAL_BASE_URL environmental variable must be set to run the service. The values provided should be of format scheme://host[:port] and not include any part of path (e.g., https://entitlements.osdu.compay.com).
API authorization
To read or evaluate policies, user calling the policy service, must be a member of service.policy.user or service.policy.admin group.
To create, update, or delete the policies, user must be a member of service.policy.admin group.
User can be added to these groups by using entitlements service.
For information on how to run the policy service: Documentation
For information on testing the policy service: Test Policy Service README
API documentation: OpenAPI
There also a great CLI support from AdminCLI (formerly Policy AdminCLI):