-
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
Credentials present in logs when using Shared Key auth to Azure Blob Storage #19883
Comments
@eladkal Any feedback on any of the fix options listed above? I'm inclined to go with Option 1 but this would be a breaking change. I'm not sure when those become justified. Also Option 3 is intriguing but it does have some questions that come along with and is more widespread in its effect. |
@josh-fell why don't we have the same problem with Security Token field in Salesforce connection? |
For two reasons:
|
Actually I'd do all three options together:
|
@josh-fell is this issue resolved or is there a further task? |
Yeah, I'd still need to implement the other 2 solution options for full coverage to mask shared access key from the logs. But at least the shared access key will only be logged if debug logging so it's probably fine now for the vast majority of users (which I imagine is a much smaller subset using this particular auth anyway). |
Thinking more about this. The update in #21162 really addresses this. If users do feel they need to mask other connection attributes when using debug logging for this particular type of authentication (which by no means is vastly popular), they can still mask those with existing Airflow configs. |
Apache Airflow Provider(s)
microsoft-azure
Versions of Apache Airflow Providers
Latest of all providers available on Airflow
main
.Apache Airflow version
main (development)
Operating System
Debian GNU/Linux 10 (buster)
Deployment
Other
Deployment details
Using Breeze on
main
branch.What happened
When authenticating to Azure Blob Storage using the "Shared Key" method (which only includes the shared access key and storage account URL), both the key value and URL are printed in plain text to the task logs.
Example log entry:
What you expected to happen
The entirety of the credentials used to authenticate to Azure Blob Storage should not be visible in plain text within the task logs.
How to reproduce
shared_access_key
/extra__wasb__shared_access_key
extra andhost
.example_local_to_wasb
DAG in the Azure provider:Anything else
While a fix is relatively straightforward, feedback on the best approach would be appreciated. There seem to be a few options:
WasbHook
to use thepassword
connection field instead of the 'shared_access_keyor
extra__wasb__shared_access_key` extras.DEFAULT_SENSITIVE_FIELDS
to ensure the shared key value is masked in the connectionextras
when loggedairflow.hooks.base.get_connection()
to only log what connection ID is being used rather than all of the connection details.host
is provided in a connection?)Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: