-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Prevent client secrets and proxy credentials from being logged in Microsoft Graph hook logs #59688
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
Prevent client secrets and proxy credentials from being logged in Microsoft Graph hook logs #59688
Conversation
a8fafc1 to
8e45f9d
Compare
4c4d6a6 to
e6276ea
Compare
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/msgraph.py
Outdated
Show resolved
Hide resolved
e6276ea to
7755235
Compare
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/msgraph.py
Outdated
Show resolved
Hide resolved
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/msgraph.py
Outdated
Show resolved
Hide resolved
23d0833 to
6f78a11
Compare
amoghrajesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are almost there, one comment
9f3db7c to
c33e3e4
Compare
providers/microsoft/azure/src/airflow/providers/microsoft/azure/hooks/msgraph.py
Outdated
Show resolved
Hide resolved
3b307d7 to
05525d1
Compare
amoghrajesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, otherwise LGTM
providers/common/compat/src/airflow/providers/common/compat/sdk.py
Outdated
Show resolved
Hide resolved
b3cb3da to
39479cd
Compare
text at INFO level.
parameter to automatically mask proxy configurations containing credentials.
Re-export redact from airflow.sdk.log and add to compat module import map to enable unconditional import via airflow.providers.common.compat.sdk
….secrets_masker to the import fallback chain for redact to support compact 3.0.6 and 3.1.5 environments
DEFAULT_SENSITIVE_FIELDS in secrets_masker to ensure proxy configurations are treated as sensitive by default regardless of field naming convention.
39479cd to
2c6b2c1
Compare
amoghrajesh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
Backport failed to create: v3-1-test. View the failure log Run details
You can attempt to backport this manually by running: cherry_picker a9dea6d v3-1-testThis should apply the commit to the v3-1-test branch and leave the commit in conflict state marking After you have resolved the conflicts, you can continue the backport process by running: cherry_picker --continue |
…ogged in Microsoft Graph hook logs (apache#59688) Prevent client secrets and proxy credentials from being logged in Microsoft Graph hook logs (apache#59688) (cherry picked from commit a9dea6d)
…rosoft Graph hook logs (apache#59688) Prevent client secrets and proxy credentials from being logged in Microsoft Graph hook logs (apache#59688)
…rosoft Graph hook logs (apache#59688) Prevent client secrets and proxy credentials from being logged in Microsoft Graph hook logs (apache#59688)
…rosoft Graph hook logs (apache#59688) Prevent client secrets and proxy credentials from being logged in Microsoft Graph hook logs (apache#59688)
Problem
The
KiotaRequestAdapterHookwas logging sensitive information at INFO level:http://user:pass@proxy.example.com:3128) were logged in plain textFix
DEFAULT_SENSITIVE_FIELDSin the shared secrets_maskerredact(proxies, name="proxies")to automatically mask proxy configurations containing credentialsredact(client_secret, name="client_secret")to mask client secretsTesting
KiotaRequestAdapterHookand following is the screenshot of the task logs:^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.