Access request management in Slack, with access that expires on its own

Someone asks for one action on one resource in a Slack form, an approver answers Yes or No, and Formal turns the Yes into a policy exception the Connector enforces until it expires. Workflows are YAML, managed in the Control Plane, with Terraform or through the API.

workflow · access requestfrom the docs
trigger:
  type: form-submission
actions:
  - type: ask-in-chat          # Yes/No in #security-approvals
  - type: formal-app-command   # create a PolicySuspension
    if: actions.ask_approval.response == "yes"

ALLOW  maya's requests to prod-postgres for 60 minutes
BLOCK  the policy applies again once the suspension expires

The problem

Engineering access requests turn into standing access

Production access usually arrives as a ticket that grants a role, or a password someone shares. Both are quick to hand out. Neither is scoped to the job that prompted the request, and taking it back is a separate task that nobody owns.

The ticket grants a role

The request says one update on one table. The grant that closes the ticket is a database role, and it is still there after the fix ships.

maya · 3 weeks laterDELETE FROM orders WHERE created_at < '2025-01-01'ALLOWED

A shared password has no requester

A database password in an agent's environment gives every session the same access, and the logs can't say which person asked for it.

devin · session 7f2psql prod-postgres (shared password)ALLOWED

The approval lives somewhere else

The Yes is a comment in a ticket or a chat thread. Nothing ties it to what the database accepts, so revoking it depends on someone remembering.

ops-bot · ticket closedGRANT write ON orders TO mayaALLOWED

# With no expiry, all three stay allowed.

How it works

How an access request workflow runs

  1. Ask in Slack or the terminal

    The requester opens a Formal form with the /formal form command or the Fill out form shortcut in Slack, or runs formal form fill on the Formal Endpoint. Fields are typed and validated, so a production request can require an incident ticket before it submits.

    FORM · PROD ACCESSexample
    • Resource: prod-postgres✓
    • Access until: 10:42 UTC✓
    • Incident ticket: INC-4821✓
  2. An approver answers Yes or No

    The workflow posts a message with Yes and No buttons to a channel, or by direct message to up to 25 approvers, and pauses until someone answers. The first answer decides. A No can require a reason, which the workflow can send back to the requester.

    DM · 3 APPROVERSexample
    • maya@acme.com → prod-postgres, 1 hourREQUEST
    • sam@acme.com answers YesDECIDES
    • lee@, kim@: copy shows sam answeredUPDATED
  3. The exception applies until it expires

    On Yes, the workflow calls the Formal API to create a policy suspension for that user, that policy and the requests that match its condition. The Connector lets those requests through until the expiry, then the policy blocks again and Formal deletes the suspension.

    PROD-POSTGRES · MAYAexample
    • 09:43 UPDATE orders SET status='refunded' WHERE id=4821ALLOWED
    • 10:42 suspension expired and removedEXPIRED
    • 10:44 UPDATE orders SET status='refunded' WHERE id=4822BLOCKED

Why an exception, not a grant

Access request management built on policy exceptions

A typical access request ends in a grant: a role, a group membership, a database account. In Formal, access request management ends in an exception to a policy that the Connector already evaluates on every request.

Everyone else stays blocked

The policy keeps blocking everyone else while the suspension lets one user or group through, for the requests that match its condition, until it expires.

Other policies still apply

Masking and read-only rules hold during the exception, because only the suspended policy steps aside.

No deprovisioning step to forget

The user’s roles and the database’s accounts never changed. When the exception expires, there is nothing left to take back.

Least privilege for a single request

Least privilege, in NIST’s glossary, limits a user to what their assigned tasks need. A suspension scoped to one resource and one time window applies that to a single request.

Conditions from fixed options only

The docs workflow builds the input condition from a form field, which we’d only do when that field is a select with fixed options. Anything a caller can type freely stays out, and the Devin guide builds its condition from verified token claims alone for the same reason, since the agent controls its payload and could inject CEL.

Test a condition before you rely on it

One that doesn’t compile, or doesn’t return a boolean, never applies, and Formal doesn’t report an error.

Capabilities

The three parts of a Slack approval workflow

