sabz90 opened a new issue, #55918: URL: https://github.com/apache/airflow/issues/55918
### Description This request is to add the ability for airflow to refresh database Connection Strings by re-evaluating the _CMD at a specified refresh interval. ### Use case/motivation We run Airflow on Kubernetes Clusters on Azure with PostgreSQL as the database backend. Various CSPs have managed identities, (eg. Azure's workload identity), which can be used to generate access tokens for authenticating against databases like Azure PostgreSQL. From this discussion - https://github.com/apache/airflow/discussions/43837, I see that we have an option to specify a CMD to execute to obtain the connection string. While the configuration system supports dynamic CMD evaluation, the database connection string seems to be typically evaluated once during startup and then cached. The CMD would only be re-evaluated during specific reconfiguration scenarios, so it's not guaranteed to be refreshed before tokens expire. So, this is not helpful for cases where the connection strings need to be refreshed periodically as the expiration time is ~ 1 hour. Restarting all the airflow services frequently is not practical for us, as it increases risks of disruption. So, one solution may be to bring in changes in the code to refresh/reconfigure connection pool at specified intervals. ### Related issues There is no current issue, but I see a past discussion which is related but not concluded, but the issue I'm talking about is to support short lived tokens - https://github.com/apache/airflow/discussions/43837 ### 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]
