Skip to content
Reference

Variables and secret references

Vars configure an App without changing its source code. They have three value classes with different visibility and delivery contracts.

Value classUse forValue visibilityAvailable to
Environment variableNon-sensitive runtime configurationPlain text in App settingsRunning App containers
Runtime secretPasswords, API keys, tokens, and private keysWrite-only after saveSelected running App containers
Build secretCredentials required while building an imageWrite-only after saveThe isolated image build, not the running App

Secret references contain delivery metadata only. Secret values don’t appear in the platform-managed App settings file, the applied configuration read model, operation history, or customer-visible logs.

synsmarts canonicalizes every customer variable and secret-reference name before validation:

  1. apply Unicode compatibility normalization;
  2. convert letters to uppercase;
  3. replace each sequence outside A-Z and 0-9 with _;
  4. remove leading and trailing underscores.

Examples:

Entered nameEffective name
feature modeFEATURE_MODE
payments-api-tokenPAYMENTS_API_TOKEN
__cache.region__CACHE_REGION
already_NORMALIZEDALREADY_NORMALIZED

A name that contains no letters or digits after canonicalization is invalid.

Non-secret environment-variable names must be unique by effective name. Secret-reference names must be unique within each runtime target. For example, payments-token, PAYMENTS_TOKEN, and payments token collide when they appear in the same name scope. A runtime secret also can’t use the same effective name as a non-secret environment variable in a container where that secret is delivered.

Customers can’t replace names owned by the platform.

The following prefixes are reserved:

  • AWS_
  • DATABASE_
  • MAGENTO_
  • OTEL_
  • S3_UPLOADS_

Current exact reserved names outside those prefixes are:

  • CRON_MAX_OVERLAP
  • CRON_STATE_DIR
  • LOG_FORMAT
  • LOG_LEVEL
  • MYSQL_HOST
  • OPENSEARCH_HOST
  • PATH
  • PHP_ERROR_REPORTING
  • REDIS_CACHE_HOST
  • REDIS_CONFIG_CACHE_HOST
  • REDIS_SESSION_HOST
  • TENANT_ID

The server validates against the current platform registry. If a submitted name becomes reserved, the change is rejected rather than silently overriding the platform value.

Environment variables are app-level, non-secret strings. Use them for feature flags, hostnames, log levels, and other values that are safe to display in App settings.

Removing an environment variable removes it from the next applied runtime configuration. Application code must handle missing optional values.

The platform can’t identify every credential pasted into a plain-text field. Choosing the correct value class is part of the customer security boundary: never store a password, token, private key, or recovery code as an environment variable.

A secret reference has these customer-visible parts:

PartContract
Environment nameThe canonical name exposed to the consuming process.
Secret keyThe logical storage key for the write-only value.
Classruntime for a running process or build for an image build.
Runtime targetsThe containers that receive a runtime secret. Build secrets have no runtime target.

The default secret key is the environment name converted to lowercase snake-case. For example, PAYMENTS_API_TOKEN defaults to payments_api_token.

Change the secret key only when an integration requires a different logical key. Changing the key retargets the reference, so the request must include the secret value again.

Each secret value must be 60 KiB or smaller.

Runtime secrets default to all supported runtime containers. Advanced options can restrict a secret to the smallest required set.

Portal targetSettings targetTypical consumer
PHP runtimephp_fpmWordPress, Magento, or custom PHP code
Web servernginxValidated Nginx runtime behavior
Scheduled jobscronCron PHP and scheduled commands
Managed shellshellCommands run in the App shell

One stored runtime value can be delivered under the same environment name to multiple selected targets. A secret isn’t broadcast to containers that don’t declare the reference.

Runtime secret values are write-only. After a secret is saved, the portal shows that a value exists but can’t display the original value. The value field is masked while you type it.

This applies to customer-supplied secrets. Platform-generated credentials are a separate class: synsmarts issues them, so it can show them back to you. The only one today is DATABASE_PASSWORD in the Platform provided group, which Team owners and admins can copy or reveal; both actions are rate limited and recorded in Team activity. See Manage Vars and secrets.

  • Leave the value field empty when editing unrelated settings to preserve an existing value.
  • Enter a replacement value to rotate a secret.
  • A new reference, a reference whose key or class changed, or an existing reference added to another runtime target requires a value in the same request.
  • Remove the reference to stop delivering the secret after the change applies.

If you don’t know the current value, retrieve it from the credential issuer or rotate it there and in synsmarts. Support can’t read it back for you.

Build secrets are mounted only into an isolated image build. They aren’t added to the running environment. Build steps must not copy a mounted credential into the source tree, an image layer, a build artifact, or a cache; doing so can persist the value outside the protected secret mount.

Magento Apps provide an empty COMPOSER_AUTH slot with the default key composer_auth. The value is the complete Composer authentication JSON document. Leaving the empty default slot unchanged doesn’t create a secret reference.

Saving or applying a build-secret change doesn’t rebuild the current image. The next image build uses the current build-secret value.

The Vars page shows desired configuration. The running App can remain on the last successfully applied configuration while a newer revision is staged or being applied.

ActionDesired settings fileRunning containersBuild image
Save for next restartUpdated immediatelyUnchanged until the next managed restartUnchanged
Apply nowUpdated immediatelyConfig deploy restarts containersUnchanged
Later image buildUnchangedUpdated only if a runtime rollout also runsUses current build secrets

Use Apply now for runtime-secret rotation or removal so an already-running process doesn’t continue using the previous credential. A later managed restart also promotes staged Vars.

  • For an environment variable, verify the App feature that consumes it.
  • For a runtime secret, verify the authenticated integration without printing the value, dumping the environment, or exposing a diagnostic page.
  • For a build secret, run a build that requires it and verify the build result.
  • After removing or rotating a credential, verify that the replacement works and revoke the old credential at its issuer.
  • If an apply fails or its final state is unknown, load the latest Vars configuration before entering a write-only value again.

Never place secret values in source control, the App settings file, support requests, screenshots, operation notes, command output, or customer documentation.

See Manage Vars and secrets for the portal workflow and App settings file for the authoritative env and secret_refs sections.