Forms that ask the right questions

A form is a list of typed fields: text, number, email, URL, date, time, timestamp, select, multi-select, checkbox and radio. Each field can carry a CEL validation rule, so Slack keeps the form open until the ticket looks like INC-1234 or the reason has 20 characters.

  • Fields and options can depend on an earlier answer, such as a ticket field that appears only when the requester picks Production
  • Dropdowns can list live data from the Formal API, such as the resources of the technology picked one field earlier
  • Formal saves form data only when a workflow listens for that form
Forms in the docs ›
form · access requestexample
field_env       radio    dev | prod
field_duration  select   1h | 8h | 24h (dev only)
field_ticket    string   visible_if field_env == "prod"
                rule     matches("^INC-[0-9]+$")

ERROR  Use an incident ticket like INC-1234

Slack access requests and approvals

Requests start from /formal form or the Fill out form shortcut, and approvals arrive as Yes/No messages from the Formal app. Slack is the only chat integration today. You connect a workspace with Add to Slack in the Control Plane, and each Slack permission you grant maps to one feature.

  • chat:write for messages and approvals, commands for the form, im:write and user lookup by email for approvers named by address
  • Approvers are a channel, a channel ID or up to 25 emails; with several emails, the first answer decides and the other copies show who answered
  • Workspace-level installs only: on Enterprise Grid, pick a workspace, not the organization
Slack integration in the docs ›
slack · #security-approvalsexample
Formal  maya@acme.com is requesting access to
        prod-postgres. Reason: refund for INC-4821.
        Approve?        [ Yes ]  [ No ]

ALLOW  sam answered Yes: suspension created, 60 min

Access that expires on its own

A policy suspension lifts one policy for one user or group. A one-off suspension covers the first matching request, or ends at the safety timeout. A time-bound suspension covers every matching request until it expires. An optional CEL input condition narrows either one to a resource or a statement.

  • Delete a suspension to revoke it on the spot; expired ones are removed automatically
  • Each suspension stores a reason, and the Triggered Policies tab has a Suspend action on every request a policy acted on
  • The docs name break-glass access and approved one-time operations as the two main uses
Policy suspensions in the docs ›
suspension · input conditioncel
# one resource
input.resource.name == "prod-postgres"

# one statement type on one database
input.sql_query.statement_type == "DELETE"
  && input.db_name == "billing"

ALLOW  matching requests until Expires At
BLOCK  everything else the policy covers

Just-in-time access

Just-in-time access for databases, SSH, Kubernetes and agents

Just-in-time access management in Formal is this same workflow pointed at production: a policy blocks a resource by default, and each approved request suspends the block for one person, or one agent session, until it expires. For the concept itself, read what just-in-time access is; the goal it serves is zero standing privileges.

Infrastructure

Block by default, approve one resource at a time

The pattern doesn’t change with the resource type, because the policy and its suspension are evaluated by the Connector in front of each resource. What changes is how narrow you make the exception.

  • Database access: scope the exception with a CEL condition, down to one database or one statement type
  • SSH access: suspend a session policy for the approved user, and the session is recorded like any other
  • Kubernetes access: policies run on every API request, so the exception applies call by call while it lasts
  • At Cursor, nobody keeps permanent production permissions: engineers ask for access when an operational task calls for it
prod access · this morningexample
09:41maya · psqlprod-postgres: UPDATE orders, onceREQUESTED
09:42leo · sshbastion-prod: session, 30 minAPPROVED
10:05sam · kubectlexec payments-api, 15 minAPPROVED
10:13leo · sshbastion-prod: new sessionBLOCKED
Agents

Agents ask, the person who started them approves

An agent that signs in with OIDC can start a workflow through the API, and the workflow can read the agent’s verified token claims. In the Devin guide, a policy blocks Devin’s machine user by default, the Yes/No goes by Slack DM to the person who started the session, and the suspension covers that person and that Devin session only.

  • Devin picks the reason and the duration, and the approver sees both before answering
  • The suspension condition is built from verified claims only, never from fields in the agent’s payload, which the agent controls
  • A new Devin session needs a new approval
