You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Marcin Zajaczkowski (JIRA)" <ji...@codehaus.org> on 2010/09/02 21:33:32 UTC

[jira] Created: (MNG-4792) Preemptive authentication doesn't work

Preemptive authentication doesn't work
--------------------------------------

                 Key: MNG-4792
                 URL: http://jira.codehaus.org/browse/MNG-4792
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Artifacts and Repositories
    Affects Versions: 2.2.1
         Environment: Sun Java 1.6.0_21, Windows 7
            Reporter: Marcin Zajaczkowski


It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.

<server>
 <id>repo-id</id>
 <username>user</username>
 <password>pass</password>
 <configuration>
  <wagonProvider>httpclient</wagonProvider>
  <httpConfiguration>
   <put>
    <params>
     <param>
      <name>http.authentication.preemptive</name>
      <value>%b,true</value>
     </param>
    </params>
   </put>
  </httpConfiguration>
 </configuration>
</server>

Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.

[1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-4792) Preemptive authentication doesn't work

Posted by "Chris Tanger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=269567#action_269567 ] 

Chris Tanger edited comment on MNG-4792 at 6/4/11 10:45 PM:
------------------------------------------------------------

I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.

Note:  We are using a username and maven encrypted password in the server section of settings.xml.

      was (Author: tangercp):
    I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.
  
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4792) Preemptive authentication doesn't work

Posted by "Lukasz Szelag (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305574#comment-305574 ] 

Lukasz Szelag commented on MNG-4792:
------------------------------------

I was just wondering if there is a fix available for Maven 2.2.1. I'm facing the same issue when connecting to Archiva repository, and credentials are not passed by Maven. Thanks.
                
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: https://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>            Assignee: Olivier Lamy
>             Fix For: 3.0.4
>
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4792) Preemptive authentication doesn't work

Posted by "Lukasz Szelag (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305716#comment-305716 ] 

Lukasz Szelag commented on MNG-4792:
------------------------------------

Brett, the only way for me to have Maven 2.2.1 and Archiva 1.3.5 work together, is to grant the Archiva guest user read access to my repositories. Can you provide an example showing how to configure httpclient? Thanks.
                
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: https://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>            Assignee: Olivier Lamy
>             Fix For: 3.0.4
>
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4792) Preemptive authentication doesn't work

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305632#comment-305632 ] 

Brett Porter commented on MNG-4792:
-----------------------------------

Lukasz - we frequently use Maven 2.2.1 to connect to private Archiva repos - feel free to ask for help on users@archiva.apache.org.

With regard to specifically enabling pre-emptive authentication on Maven 2.2.1, I believe it is possible to use the newer httpclient wagon with Maven 2.2.1 through an <extension> element, but I haven't confirmed that.
                
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: https://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>            Assignee: Olivier Lamy
>             Fix For: 3.0.4
>
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-4792) Preemptive authentication doesn't work

Posted by "Chris Tanger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=269567#action_269567 ] 

Chris Tanger edited comment on MNG-4792 at 6/6/11 11:47 AM:
------------------------------------------------------------

I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.

Note:  We are using a username and maven encrypted password in the server section of settings.xml.

Here is an excerpt with the password altered of course.

<server>
  <id>nexus-server</id>
  <!-- configure windows domain username and encrypted password here 
   Don't forget you need to setup a settings-security.xml file too in the same
   directory for password decryption purposes.
   -->
  <username>ctanger</username>
   <!-- This may not be a valid base64 string since it was altered -->
  <password>{CJ9S6SY2mSAH3w5CheexecNxNxd/nqZ3Wkef1a1a5Kg=}</password>

  <configuration>
     <wagonProvider>httpclient</wagonProvider> 
        <httpConfiguration>
          <put>
            <params>
              <param>
                <name>http.authentication.preemptive</name>
                <value>%b,true</value>
              </param>
            </params>
          </put>
      </httpConfiguration>
   </configuration>
</server>



      was (Author: tangercp):
    I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.

Note:  We are using a username and maven encrypted password in the server section of settings.xml.

Here is an excerpt with the password altered of course.

