# Requesting Access

Here we'll walk you through the life-cycle of an access request:

* :wave: [Creating a request](#creating-a-request)
* :speaking\_head: [Discussing your request with approvers](#discussing-your-request)
* :arrow\_forward: [Gaining access](#gaining-access)
* :eject: [Relinquishing access and access expiration](#access-relinquishment-and-expiration)

## :wave: Creating a request

To begin, you'll use Slack to create an access request. You can either:

* [Use an interactive modal](#using-the-slack-request-modal)
* [Use slash commands](#using-slack-slash-commands)

### Using the Slack request modal

You can make requests using an interactive modal. This will help you discover what resources and possible access modes you can request.

#### Opening the modal

To open the modal, you can either:

* Type `/p0 request` in any Slack channel
* Click the "Run Shortcut" icon in the message draft bar, then search for and select "Request access"

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-fbb41058e42d60cc16cf428bc20c32f28d599d0f%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

#### Making your request

Choose a resource and access type, then fill out the remaining fields. You may skip optional fields.

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-8d7e71b13706f5d112258d50e36c8e28a0a80423%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
The "reason" field is optional, but highly recommended. Filling this out will help your request be approved more easily.
{% endhint %}

Once you've filled out all required fields, click "Done". P0 will then send you a DM with details of your request.

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-c025aa19d091e3c5a3d3bc618d172520301ec28b%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

### Using Slack slash commands

If you already know exactly what you need access to, you can use slash commands to make requests more quickly.

#### Slash-command format

All slash commands start with `/p0`. You can always use `--help` to get help for your current command.

#### Request modal shortcut

You can open the interactive modal by typing an incomplete slash command. For example, `/p0 request aws policy` will open a partially filled AWS user-policy request. Add `--help` to force P0 to show you how to complete the slash command.

#### Creating requests

Using a complete slash command will generate an access request. For instance: `/p0 request gcloud role p0-demo viewer --reason 'showing off P0'` will create a new access request to gain the "Viewer" role on a `p0-demo` Google Cloud project.

After a successful request command, P0 will send you a DM with details of your request.

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-c025aa19d091e3c5a3d3bc618d172520301ec28b%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

## :speaking\_head: Discussing your request

After your request is made, a message will be sent in your public P0 approval channel, asking for approval.

Your approver may immediately grant or deny your request, or respond in a thread to your request, asking for more information about why you're requesting access.

{% hint style="info" %}
You cannot approve nor deny your own requests, unless you are a configured approver *and* your organization allows one-party approvals.
{% endhint %}

If your organization has configured automatic approvals and you meet the approval conditions (for example, you are on-call on a specified PagerDuty escalation policy), you will automatically be granted access for one hour.

## :arrow\_forward: Gaining access

After your request is approved, P0 will provision access for you, then notify you after provisioning is complete.

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-c299bb5d017842cb2a455dbee81fec44f3eab398%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Note that you may have to wait an additional amount of time before your access is ready to use. This is because IAM resources have a propagation time in-between when access is configured and when access is usable. Observed propagation times are approximately:

<table data-full-width="false"><thead><tr><th>System</th><th>Time-to-use</th></tr></thead><tbody><tr><td>AWS</td><td>10 seconds - 15 seconds</td></tr><tr><td>Directories (Okta, Entra ID, Workspace)</td><td>Depends on SCIM propagation time</td></tr><tr><td>Google Cloud</td><td>30 seconds - one minute</td></tr><tr><td>PostgreSQL</td><td>Immediate</td></tr><tr><td>Snowflake</td><td>Immediate</td></tr></tbody></table>

## :eject: Access relinquishment and expiration

When your access was approved, your approver defined how long your access would last. Once your access expires, P0 will automatically remove it. If you still need this access, you can re-request it.

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-0a19911f32228b6840a2e32694d3b7688da64e9a%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

If you finish using your access before your access expires, you can also choose to relinquish your access. Click the "Relinquish" button to give up access early. This can help you avoid using your access unintentionally.

<figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-99a8903402630c897852a75173e9105b0e6f2a40%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>
