-
Notifications
You must be signed in to change notification settings - Fork 0
Allow authentication scheme to be specified explicitly when connecting with credentials #638
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #638 +/- ##
==========================================
+ Coverage 94.24% 94.45% +0.20%
==========================================
Files 7 7
Lines 782 793 +11
==========================================
+ Hits 737 749 +12
+ Misses 45 44 -1 ☔ View full report in Codecov by Sentry. |
Wiz Scan Summary
|
Re-implemented this for Still TODO:
We don't have any credentialed windows auth tests (NTLM, kerberos, or negotiate) as far as I can see. We'll have to test this manually and check the server logs to see that there's no 401 response generated. |
…s/openapi-common into feat/pre-emptive-basic-auth
…s/openapi-common into feat/pre-emptive-basic-auth
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.
Not sure what to do at this point, the requests-negotiate-sspi
library won't allow us to force it to send the initial handshake if the server doesn't advertise it supports Negotiate.
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.
Looks as discussed
Closes #636
Add a new builder method which doesn't check the 401-response header and attempts to use basic auth. I also did some cleanup of the return type of the
__test_connection()
method, since it returnsLiteral[True]
instead ofbool
.I thought about the best way to implement this. We could have used an undocumented environment variable, but given that this is an open-source project it seemed wiser to implement this function, but to be very clear in the documentation that it should not be used in almost all cases.
I did think about marking the method as deprecated, but I think we can only really get away with this once
Basic
is included in the 401-response alongsideBearer
from MI.