doorman
doorman copied to clipboard
Endpoint to return the list of allowed actions
Useful to populate a UI for example.
- [ ] Define formal representation of regexps (eg.
actions: <.*>) - [ ] Design API endpoint and response
Something as simple as that would do it:
POST /permissions
Authorization: bearer TOKEN
{
"context": {
"env": "stage"
}
}
{
"service1": {
"resource1": ["read", "update"],
"resource2": ["review", "signoff"],
},
"service2": {
"path/<.*>": ["create"],
}
}
Note: Posting context could be optional.