Skip to content

Add Akeyless Vault Platform provider#64754

Open
baraka-akeyless wants to merge 16 commits intoapache:mainfrom
baraka-akeyless:add-akeyless-provider
Open

Add Akeyless Vault Platform provider#64754
baraka-akeyless wants to merge 16 commits intoapache:mainfrom
baraka-akeyless:add-akeyless-provider

Conversation

@baraka-akeyless
Copy link
Copy Markdown

Summary

Add a new community provider for Akeyless Vault Platform — a SaaS-based secrets management and zero-trust access platform.

Components

Component Class Description
Hook AkeylessHook Interact with Akeyless — static, dynamic, and rotated secrets; item CRUD
Connection type akeyless Custom UI fields for 8 authentication methods
Secrets Backend AkeylessBackend Source Airflow Connections, Variables, and Config from Akeyless

Authentication methods supported

API Key, AWS IAM, GCP, Azure AD, Universal Identity (UID), JWT/OIDC, Kubernetes, Certificate

Hook capabilities

  • get_secret_value / get_secret_values — static secrets
  • get_dynamic_secret_value — just-in-time credentials (databases, cloud, K8s)
  • get_rotated_secret_value — auto-rotated credentials
  • create_secret / update_secret_value / delete_item
  • list_items / describe_item

Secrets Backend

Drop-in replacement pattern identical to the HashiCorp Vault backend — stores Connections (URI or JSON), Variables, and Config under configurable Akeyless paths.

Dependencies

  • akeyless>=5.0.0 (Apache 2.0, ~350K monthly PyPI downloads)
  • Optional: akeyless_cloud_id for AWS/GCP/Azure cloud-based auth

Changes outside providers/akeyless/

  • pyproject.toml: added akeyless extra, workspace member, uv source, mypy paths, all-providers dep
  • .github/boring-cyborg.yml: provider:akeyless label mapping
  • .github/CODEOWNERS: /providers/akeyless/ ownership
  • docs/spelling_wordlist.txt: added Akeyless/akeyless

Test plan

  • Unit tests pass for hook (tests/unit/akeyless/hooks/test_akeyless.py — 10 tests)
  • Unit tests pass for secrets backend (tests/unit/akeyless/secrets/test_akeyless.py — 19 tests)
  • Client validation tests pass (auth type validation, missing params)
  • Static checks pass (prek run --from-ref main)
  • mypy passes (prek --stage manual mypy-providers --all-files)
  • Documentation builds successfully
  • Example DAG loads without import errors

Made with Cursor

@boring-cyborg
Copy link
Copy Markdown

