-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Secret masker ignores passwords with special chars #36692
Conversation
|
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.
I duplicated the updated tests on the main branch, and they passed without your change. Could you check if your change is really necessary, or you need to create a new test that fail on main and works with your change?
@hussein-awala I see the test failing on main
|
@hussein-awala could I get a re-review on this. |
That's because you check if the mock is called with quote method, which is not currently the case. Could you add a test that checks if the final result is correct? |
Added a secret_masker test which tests that the logs do get redacted. @hussein-awala if you could re-review. |
@aritra24 I personally think this should be the case by design, aligning with the postgres documentation too. |
@amoghrajesh made a comment on the issue. Could you take a look again? |
Connection uri's get connection uses quote to change the password and certain other fields to escape special chars due to this, when the connection object is passed through the masker this changed string is skipped.
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.
Thanks for making the changes, @aritra24
LGTM +1
@hussein-awala - I run the tests in main now and they nicely fail there. I think this one is ready to go. |
Ping @hussein-awala, I think this one is ready, can you take a look? |
Yep. for me looks good too. |
@hussein-awala pinging you for a re-review. This commits ready to merge. |
I'm a bit busy this week, I'll let the other committers test it and merge it if they think it's ready.
@amoghrajesh / @potiuk could you please have a look and merge if you believe it's done. |
The changes look fine to me. @potiuk WDYT on a last review prior to merge? |
Nice! |
* Secret masker ignores passwords with special chars #36688 Connection uri's get connection uses quote to change the password and certain other fields to escape special chars due to this, when the connection object is passed through the masker this changed string is skipped. * Added a test for the logging change (cherry picked from commit e853849)
* Secret masker ignores passwords with special chars #36688 Connection uri's get connection uses quote to change the password and certain other fields to escape special chars due to this, when the connection object is passed through the masker this changed string is skipped. * Added a test for the logging change (cherry picked from commit e853849)
* Secret masker ignores passwords with special chars #36688 Connection uri's get connection uses quote to change the password and certain other fields to escape special chars due to this, when the connection object is passed through the masker this changed string is skipped. * Added a test for the logging change (cherry picked from commit e853849)
Connection uri's get connection uses quote to change the password and certain other fields to escape special chars due to this, when the connection object is passed through the masker this changed string is skipped.
closes: #36688
^ 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.rst
or{issue_number}.significant.rst
, in newsfragments.