app_rack_url_disable
Description
The app_rack_url_disable parameter stops the Rack from adding the RACK_URL system variable to App Processes. RACK_URL is the URL of the Rack API with the Rack API password in it, so with the parameter on, the password is no longer in the environment of your Apps. The RACK variable is still set.
Default Value
The default value is false. The Rack adds RACK_URL to App Processes, as it did before the parameter existed.
When Processes Lose RACK_URL
| Process | When it stops receiving RACK_URL |
|---|---|
convox run |
Once the Rack update that applies the parameter has restarted the Rack API |
| Services, agents and Timers | At the App's next deploy: convox deploy, or a promote of a new Release |
Processes already running when you promote the active Release again, or run convox apps params set |
They keep it until convox restart. Processes started after that do not get it |
| Builds | Never. A Build uses its own RACK_URL to report back to the Rack |
A RACK_URL that you set on an App with convox env set takes precedence over the Rack's value, and the Rack leaves it in place with the parameter on or off.
Apps That Call the Rack API
An App that calls the Rack API through RACK_URL loses access at its next deploy. Give it its own RACK_URL before you turn the parameter on:
-
Create an access token with the lowest role the App needs. Use
readunless the App changes things, and set a duration in hours, at most8760:$ convox rack access --role read --duration-in-hours 720 -r rackName RACK_URL=https://jwt:<token>@<rack host> -
Set it on the App with the in-cluster host of the Rack API, keeping only the token from the output above.
<RACK>is the value of the App'sRACKvariable:$ convox env set RACK_URL="https://jwt:<token>@api.<RACK>-system.svc.cluster.local:5443" -a myapp --promote Setting RACK_URL... OK Release: RABCDEFGHI Promoting RABCDEFGHI... OKThe in-cluster host reaches the Rack API service directly from inside the cluster, without going through the Rack's router.
-
Set a new token before the old one expires. A token also stops working when
convox rack access key rotateruns.
Anyone who can read the App's environment with convox env can read this value, including users with a read access token. Choose the token's role with that in mind, and do not put the Rack API password itself in an App's environment.
Setting the Parameter
$ convox rack params set app_rack_url_disable=true -r rackName
Updating parameters... OK
Setting it to true prints this warning on stderr:
WARNING: running app processes keep RACK_URL until each app's next deploy. Apps that call the rack API through RACK_URL lose access and need their own, set with 'convox env set'.
To add RACK_URL to App Processes again, set the parameter to false. Processes get it back on the same schedule as in the table above.
$ convox rack params set app_rack_url_disable=false -r rackName
Updating parameters... OK
You can also set the parameter from the Rack's settings in the Console.
Viewing Current Configuration
$ convox rack params -r rackName
convox rack params lists stored values only, so app_rack_url_disable does not appear until you set it. It belongs to the security parameter group.
Additional Information
- Validation: must be
trueorfalse. The parameter is not clearable: an empty value is rejected withparam 'app_rack_url_disable' requires an explicit value (omit to keep current). - Version: requires Rack version
3.26.1or later and CLI version3.26.1or later. An older CLI rejects the parameter as unknown, so runsudo convox updatefirst. On a Rack below3.26.1the parameter has no effect, and the Rack update removes it withNOTICE: removing parameters not supported by version <version>: app_rack_url_disable. - Downgrade: downgrading below
3.26.1removes the parameter with the sameNOTICE, and each App getsRACK_URLback at its next deploy. A Rack managed through the Console keeps the stored value and applies it again on the next update to3.26.1or later. A self-managed Rack drops the value, so set it again after upgrading. - Providers: AWS, GCP, Azure, DigitalOcean and metal. See AWS, GCP and DigitalOcean. On metal Racks, set it through the CLI. Local Racks do not accept it.
See Also
- Environment Variables for the variables the Rack sets on every process
- rack access for creating access tokens and rotating their signing key
- rotate_api_password for replacing the Rack API password
- router_user_snippets_disable for refusing nginx snippet annotations from Apps