<server>
  <id>nexus-server</id>
  <!-- configure windows domain username and encrypted password here 
   Don't forget you need to setup a settings-security.xml file too in the same
   directory for password decryption purposes.
   -->
  <username>ctanger</username>
   <!-- This may not be a valid base64 string since it was altered -->
  <password>{CJ9S6SY2mSAH3w5CheexecNxNxd/nqZ3Wkef1a1a5Kg=}</password>

  <configuration>
     <wagonProvider>httpclient</wagonProvider> 
        <httpConfiguration>
          <all>
            <params>
              <param>
                <name>http.authentication.preemptive</name>
                <value>%b,true</value>
              </param>
            </params>
          </all>
      </httpConfiguration>
   </configuration>
</server>


  
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-4792) Preemptive authentication doesn't work

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MNG-4792.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.4
         Assignee: Olivier Lamy

will be fixed with a new default wagon http client in core

> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: https://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>            Assignee: Olivier Lamy
>             Fix For: 3.0.4
>
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4792) Preemptive authentication doesn't work

Posted by "Chris Tanger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=269567#action_269567 ] 

Chris Tanger commented on MNG-4792:
-----------------------------------

I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-4792) Preemptive authentication doesn't work

Posted by "Chris Tanger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=269567#action_269567 ] 

Chris Tanger edited comment on MNG-4792 at 6/6/11 11:47 AM:
------------------------------------------------------------

I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.

Note:  We are using a username and maven encrypted password in the server section of settings.xml.

Here is an excerpt with the password altered of course.

<server>
  <id>nexus-server</id>
  <!-- configure windows domain username and encrypted password here 
   Don't forget you need to setup a settings-security.xml file too in the same
   directory for password decryption purposes.
   -->
  <username>ctanger</username>
   <!-- This may not be a valid base64 string since it was altered -->
  <password>{CJ9S6SY2mSAH3w5CheexecNxNxd/nqZ3Wkef1a1a5Kg=}</password>

  <configuration>
     <wagonProvider>httpclient</wagonProvider> 
        <httpConfiguration>
          <all>
            <params>
              <param>
                <name>http.authentication.preemptive</name>
                <value>%b,true</value>
              </param>
            </params>
          </all>
      </httpConfiguration>
   </configuration>
</server>



      was (Author: tangercp):
    I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.

Note:  We are using a username and maven encrypted password in the server section of settings.xml.
  
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-4792) Preemptive authentication doesn't work

Posted by "Chris Tanger (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=269567#action_269567 ] 

Chris Tanger edited comment on MNG-4792 at 6/4/11 10:38 PM:
------------------------------------------------------------

I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.

Furthermore it appears that the expect 100-continue functionality isn't working properly either.  Protocol inspection reveals that even when 100-continue is sent in the header the payload is still sent.  Naturally this leads to a bad checksum computation on the server since the first request is denied with 401 since preemptive authentication doesn't work.

      was (Author: tangercp):
    I'm also experiencing this issue with maven 2.2.1 with a Nexus server on the back.  I have sniffed the http communications and the preemptive authentication configuration is indeed being ignored.
  
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4792) Preemptive authentication doesn't work

Posted by "Tarjei Skorgenes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257442#action_257442 ] 

Tarjei Skorgenes commented on MNG-4792:
---------------------------------------

Having hit the same problem as you I've come to the conclusion that there are multiple layers of problems here that hinders preemptive authentication from working:

1) The configuration listed in [1] is never injected into the HttpMethodConfiguration-objects created by Plexus during configuration of HttpWagon. This is caused by the fact that the params-field in HttpMethodConfiguration is of type Properties and PropertiesConverter does not recognize the param-element. Replacing param with property fixes this part of the problem:
{code:xml}
<configuration><wagonProvider>httpclient</wagonProvider><httpConfiguration><put><params><property><name>http.authentication.preemptive</name><value>%b,true</value></property></params></put></httpConfiguration></configuration>
{code}
2) Once properly configured Http Client ignores the preemptive-parameter completely. This is caused by the fact that the check for preemptive authentication in HTTP Client's HttpMethodDirector (line 158) is not performed on the PutMethod-object. The check is done one the HttpClientParams-object and this one has not been configured by HttpWagon to include any information about preemptive-auth.

> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MNG-4792) Preemptive authentication doesn't work

Posted by "Tarjei Skorgenes (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=257442#action_257442 ] 

