Secret Managers
Instead of a password, you can give the platform a reference to a secret in AWS Secrets Manager, Google Cloud Secret Manager or HashiCorp Vault. The platform fetches the value when it connects, so the password isn’t stored in a configuration file or with the data source.
How it works
A reference is a JSON object whose type names the secret manager, with the fields that identify the secret. For example:
{"type": "aws", "secret": "prod/tdk/input-password"}
-
Turn on the secret manager with its setting, on the CLI or on Governor and its workers.
-
Give the platform access to the secret manager, through the cloud’s usual credentials or Vault’s connection settings.
-
Put references where you would put a user name or password: see Where references go.
Each secret’s value must be a UTF-8 string.
AWS Secrets Manager
Turn it on with SECRETS_AWS_SECRET_MANAGER_ENABLED=true. It defaults to the value of TDK_AWS_ENABLED.
{"type": "aws", "secret": "prod/tdk/input-password", "version": "<version-id>"}
| Field | Value |
|---|---|
|
The name or ARN of the secret. |
|
Optional. The version ID. Without it, the |
The platform finds AWS credentials through the AWS SDK credentials chain: environment variables, a profile, or the role of the instance, task or pod it runs in. Give that identity secretsmanager:GetSecretValue on the secrets it needs. When it’s on, the log shows AWS Secrets Manager enabled.
Google Cloud Secret Manager
Turn it on with SECRETS_GCP_SECRET_MANAGER_ENABLED=true.
{"type": "gcp", "project": "my-project", "secret": "tdk-input-password", "version": "latest"}
| Field | Value |
|---|---|
|
The Google Cloud project ID. |
|
The secret ID. |
|
Optional. The version ID. Without it, the latest version is used. |
The platform finds Google Cloud credentials from the environment it runs in, or from the file that GOOGLE_APPLICATION_CREDENTIALS points to. When it’s on, the log shows Google Secret Manager enabled.
HashiCorp Vault
Turn it on with SECRETS_VAULT_SECRET_MANAGER_ENABLED=true.
{"type": "vault", "storage": "secret", "path": "tdk", "secret": "input-password", "versioned": "true", "version": "0"}
| Field | Value |
|---|---|
|
The secret storage, such as |
|
The mount path of the secret. |
|
The name of the secret. |
|
Optional. Whether the storage is versioned. |
|
Optional. The version. |
Also set the Vault connection properties, such as vault.uri, vault.token and vault.ssl.*, and any other authentication settings Spring Vault supports. See the Spring Vault documentation. When it’s on, the log shows Vault Secrets Manager enabled.
Raw values
A raw reference holds the value itself, unencrypted. Use it for testing:
{"type": "raw", "value": "${SOURCE_PASSWORD}"}
Where references go
- CLI options
-
The
-secretoptions take a reference instead of the value:--input-username-secret,--input-password-secret,--output-username-secretand--output-password-secret.SECRETS_AWS_SECRET_MANAGER_ENABLED=true \ tdk --config-file workflow.yaml \ --input-url "jdbc:postgresql://db.example.com:5432/production" \ --input-username tdk \ --input-password-secret '{"type": "aws", "secret": "prod/tdk/input-password"}' \ --output-url "jdbc:postgresql://db.example.com:5432/testing" \ --output-username tdk \ --output-password-secret '{"type": "aws", "secret": "test/tdk/output-password"}' - Inventory file
-
In an inventory file,
userandpasswordtake a reference:data_sources: input: url: jdbc:postgresql://db.example.com:5432/production read_only: true user: type: raw value: tdk password: type: aws secret: prod/tdk/input-password output: url: jdbc:postgresql://db.example.com:5432/testing user: type: raw value: tdk password: type: vault storage: secret path: tdk secret: output-password - Governor
-
A data source can keep its credentials in a secret manager instead of Governor’s database. Governor then stores the reference, not the password.