3476) and gRPC (port 3478). The Permission Service is the primary interface for enforcing access control at runtime.
API overview
The Permission Service provides the following endpoints:| Endpoint | Purpose |
|---|---|
POST /v1/tenants/{tenant_id}/permissions/check | Check if a subject can perform an action on an entity |
POST /v1/tenants/{tenant_id}/permissions/bulk-check | Check multiple permissions in a single request |
POST /v1/tenants/{tenant_id}/permissions/lookup-entity | Find all entities a subject can access |
POST /v1/tenants/{tenant_id}/permissions/lookup-subject | Find all subjects that can access an entity |
POST /v1/tenants/{tenant_id}/permissions/expand | Expand an action into the full set of relations it resolves to |
SDKs
Official SDK clients are available for:Authentication
Permify supports OpenID Connect and Pre-Shared Keys for API authentication. Both methods are configurable via the configuration YAML file or CLI flags. Once enabled, pass a Bearer token with every request.Check API
The Check API answers the question: Can user U perform action X on resource Y? POST/v1/tenants/{tenant_id}/permissions/check
- cURL
- Go
- Node
can field returns one of:
RESULT_ALLOW— access is granted.RESULT_DENY— access is denied.
How access decisions are evaluated
When Permify receives a check request, it:- Looks up your authorization model (schema) to find the relations that compose the requested action.
- Walks the relationship graph to determine whether the subject is connected to the resource through those relations.
document entity with action edit = parent.admin or owner, Permify runs two concurrent queries:
- Q1: Is the subject an owner of the document?
- Q2: Is the subject an admin of the document’s parent organization?
or relation, the engine returns RESULT_ALLOW as soon as either query resolves to true. With an and relation, both must resolve to true.
Attribute-based check with context
You can pass runtime context data (e.g. IP address, time) alongside a check request for ABAC evaluation:Bulk Check API
The Bulk Check API lets you verify multiple permissions in a single request, reducing network round trips when you need to render UI elements conditionally or check access for a list of resources. POST/v1/tenants/{tenant_id}/permissions/bulk-check
You can check up to 100 permissions in a single bulk-check call. All checks are evaluated against the same authorization data snapshot.
Lookup Entity
Lookup Entity answers: Which resources can user X perform action Y on? POST/v1/tenants/{tenant_id}/permissions/lookup-entity
Instead of querying all resources and checking each one, Permify first finds the relations linked to the requested action, then queries those relations for the given subject. This makes reverse lookups significantly more efficient.
repository entities that user:1 can edit.
Lookup Subject
Lookup Subject answers: Who can perform action Y on entity Z? POST/v1/tenants/{tenant_id}/permissions/lookup-subject
user subjects that can edit repository:1.
Additional APIs
Permify provides a full suite of authorization APIs beyond permission checks:| API | Description |
|---|---|
| Write Schema | Configure your authorization model |
| Write Data | Write relational tuples and attributes |
| Read Relationships | Read and filter stored relation tuples |
| Delete Data | Remove relation tuples or attributes |
| Expand API | Expand an action into its full relation tree |
| Watch API | Stream real-time changes to relation tuples |
Performance
Permify targets 7–12 ms end-to-end check latency with the right architecture. Under heavy load with cache and database tuning you may see up to 30 ms. The default rate limit is 100 requests per second (configurable). See Cache Mechanisms for details on tuning.Permify is compatible with service meshes such as Istio since it uses standard gRPC and HTTP protocols. You will need to configure your service mesh manually.