Secrets
Any string value in a pipeline config can be a reference to a secret instead of a plaintext value. Bizon resolves every reference once, over the raw YAML, before the config is validated. Sources and destinations receive plain strings, so no connector needs to support secrets itself.
source: name: hubspot stream: contacts authentication: type: api_key params: token: gsm://hubspot-api-token
engine: backend: type: postgres config: host: db.internal port: 5432 database: bizon schema: public username: bizon password: env://PG_PASSWORDReference Syntax
Section titled “Reference Syntax”| Reference | Resolves to |
|---|---|
gsm://<secret> | Latest version of <secret> in the default project |
gsm://<secret>/versions/<n> | Version <n> of <secret> in the default project |
gsm://projects/<project>/secrets/<secret>/versions/<n> | That exact resource, used as-is |
env://<VAR> | The environment variable <VAR> |
${gsm://...} / ${env://...} | The same, embedded in a larger string |
Google Secret Manager
Section titled “Google Secret Manager”source: name: notion stream: pages authentication: type: api_key params: token: gsm://notion-api-token/versions/3The full projects/... form names the project, so it needs no default project. The short forms use the default project. The secret payload is decoded as UTF-8.
Environment variables
Section titled “Environment variables”password: env://PG_PASSWORDA variable that is not set is an error, not an empty string. Variables can come from the shell or from a .env file loaded with --env-file.
Inline references
Section titled “Inline references”Wrap a reference in ${...} to embed it in a larger string. A value can hold several:
destination: name: bigquery config: project_id: ${env://GCP_PROJECT_ID} dataset_id: raw_${env://ENVIRONMENT} gcs_buffer_bucket: ${env://GCP_PROJECT_ID}-${env://ENVIRONMENT}-bizon-bufferA whole value with any other scheme, such as https://... or postgresql://..., is left untouched. Inside ${...}, only gsm and env are accepted.
BIZON_ENV_ prefix
Section titled “BIZON_ENV_ prefix”A whole value starting with BIZON_ENV_ is replaced by the environment variable of that name:
token: BIZON_ENV_HUBSPOT_TOKENIt works only for whole values in mappings, not inline and not inside lists. env:// covers both cases.
The secrets Block
Section titled “The secrets Block”The optional top-level secrets: block sets provider defaults. It accepts only gsm.project_id; any other key fails validation.
secrets: gsm: project_id: my-secrets-projectWhen secrets.gsm.project_id is not set, gsm:// references use the project of the Application Default Credentials, which also reads GOOGLE_CLOUD_PROJECT. If no project can be found, short references fail and name the three ways to set one.
Authentication
Section titled “Authentication”Google Secret Manager is accessed with Application Default Credentials: workload identity on GKE or Cloud Run, GOOGLE_APPLICATION_CREDENTIALS, or gcloud auth application-default login locally. The identity needs secretmanager.versions.access on each secret, for example through the Secret Manager Secret Accessor role.
Install the client with the secretmanager extra:
pip install 'bizon[secretmanager]'The client is only loaded when a gsm:// reference appears, so configs that use only env:// don’t need the extra. Without it, a gsm:// reference fails with a message naming the extra.
Resolution Order
Section titled “Resolution Order”- Values starting with
BIZON_ENV_are replaced from the environment. gsm://andenv://references, whole-value and inline, are resolved. Each distinct reference is fetched once per run.- The resolved config is validated.
Because resolution comes before validation, a typed field (a port, a boolean) can hold a reference and still be checked against the resolved value. Resolution runs for bizon run, bizon config validate and bizon stream reset.
Checking References
Section titled “Checking References”bizon secrets check dry-runs every reference in a config and prints its path with a masked result. It exits non-zero if any reference fails.
bizon secrets check config.yml --env-file .envsource.authentication.params.token gsm://hubspot-api-token ✓ (44 chars)engine.backend.config.password env://PG_PASSWORD ✓ (24 chars)All 2 reference(s) resolved.To validate a config in CI without access to the secrets, use bizon config validate --skip-references. References are left unresolved and the fields that hold one are not type-checked.
Next Steps
Section titled “Next Steps”- CLI Reference -
secrets check,config validateand--env-file - Configuration Reference - Complete YAML options
- Authentication - Configure source credentials