Dave Vernon
2014-10-07 17:25:12 UTC
Hello again,
As you know, yesterday was an exciting day for me, getting my first Shibboleth project running in my dev environment. My users are held in a Microsoft Active Directory (2008 R2 DC's, 2003 functional level). I was aware that the default search base is CN=Users so I had put my test user there.
Today I went to expand that and I've run into issues. I'd like to be able to search from the root of my AD dc=ad,dc=loyalistcollege,dc=ca , so I edited my attribute-resolver.xml file on my IdP, restarted the service, and tested. I found that it wasn't working - users NOT in the cn=users container were rejected by Shib, and my test user in the cn=users container was authenticated by Shib but rejected by the resource I'm protecting (remote_user not set)
I checked the documentation I see the common cause seems to revolve around refers. The docs say that I need to set <LDAPProperty name="java.naming.referral" value="follow"/> , as it is 'ignore' by default. I think that's actually old information because I can verify that in my instance it was set to 'follow' by default.
The other fix is to search a GC instead - which is not a problem for me ("horus" is a GC). I changed my ldapURL to use port 3268 (plain old) but I'm still getting the same results. If I move a user into the cn=users container they work, but if they aren't there, they won't authenticate.
Here is my attribute-resolver.xml
<resolver:DataConnector id="myLDAP" xsi:type="LDAPDirectory" xmlns="urn:mace:shibboleth:2.0:resolver:dc"
useStartTLS="false"
ldapURL="ldap://horus.ADS.LOYALISTCOLLEGE.CA:3268" baseDN="DC=ads,DC=loyalistcollege,DC=ca" principal="ldapqsvc-***@public.gmane.orgege.ca"
principalCredential="password removed for post">
<FilterTemplate>
<![CDATA[
(sAMAccountName=$requestContext.principalName)
]]>
</FilterTemplate>
<!-- We rely on the uniqueness of the objectSid. But it is binary so we *must* make it so -->
<LDAPProperty name="java.naming.ldap.attributes.binary" value="objectSid"/>
<!-- If we are following from the GC we need thus on -->
<LDAPProperty name="java.naming.referral" value="follow"/>
</resolver:DataConnector>
And a snip from my idp-process.log
javax.security.auth.login.LoginException: Cannot authenticate dn, invalid dn
Any thoughts? I also read that I could stack multiple searches, which would also work for me ( I only have 3 or 4 OUs where users are) so I tried changing the base path to a specific OU where a user is, but I was also unable to authenticate.
Dave Vernon
Technology Infrastructure Specialist
dvernon-6gMbXkmN5X7mEV3UZ/***@public.gmane.org<mailto:dvernon-6gMbXkmN5X7mEV3UZ/***@public.gmane.org>
loyalistcollege.com<http://loyalistcollege.com/>
[Loyalist College]<http://www.loyalistcollege.com/>[Facebook]<https://www.facebook.com/loyalistcollege>[Twitter]<https://twitter.com/loyalistcollege>
As you know, yesterday was an exciting day for me, getting my first Shibboleth project running in my dev environment. My users are held in a Microsoft Active Directory (2008 R2 DC's, 2003 functional level). I was aware that the default search base is CN=Users so I had put my test user there.
Today I went to expand that and I've run into issues. I'd like to be able to search from the root of my AD dc=ad,dc=loyalistcollege,dc=ca , so I edited my attribute-resolver.xml file on my IdP, restarted the service, and tested. I found that it wasn't working - users NOT in the cn=users container were rejected by Shib, and my test user in the cn=users container was authenticated by Shib but rejected by the resource I'm protecting (remote_user not set)
I checked the documentation I see the common cause seems to revolve around refers. The docs say that I need to set <LDAPProperty name="java.naming.referral" value="follow"/> , as it is 'ignore' by default. I think that's actually old information because I can verify that in my instance it was set to 'follow' by default.
The other fix is to search a GC instead - which is not a problem for me ("horus" is a GC). I changed my ldapURL to use port 3268 (plain old) but I'm still getting the same results. If I move a user into the cn=users container they work, but if they aren't there, they won't authenticate.
Here is my attribute-resolver.xml
<resolver:DataConnector id="myLDAP" xsi:type="LDAPDirectory" xmlns="urn:mace:shibboleth:2.0:resolver:dc"
useStartTLS="false"
ldapURL="ldap://horus.ADS.LOYALISTCOLLEGE.CA:3268" baseDN="DC=ads,DC=loyalistcollege,DC=ca" principal="ldapqsvc-***@public.gmane.orgege.ca"
principalCredential="password removed for post">
<FilterTemplate>
<![CDATA[
(sAMAccountName=$requestContext.principalName)
]]>
</FilterTemplate>
<!-- We rely on the uniqueness of the objectSid. But it is binary so we *must* make it so -->
<LDAPProperty name="java.naming.ldap.attributes.binary" value="objectSid"/>
<!-- If we are following from the GC we need thus on -->
<LDAPProperty name="java.naming.referral" value="follow"/>
</resolver:DataConnector>
And a snip from my idp-process.log
javax.security.auth.login.LoginException: Cannot authenticate dn, invalid dn
Any thoughts? I also read that I could stack multiple searches, which would also work for me ( I only have 3 or 4 OUs where users are) so I tried changing the base path to a specific OU where a user is, but I was also unable to authenticate.
Dave Vernon
Technology Infrastructure Specialist
dvernon-6gMbXkmN5X7mEV3UZ/***@public.gmane.org<mailto:dvernon-6gMbXkmN5X7mEV3UZ/***@public.gmane.org>
loyalistcollege.com<http://loyalistcollege.com/>
[Loyalist College]<http://www.loyalistcollege.com/>[Facebook]<https://www.facebook.com/loyalistcollege>[Twitter]<https://twitter.com/loyalistcollege>