Custom actions and resources
Name actions, describe resource types and choose the right granularity for any domain.
Actions and resource types are yours to define. ReQlo has no built-in notion of payments, tickets or documents.
Naming actions
Actions are lowercase, dot-separated names: namespace.verb or namespace.sub.verb, 2 to 5 segments, using
letters, digits and underscores.
| Domain | Actions |
|---|---|
| Documents | documents.read, documents.publish, documents.share |
| Support | tickets.read, tickets.reply, customers.profile.read, subscriptions.cancel |
| Finance | accounts.read, transactions.export, payments.initiate |
| HR / internal | hr.records.read, calendar.schedule, employees.profile.update |
| Engineering | repositories.read, deployments.create, secrets.read |
| Operations | inventory.adjust, vendors.update, devices.restart |
| Your own | my_domain.widget.activate |
Policies can match a whole namespace with a trailing .*, for example documents.*.
Granularity
- One action per distinct risk.
documents.readanddocuments.deletedeserve different rules. - Don't encode arguments in names. Use
payments.initiatewith anamount_minorattribute, notpayments.initiate_under_100. - Avoid catch-alls like
do_anythingorapi.call. They make policies meaningless. - Name what happens, not the tool.
emails.sendsurvives a switch from one email provider to another.
Registering actions
Register actions in the dashboard under Actions & resources (owners, admins and developers). Register the action's resource type first. Select Register action, choose the resource type, and add context attributes. To paste a schema, switch the attribute editor to JSON:
{
"channel": { "type": "enum", "values": ["email", "chat"], "required": true },
"reply_length": { "type": "integer", "minimum": 0, "maximum": 20000, "provenance": "caller" }
}To keep the catalog in your repository and apply it to every environment, describe it in reqlo/schema.yaml and run
reqlo schema push.
Project API keys can't register actions; they are only for authorization checks.
Requests for unregistered or archived actions fail with action_unknown (HTTP 422), never with an allow. Archive an
action from its Manage page when you retire it.
Resource types
A resource type describes the attributes your server may send about a target object. Select Register resource type, name it, and add its attributes:
{
"customer_id": { "type": "id", "required": true },
"team_id": { "type": "id", "required": true },
"priority": { "type": "enum", "values": ["low", "normal", "urgent"] }
}Resource attributes should come from your authoritative database at request time. See Custom attributes.
Adding a new domain
Adding devices.restart for an IoT fleet needs no change to ReQlo: register a device resource type, register the
action, write rules, and call authorize. Every industry uses the same API.
Something wrong or unclear? Report an issue with this page.