TRAC Integration help

Jamie Gagnon, modified 10 Years ago.

TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Hi there,

Looking for some assistance on Trac Integration.

We use the Community version of Klaros Test Management.

With TRAC we use windows autentication to connect to it rather than having to enter our login credentials over and over again. However, the initial train of thought is to use Community version of Klaros for our test case management until such times we feel necessary to expand it further.

We have encountered a problem with intrgration with TRAC where KLAROS is trying to use NTLM instead of acceptin guser login credentials.

I was wonering if anyone could help us out with a way we can get round this problem?

I suppose what we really want to do is have the user enter username and password to access TRAC when logging a defect rather than use the LDAP in this case without getting messages that they cant be authenticated.
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Jamie,

did you consider using an NTLM Authorization Proxy Server http://ntlmaps.sourceforge.net/?

Regards

Torsten
Jamie Gagnon, modified 10 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Thanks for your input

We haven't as of yet but I can suggest it to the man incharge of the installation.

Besides this option, are there other ways around it? Just thinking that if I supply a couple of options, they can choose the best one they feel works in our environment
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Just to make sure that we are not chasing the wrong problem here:

Klaros initially tries to authenticate with trac (and other IMs) using the credentials provided by the user when logging in with Klaros. Only in case the authentication was done against LDAP these would be the LDAP credentials.

If this fails the user is asked for credentials again. I am not aware that the mylyn accessor is trying to use any local user credentials here.

HTH,

Torsten
Jamie Gagnon, modified 10 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Morning Torsten.

Sorry for not coming back sooner and forgive me if I have not explained things right. below is how we log into our network and TRAC normally follwoed by the problems we have for KLAROS login.

1. Network loging is usually <DOMAIN>\<Username> and then a password..
2. Once I have authenticated to the network. and Access TRAC my credentials are passed on to TRAC so that I do not need to log in twice.


KLAROS

1. We are using community so we do not have the LDAP functionality.
2. Login into KLAROS ( I set up a username and password same as my network password.
3. I ran a test and clicked to log a defect. I got asked for username and password.
4. I entered <DOMAIN>\<Username> as username then my network password. no connection made
5. Tried with just my username without domain. no connection made.

We have managed to get Klaros to recognise our instance of TRAC and tested the connection it works. But when we checked at a command prompt on the server, we could see that on login to TRAC for defect logging. nothing was happening. It seems to be trying an NTLM connection first and if it cant connect that way it does nothing more.

Hope that explains it better for you. If not I will have the guy installing Klaros for me, drop you a message explaining what he gets

Regards

Jamie
thumbnail
Torsten Stolpmann, modified 10 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Morning Jamie,

thanks for clearing things up emoticon

Just for the record (and as a checklist for others having problems with Trac): I assume you did install the XML-RPC Plugin in Trac, and it is showing up in Trac as follows:



Next part would be to check that the XMLRPC-Plugin actually works with NTML Authentication.

It is possible that:

a) This combination does not work at all (in Trac)
b) On the Klaros side the connector automatically tries the user credentials of the account it is running in

We have managed to get Klaros to recognise our instance of TRAC and tested the connection it works.

This currently only ensures that a connection can be established to that URL.

Please send the relevant parts of the Klaros and Trac log files to support@verit.de.

Regards,

Torsten
Jamie Gagnon, modified 13 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Hi Torsten,

We definitely have the plugin in place and working as we use it for another tool also.

I just emailed some screen shots to the support email address as I thought they might come in handy

We seem to be on TRAC 0.12
Jamie Gagnon, modified 13 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Good Morning

I have managed to to get Eclipse Mylyn to connect to Trac using my login credentials. However I now do not know how to make Klaros connect to Eclipse in order to connect to Trac. Any pointer would be appreciated. Meantim I will continu investigating this
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: TRAC Integration help (Answer)

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Jamie,

I think I pinned down the source of your problems. The problem is rooted in the fact that we require non-authenticated access to the XML RPC plugin on the trac server side during authentication.

If you have raised the debug level in your trac installation you probably find lines like the following:

