This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 269323 - [regression] authentification fails with mod_auth_sspi or NTLM
Summary: [regression] authentification fails with mod_auth_sspi or NTLM
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 3.1.1   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 271019
  Show dependency tree
 
Reported: 2009-03-19 06:03 EDT by Achim Winkler CLA
Modified: 2009-06-02 08:44 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (5.32 KB, application/octet-stream)
2009-03-30 01:31 EDT, Steffen Pingel CLA
no flags Details
eclipse debug output (9.72 KB, text/plain)
2009-03-30 05:05 EDT, Achim Winkler CLA
no flags Details
fix (1.02 KB, patch)
2009-04-10 02:03 EDT, Steffen Pingel CLA
no flags Details | Diff
updated patch (1.53 KB, patch)
2009-04-10 22:16 EDT, Steffen Pingel CLA
no flags Details | Diff
Console log of "Validate settings" for TRAC connector (10.70 KB, text/plain)
2009-06-02 08:44 EDT, Jens H. Gabe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Achim Winkler CLA 2009-03-19 06:03:52 EDT
Build ID: M20090211-1700

Steps To Reproduce:
After updating MyLyn to the latest version (v3.1) the Trac authentification does not work anymore. I changed nothing else and all worked perfectly before the update.

A look into the Apache logfile give me the following information:

before the update:

ip - username [19/Mar/2009:10:30:01 +0100] "POST /project/login/xmlrpc HTTP/1.1" 200 168
ip - username [19/Mar/2009:10:30:01 +0100] "POST /project/login/xmlrpc HTTP/1.1" 200 3075

after the update:

ip - - [19/Mar/2009:10:04:22 +0100] "HEAD /project/login/xmlrpc HTTP/1.1" 401 -
ip - - [19/Mar/2009:10:04:22 +0100] "POST /project/login/xmlrpc HTTP/1.1" 401 401
ip - - [19/Mar/2009:10:04:22 +0100] "POST /project/login/xmlrpc HTTP/1.1" 401 401


More information:
Comment 1 Jörg Thönnes CLA 2009-03-19 09:25:29 EDT
Hi Achim,

did you check the Trac repository settings (user/pw) and use "Validate Settings"?

Jörg
Comment 2 Achim Winkler CLA 2009-03-19 10:04:44 EDT
Yes of course. I get always the error "Unable to authenticate with repository. Login credentials invalid.". But the password is correct because my SVN access works perfectly with the same username and password.

Trac worked yesterday until i updated to the latest Mylyn version. I restarted Eclipse and Trac does not work anymore. I changed nothing else on my system or the server.
Comment 3 Jörg Thönnes CLA 2009-03-20 05:59:25 EDT
(In reply to comment #2)
> Yes of course. I get always the error "Unable to authenticate with repository.
> Login credentials invalid.". But the password is correct because my SVN access
> works perfectly with the same username and password.
> 
> Trac worked yesterday until i updated to the latest Mylyn version. I restarted
> Eclipse and Trac does not work anymore. I changed nothing else on my system or
> the server.

I am also using the newest version from the weekly update site. This version has been promoted to the 3.1 release so the software should be the same.

If I have some time to switch to the real 3.1 release, I could test whether it continues to work for me (Trac 0.10.4).
Comment 4 Jens H. Gabe CLA 2009-03-25 03:56:50 EDT
I have the same issue.
After updating Mylyn and the Trac connector to version 3.1.0.v20090315-1500-e3x, I can no longer authenticate against my Trac repository, and it worked perfectly before.
I have tried removing the old and creating a new repository - no luck.
Comment 5 Steffen Pingel CLA 2009-03-25 13:36:25 EDT
Jens, Achim, can you provide details about configuration such as the version of Apache used, whether you use CGI and mod_python and basic auth or digest auth?
Comment 6 Jens H. Gabe CLA 2009-03-25 13:55:55 EDT
Sure:
Trac 0.11.2.1
Apache 2.0.62 (on WINDOWS)
mod_python (python 2.5)
mod_auth_sspi 1.0.4

Comment 7 Achim Winkler CLA 2009-03-26 04:27:59 EDT
Trac 0.11.1
Apache 2.2.9
mod_ssl 2.2.9
OpenSSL 0.9.8h
mod_auth_sspi 1.0.4
mod_python with Python 2.5

We use SSL for our Subversion and Trac access.

May be it has something to do with SSL or mod_auth_sspi...

Apache configuration:

<LocationMatch /[[:alnum:]_-]+/login/xmlrpc>
    SSLRequireSSL
    SVNParentPath D:/subversion
    AuthType SSPI
    SSPIAuth On
    SSPIAuthoritative On
    SSPIDomain <domaincontroller>
    SSPIOfferBasic On
    SSPIBasicPreferred On
    SSPIOmitDomain On
    SSPIUsernameCase lower
    AuthzSVNAccessFile "C:/Program Files/Apache/conf/svnaccess"
    Require valid-user 
</LocationMatch>
Comment 8 Jens H. Gabe CLA 2009-03-26 04:58:08 EDT
We do not use SSL (as the server is not public).
But mod_auth_sspi does seem to light up as the common ground...
Comment 9 Steffen Pingel CLA 2009-03-30 01:31:42 EDT
I am not able to reproduce the error due to a lack of a Windows Trac test setup. It would be helpful if someone could post the headers of a failed Trac request following these instructions to enable debug output: http://wiki.eclipse.org/Mylyn/FAQ#How_do_I_enable_debugging_output_for_network_communications.3F . Please make sure to remove any private information before posting the headers.
Comment 10 Steffen Pingel CLA 2009-03-30 01:31:54 EDT
Created attachment 130199 [details]
mylyn/context/zip
Comment 11 Achim Winkler CLA 2009-03-30 03:24:29 EDT
Hmm i can't get it working. Thats the contents of my ini file:

256M
-startup
plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
-Dorg.apache.commons.logging.simplelog.showlogname=true
-Dorg.apache.commons.logging.simplelog.defaultlog=off
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire.header=debug
-Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=off
-Dorg.apache.commons.logging.simplelog.log.org.apache.axis.message=debug
-Dorg.apache.commons.logging.simplelog.log.httpclient.wire.content=debug
-Xms40m
-Xmx256m

I startet cmd.exe and now Eclipse.exe but i do not get any logs.
Comment 12 Steffen Pingel CLA 2009-03-30 04:03:51 EDT
Can you try to start eclipse with "-consolelog"? This might be required on Windows for Eclipse to have a console to write to. 
Comment 13 Achim Winkler CLA 2009-03-30 05:05:40 EDT
Created attachment 130211 [details]
eclipse debug output
Comment 14 Steffen Pingel CLA 2009-04-02 07:48:30 EDT
I have committed a fix for NTLM authentication. It would be great if you could verify that the problem is fixed in the latest weekly build (3.2.0.I20090402-1000) of the Trac connector. It is available from this update site: http://download.eclipse.org/tools/mylyn/update/weekly/extras
Comment 15 Achim Winkler CLA 2009-04-02 09:32:59 EDT
Seems to work again. Thx!
Comment 16 Jens H. Gabe CLA 2009-04-02 15:57:34 EDT
Works fine here also - thanx for the quick fix :-)
Comment 17 Steffen Pingel CLA 2009-04-10 02:03:16 EDT
Created attachment 131484 [details]
fix
Comment 18 Steffen Pingel CLA 2009-04-10 02:17:11 EDT
Achim, Jens, thanks for the feedback. Marking resolved.
Comment 19 Steffen Pingel CLA 2009-04-10 22:16:51 EDT
Created attachment 131535 [details]
updated patch
Comment 20 Dan G. Switzer, II CLA 2009-04-23 22:14:03 EDT
I believe this is the same issue I was facing. I had 3.1.1.v20090411-0400.e3x installed, but calls via HTTP were not sending the basic authentication header (I verified this using an HTTP proxy.)

