Hi Josh,
the original config (before I tried to turn on SSL) looked like this:
- Code: Select all
omero.data.dir=/srv/omero_data
omero.db.name=omerodb
omero.db.pass=xxx
omero.db.poolsize=50
omero.db.user=omero
omero.ldap.base=dc=oice
omero.ldap.config=true
omero.ldap.new_user_group=oice_private
omero.ldap.referral=ignore
omero.ldap.urls=ldap://localhost:389
omero.ldap.user_filter=(memberOf=cn=omerologins,ou=groups,dc=oice)
omero.ldap.user_mapping=omeName=uid,firstName=givenName,lastName=sn,email=mail
omero.sessions.timeout=3600000
omero.web.application_server=fastcgi-tcp
omero.web.debug=False
This worked fine. The problem is, that our server does not enforce to use TLS when connecting on port 389. As far as I could find out, OMERO is also not capable of doing a startTLS session, even when enforcing TLS on port 389. So I turned on ldaps (which uses another protocol forcing encryption form the start) on port 636 and changed the config to:
- Code: Select all
omero.data.dir=/srv/omero_data
omero.db.name=omerodb
omero.db.pass=xxx
omero.db.poolsize=50
omero.db.user=omero
omero.ldap.base=dc=oice
omero.ldap.config=true
omero.ldap.new_user_group=oice_private
omero.ldap.referral=ignore
omero.ldap.urls=ldaps://our-server.de:636
omero.ldap.user_filter=(memberOf=cn=omerologins,ou=groups,dc=oice)
omero.ldap.user_mapping=omeName=uid,firstName=givenName,lastName=sn,email=mail
omero.security.trustStore=/home/omero/.ssl/truststore
omero.security.trustStorePassword=xxx
omero.sessions.timeout=3600000
omero.web.application_server=fastcgi-tcp
omero.web.debug=False
Now, I get the following error in Blitz-0.log when I try to log on as an LDAP user:
- Code: Select all
org.springframework.ldap.CommunicationException: simple bind failed: romulus.oice.uni-erlangen.de:636; nested exception is javax.naming.CommunicationException: simple bind failed: romulus.oice.uni-erlangen.de:636 [Root exception is javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty]
I tried to create a java truststore containing the last certificate in the chain used by our certificate provider (the university), but this should technically not be necessary since the university uses a well-known root CA. Unfortunately, this led to the same error. I did not try to create a java keystore, since our server does not require client certificates.
Any ideas on how I can get a secure ldap authentication working?
Best,
Tristan