AI agent identity ›
slack · DM · mayaexample
FormalAPP
devin for maya requests database access after psql: SELECT 1 was blocked
Reason
verify Formal JIT access
Duration
5 min
Covers
maya, this Devin session
maya answered Yes. Devin's next SELECT 1 went through.
APPROVED

Workflows as code

The access request management workflow, in YAML

Every workflow is YAML with one trigger and one or more actions. This is the docs workflow that turns a Slack form into a policy exception. The form asks for a resource and an “access until” time. The workflow asks a channel, looks up the submitter’s Formal user, and creates the suspension only if the answer is Yes and the end time is at least a minute away.

  • Abridged from the docs, with the user lookup step left out
  • oneoff: false makes the exception time-bound: every matching request passes until it expires
  • oneoff: true covers only the next matching request
Workflows in the docs ›
access-request-workflow.yamlyaml
trigger:
  type: form-submission
  name: form_submission
  args:
    id: form_abc123
actions:
  - type: ask-in-chat
    name: ask_approval
    args:
      message: 'Approve access request to "${{ trigger.form_submission.submission.field_resource }}" from ${{ trigger.form_submission.submitter_email }}?'
      recipient_channel: some-slack-channel
      integration: slack
  # get_user_id: a Users List call that finds the submitter's Formal user
  - type: formal-app-command
    name: suspend_policy
    depends_on: [get_user_id]
    if: actions.ask_approval.response == "yes" && (int(timestamp(trigger.form_submission.submission.field_access_un)) > int(now) + 60) && actions.get_user_id.status_code == 200 && size(actions.get_user_id.body.users) > 0
    args:
      app: Policies
      command:
        name: PolicySuspension
        type: Create
      machine_user_id: user_abc123
      input:
        policy_id: policy_abc123
        identity_type: user
        identity_id: ${{ actions.get_user_id.body.users[0].id }}
        input_condition: 'input.resource.name == "${{ trigger.form_submission.submission.field_resource }}"'
        oneoff: false
        expiration_minutes: ${{ (int(timestamp(trigger.form_submission.submission.field_access_un)) - int(now)) / 60 }}

Works with

Access request management with the tools you already run

Slack carries the request and the Yes/No, Terraform or the API holds the YAML, your cloud accounts feed autodiscovered resources, and your log destinations keep the audit trail.

  • SLSlack
  • Terraform
  • Devin
  • AWS
  • GCP
  • Splunk
  • Datadog
  • Panther
  • S3
  • HTTPS APIs and webhooks
Slack integration in the docs ›

Audit trail

Who approved what, and where is it recorded?

Formal records each access request from the form to the last query the exception allowed.

Audit trail6 items
01

Workflow runs are logs

Workflow runs and their steps are logs with the source workflow.

02

The suspension and its expiry

The Policy Suspensions tab shows each suspension’s policy, identity, reason, condition and Expires At time.

03

Every request it let through

Each request the suspension allowed is a Connector log under the requester’s identity. Triggered Policies lists each request a policy acted on.

04

The approver and the reason

The approval step returns responder_email, and a No with denial_reason: required also returns the approver’s comment. A later action can post both to the requester in Slack, or to your ticketing system with http-request.

05

Agents, with the person behind them

When an agent asks, the log shows the agent’s machine user, the person it acts for as the end user, and its token claims.

06

In your SIEM

If the audit trail has to live in your SIEM, forward the same logs to Splunk, Datadog, Panther or S3.

Slack or Catalog

Should requests start in Slack or in the employee Catalog?

Both end in the same policy suspension. Here is how a Slack workflow (Forms and Workflows) compares with the employee Catalog (Access Requests).

Where the request starts

Slack: /formal form, the Fill out form shortcut, or formal form fill. Catalog: catalog.formal.ai, on a blocked action or an MCP server.

Who decides

Slack: whoever the workflow asks, a channel or up to 25 people by direct message. Catalog: an admin, in the Access Requests queue of the Control Plane.

Notifications

Slack: messages to the approver, and to the requester with send-slack-message. Catalog: none, so check the queue, or add a Slack workflow for urgent requests.

How long access lasts

