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

   ### Description
   
   When Airflow is configured to use GCP Secret Manager as the backend for 
variable storage, Variable.get() retrieves the latest version of the secret 
from Secret Manager. However, Variable.set() currently creates a variable in 
the Airflow database instead of creating a new version in Secret Manager. 
   
   This inconsistency can lead to confusion and potential security risks.
   
   I propose enhancing Variable.set() to add the possibility to create a new 
version of the secret in Secret Manager when the backend is connected, 
maintaining consistency with Variable.get() behavior.
   
   ### Use case/motivation
   
   - Consistency: Users expect Variable.set() to interact with Secret Manager 
when it's configured as the backend, just as Variable.get() does.
   - Version control: Creating new versions in Secret Manager allows for better 
tracking and management of variable changes over time.
   - Security: Storing variables directly in Secret Manager, rather than the 
Airflow database, maintains the security benefits of using a dedicated secret 
management service.
   
   ### Related issues
   
   None that I'm aware of.
   
   ### Are you willing to submit a PR?
   
   - [X] 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