You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "andrii-korotkov-verkada (via GitHub)" <gi...@apache.org> on 2024/12/23 23:40:41 UTC

[D] What's the best way to integrate Airflow with encrypted secrets stored in manifests? [airflow]

GitHub user andrii-korotkov-verkada created a discussion: What's the best way to integrate Airflow with encrypted secrets stored in manifests?

Hello. I hope your day is going well. I'm trying to use ArgoCD to manage Airflow, which makes it tougher to work with secrets, as I can't just check them into the repo due to values being only base64 encoded. I've seen there's AWS Secrets Manager backend, which is a fine option, but has a downside of some manual overhead when updating values. For example, `pgbouncer.ini` is a whole config which has some sensitive data (e.g. password in db connection).

A solid alternative would be to store the secrets in a source manifests code in encrypted form (e.g. with AWS KMS). This would allow to automate a process bringing up things in a new account/region for example. However, Airflow doesn't seem to support this out of the box. I can set env variables in `airflowLocalSettings` (which maps to a Python file run on init), e.g. by creating _ENCRYPTED versions of env variables, decrypting them on startup and setting regular versions of variables. However, it won't work out of the box for things like `pgbouncer.ini`, which is mounted as a file in the deployment manifest.

What's the best way forward? Shall I do some code changes to Airflow to natively support encrypted data with some new backend? Or is there some way to configure all secrets without doing this? Thanks.

GitHub link: https://github.com/apache/airflow/discussions/45190

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] What's the best way to integrate Airflow with encrypted secrets stored in manifests? [airflow]

Posted by "andrii-korotkov-verkada (via GitHub)" <gi...@apache.org>.
GitHub user andrii-korotkov-verkada closed the discussion with a comment: What's the best way to integrate Airflow with encrypted secrets stored in manifests?

Used secrets manager in the end

GitHub link: https://github.com/apache/airflow/discussions/45190#discussioncomment-12062863

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] What's the best way to integrate Airflow with encrypted secrets stored in manifests? [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
GitHub user potiuk added a comment to the discussion: What's the best way to integrate Airflow with encrypted secrets stored in manifests?

No idea. 

But you should avoid tagging people directly to drag them in discussions. This way you are demanding their exclusive attention to your issue (which is pretty selfish) but also if you are tagging single person, you are limiting your chances of getting help from others because others will think that the tagged person will answer (which is shooting yourself in a foot). Especialy when you expect answer one hour after you posted a question.

Remember, that this is a place where people help others for free in their free time, away from familiy and other things they can do, and it's them who decide what and where they can help with and where they put their time and energy.

Not mentioning that this is holiday time and you can safely expect that people are currently thinking about something else than Airflow.

GitHub link: https://github.com/apache/airflow/discussions/45190#discussioncomment-11656222

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] What's the best way to integrate Airflow with encrypted secrets stored in manifests? [airflow]

Posted by "andrii-korotkov-verkada (via GitHub)" <gi...@apache.org>.
GitHub user andrii-korotkov-verkada added a comment to the discussion: What's the best way to integrate Airflow with encrypted secrets stored in manifests?

Sorry about that :(

GitHub link: https://github.com/apache/airflow/discussions/45190#discussioncomment-11657955

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] What's the best way to integrate Airflow with encrypted secrets stored in manifests? [airflow]

Posted by "andrii-korotkov-verkada (via GitHub)" <gi...@apache.org>.
GitHub user andrii-korotkov-verkada added a comment to the discussion: What's the best way to integrate Airflow with encrypted secrets stored in manifests?

@potiuk, do you have any recommendations? This would help guiding my future work in the area. Thank you.

GitHub link: https://github.com/apache/airflow/discussions/45190#discussioncomment-11654407

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org


Re: [D] What's the best way to integrate Airflow with encrypted secrets stored in manifests? [airflow]

Posted by "andrii-korotkov-verkada (via GitHub)" <gi...@apache.org>.
GitHub user andrii-korotkov-verkada closed a discussion: What's the best way to integrate Airflow with encrypted secrets stored in manifests?

Hello. I hope your day is going well. I'm trying to use ArgoCD to manage Airflow, which makes it tougher to work with secrets, as I can't just check them into the repo due to values being only base64 encoded. I've seen there's AWS Secrets Manager backend, which is a fine option, but has a downside of some manual overhead when updating values. For example, `pgbouncer.ini` is a whole config which has some sensitive data (e.g. password in db connection).

A solid alternative would be to store the secrets in a source manifests code in encrypted form (e.g. with AWS KMS). This would allow to automate a process bringing up things in a new account/region for example. However, Airflow doesn't seem to support this out of the box. I can set env variables in `airflowLocalSettings` (which maps to a Python file run on init), e.g. by creating _ENCRYPTED versions of env variables, decrypting them on startup and setting regular versions of variables. However, it won't work out of the box for things like `pgbouncer.ini`, which is mounted as a file in the deployment manifest.

What's the best way forward? Shall I do some code changes to Airflow to natively support encrypted data with some new backend? Or is there some way to configure all secrets without doing this? Thanks.

GitHub link: https://github.com/apache/airflow/discussions/45190

----
This is an automatically sent email for commits@airflow.apache.org.
To unsubscribe, please send an email to: commits-unsubscribe@airflow.apache.org