Skip to content

Permissions

Rack Gateway uses a structured permission system based on scopes, resources, and actions.

Every permission follows a three-part format:

{scope}:{resource}:{action}

Examples:

  • convox:app:list - List Convox applications
  • convox:process:exec - Execute commands in containers
  • gateway:user:create - Create gateway users
  • gateway:deploy_approval_request:read - View deploy approval requests

Permissions are organized into four scopes:

ScopeDescription
convoxOperations passed through to the Convox API
gatewayOperations implemented within the gateway itself
authAuthentication-related operations
securitySecurity-specific operations

Resources that map to Convox API operations:

ResourceDescription
appApplications
buildDocker image builds
deployDeployment operations
envEnvironment variables
instanceEC2/container instances
logApplication logs
objectBuild artifacts and objects
processRunning processes/containers
rackRack configuration
releaseApplication releases
secretSecret env var values (convox:secret:read reveals them)

The gateway forwards only the rack API routes it has a permission for (see Rack API Routes). Requests to any other route are refused with 404 and logged as denied, whatever the caller’s role, so Convox’s certificates, registries, resources, instance keyroll and terminate, and canceling an app update aren’t available through the gateway (the rack-gateway CLI has no commands for them).

Resources specific to the gateway:

ResourceDescription
api_tokenAPI tokens for automation
audit_logThe gateway audit log
deploy_approval_requestDeploy approval requests
integrationThird-party integrations
jobBackground jobs
settingA single gateway or app setting
setting_groupA group of settings saved together (one settings form)
userGateway users
ResourceDescription
secretsecurity:secret:update refreshes the pinned rack TLS certificate

Authentication and MFA resources:

ResourceDescription
authAuthentication sessions
mfa_backup_codesMFA recovery codes
mfa_methodMFA methods (TOTP, WebAuthn)
mfa_preferencesPreferred MFA method
mfa_verificationMFA verification challenges
trusted_deviceTrusted device tokens
ActionDescription
approveApprove a request
createCreate a new resource
deleteDelete a resource
deploy_with_approvalDeploy requiring prior approval
execExecute commands
generateGenerate credentials/codes
importImport external resources
listList resources
manageGeneral management operations
promotePromote a release
readRead/view a resource
restartRestart a service
run_privilegedStart a process with privileged options
setSet a value
set_protectedChange or remove a protected value
startStart a resource
stopStop a resource
terminateTerminate a resource
unsetRemove a value
updateUpdate a resource
update_nameUpdate only the name
PermissionDescriptionRoles
convox:app:listList all applicationsviewer, ops, deployer, cicd, admin
convox:app:readView application detailsviewer, ops, deployer, cicd, admin
convox:app:createCreate new applicationadmin
convox:app:updateUpdate application settingsdeployer, admin
convox:app:deleteDelete applicationadmin
convox:app:restartRestart applicationops, deployer, admin
PermissionDescriptionRoles
gateway:user:listView the team directory (names, emails, roles, locked status)viewer, ops, deployer, admin
gateway:user:readView any user’s details, sessions, lock reasons and MFA preferencesadmin
gateway:user:createCreate new useradmin
gateway:user:updateChange a user’s roles, lock or unlock them, revoke their sessionsadmin
gateway:user:update_nameChange a user’s display nameadmin
gateway:user:deleteDelete useradmin
gateway:audit_log:readRead and export every user’s audit logadmin

These permissions control MFA and authentication operations:

PermissionDescriptionNotes
auth:mfa_method:createEnroll new MFA methodSelf-service
auth:mfa_method:updateRename an MFA methodSelf-service
auth:mfa_preferences:updateChoose the preferred MFA methodSelf-service
auth:mfa_method:deleteRemove MFA methodSelf-service
auth:mfa_backup_codes:generateGenerate backup codesSelf-service
auth:mfa_verification:createInitiate MFA challengeSystem
auth:trusted_device:createTrust a deviceSelf-service
auth:trusted_device:deleteRemove trusted deviceSelf-service
PermissionDescriptionRoles
security:secret:updateRefresh the pinned rack TLS certificateadmin

Each permission also says how recently the caller must have verified MFA. A request needs the strictest level of any permission it uses:

LevelWhat the request needs
NoneA signed-in session
Step-upAn MFA verification within the step-up window (mfa_step_up_window_minutes, 10 minutes by default). The CLI asks once per command
Step-up once enrolledNothing for a user’s first MFA method; step-up once they have one
AlwaysAn MFA proof verified on that request, even within the step-up window

Reads and lists need none. Any other permission needs always unless it’s listed below:

