Skip to content

Support JSON-formatted connections in GoogleCloudSecretManagerBackend #76604

Closed

Description

@simonprydden

Description

Currently, the Google Secret Manager backend (GoogleCloudSecretManagerBackend) expects Airflow connections to be stored as URI-encoded strings.

For complex Google Cloud Platform connections, particularly those involving service account credentials, the URI format can become difficult to read, validate, and maintain. In contrast, the AWS Secrets Manager backend supports storing Google connections as structured JSON objects, which significantly improves readability and operability.

Current behavior

GoogleCloudSecretManagerBackend expects secrets in Airflow connection URI format, for example:

google-cloud-platform://?key_path=%2Fkeys%2Fsa.json&project=my-project

This becomes increasingly difficult to manage when handling multiple connection extras and nested configuration values.

Proposed behavior

Allow GoogleCloudSecretManagerBackend to optionally accept a JSON representation of an Airflow connection, similar to the format supported by the AWS Secrets Manager backend.

For example:

{
  "conn_type": "google_cloud_platform",
  "extra": {
    "project": "my-project",
    "key_path": "/keys/sa.json",
    "scope": "https://www.googleapis.com/auth/cloud-platform"
  }
}

Use case/motivation

The AWS Secrets Manager backend already supports JSON-formatted connections, while the Google Secret Manager backend currently requires URI-encoded connection strings.

Supporting JSON in both backends would:

  • Provide a more consistent developer experience across cloud-native secrets backends
  • Improve readability and maintainability of complex connection configurations
  • Simplify secret rotation and manual management
  • Reduce the risk of URI encoding and escaping errors
  • Improve handling of large extra payloads and complex configuration objects
  • Make migrations between SecretsManagerBackend and GoogleCloudSecretManagerBackend simpler

Aligning the connection formats would reduce friction for teams operating across multiple cloud providers and make Airflow secrets management more intuitive and predictable.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. kartik00052 commented on Nov 6, 2026

    @kartik00052
    Contributor

    I want to work on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:featureFeature Requestsneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions