-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AIRFLOW-2899] Hide sensitive data when Exporting Variables #3748
Conversation
cc @Fokko @feng-tao @bolkedebruin #1530 covered hiding it from the UI but didn't consider variable export. |
Codecov Report
@@ Coverage Diff @@
## master #3748 +/- ##
==========================================
+ Coverage 76.67% 77.64% +0.97%
==========================================
Files 199 204 +5
Lines 16186 15853 -333
==========================================
- Hits 12410 12309 -101
+ Misses 3776 3544 -232
Continue to review full report at Codecov.
|
@kaxil, it would be good if you could add a test to test the sensitive data export case. |
I might even argue that we need to fix this on an API level instead of the view level. In this case the API will just obfuscate the secrets. |
@Fokko Fixing this on API level will mean we won't be able to get the variables in plain text through CLI as well. |
@ashb Thoughts? |
Yes. And No? Yes, because by default it probably shouldn't be possible to get the secrets back out. But the export including sensitive might be useful for backups/provisioning. The "fuller" solution that would support exporting while keeping then encrypted. That would involve a change of format of export and is probably a bigger chunk of work. In short: I don't know, sorry. |
@ashb No worries. The aim of this PR was to obfuscate sensitive variables from UI export but it would still allow you to download them through the CLI. |
Why not allow the user to decide per Variable if it's sensitive or not (addition of Boolean column)? Then you won't need to consider the question of what to do... there will be a value defined by the user to simply act accordingly. |
@ron819 Even if a user decides whether a field is sensitive or not, you would still need to add the functionality of obfuscating them in the UI, the scope of this PR is just that. And to your point on letting a user decide whether a given field is secret or not, we are happy for you to implement that functionality and send a PR. Just for your information, the selection of a Variable to be sensitive was decided in this PR: #1530 |
@kaxil No need to get mad it was just a suggestion :) |
@ron819 I didn't get mad at all, apologies and sorry if you felt so. I seriously think that it should have been a user's choice to select the sensitive variables. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Make sure you have checked all steps below.
Jira
Description
Currently, the sensitive variable is hidden from being exposed in the Web UI. However, if the UI is compromised, someone can export variables where all the sensitive variables are exported in plain text format.
This will still allow an admin to export all the variables from the CLI. The main intention here would be incase of an exposed Web UI, the sensitive data should still be inaccessible.
Tests
Commits
Documentation
Code Quality
git diff upstream/master -u -- "*.py" | flake8 --diff