LevelPermissions
Noneconvox:object:create, gateway:deploy_approval_request:create, auth:mfa_verification:create, and the settings ci_provider, circleci_approval_job_name, default_branch, github_post_pr_comment, vcs_provider, vcs_repo
Step-up once enrolledauth:mfa_method:create
Step-upconvox:app:create, convox:app:update, convox:app:restart, convox:build:create, convox:build:update, convox:release:create, convox:release:promote, convox:env:set, convox:env:unset, convox:process:start, convox:process:exec, convox:process:stop, convox:process:terminate, convox:rack:update, convox:secret:read, gateway:user:update_name, gateway:integration:create, gateway:integration:update, gateway:integration:delete, gateway:job:update, gateway:job:delete, the vcs_and_ci_defaults and session_configuration setting groups, the settings allow_deploy_from_default_branch, approved_deploy_commands, audit_visible_env_vars, circleci_auto_approve_on_approval, service_image_patterns, verify_git_commit_mode, and the auth permissions other than those above and auth:mfa_method:delete

So these always need MFA on the request itself: deleting apps, importing builds, creating, changing, locking and deleting users, revoking sessions, creating, changing and deleting API tokens, approving, rejecting and extending deploy approvals, removing an MFA method, refreshing the rack TLS certificate, changing protected env vars, privileged process options, and the settings that protect secrets or loosen deploy checks (mfa_configuration, allow_destructive_actions, deploy_approvals, vcs_ci_deploy, protected_env_vars, secret_env_vars, github_verification, require_pr_for_branch).

API tokens can’t verify MFA, so MFA levels don’t apply to them; what a token may do is limited by its permissions and its owner’s role. The levels are defined in internal/gateway/rbac/mfa_requirements.go.

Admin role uses wildcard permissions:

PermissionMatches
convox:*:*All Convox operations
gateway:*:*All Gateway operations
security:*:*Security operations (e.g. refreshing the rack TLS certificate)

Wildcards match any value in that position:

  • convox:app:* would match all app actions
  • convox:*:read would match all read actions

When a request arrives, the gateway:

  1. Identifies the user from session or API token
  2. Maps the endpoint to a permission (e.g., DELETE /apps/myapp → convox:app:delete). Every gateway endpoint under /api/v1 is declared in a route policy table with the permissions it needs; an endpoint that isn’t in the table is refused.
  3. Checks the caller’s current roles against the required permission. Roles are read from the database on every request, so a demotion takes effect immediately. An API token must hold the permission itself and its owner’s current role must allow it.
  4. Logs the decision to audit trail

Common API endpoints and their required permissions:

EndpointMethodPermission
/api/v1/rack-proxy/appsGETconvox:app:list
/api/v1/rack-proxy/apps/:nameGETconvox:app:read
/api/v1/rack-proxy/apps/:nameDELETEconvox:app:delete
/api/v1/rack-proxy/apps/:name/buildsPOSTconvox:build:create
/api/v1/rack-proxy/apps/:name/builds/importPOSTconvox:build:import
/api/v1/rack-proxy/apps/:name/processesGETconvox:process:list
/api/v1/rack-proxy/apps/:name/processes/:id/execGET (WebSocket)convox:process:exec
/api/v1/apps/:app/envGETconvox:env:read
/api/v1/apps/:app/envPUTconvox:env:set
/api/v1/rack-proxy/apps/:name/releases/:id/promotePOSTconvox:release:promote

These are the only rack API routes the gateway forwards (under /api/v1/rack-proxy), from internal/gateway/rbac/http_routes.go:

RoutePermission
GET /apps, GET /apps/{name}, GET /apps/{app}/services, GET /apps/{app}/budget, GET /apps/{app}/budget/shutdown-stateconvox:app:list, convox:app:read
POST /appsconvox:app:create
PUT /apps/{name}, PUT /apps/{app}/services/{name}convox:app:update
POST /apps/{app}/restart, POST /apps/{app}/services/{service}/restartconvox:app:restart
DELETE /apps/{name}convox:app:delete
GET /apps/{app}/builds, GET /apps/{app}/builds/{id}, GET /apps/{app}/builds/{id}.tgzconvox:build:list, convox:build:read
POST /apps/{app}/builds, PUT /apps/{app}/builds/{id}convox:build:create, convox:build:update
POST /apps/{app}/builds/importconvox:build:import
POST /apps/{app}/objects/tmp/{name}convox:object:create
GET /apps/{app}/releases, GET /apps/{app}/releases/{id}convox:release:list, convox:release:read
POST /apps/{app}/releasesconvox:release:create
POST /apps/{app}/releases/{id}/promoteconvox:release:promote
GET /apps/{app}/processes, GET /apps/{app}/processes/{pid}convox:process:list, convox:process:read
POST /apps/{app}/services/{service}/processesconvox:process:start
DELETE /apps/{app}/processes/{pid}convox:process:terminate
GET /apps/{app}/processes/{pid}/exec (WebSocket)convox:process:exec
App, process, build and rack logs (.../logs, HTTP or WebSocket)convox:log:read
GET /instances, GET /instances/{id}convox:instance:list, convox:instance:read
GET /system, /system/capacity, /system/metrics, /system/processes, /system/releasesconvox:rack:read
PUT /systemconvox:rack:update