Configuring DataLens On-premises secrets
You can set secrets in two ways:
- Via properties in the
values.yamlfile (recommended for first deployment). - Via an external Kubernetes secret, with a link in
secrets.ref.
When using the ./init.sh script, secrets are generated automatically on first deployment and stored in the Kubernetes cluster secrets.
Example YAML configuration
secrets:
ref: null # Link to an external Kubernetes secret
#
# === RSA authentication keys (required) ===
AUTH_TOKEN_PRIVATE_KEY: null # Generated automatically on first deployment
AUTH_TOKEN_PUBLIC_KEY: null # Generated automatically on first deployment
AUTH_PROVIDERS_CONFIG: null # JSON array of providers (optional)
AUTH_ADMIN_PASSWORD: null # The admin password (generated automatically)
AUTH_CALLBACK_COOKIE_SECRET: null # Generated automatically
#
# === Security ===
CSRF_SECRET: null # Generated automatically
#
# === Master tokens ===
AUTH_MASTER_TOKEN: null # Generated automatically
US_MASTER_TOKEN: null # Generated automatically
FILE_UPLOADER_MASTER_TOKEN: null # Generated automatically
EXPORT_DATA_VERIFICATION_KEY: null # Generated automatically
#
# === Encryption keys ===
CONTROL_API_CRYPTO_KEY: null # Generated automatically
#
# === Docker Registry ===
DOCKER_CONFIG_JSON: null # Required if registry.private: true
#
# === PostgreSQL ===
POSTGRES_PASSWORD_ROOT: null # Generated automatically
POSTGRES_PASSWORD_US: null # Generated automatically
POSTGRES_PASSWORD_COMPENG: null # Generated automatically
POSTGRES_PASSWORD_AUTH: null # Generated automatically
POSTGRES_PASSWORD_TEMPORAL: null # Generated automatically
POSTGRES_PASSWORD_META_MANAGER: null # Generated automatically
POSTGRES_PASSWORD_DEMO: null # Generated automatically
#
# === Temporal RSA keys (for import/export) ===
TEMPORAL_AUTH_PRIVATE_KEY: null # Generated if features.export is enabled
TEMPORAL_AUTH_PUBLIC_KEY: null # Generated if features.export is enabled
#
# === Infrastructure components ===
CLICKHOUSE_PASSWORD: null # Generated automatically
REDIS_PASSWORD: null # Generated automatically
S3_ACCESS_KEY_ID: null # Generated automatically
S3_SECRET_ACCESS_KEY: null # Generated automatically
Manual generation of RSA keys
If you need to generate RSA keys manually, use the following commands:
# Generating a private key (4096 bit)
openssl genpkey -algorithm RSA -pkeyopt "rsa_keygen_bits:4096" -out private.pem
# Extracting a public key
openssl rsa -in private.pem -pubout -out public.pem
# Viewing content to insert into values.yaml
cat private.pem
cat public.pem
When specifying in values.yaml, use the multi-line YAML format:
secrets:
AUTH_TOKEN_PRIVATE_KEY: |
-----BEGIN PRIVATE KEY-----
MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQC...
...
-----END PRIVATE KEY-----
AUTH_TOKEN_PUBLIC_KEY: |
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA...
...
-----END PUBLIC KEY-----
DOCKER_CONFIG_JSON format
Example configuration for a private registry:
{
"auths": {
"registry.example.com": {
"username": "user",
"password": "password",
"auth": "base64(user:password)"
}
}
}
Also see the example in the ./help/docker-config.example.json file.
Using an external Kubernetes secret
If secrets already exist in the Kubernetes cluster, provide a link to the secret:
secrets:
ref: my-existing-secret
In which case all other values in the secrets section will be ignored, and the system will use the values from the specified Kubernetes secret.
The external secret must contain all the necessary keys with relevant names.
Useful commands
# To get the administrator password
./init.sh --get-admin-password
# To generate new RSA keys for authentication
./init.sh --auth-rsa-gen
# To generate new RSA keys for Temporal
./init.sh --temporal-rsa-gen
# To specify the authentication provider configuration file
./init.sh --auth-providers-config ./my-auth-config.json
# To create a PostgreSQL backup prior to rotation
./init.sh --dump-postgres
# To check pod statuses after rotation
./init.sh --kubectl get pods
# To view logs to diagnose issues
./init.sh --stern .
ClickHouse® is a registered trademark of ClickHouse, Inc.