Skip to content

Add cloud-based auth (aws_iam, gcp, azure_ad) to Akeyless secrets backend#69772

Merged
eladkal merged 3 commits into
apache:mainfrom
baraka-akeyless:add-cloud-auth-to-akeyless-backend
Jul 12, 2026
Merged

Add cloud-based auth (aws_iam, gcp, azure_ad) to Akeyless secrets backend#69772
eladkal merged 3 commits into
apache:mainfrom
baraka-akeyless:add-cloud-auth-to-akeyless-backend

Conversation

@baraka-akeyless

Copy link
Copy Markdown
Contributor

Summary

  • Add aws_iam, gcp, and azure_ad authentication support to AkeylessBackend secrets backend, enabling seamless integration with managed Airflow services (Amazon MWAA, GCP Cloud Composer, Azure) without requiring static API keys.
  • Cloud auth uses the optional akeyless_cloud_id package (already an extra dependency of the provider) to generate cloud identity tokens, reusing the same pattern already implemented in AkeylessHook.
  • Add documentation for MWAA and Cloud Composer setup, and 7 new unit tests covering all cloud auth paths.

Motivation

The Akeyless secrets backend previously only supported api_key and uid authentication. Users on managed Airflow services like Amazon MWAA naturally expect to authenticate using their environment's IAM role rather than managing static API keys. This change closes that gap.

Changes

providers/akeyless/src/airflow/providers/akeyless/secrets/akeyless.py

  • Expanded _SUPPORTED_BACKEND_AUTH_TYPES to include aws_iam, gcp, azure_ad
  • Added _get_cloud_id() method for cloud identity token generation
  • Updated _authenticate() to route cloud auth types through _get_cloud_id()
  • Updated docstring with all auth methods and new parameters (gcp_audience, azure_object_id)

providers/akeyless/tests/unit/akeyless/secrets/test_akeyless.py

  • 7 new tests: auth flow for each cloud type, CloudId integration, parameter passthrough, and missing-package error handling

providers/akeyless/docs/secrets-backend.rst

  • New "Authentication Methods" section with all 5 supported types
  • Step-by-step "Using with Amazon MWAA" guide
  • "Using with GCP Cloud Composer" configuration example
  • Added gcp_audience, azure_object_id, token_ttl to parameters table

Test plan

  • All 43 akeyless provider unit tests pass locally
  • Existing api_key and uid tests unaffected
  • New tests cover aws_iam, gcp, azure_ad auth flows
  • Missing akeyless_cloud_id package raises clear ImportError

Made with Cursor

The secrets backend previously only supported api_key and uid auth.
This adds aws_iam, gcp, and azure_ad authentication using the
akeyless_cloud_id package, enabling seamless integration with managed
Airflow services like Amazon MWAA, GCP Cloud Composer, and Azure
workloads without requiring static API keys.

Co-authored-by: Cursor <cursoragent@cursor.com>
baraka-akeyless and others added 2 commits July 12, 2026 10:17
Cloud Composer was rebranded to Managed Service for Apache Airflow
(Managed Airflow) as of April 2026.

Co-authored-by: Cursor <cursoragent@cursor.com>

@eladkal eladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@eladkal
eladkal merged commit 6e6d0af into apache:main Jul 12, 2026
79 checks passed
@baraka-akeyless
baraka-akeyless deleted the add-cloud-auth-to-akeyless-backend branch July 12, 2026 11:23
joshuabvarghese pushed a commit to joshuabvarghese/airflow that referenced this pull request Jul 16, 2026
…kend (apache#69772)

* Add cloud-based auth (aws_iam, gcp, azure_ad) to AkeylessBackend

The secrets backend previously only supported api_key and uid auth.
This adds aws_iam, gcp, and azure_ad authentication using the
akeyless_cloud_id package, enabling seamless integration with managed
Airflow services like Amazon MWAA, GCP Cloud Composer, and Azure
workloads without requiring static API keys.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update Cloud Composer references to Managed Service for Apache Airflow

Cloud Composer was rebranded to Managed Service for Apache Airflow
(Managed Airflow) as of April 2026.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

2 participants