airflow.providers.akeyless.secrets.akeyless¶
Secrets Backend for sourcing Connections, Variables, and Config from Akeyless.
Classes¶
Retrieve Connections, Variables, and Configuration from Akeyless. |
Module Contents¶
- class airflow.providers.akeyless.secrets.akeyless.AkeylessBackend(connections_path='/airflow/connections', variables_path='/airflow/variables', config_path='/airflow/config', sep='/', use_team_secrets_path=True, global_secrets_path=None, api_url='https://api.akeyless.io', access_id=None, access_key=None, access_type='api_key', token_ttl=_DEFAULT_TOKEN_TTL, **kwargs)[source]¶
Bases:
airflow.secrets.BaseSecretsBackend,airflow.utils.log.logging_mixin.LoggingMixinRetrieve Connections, Variables, and Configuration from Akeyless.
Configurable via
airflow.cfg:[secrets] backend = airflow.providers.akeyless.secrets.akeyless.AkeylessBackend backend_kwargs = { "connections_path": "/airflow/connections", "variables_path": "/airflow/variables", "api_url": "https://api.akeyless.io", "access_id": "p-xxxx", "access_key": "xxxx" }
Secrets are looked up by joining
<base_path>/<key>.In multi-team deployments (
core.multi_team = True), secrets are first looked up under{base_path}/{team_name}/{key}. If not found, the backend falls back to a global path:{base_path}/{global_secrets_path}/{key}(whenglobal_secrets_pathis set) or{base_path}/{key}(default). Team-scoped lookup can be disabled withuse_team_secrets_path = False.Only
api_keyanduidauthentication types are supported in the secrets backend. For cloud-based authentication (aws_iam,gcp,azure_ad) or other advanced methods, useAkeylessHookdirectly.- Parameters:
connections_path (str | None) – Akeyless path prefix for Connections (None to disable).
variables_path (str | None) – Akeyless path prefix for Variables (None to disable).
config_path (str | None) – Akeyless path prefix for Config (None to disable).
sep (str) – Separator between base path and key.
use_team_secrets_path (bool) – When True (default), look up secrets under
{base_path}/{team_name}/{key}in multi-team mode before falling back.global_secrets_path (str | None) – Optional path segment inserted between base path and key for the global fallback in multi-team mode (e.g.
"global").api_url (str) – Akeyless API endpoint.
access_id (str | None) – Access ID.
access_key (str | None) – Access Key (for
api_keyauth).access_type (str) – Auth type (
api_keyoruid).token_ttl (int) – Seconds to cache the API token before refreshing (default 600).