> For the complete documentation index, see [llms.txt](https://wiki.datadike.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.datadike.com/pam/administration/access/just-in-time.md).

# Just-in-time access

Access granted on demand for a limited period and revoked automatically, instead of a standing authorization that never expires.

## What this is and when to use it

Just-in-time (JIT) access replaces a standing grant with a request. Instead of holding permission to an asset permanently, the user asks for it when the work requires it; an approver decides; the grant is temporary and is **revoked automatically when it expires**. Sessions still open at that moment are terminated.

Compare it with an [authorization](https://wiki.datadike.com/pam/administration/access/authorizations.md), which is the standing form of the same thing:

|                   | Authorization                               | Just-in-time request             |
| ----------------- | ------------------------------------------- | -------------------------------- |
| Who initiates it  | An administrator, in advance                | The user, when the work needs it |
| How long it lasts | Until the validity period ends, often years | A defined, short period          |
| How it ends       | You edit or delete the rule                 | Automatically, at expiry         |
| Who decides       | The administrator who wrote the rule        | The designated approver          |

Use it for the accesses you do not want anyone holding by default: production databases, domain controllers, out-of-band consoles, and above all third parties. For a contractor, a determined term is the right shape of access — a permanent grant to a vendor account is the thing JIT exists to avoid.

{% hint style="info" %}
This page covers the concept and where JIT lives in the console. The request form varies by version: raise one request in a test tenant to see the form yours presents.
{% endhint %}

## What a request narrows

JIT cuts two dimensions at once, and the second is the one people forget. Reducing how long access lasts is worth little if, for that hour, the person holds everything they would have held permanently.

A request names, and is granted for, only:

| Dimension          | What the request carries                                                        |
| ------------------ | ------------------------------------------------------------------------------- |
| **Which assets**   | The individual assets, or the folders of the asset tree, being asked for        |
| **Which accounts** | The accounts on those assets that may be used, not every account they hold      |
| **Which actions**  | Connect, and separately upload, download, copy, paste, delete, share            |
| **For how long**   | A start and an expiry. Access appears at the first and is revoked at the second |

So a grant can be "read-only access to one account on two hosts, this afternoon" rather than "administrator, today". The approver sees each of those dimensions before deciding, which is what makes the approval a real decision instead of a rubber stamp.

{% hint style="warning" %}
Ask for the actions you need, not the full set. A request that includes **upload** and **download** because the form offered them is a request for file transfer into production, and it will be read that way in an audit. The narrower request is also the one an approver grants faster.
{% endhint %}

## Where it lives in the console

![The Just in time screen](https://1085357737-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F7xzJyi9JVzRwnV6JzUho%2Fuploads%2Fgit-blob-e3925ff3fc4176c89a008176a540f843dd07a946%2Fjust-in-time.png?alt=media)

JIT is spread across three screens, in two different areas:

| Screen                      | Area     | What it is for                                            |
| --------------------------- | -------- | --------------------------------------------------------- |
| **Policies › Just in Time** | Sysadmin | The administrator's view of just-in-time access           |
| **My requests**             | Cockpit  | Where a user raises a request and follows its status      |
| **To approve**              | Cockpit  | Where an approver finds pending requests and decides them |

The requester and the approver each have their own dedicated area, so an approver does not need administrator rights to decide a request — only the profile that grants them the approver role.

## How a request flows

1. The user signs in, with MFA where it is required.
2. From **My requests**, the user requests access to a specific asset.
3. The approver is notified, finds the request under **To approve**, and approves or rejects it. The decision is recorded.
4. On approval the access is granted for the requested period. The asset appears in the user's own access list and the credential is supplied by the solution, as with any other granted access.
5. At expiry the grant is revoked automatically, and any session still running on it is terminated.

{% hint style="danger" %}
**You cannot approve your own request** — being an administrator does not change this. If the only approver on a rule is also the only person who needs the access, nobody can release it.
{% endhint %}

## How to verify it worked

Like any approval flow, this needs two accounts — a requester and an approver.

1. As the requester, raise a request from **My requests**. It must appear there with a pending status.
2. As the approver, from a different account, confirm it is listed under **To approve**, and approve it.
3. Back as the requester, the asset must now appear in the access list, and a session to it must open.
4. Wait for the grant to expire, or revoke it. The asset must disappear from the requester's list, and a session left open must be dropped.

Step 4 is the one worth doing at least once. The whole value of JIT is the automatic revocation, and it is the only part of the flow that fails silently — an access that quietly never expires looks exactly like one that works.

## Common errors

| Symptom                                                | Cause                                                                              | Fix                                                                                                         |
| ------------------------------------------------------ | ---------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| The approver never sees the request                    | No notification transport, or the wrong person is designated as approver           | Configure email or SMS under **System settings › Notifications**, then check who the rule names as approver |
| The only approver cannot approve                       | The approver is also the requester, and self-approval is not permitted             | Designate a second approver                                                                                 |
| Approved, but the user still sees no asset             | The grant has already expired, or the request covered a different asset or account | Check the request's period and its target                                                                   |
| A session ended without warning                        | The grant expired while the session was open                                       | Expected. Revocation terminates running sessions                                                            |
| Nobody uses it, and standing access is granted instead | Requesting is slower than asking an administrator                                  | Approvals must be answered quickly, or the workflow is bypassed in practice                                 |

## Related pages

* [Approval workflows](https://wiki.datadike.com/pam/administration/access/approvals.md) — everything else that can be held for approval
* [Authorizations](https://wiki.datadike.com/pam/administration/access/authorizations.md) — the standing grant JIT is an alternative to
* [Reports](https://wiki.datadike.com/pam/administration/audit/reports.md) — the approvals and access-requests report
* [Users and groups](https://wiki.datadike.com/pam/administration/identities/users-and-groups.md) — external and third-party users
* [Restrict a third party to specific assets](https://wiki.datadike.com/pam/administration/access/third-party-access.md) — taking this menu away from a third party
