policy API musings #43
thomas-fossati
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Related to #42
Assumptions:
(*) a uuid - or other id with sufficient entropy (e.g., commit hash) is probably better than a sequence number
Add new policy
The tenant adds a new policy for the given scheme.
The supported policy type is OPA and the file format is rego.
On success, the new policy object is returned alongside its unique URI.
A new policy is inactive. Uploading a policy and activating it are two separate operations.
Request
Response
Retrieve a policy object
Obtain a given policy object by URI.
Request
Response
Retrieve all policy objects for a scheme
Obtain all policy objects associated with a scheme.
Request
Response
Activate a policy
Set a given policy to become the active one. This operation atomically deactivates any previously active policy.
Request
Response
HTTP/1.1 200 OK
Deactivate all policies
Request
Response
HTTP/1.1 200 OK
Beta Was this translation helpful? Give feedback.
All reactions