I tried upgrading the 3.2 weekly build, but that fared no better.

I ended up having to disable all the Mylyn plug-ins and then go through and uninstall every version but the base v3.0.5 that came with my Ganymede install. 

Rolling back to v3.0.5.v20090218-1800-e3x and then installing the Trac connector has resolved the issue for me.
Comment 21 Steffen Pingel CLA 2009-04-23 22:22:48 EDT
Dan, it would be helpful if you could provide additional details about your configuration such as the Apache authentication module used etc. to help reproduce the problem. The existing test cases for basic authentication all pass with the latest version of the Trac connector.
Comment 22 Dan G. Switzer, II CLA 2009-04-23 22:44:03 EDT
Here you go:

Apache 2.2.4
Trac 0.10.4
Python 2.4
XMLRPC Plug-in 0.10 (r5577)
mod_auth_sspi v1.0.4.2.2.2

I'm also using a self signed cert and force everything through HTTPS.

What's weird is watching the HTTP traffic, the authentication header just never gets sent. I wish I would have saved my HTTP logs, but all I was seeing was 3 consecutive failed requests to: https://server/xmlrpc/login

None of the request past the basic authentication header. All of the version of Mylyn that do work, all pass the header.

Here's my location info:

<Location />

    AuthName "server info"
    AuthType SSPI
    SSPIAuth On
    SSPIAuthoritative On
    # set the domain to authorize against
    SSPIDomain [domain]
    SSPIOfferBasic On     # let non-IE clients authenticate
    SSPIOmitDomain On     # keep domain name in userid string
    SSPIBasicPreferred On # basic authentication should have higher priority

    # require the Trac Users group
    require group "[group name]"
</Location>

Also, as I said I am using SSL with a self-signed 128bit cert.

Let me know if you need more info.
Comment 23 Steffen Pingel CLA 2009-04-23 23:10:09 EDT
Would you be able to setup a separate instance of Eclipse with the latest release of Mylyn? It would be very helpful to see the debug output that can be enabled following these instructions and starting eclipse with -consolelog:

http://wiki.eclipse.org/Mylyn/FAQ#How_do_I_enable_debugging_output_for_network_communications.3F
Comment 24 Jens H. Gabe CLA 2009-06-02 07:59:51 EDT
I've updated my Trac connector to version 3.2.0.I20090529-0600-e3x and today to version 3.2.0.I20090531-0500-e3x, but none of them works against our SSPI auth setup (We have not changed anything on the server since comment #6 in March).

As I wrote back in the beginning of April version 3.2.0.I20090402-1000 did work!
Comment 25 Jens H. Gabe CLA 2009-06-02 08:44:11 EDT
Created attachment 137988 [details]
Console log of "Validate settings" for TRAC connector