Skip to content

Whether an identity may do an action (`policy`).

GET
/v1/policy-check
curl --request GET \
--url 'https://ferritor.example.internal:7070/v1/policy-check?identity=example&action=example'

With the rules that grant it.

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.

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
Allowed values: sealed unverified

Example

{
"undecided": "sealed"
}

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
Allowed values: invalid_argument unauthenticated permission_denied not_found method_not_allowed version_mismatch live_version no_namespace unknown_profile busy aborted misdirected_request sealed unaudited unknown_kek policy_unverified rate_limited unavailable failed_precondition internal
message
required

For people; may change.

string

Example

{
"error": {
"code": "invalid_argument"
}
}