You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2021/02/11 18:25:06 UTC

[GitHub] [httpcomponents-client] careylam opened a new pull request #283: Fix the issues causing Kerberos/SPNego to fail

careylam opened a new pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283


   1. When extracting token from "WWW-Authenticate: Negotiate", return "" rather than null.
   2. Kerberos expects HTTP rather than possibly HTTPS.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on a change in pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
ok2c commented on a change in pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283#discussion_r574797434



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/AuthChallengeParser.java
##########
@@ -116,6 +116,7 @@ public String toString() {
                     params.clear();
                 }
             }
+            if (token68 == null) token68 = "";

Review comment:
       @careylam could you please explain why this change is necessary? Please also note there are test cases failing due to this change. 
   I also suggest this check be moved from the `AuthChallengeParser` to the `GGSSchemeBase` class.

##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/auth/KerberosConfig.java
##########
@@ -81,6 +85,10 @@ public Option getRequestDelegCreds() {
         return requestDelegCreds;
     }
 
+    public String getServiceName() {

Review comment:
       @careylam Please add `@since 5.1` tag to all new public methods introduced in your change-set.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] careylam closed pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
careylam closed pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] careylam commented on a change in pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
careylam commented on a change in pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283#discussion_r574863815



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/AuthChallengeParser.java
##########
@@ -116,6 +116,7 @@ public String toString() {
                     params.clear();
                 }
             }
+            if (token68 == null) token68 = "";

Review comment:
       This line is to avoid GGSSchemeBase throwing MalformedChanllengeException. The token is not in the negociate reponse header "WWW-Authenticate: Negotiate".
   
   I suggest to remove the null check on GGSSchemeBase. What do you think?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] careylam commented on a change in pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
careylam commented on a change in pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283#discussion_r574852266



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/auth/KerberosConfig.java
##########
@@ -81,6 +85,10 @@ public Option getRequestDelegCreds() {
         return requestDelegCreds;
     }
 
+    public String getServiceName() {

Review comment:
       Agree! Ideally we can just hardcode it in the code like what v4.5 does. This code is written just in case there's a plan to support other type. Please suggest. 
   
   Kerberos/SPNego works with these changes. Otherwise, not




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283#discussion_r574865456



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/impl/auth/AuthChallengeParser.java
##########
@@ -116,6 +116,7 @@ public String toString() {
                     params.clear();
                 }
             }
+            if (token68 == null) token68 = "";

Review comment:
       I see no point in converting a null into an empty string. Where is the benefit? The token hasn't been provided. Period.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283#discussion_r574866032



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/auth/KerberosConfig.java
##########
@@ -81,6 +85,10 @@ public Option getRequestDelegCreds() {
         return requestDelegCreds;
     }
 
+    public String getServiceName() {

Review comment:
       Hard code it and notice HTTPCLIENT-1625.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] michael-o commented on a change in pull request #283: Fix the issues causing Kerberos/SPNego to fail

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #283:
URL: https://github.com/apache/httpcomponents-client/pull/283#discussion_r574848975



##########
File path: httpclient5/src/main/java/org/apache/hc/client5/http/auth/KerberosConfig.java
##########
@@ -81,6 +85,10 @@ public Option getRequestDelegCreds() {
         return requestDelegCreds;
     }
 
+    public String getServiceName() {

Review comment:
       I consider this pointless because there no other service class, but `HTTP`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org