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:

  1. Create an access token with the lowest role the App needs. Use read unless the App changes things, and set a duration in hours, at most 8760:

    $ convox rack access --role read --duration-in-hours 720 -r rackName
    RACK_URL=https://jwt:<token>@<rack host>
    
  2. 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's RACK variable:

    $ 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... OK
    

    The public host that convox rack access prints does not work from inside the Rack when proxy_protocol is true. When disable_convox_resolver is true, calls to it leave the cluster and go through the internet and the Rack's whitelist.

  3. Set a new token before the old one expires. A token also stops working when convox rack access key rotate runs.

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 true or false. The parameter is not clearable: an empty value is rejected with param 'app_rack_url_disable' requires an explicit value (omit to keep current).
  • Version: requires Rack version 3.26.1 or later and CLI version 3.26.1 or later. An older CLI rejects the parameter as unknown, so run sudo convox update first. On a Rack below 3.26.1 the parameter has no effect, and the Rack update removes it with NOTICE: removing parameters not supported by version <version>: app_rack_url_disable.
  • Downgrade: downgrading below 3.26.1 removes the parameter with the same NOTICE, and each App gets RACK_URL back at its next deploy. A Rack managed through the Console keeps the stored value and applies it again on the next update to 3.26.1 or later. A self-managed Rack drops the value, so set it again after upgrading.
  • Providers: AWS, GCP, Azure, DigitalOcean and metal. See GCP, Azure and DigitalOcean. On metal Racks, set it through the CLI. Local Racks do not accept it.

See Also