Problems using LDAP with SSL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems using LDAP with SSL

PDiefent
Hi,
I want to use the Shiro framework to connect to a LDAP with a secure SSL connection (LDAPv2 & LDAPv3 on SSLv3 port).

I've tried to set some parameters for LDAP in the shiro.ini file:
[main]
...
ldapRealm.contextFactory.environment[java.naming.security.protocol] = ssl
ldapRealm.contextFactory.environment[com.sun.jndi.ldap.connect.pool.protocol] = plain ssl
ldapRealm.contextFactory.environment[com.sun.jndi.ldap.connect.pool] = true

These entries lead to following error message:

org.apache.shiro.config.ConfigurationException: Map property value [ssl] contained key-value pair token [ssl] that does not properly split to a single key and pair.  This must be the case for all map entries.

How do I enter parameters correctly?

Thanks, Peter
Reply | Threaded
Open this post in threaded view
|

Re: Problems using LDAP with SSL

Les Hazlewood
Administrator
Hi Peter,

This must be a bug - can you please open up a Jira issue for this?

In the meantime, you might want to set this programmatically after
Shiro is initialized:

securityManager.getRealms()

then find the LDAP one and then call
getContextFactory().getEnvironment() and set the values explicitly.

Thanks,

Les
Reply | Threaded
Open this post in threaded view
|

Re: Problems using LDAP with SSL

PDiefent
New Jira Ticket: SHIRO-305
Reply | Threaded
Open this post in threaded view
|

Re: Problems using LDAP with SSL

Les Hazlewood-2
Great - thanks Peter!

--
Les Hazlewood
CTO, Katasoft | http://www.katasoft.com | 888.391.5282
twitter: http://twitter.com/lhazlewood
katasoft blog: http://www.katasoft.com/blogs/lhazlewood
personal blog: http://leshazlewood.com