rotate_api_password

Description

Setting rotate_api_password=true replaces the Rack API password. The Rack runs an update at its current version that generates a new password, and the Rack API restarts on it. The Rack version does not change, and no convox rack update is needed.

The parameter is an action, not a stored setting. It accepts only true, it has no default, and it never appears in convox rack params.

A rotation does not revoke access tokens created with convox rack access. Those keep working until you run convox rack access key rotate.

Rotating the Password

$ convox rack params set rotate_api_password=true -r rackName
Updating parameters... OK

On a self-managed Rack, the CLI prints this line on stderr when the update finishes:

NOTICE: rotated the rack API password. RACK_URL values that embed the old password no longer work; run 'convox rack access key rotate' to also revoke access tokens.

On a Console-managed Rack, the Console performs the rotation and stores the new password. You can also start it from the Console with Rotate API Password in the Rack's settings.

To revoke every credential after a leak, rotate the password and the access token signing key. The password rotation does not revoke access tokens:

$ convox rack params set rotate_api_password=true -r rackName
Updating parameters... OK

$ convox rack access key rotate -r rackName
OK

What Uses the Old Password

Holder of the old password After the rotation
The Rack API Restarts on the new password
The Console, for a Console-managed Rack Stores the new password when the update finishes
A self-managed CLI on the machine that ran the rotation Uses the new password on its next command
A kubeconfig from convox rack kubeconfig, a Rack added by URL, an exported RACK_URL Stops working. Generate or update it again
App Processes using the RACK_URL the Rack sets Get 401 responses until the App's next deploy
Builds running during the rotation Can fail while the Rack API restarts
External tools and CI that use a RACK_URL with the password Stop working
Access tokens from convox rack access Keep working until convox rack access key rotate

A Rotation Is a Full Rack Update

A rotation is a full Rack update at the current version, not a change to the password alone. Like any convox rack params set, it puts every resource Convox manages back to its configured state. Changes made by hand to those resources, for example during an incident, are undone. Changes to things Convox does not manage are kept.

If the update fails, the rotation stays pending, and the next Rack update completes it.

Changing the api-password Secret in the cluster by hand does not rotate the password: the next Rack update puts the stored value back. Use this parameter instead.

Requirements

Rack Requirement
Self-managed CLI version 3.26.1 or later (run sudo convox update). Any Rack version
Console-managed The Console's Rotate API Password control, or CLI version 3.26.1 or later. Any Rack version

An older CLI rejects rotate_api_password as an unknown parameter. On a self-managed Rack, --force makes an older CLI accept it, but the Rack update then removes it with NOTICE: removing parameters not supported by version <version>: rotate_api_password and nothing rotates.

Additional Information

  • Validation: any value other than true is rejected with param 'rotate_api_password' only accepts true, also with --force.
  • Access tokens: a rotation does not revoke them. Run convox rack access key rotate for that.
  • Downgrade: the parameter is not stored, so a downgrade has nothing to remove.
  • Providers: AWS, GCP, Azure, DigitalOcean, metal and local. See AWS, GCP and Azure.

See Also