Commit eba7f220 authored by Clement Bois's avatar Clement Bois
Browse files

Merge branch 'secret-url-timeout' into 'master'

docs: url variable for external secrets

See merge request to-be-continuous/doc!113
parents 35a34fdd add572bd
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -163,6 +163,14 @@ decoded by our templates (make sure you're using a version of the template that
>
> `CAVE_PASSPHRASE=@b64@eyJvcGVuIjoiJOKCrDVAbWUifQ==`

### Using an external secrets management system

If you want to pull secrets from an external secrets management system, declare a variable with `@url@` prefix, followed by the URL of the secret. Our templates will automatically fetch the URL and put the content into the variable (make sure you're using a version of the template that supports this syntax).

For [Hashicorp Vault](https://developer.hashicorp.com/vault), we provide a [vault-secrets-provider](https://gitlab.com/to-be-continuous/tools/vault-secrets-provider) image, available in most templates through a `-vault` [variant](../self-managed/advanced/#template-variants). It allows fetching secrets from a Vault server and inject them into your CI/CD variables using the `@url@http://vault-secrets-provider/api/secrets/{secret_path}?field={field}` syntax.

Default timeout for fetching secrets is 5 seconds. If you need to increase it, you can set the global `TBC_SECRET_URL_TIMEOUT` variable to the desired number of seconds.

## Scoped variables

All our templates support a generic and powerful way of limiting/overriding some of your environment variables, depending on the execution context.