boring-cyborg Bot commented Apr 6, 2026

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide (https://github.com/apache/airflow/blob/main/contributing-docs/README.rst)
Here are some useful points:

  • Pay attention to the quality of your code (ruff, mypy and type annotations). Our prek-hooks will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it's a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
  • Always keep your Pull Requests rebased, otherwise your build might fail due to changes not related to your commits.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: dev@airflow.apache.org
    Slack: https://s.apache.org/airflow-slack

@eladkal eladkal removed the backport-to-v3-2-test Mark PR with this label to backport to v3-2-test branch label Apr 7, 2026
@eladkal
Copy link
Copy Markdown
Contributor

eladkal commented Apr 7, 2026

Please follow Accepting New Community Providers for adding a new provider. Once this is checked we can start review proccess

@kaxil kaxil requested a review from Copilot April 10, 2026 19:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new community Apache Airflow provider for Akeyless Vault Platform, including a Hook, a custom akeyless connection type (with UI fields), and a Secrets Backend implementation.

Changes:

  • Introduces AkeylessHook for authenticating and interacting with Akeyless (static/dynamic/rotated secrets, item CRUD).
  • Adds AkeylessBackend to source Airflow Connections/Variables/Config from Akeyless paths.
  • Wires the provider into the Airflow monorepo (extras, workspace membership, docs, ownership/labels, spelling list, example DAG, unit/system tests scaffolding).

Reviewed changes

Copilot reviewed 39 out of 39 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
pyproject.toml Registers the akeyless extra, adds provider to “all” extras, mypy paths, and workspace members.
providers/akeyless/pyproject.toml Defines the provider package metadata and dependencies.
providers/akeyless/provider.yaml Declares provider metadata (for provider tooling/release generation).
providers/akeyless/src/airflow/providers/akeyless/init.py Sets provider version and enforces minimum Airflow version.
providers/akeyless/src/airflow/providers/akeyless/get_provider_info.py Exposes provider info for Airflow’s provider discovery.
providers/akeyless/src/airflow/providers/akeyless/hooks/akeyless.py Implements AkeylessHook, auth handling, secret operations, and UI fields/behavior.
providers/akeyless/src/airflow/providers/akeyless/secrets/akeyless.py Implements AkeylessBackend secrets backend.
providers/akeyless/src/airflow/init.py Sets up namespace package for provider build layout.
providers/akeyless/src/airflow/providers/init.py Sets up namespace package for provider build layout.
providers/akeyless/src/airflow/providers/akeyless/hooks/init.py Package marker for hooks.
providers/akeyless/src/airflow/providers/akeyless/secrets/init.py Package marker for secrets backend module.
providers/akeyless/tests/conftest.py Enables common pytest plugin for provider tests.
providers/akeyless/tests/unit/init.py Namespace package marker for unit tests.
providers/akeyless/tests/unit/akeyless/init.py Package marker for unit tests.
providers/akeyless/tests/unit/akeyless/hooks/init.py Package marker for hook tests.
providers/akeyless/tests/unit/akeyless/hooks/test_akeyless.py Unit tests for AkeylessHook.
providers/akeyless/tests/unit/akeyless/secrets/init.py Package marker for secrets backend tests.
providers/akeyless/tests/unit/akeyless/secrets/test_akeyless.py Unit tests for AkeylessBackend.
providers/akeyless/tests/system/init.py Namespace package marker for system tests.
providers/akeyless/tests/system/akeyless/init.py Package marker for system tests.
providers/akeyless/tests/system/akeyless/example_dag_akeyless.py Example DAG demonstrating provider usage.
providers/akeyless/docs/index.rst Provider documentation index and generated content scaffold.
providers/akeyless/docs/connections.rst Documentation for the akeyless connection type and auth extras.
providers/akeyless/docs/secrets-backend.rst Documentation for AkeylessBackend configuration and naming conventions.
providers/akeyless/docs/changelog.rst Provider changelog initial release entry.
providers/akeyless/docs/commits.rst Placeholder for commit list generation at release time.
providers/akeyless/docs/security.rst Security docs include scaffold.
providers/akeyless/docs/installing-providers-from-sources.rst Include scaffold for provider source install docs.
providers/akeyless/docs/conf.py Sphinx config for provider docs build.
providers/akeyless/docs/.latest-doc-only-change.txt Marks last doc-only change version.
providers/akeyless/README.rst Provider README with installation and features overview.
providers/akeyless/LICENSE Provider package license file.
providers/akeyless/NOTICE Provider package notice file.
providers/akeyless/.gitignore Provider-local ignore rules.
docs/spelling_wordlist.txt Adds “Akeyless/akeyless” to spelling allowlist.
airflow-core/docs/extra-packages-ref.rst Documents the new apache-airflow[akeyless] extra.
.github/boring-cyborg.yml Adds automated label mapping for provider path.
.github/ISSUE_TEMPLATE/1-airflow_bug_report.yml Adds akeyless to provider selection options.
.github/CODEOWNERS Adds ownership for /providers/akeyless/.
Comments suppressed due to low confidence (1)

providers/akeyless/tests/unit/akeyless/hooks/test_akeyless.py:1

  • The rotated-secret test validates only the returned shape, but it does not assert the request sent to the SDK. Given the implementation currently passes names=name (string) into GetRotatedSecretValue, add an assertion that api.get_rotated_secret_value was called with the expected request object/fields (in particular, that names is a list containing the secret name). This will prevent request-shape regressions.

Comment thread providers/akeyless/src/airflow/providers/akeyless/hooks/akeyless.py Outdated
Comment thread providers/akeyless/src/airflow/providers/akeyless/hooks/akeyless.py
Comment thread providers/akeyless/src/airflow/providers/akeyless/hooks/akeyless.py
Comment thread providers/akeyless/src/airflow/providers/akeyless/hooks/akeyless.py Outdated
Comment thread providers/akeyless/src/airflow/providers/akeyless/secrets/akeyless.py Outdated
Comment thread providers/akeyless/docs/index.rst
Comment thread providers/akeyless/provider.yaml
@baraka-akeyless
Copy link
Copy Markdown
Author

fixed the relevant files, and added some more tests

@baraka-akeyless
Copy link
Copy Markdown
Author

Fixed unit test and documentation

Comment thread .github/CODEOWNERS Outdated
@baraka-akeyless baraka-akeyless force-pushed the add-akeyless-provider branch 2 times, most recently from f5d9720 to 84d0019 Compare April 14, 2026 06:27
Comment thread .github/CODEOWNERS Outdated
Copy link
Copy Markdown
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

@vincbeck vincbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the secret backend side of things. The approach to handle multi-team is similar with #65493 (which is positive)

@eladkal eladkal force-pushed the add-akeyless-provider branch from 21197bb to 8dee5d1 Compare April 22, 2026 06:21
baraka-akeyless and others added 9 commits April 23, 2026 12:05
Introduces a new community provider for Akeyless (https://www.akeyless.io/)
with the following components:

- AkeylessHook: Hook for interacting with Akeyless Vault Platform
  supporting static, dynamic, and rotated secrets with 8 auth methods
  (API Key, AWS IAM, GCP, Azure AD, UID, JWT, Kubernetes, Certificate)

- AkeylessBackend: Secrets backend for sourcing Airflow Connections,
  Variables, and Configuration directly from Akeyless

- Custom 'akeyless' connection type with dedicated UI fields

Includes full RST documentation, unit tests, and example DAG.

Made-with: Cursor
The _internal_client layer was an unnecessary abstraction.  The
akeyless Python SDK already provides clean Auth() and V2Api methods
that handle authentication and CRUD in single calls.

- AkeylessHook now holds a cached akeyless.V2Api and calls SDK
  methods directly (idiomatic Airflow pattern).
- AkeylessBackend likewise creates its own V2Api + Auth inline.
- Tests updated to mock the akeyless SDK directly.

Made-with: Cursor
- Import BaseHook from airflow.providers.common.compat.sdk (not
  airflow.hooks.base) — required compatibility layer for providers
- Add apache-airflow-providers-common-compat>=1.8.0 to dependencies
- Rewrite example DAG to use classic DAG/PythonOperator pattern
  (airflow.decorators not visible to provider mypy config)
- Add [tool.uv.sources] for workspace resolution
- Add Python 3.14 classifier

Made-with: Cursor
- Change integration tag from [security, secrets] to [software]
  (matching hashicorp provider; 'secrets' not in allowed tag list)
- Fix test assertions: check conn.host/login instead of conn_type
  (URI scheme normalization varies across Airflow versions)

Made-with: Cursor
…extra-packages-ref

- Add providers/akeyless/docs/conf.py for Sphinx documentation build
- Restructure index.rst to match Airflow provider conventions (commits
  section, Python API reference, proper toctree structure)
- Register akeyless in airflow-core/docs/extra-packages-ref.rst for
  static check-extra-packages-references validation

Made-with: Cursor
…o conventions

- Replace all short-form Apache license headers with full ASF license
  format across all Python, RST, and YAML files (25+ files)
- Fix docs/conf.py Sphinx configuration (already added)
- Restructure docs/index.rst with auto-generated sections (separator,
  description, cross-provider deps, download links)
- Add System Tests toctree section to index.rst
- Fix RST include paths to use devel-common sphinx_exts
- Rename .latest-doc-only-changes.txt to .latest-doc-only-change.txt
  (matches .rat-excludes pattern)
- Fix NOTICE copyright year: 2017 -> 2016
- Fix .gitignore to only contain *.iml (matches other providers)
- Add __path__ extensions to tests/unit/__init__.py and
  tests/system/__init__.py
- Add akeyless to bug report provider list
- Fix spelling wordlist sort order for Akeyless/akeyless entries
- Run ruff check --fix and ruff format for code style compliance

Made-with: Cursor
- Fix GetRotatedSecretValue to pass names as list, not string
- Add access_type validation in AkeylessHook.authenticate() with clear
  error message listing valid auth types
- Catch ImportError for akeyless_cloud_id with helpful install message
- Restrict AkeylessBackend auth to api_key/uid types only (cloud-based
  auth methods require AkeylessHook directly)
- Add token caching with configurable TTL in AkeylessBackend to avoid
  repeated auth calls during DAG parsing
- Align get_provider_info.py tags with provider.yaml ([software])
- Add tests for invalid access_type validation, rotated secret list
  parameter, unsupported backend auth type, and token caching

Made-with: Cursor
The test_get_rotated_secret_passes_list was checking .names on a
MagicMock object instead of verifying the SDK constructor call args.
The commits.rst file was missing a proper RST title, causing 48
documentation build errors.

Made-with: Cursor
Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
baraka-akeyless and others added 2 commits April 23, 2026 12:05
When core.multi_team is enabled, the secrets backend now looks up
secrets under {base_path}/{team_name}/{key} first, falling back to
a global path. Supports use_team_secrets_path and global_secrets_path
configuration options, matching the VaultBackend pattern from apache#65493.

Made-with: Cursor
Co-authored-by: Elad Kalif <45845474+eladkal@users.noreply.github.com>
Comment thread pyproject.toml Outdated
…rovider

Run update_airflow_pyproject_toml.py to add required comments and
exclude-newer-package entries for the akeyless provider.

Made-with: Cursor
Copy link
Copy Markdown
Contributor

@eladkal eladkal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
will merge when CI is green

Comment thread docs/spelling_wordlist.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants