Link to home
Start Free TrialLog in
Avatar of lhrslsshahi
lhrslsshahi

asked on

Testrail - Active Directory integration.

Hello

I am trying to integrate Testrail with Active Directory using the script from http://docs.gurock.com/testrail-integration/auth-activedirectory

Below is the section where are all the changes are unique.

I keep getting when trying to login External auth: Bind: Invalid credentials

define('AUTH_HOST', 'dc.blah-route.local');
define('AUTH_PORT', 389);
define('AUTH_DN', 'CN=Testrail_Access_Group,OU=Security Groups,OU=Groups,OU=Val,DC=blah-route,DC=local');
define('AUTH_DOMAIN', 'blah-route.local');
define('AUTH_CREATE_ACCOUNT', false);
define('AUTH_FALLBACK', true);
define('AUTH_MEMBERSHIP', '/^CN=Testrail_Access_Group');
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

> define('AUTH_DN', 'CN=Testrail_Access_Group,OU=Security Groups,OU=Groups,OU=Val,DC=blah-route,DC=local');

This should be a OU. You cannot use a group here, it's the base for the search.

That, however, should not give you an Invalid Credentials message.

This article describes use of specific credentials (Bind DN and Password) against a generic LDAP directory. It's what I'd rather expected to see here:

http://docs.gurock.com/testrail-integration/auth-ldap

For this to be single sign-on without those, I'd expect you to have to enable Windows Authentication on the web server, or for the server side code to be running under a domain-privileged account. For that to be possible it would need to be IIS, is it?

This hypothesis is roughly consistent with the implementation of the authentication component here:

https://github.com/gurock/testrail-auth/blob/master/examples/active-directory/auth.php

It does not, unlike the generic LDAP version, explicitly authenticate against the LDAP directory.
I'm not really following the documentation on the site that well, but the setting for "AUTH_DN" implies that it should be a DN of the scope of where you want the users from, so it should be:

OU=Security Groups,OU=Groups,OU=Val,DC=blah-route,DC=local

Where they state:

You can also specify specific user groups if you only want to allow specific users to authenticate with TestRail.

...I think that means that you use the "AUTH_MEMBERSHIP" setting for that.  You may want to leave that out for now, get it working, then add it back.  Debug in layers, once you get one step to work, then add another.
ASKER CERTIFIED SOLUTION
Avatar of Chris Dent
Chris Dent
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lhrslsshahi
lhrslsshahi

ASKER

Thanks for your help.

I changed the below to get it working.

define('AUTH_DN', 'OU=Users,DC=blah-route,DC=local');             - Users reside under the USERS OU.
define('AUTH_MEMBERSHIP', '/^CN=Testrail_Access_Group,/');

Login was  blah-route\joeb and not joeb