Skip to content

Deploy Approvals

Deploy approvals add a manual checkpoint before sensitive Convox deployment actions, ensuring human oversight of production changes.

The deploy approval workflow integrates with CI/CD pipelines to enforce admin review:

  1. CI tests pass

    After tests complete, CI pushes an approval request with git commit and CI metadata

  2. Admin reviews

    Admin sees pending request in web UI with commit hash, branch, and PR link

  3. Admin approves

    Approval requires MFA step-up authentication

  4. CI auto-approved

    Gateway calls CI provider API to unblock the waiting job (if configured)

  5. Deploy validated

    Gateway validates manifest matches approved commit during deployment

  6. Deployment completes

    All deployment actions are gated by the approval

Every approval is tied to a specific git commit hash:

  • Approval cannot be reused for different code
  • Manifest validation ensures deployed images match approved commit
  • Prevents deploying arbitrary code even with compromised CI/CD token

Approvals require multi-factor authentication:

  • Admin must verify MFA when approving
  • Prevents approval with compromised session
  • Auditable proof of human authorization

Approvals expire after a configurable window (default 15 minutes):

  • Prevents stale approvals from being used later
  • Encourages timely deployment after approval
  • Configurable via RGW_SETTING_DEPLOY_APPROVAL_WINDOW_MINUTES

Native integration with CI providers:

  • CircleCI auto-approval via API
  • GitHub PR comments for status updates
  • Extensible to other providers

The approval request progresses through these states:

StateDescription
pendingWaiting for admin review
approvedAdmin approved, CI can proceed
rejectedAdmin rejected, deployment blocked
expiredApproval or pending state timed out
deployedDeployment completed successfully

The deploy_approval_requests table tracks the complete lifecycle:

ColumnTypeDescription
public_idUUIDExternal identifier for API access
appvarcharApplication name
git_commit_hashvarcharGit commit SHA (indexed)
git_branchvarcharBranch name
pr_urltextPull request URL (from GitHub)
ci_metadataJSONBProvider-specific data
messagetextHuman-readable context
statusvarcharCurrent state
target_api_token_idbigintCI/CD token that will use approval
approved_by_user_idbigintAdmin who approved
approval_expires_attimestampWhen approval expires
SettingDefaultDescription
RGW_SETTING_DEPLOY_APPROVALS_ENABLEDtrueEnable/disable approval checks
RGW_SETTING_DEPLOY_APPROVAL_WINDOW_MINUTES15How long approvals remain valid

Configure via UI or environment variables:

SettingDescription
vcs_providerVersion control (github, bitbucket)
vcs_repoRepository in org/repo format
ci_providerCI system (circleci)
circleci_approval_job_nameCircleCI approval job name
circleci_auto_approve_on_approvalEnable auto-approval
Terminal window
rack-gateway deploy-approval request \
--app myapp \
--git-commit "$CIRCLE_SHA1" \
--branch "$CIRCLE_BRANCH" \
--ci-metadata '{"workflow_id":"abc-123","pipeline_number":"42"}' \
--message "Deploy to production"
Terminal window
rack-gateway deploy-approval approve <request-id> \
--notes "Reviewed diff, LGTM"

Requires MFA step-up authentication.

Terminal window
rack-gateway deploy-approval list --status pending
Terminal window
rack-gateway deploy-approval request \
--git-commit abc123f \
--message "Deploy" \
--wait \
--timeout 20m
PermissionDescriptionRoles
gateway:deploy-approval-request:createCreate requestsCI/CD
gateway:deploy-approval-request:approveApprove/rejectAdmin (requires MFA)
convox:deploy:deploy_with_approvalDeploy when approvedCI/CD

The deploy_with_approval permission grants access to all deployment actions when an active approval exists.

Even with a compromised CI/CD token, an attacker cannot:

  • Deploy without admin approval
  • Deploy different code than approved (manifest validation)
  • Bypass pre-deploy command allowlist
  • Reuse approvals across commits

Attack requires:

  • Compromised CI/CD token AND
  • Admin approval for attacker’s malicious commit AND
  • Image tags matching approved commit pattern

For staging or development racks, you can disable approvals:

Terminal window
RGW_SETTING_DEPLOY_APPROVALS_ENABLED=false