> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ravenna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Entitlements

> Track and manage active access grants with entitlement lifecycle states, extensions, and revocation.

## Data model

An `AccessEntitlement` record includes:

* `id`, `userId`, `status`, `createdAt`
* `accessRequestId`: the originating request
* `userGroupId`, `applicationId`: the provisioned resource
* `expiresAt`: set when the access policy defines a duration
* `revokedAt`, `revokedByUserId`, `revokeNote`: populated on revocation
* `provisionedAt`: timestamp when provisioning completed
* `parentEntitlementId`: links an extension to its origin entitlement
* `lineage` (computed): array of related entitlements for extension chains, derived from `parentEntitlementId` relationships

Status transitions follow: Pending → Processing → Active (or Failed Provisioning). On revocation: Active → Deprovisioning → Inactive (or Failed Revocation).

***

## Key operations

* **List**: filterable by application, user, status, and workspace
* **Extend**: creates a child entitlement with `parentEntitlementId` set to the original. Does not modify the original record.
* **Revoke**: sets `revokedAt`, `revokedByUserId`, and triggers deprovisioning for synced apps. Failure results in `Failed Revocation` status.
* **Manual provision**: marks a pending manual entitlement as provisioned after a human grants access in the target system. Reachable from the ticket or from the Slack DM sent to the ticket assignee when the entitlement enters `processing`.

***

## Constraints

* Entitlement records are immutable; status changes accumulate as audit history rather than overwriting.
* Extension creates a new record and does not modify the original.
* Revocation of a synced app calls the IdP integration. If the call fails, the entitlement status is set to `Failed Revocation`.
* `Skipped Revocation` occurs when another active entitlement grants the same access, preventing unnecessary removal.
* When an access request reaches `provisioned` or `partially_provisioned`, the originating ticket is set to the workspace's Done status by the system user. No workflow is involved.
* The Slack manual provisioning prompt requires a published ticket with an assignee who has Slack connected.
