DocsUsing Gatehouse

Approvals

Hold risky calls for a person to approve, in the console or in Slack.

When a policy says Require approval, the agent's call waits while a person decides.

The Approvals queue

What approvers see

Each request shows who asked, which agent they used, the tool, the exact arguments (with secrets redacted), the policy that required approval, and how long is left. Approvers can add a note, which the agent receives with the result.

Who can approve

  • Members of the policy's approver group, or any admin or owner if the policy names no group.
  • Nobody can approve their own request. This holds in the console, Slack and the API.

If nobody decides before the timeout, the call fails with "expired". The default timeout is 5 minutes. Change it with GATEHOUSE_APPROVAL_TIMEOUT_MS.

For a one-person trial you can allow self-approval with GATEHOUSE_ALLOW_SELF_APPROVAL=true. Don't use it in production.

Approve in the console

Open Approvals. Pending requests are at the top, and the count shows in the sidebar. Click Approve or Deny.

Approve for a while

When the same person will need the same tool several times, such as a run of staging deploys, approve once for a period instead of every call. In the console pick Also allow for 1, 2, 8 or 24 hours before clicking Approve; in Slack click Approve for 2h.

Until it ends, that person's calls to that tool under the same approval policy go through without waiting, and the agent is told who pre-approved them. A Deny policy still blocks them, and a different approval policy (say, one for production) still asks. Every call is logged as approved, with the approval it came from.

Running approvals are listed under Approvals → Approved for a while. End now cuts one short: the next call asks again.

Approve in Slack

Gatehouse posts each request to a Slack channel with Approve and Deny buttons, and updates the message when someone decides. It uses Socket Mode, so Gatehouse doesn't need a public URL.

An owner sets it up in Settings → Slack & email. No server restart and no public URL are needed:

  1. Click Create app in Slack. Slack opens with Gatehouse's app settings filled in; pick your workspace and click Create.
  2. Install the app to your workspace and copy the Bot User OAuth Token (xoxb-…) from OAuth & Permissions.
  3. Under Basic Information → App-Level Tokens, generate a token with the connections:write scope (xapp-…).
  4. Invite the app to your approvals channel: /invite @Gatehouse.
  5. Paste both tokens and the channel, click Send a test message, then Connect Slack.

The test tells you exactly what's wrong, for example a revoked token or an app that isn't in the channel. Tokens are encrypted and never shown again. Disconnect stops posting to Slack; approvals still appear in the console.

Servers configured with SLACK_BOT_TOKEN, SLACK_APP_TOKEN and SLACK_CHANNEL environment variables keep working. Settings saved in the console take over from them.

Gatehouse matches the Slack user to a Gatehouse person by email address. Someone without a matching account, or without permission to approve, gets a private message saying so and nothing changes.

Approve over the API

curl -X POST -H "Authorization: Bearer $GATEHOUSE_TOKEN" -H "Content-Type: application/json" \
  -d '{"approve": true, "note": "Looks right"}' \
  https://gatehouse.yourcompany.com/api/approvals/<id>/decide