-
Notifications
You must be signed in to change notification settings - Fork 972
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
HTTPCLIENT-2358 Implement a mutual authentication capable SPNEGO scheme #615
base: master
Are you sure you want to change the base?
Conversation
@stoty I cannot contribute here much. My only wish, and I understand it is a big ask, to also create a compatibility test similar to those we have for BASIC / DIGEST with Squid and Apache HTTPD |
I was afraid you're going to say that... There are two ways to go about that:
I don't know which of the two is more work, but I know where to copy the test setup from for the second one. Do you have a preference ? |
@stoty Kek. Anyways, We already test for compatibility with Jetty in core by running it in a Docker container I t would be my preferred option but I do not know how difficult it is to pack extra Jetty dependencies into a Docker container. I was also hoping Apache HTTPD or Ngnix might have Kerberos support. If it is too much effort, disregard my request. |
It is a reasonable request, and it IS helpful to catch any regressions, etc. |
Apache Kerby implements Kerberos, you can get inspiration (copy) how they do it: https://directory.apache.org/kerby/ |
Kerby is great for in-JVM tests, but for dockerized tests it's probably easier to use MIT kerberos. |
After poking around a bit, it seems that neither Apache Httpd, not Nginx supports SPNEGO out of the box. For now, I plan to make a local test with Kerby + Jetty, without Docker. |
A full coverage test contains JGSS (via Tomcat my SpnegoAuthenticator), MIT Kerberos (via mod_auth_gssapi), Microsoft Kerberos (via IIS (SSPI)). Virtually impossible to automate. I will do manual testing anyway. I have everything in place at work to test. |
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.
This is much less code review. Thanks. I already see some points.
httpclient5/src/main/java/org/apache/hc/client5/http/auth/MutualKerberosConfig.java
Outdated
Show resolved
Hide resolved
httpclient5/src/main/java/org/apache/hc/client5/http/auth/MutualKerberosConfig.java
Outdated
Show resolved
Hide resolved
httpclient5/src/main/java/org/apache/hc/client5/http/auth/MutualKerberosConfig.java
Outdated
Show resolved
Hide resolved
Thanks. While I don't use Tomcat, testing Jgss with Jetty is doable, in fact one of the ways I tested this was via the SPNEGO test in HttpCLient->Calcite Avatica->Phoenix PQS. |
be6688d
to
ce46c45
Compare
2d87e73
to
2d7dc5e
Compare
Fix GSSCredential handling
2d7dc5e
to
5a11bce
Compare
I have added tests for direct connection to httpd + mod_auth_spnego, @michael-o . The async client cannot use the Subject set with Subject.callAs to figure out the Kerberos credentials (probably due to the auth being run from a different thread) Async still works if we create and set KerbersCredentials. (as in the new tests I added) |
No description provided.