Slack Integration
Rack Gateway can forward audit log events to Slack. Notifications are routed by action patterns that match the audit log action field.
Features
Section titled “Features”- OAuth-based connection to a Slack workspace
- Channel routing using glob patterns
- Test notifications per channel
- Dedicated deploy approval alert channel (optional)
1. Create a Slack App
Section titled “1. Create a Slack App”- Go to https://api.slack.com/apps
- Click Create New App → From an app manifest
- Select your workspace
- Paste this manifest (update
redirect_urls)
{ "display_information": { "name": "Rack Gateway", "description": "Audit notifications", "background_color": "#2c2d30" }, "features": { "bot_user": { "display_name": "Rack Gateway", "always_online": true } }, "oauth_config": { "redirect_urls": [ "https://your-gateway-domain.com/api/v1/integrations/slack/oauth/callback" ], "scopes": { "bot": ["channels:read", "chat:write"] } }, "settings": { "org_deploy_enabled": false, "socket_mode_enabled": false, "is_hosted": false, "token_rotation_enabled": false }}2. Configure Environment Variables
Section titled “2. Configure Environment Variables”SLACK_CLIENT_ID="your-client-id"SLACK_CLIENT_SECRET="your-client-secret"3. Connect via Web UI
Section titled “3. Connect via Web UI”- Log in as an admin
- Navigate to Integrations
- Click Connect to Slack
- Authorize the app in Slack
- Configure channel routing
Channel Configuration
Section titled “Channel Configuration”Each channel has:
- A selected Slack channel
- A list of action patterns (glob syntax)
Default Channels
Section titled “Default Channels”The gateway creates two default channel configs:
#security
login.completelogin.*_failedmfa_method.*user.update_rolesapi_token.*
#infrastructure
deploy_approval_request.*release.promote
Action Pattern Examples
Section titled “Action Pattern Examples”| Pattern | Matches |
|---|---|
login.*_failed | login.oauth_failed, login.user_not_authorized |
mfa_method.* | MFA enrollment events |
api_token.* | API token create/update/delete |
deploy_approval_request.* | Request create/approve/reject |
release.promote | Release promotions |
user.* | User create/update/delete/lock/unlock |
Testing
Section titled “Testing”Each channel card includes a Test button that sends a test message to the selected Slack channel.
Deploy Approval Alerts
Section titled “Deploy Approval Alerts”The Slack integration also supports a dedicated Deploy Approval Alerts channel:
- Enable the alert toggle
- Choose a single Slack channel
- The gateway posts deploy approval alerts to this channel regardless of action patterns
Message Formatting
Section titled “Message Formatting”Messages include:
- Action name
- User or API token
- Status
- Timestamp
- Context fields (when available)
Example action:
🚀 deploy_approval_request.approvedUser: admin@example.comStatus: successRelated
Section titled “Related”- Audit Logs - Action names and filters
- Deploy Approvals - Approval workflow