Tarjei Skorgenes edited comment on MNG-4792 at 2/23/11 8:14 AM:
----------------------------------------------------------------

Having hit the same problem as you I've come to the conclusion that there are multiple layers of problems here that hinders preemptive authentication from working:

1) The configuration listed in [1] is never injected into the HttpMethodConfiguration-objects created by Plexus during configuration of HttpWagon. This is caused by the fact that the params-field in HttpMethodConfiguration is of type Properties and PropertiesConverter does not recognize the param-element. Replacing param with property fixes this part of the problem:
{code:xml}
<configuration>
  <wagonProvider>httpclient</wagonProvider>
  <httpConfiguration>
    <put>
      <params>
        <property>
          <name>http.authentication.preemptive</name>
          <value>%b,true</value>
        </property>
      </params>
    </put>
  </httpConfiguration>
</configuration>
{code}
2) Once properly configured Http Client ignores the preemptive-parameter completely. This is caused by the fact that the check for preemptive authentication in HTTP Client's HttpMethodDirector (line 158) is not performed on the PutMethod-object. The check is done one the HttpClientParams-object and this one has not been configured by HttpWagon to include any information about preemptive-auth.

      was (Author: lothor):
    Having hit the same problem as you I've come to the conclusion that there are multiple layers of problems here that hinders preemptive authentication from working:

1) The configuration listed in [1] is never injected into the HttpMethodConfiguration-objects created by Plexus during configuration of HttpWagon. This is caused by the fact that the params-field in HttpMethodConfiguration is of type Properties and PropertiesConverter does not recognize the param-element. Replacing param with property fixes this part of the problem:
{code:xml}
<configuration><wagonProvider>httpclient</wagonProvider><httpConfiguration><put><params><property><name>http.authentication.preemptive</name><value>%b,true</value></property></params></put></httpConfiguration></configuration>
{code}
2) Once properly configured Http Client ignores the preemptive-parameter completely. This is caused by the fact that the check for preemptive authentication in HTTP Client's HttpMethodDirector (line 158) is not performed on the PutMethod-object. The check is done one the HttpClientParams-object and this one has not been configured by HttpWagon to include any information about preemptive-auth.
  
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: http://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MNG-4792) Preemptive authentication doesn't work

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305729#comment-305729 ] 

Brett Porter commented on MNG-4792:
-----------------------------------

Lukasz, can you open an Archiva ticket with more details on that? It's certainly possible, but I don't want to fill this ticket with troubleshooting on a different project.
                
> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: https://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>            Assignee: Olivier Lamy
>             Fix For: 3.0.4
>
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4792) Preemptive authentication doesn't work

Posted by "Richard Eckart de Castilho (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MNG-4792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=281219#comment-281219 ] 

Richard Eckart de Castilho commented on MNG-4792:
-------------------------------------------------

We hit the problem that Maven does not download files from a public Artifactory with partially private repositories as well. It turns out that disabling the option "Hide Existence of Unauthorized Resources" in the Security General Configuration of Artifactory also resolves the problem. Maven will send username and password AFTER Artifactory has first denied access.

> Preemptive authentication doesn't work
> --------------------------------------
>
>                 Key: MNG-4792
>                 URL: https://jira.codehaus.org/browse/MNG-4792
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 2.2.1
>         Environment: Sun Java 1.6.0_21, Windows 7
>            Reporter: Marcin Zajaczkowski
>            Assignee: Olivier Lamy
>             Fix For: 3.0.4
>
>
> It seems preemptive authentication in Maven using httpclient wagon provider doesn't work. With configuration taken form [1] Maven knock to repository (tested with Artifactory 2.2.5) as anonymous user.
> <server>
>  <id>repo-id</id>
>  <username>user</username>
>  <password>pass</password>
>  <configuration>
>   <wagonProvider>httpclient</wagonProvider>
>   <httpConfiguration>
>    <put>
>     <params>
>      <param>
>       <name>http.authentication.preemptive</name>
>       <value>%b,true</value>
>      </param>
>     </params>
>    </put>
>   </httpConfiguration>
>  </configuration>
> </server>
> Confirmed by independent party also with Maven 2.2.1. I can sniff http traffic if needed.
> [1] - http://maven.apache.org/guides/mini/guide-http-settings.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira