simonprydden opened a new issue, #76604:
URL: https://github.com/apache/airflow/issues/76604

   ### 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
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to