2010-10-13 12:54:06,043 Trac[main] DEBUG: Dispatching <Request "POST '/xmlrpc'">
2010-10-13 12:54:06,046 Trac[cache] DEBUG: cache metadata undefined (youngest_rev=0)
2010-10-13 12:54:06,046 Trac[cache] INFO: repos rev [0] != cached rev [None]
2010-10-13 12:54:06,046 Trac[api] INFO: Synchronized '' repository in 0.00 seconds
2010-10-13 12:54:06,046 Trac[web_ui] DEBUG: RPC incoming request of content type 'text/xml' dispatched to <tracrpc.xml_rpc.XmlRpcProtocol object at 0xdb69dd0>
2010-10-13 12:54:06,046 Trac[web_ui] DEBUG: RPC(XML-RPC) call by 'anonymous'
2010-10-13 12:54:06,047 Trac[xml_rpc] DEBUG: RPC(xml) call by 'anonymous', method 'ticket.component.getAll' with args: ()
2010-10-13 12:54:06,047 Trac[session] DEBUG: Retrieving session for ID '3d009e75afdbaff2095d14f8'
2010-10-13 12:54:06,048 Trac[perm] DEBUG: No policy allowed anonymous performing XML_RPC on None
2010-10-13 12:54:06,048 Trac[web_ui] ERROR: RPC(XML-RPC) Error
Traceback (most recent call last):
  File "/opt/python/lib/python2.6/site-packages/TracXMLRPC-1.1.0_r9171-py2.6.egg/tracrpc/web_ui.py", line 149, in _rpc_process
    req.perm.require('XML_RPC') # Need at least XML_RPC
  File "build/bdist.linux-x86_64/egg/trac/perm.py", line 576, in require
    raise PermissionError(action, resource, self.env)
PermissionError


To circumvent this you must give the access rights to the XML-RPC plugin to non authenticated users as well as authenticated ones as shown below:



And yes this should have been part of the documentation ... so sorry for the hassle. If possible we will try to avoid requiring unauthenticated access (I don't like this) - I will keep you updated on further progress.

HTH - thanks for your support,

Regards, Torsten

P.S.: The Mylyn access was just to crosscheck the availability of the service.
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
As of Klaros 3.2.3 the access rights to the XML-RPC plugin for non authenticated users should no longer be required.

Regards,

Torsten
Jamie Gagnon, modified 13 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Hi Torsten and Happy New year to you and your team.

I can now confirm that if I use the create Issue option. I can now log TRAC tickets. However, if I am executing a test and choose to log an issue at that stage. it will ask me for a username and password. No matter what username and password I supply at that stage, it will say it is incorrect.
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Hi Jamie,

A happy new year to you too and thanks for the feedback.

I really had high hopes that the Trac issues are fully resolved now emoticon

Just two quick questions to help us track this down:

1. Is this behaviour reproducible after a restart as the first action against trac?
2. Are your Klaros and Trac credentials identical (because Klaros silently tries to use the Klaros credentials before asking you for new ones)?

Regards,

Torsten
Jamie Gagnon, modified 13 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Hi Torsten. Looks like it's righted itself.

I performed a Cache clear out of my browser and then restarted the browser. It now seems to work.

The initial attempt to login will ask me for my username and password because my KLAROS login is different to my TRAC login. As soon as I enter details (In my circumstances <Server>\<username> followeed by password) then it logs in successfully. I raised a couple of dummy tickets. All working well by the looks of it.

Thanks to you and your team for your efforts on this one. emoticon
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
You see me relieved emoticon

Does that mean Trac-NTML Authentication is also working now?

Regards,

Torsten
Jamie Gagnon, modified 13 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Unfortunately Unable to test that for you. I only have community version.

What I can do as a form of test would be to set a user up in community that is an exact match to my TRAC NTLM user account.

Otehr than that, I am afraid I cannot do. Will come back to you shortly
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
Well the good news it if it works it should work with the community edition as well.

Looking forward to your feedback!

Torsten
Jamie Gagnon, modified 13 Years ago.

RE: TRAC Integration help

Padawan Posts: 46 Join Date: 8/27/10 Recent Posts
Ok tested by creating a user to be the exact same as my NTLM user.

Authentication with TRAC worked without asking for username and password again.

Not a clean test of the NTLM feature available in Enterprise though. Any plans to have such a facility available in Community version?
thumbnail
Torsten Stolpmann, modified 13 Years ago.

RE: TRAC Integration help

Jedi Council Member Posts: 755 Join Date: 2/12/09 Recent Posts
We will have to look into this. Generally spoken, new features are driven by customer demands. emoticon

I will get back to you via PM.

Regards,

Torsten