Slack: any expiry the workflow sets, in minutes. Catalog: 30 minutes to 7 days, chosen by the employee and fixed at approval.

What approval can do

Slack: a one-off or time-bound suspension, or any other Formal API call. Catalog: add an MCP server, grant MCP access, or create a one-time, time-bound or permanent exception.

Triggers and actions

More than access requests

Access requests use two of the seven triggers, form-submission and api-request. The others react to logs, to your cloud inventory and to the clock, and each one has an example in the Workflows docs.

New logs

A new-log trigger with a CEL filter can post to Slack when a policy blocks a query, with the user, the resource and the normalized statement. unique_by limits it to new keys, such as the first time a user loads a given Claude skill, or once an hour per user and resource.

Autodiscovered resources

When a cloud integration finds, changes or loses a database, a workflow can create the matching Formal resource or post the change to a Slack channel.

Schedules

cron-schedule takes a 5-field cron expression evaluated in UTC, for a weekday compliance report to a channel, for example. If Formal misses runs during an outage, recovery decides whether they fire afterwards.

Your other systems

http-request sends GET, POST, PUT, PATCH or DELETE to any HTTPS endpoint. Secrets are scoped to one workflow and replaced with *** in stored step results. A non-2xx response doesn’t fail the step, so check status_code in the next action’s if.

Chained actions

Actions chain with depends_on and run conditionally with if. Any action can read the trigger’s output and the output of the actions before it.

One YAML, three places to manage it

The same YAML lives in the Control Plane editor, in the formal_workflow Terraform resource, or behind the API.

Customer proof

Resources secured
1,000+
Technologies secured
10+
Sessions per week
600K+
“With Formal, we can finally manage least privilege access across our entire infrastructure through a single control plane.”
Tom Daniels
Tom Daniels
CISO, Cursor
Read the Cursor story ›

FAQ

Questions buyers ask us

What is access request management?

Access request management is how people ask for access, get a named approver’s decision, receive the access and lose it again, with a record of each step. For engineering teams, an access request management system has to work per resource and per action, and take the access back without a second ticket. In Formal, the grant is a policy suspension, so taking it back is its expiry.

How do I approve access requests in Slack?

Connect Slack in the Control Plane, create a form, then build an access request workflow with a form-submission trigger, an ask-in-chat action and a formal-app-command that creates the policy suspension. The Forms docs include an “Access Request with Approval” example to start from.

How long does approved access last, and can I end it early?

It lasts as long as the workflow sets: expiration_minutes can be fixed or computed from a form field such as an “access until” time. A suspension created through the API without an expiration lasts 24 hours. Delete it in the Policy Suspensions tab to revoke it before then.

Should access requests start in Slack or in the employee Catalog?

Requests can start in either place, and both can run in the same organization. A Slack workflow fits engineers asking for production access, because the approver gets a message and the expiry is whatever the workflow sets. The employee Catalog fits requests for MCP servers and for AI actions a policy blocked, with decisions made in the Control Plane queue and no notifications sent. The Catalog page covers the employee side and the Access Requests docs list every request type.

Do I need the Formal Endpoint to submit a request?

No. People in Slack submit forms with /formal form or the Fill out form shortcut. The Endpoint adds formal form fill for people who work in a terminal, and formal form list for scripts; submissions from either go through the same server-side checks.

Does Formal work with Microsoft Teams?

No. Slack is the only chat integration today, and ask-in-chat only accepts slack. To reach another system from the same access request workflow, an http-request action can call any HTTPS API or webhook and read the response.

Can an AI agent approve its own access?

Not when it’s set up like the Devin guide: the agent’s machine user may only trigger the workflow and mint federation tokens, and a separate workflow machine user is the only one allowed to create suspensions. The approval goes to the person named in the agent’s verified token claims.

Can I manage workflows with Terraform?

Yes. The formalco/formal provider has formal_workflow, formal_form and formal_workflow_secret, so forms, workflows and their secrets sit in the same repository as your policies. Inside a Terraform heredoc, write $${{ so Terraform passes the workflow expression through untouched.

Swap the access ticket for a Slack approval

We'll build one workflow with you: the form, the approver and the policy it suspends.