# Access requests

> Let people ask for a server when they need it, for a limited time, with an admin approving.

Instead of handing out access in advance, people can ask for it when they need it. An admin approves it for the time asked, and it ends by itself.

## Set it up

An admin names the tags of the servers people may ask for, like `staging`, on the **Requests** page. Servers without one of those tags stay hidden from members.

## Ask for access

Ask for a Linux account on a server, for a limited time and with a reason. In the web app under **Requests**, or in a terminal:

```bash
nk request db-1 postgres --for 2h --reason "OPS-123, the replica lags"
```

`nk request` waits for the answer. Once it is approved, plain `ssh postgres@db-1` works.

## Approve or deny

Admins get an email with a link, when the core can send mail. Any admin but the person asking can approve or deny it.

- A request nobody answers expires on its own.
- An approval never shortens access someone already has.
- Every step is in the audit log, with the reason.
