local
secrets manager that stores secrets in local files. Additional cloud secrets managers are provided by integrations:AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
as well as an optional AWS_SESSION_TOKEN
. If you don't specify a schema when registering a secret, ZenML will use the ArbitrarySecretSchema
, a schema where arbitrary keys are allowed.@
syntax to indicate to ZenML that the value needs to be read from a file:StepContext
. This allows you to use your secrets for querying APIs from within your step without hard-coding your access keys. Don't forget to make the appropriate decision regarding caching as it will be disabled by default when the StepContext
is passed into the step.zenml.secret.BaseSecretSchema
class. For example, the following is the builtin schema defined for the MySQL Metadata Store secrets:--schema
argument must be passed to the zenml secret register
command:zenml secrets-manager register
. An instance is uniquely identified by its UUID (not by its name).scope
determines the secret scope and can be set to one of the following values:none
: no secret scoping is used when this scope value is configured. This essentially means that all secrets use the same global namespace that is shared not only with other ZenML Secrets Manager instances using a none
scope, but also with other applications and users that configure secrets directly in the backend. This mode of operation is only used to preserve backwards compatibility with Secrets Manager instances that were already in use prior to the ZenML release 0.12.0 that introduced the concept of scoping. It is not recommended to use this scope with Secrets Manager instances that support scoping, as it will be deprecated and phased out in future ZenML versions.global
: secrets are shared across all Secrets Manager instances that connect to the same backend and have a global
scope. You should use this scope if you want to share your secrets with everyone using ZenML in your team or organization and are not interested in micro-managing the access to these secrets.component
: secrets are not visible outside a Secrets Manager instance. This is the default for new instances of Secrets Manager flavors that support scoping. Use this scope if you don't intend to share your secrets with other projects or stacks. The component scope means that only stacks with a Secrets Manager with the exact UUID as your stack can access your secrets. The global or namespace scope are more suitable for sharing access to secrets.namespace
: secrets in a namespace scope are shared only by Secrets Manager instances that connect to the same backend and have the same namespace
attribute value configured (see below). Use a namespace scope when you want to fine-tune the visibility of secrets across stacks and projects.namespace
is a scope namespace value to use with the namespace scope