When configuring connections to Apache Kafka or Amazon Kinesis, you can use environment variable placeholders to dynamically insert sensitive or environment-specific values (e.g., credentials, file paths, or hostnames). This feature is supported both in the user interface (UI) and through the Public API. Placeholders follow the format ${env:CON_VARIABLE_NAME}, where CON_VARIABLE_NAME is the name of an environment variable available to the application.

The environment variable must start with CON_ (e.g., CON_KAFKA_BROKERS). Access to other environment variables is prohibited due to security reasons. Non-prefixed variables (e.g., USER) will not be replaced and will remain as placeholders in the output.
This article covers how to use placeholders when setting up connections, whether through the UI dialog or the Public API.
You can use multiple placeholders in a value, e.g.:
- org.apache.kafka.common.security.plain.PlainLoginModule required username="${env:CON_KAFKA_USERNAME}" password="${env:CON_KAFKA_PASSWORD}";
Add the respective environment variables to your container:
- export CON_KAFKA_USERNAME="myuser"
- export CON_KAFKA_PASSWORD="mypassword123"
Supported Connection Fields
Placeholders can be used in the following connection fields:
- Addresses: Kafka broker or Kinesis endpoint addresses.
- Schema Registry: URL for the schema registry.
- Security Configuration:
- SASL Configuration
- Truststore Location
- Truststore Password
- Keystore Location
- Keystore Password
- Keystore Private Password
- Schema Security Configuration (Kafka only):
- Schema User Info
- Truststore Location
- Truststore Password
- Keystore Location
- Keystore Password
- Keystore Private Password
- Additional Config Details: Extra configuration settings.
- Custom Properties: JSON-formatted custom properties.
- JMX: JSON-formatted JMX configuration.
If an environment variable isn’t found, the placeholder remains unchanged in the field.