Whether an identity may do an action (`policy`).
GET
/v1/policy-check
const url = 'https://ferritor.example.internal:7070/v1/policy-check?identity=example&action=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://ferritor.example.internal:7070/v1/policy-check?identity=example&action=example'With the rules that grant it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”identity
required
string
The <name> of a ferritor://<name> identity.
action
required
string
Any action name (read, rotate, …).
path
string
For a secret action: the secret or prefix; absent: every secret.
Responses
Section titled “Responses”The verdict.
Media typeapplication/json
object
allowed
required
boolean
enforced
required
False in dev mode: everyone may do everything there, whatever the rules say.
boolean
granted_by
required
The rules that grant it, by name (config rules as config:…).
Array<string>
undecided
Why the stored policies couldn’t answer.
string
Example
{ "undecided": "sealed"}default
Section titled “default”An error: see error.code.
Media typeapplication/json
Every error’s body.
object
error
required
object
code
required
Match on this, never on the message.
string
message
required
For people; may change.
string
Example
{ "error": { "code": "invalid_argument" }}