{"id":273,"date":"2005-09-16T16:00:01","date_gmt":"2005-09-16T20:00:01","guid":{"rendered":"http:\/\/www.uvm.edu\/~waw\/blog\/?p=273"},"modified":"2005-09-16T16:00:01","modified_gmt":"2005-09-16T20:00:01","slug":"make-dspace-talk-to-ldap","status":"publish","type":"post","link":"https:\/\/blog.uvm.edu\/waw\/2005\/09\/16\/make-dspace-talk-to-ldap\/","title":{"rendered":"Make Dspace talk to LDAP"},"content":{"rendered":"<p>Option 1, which should work, near as I can tell from several hours googling, is to build a &quot;Trusted Keystore&quot; &#8212; put a copy of the LDAP servers cert into a different keystore:<\/p>\n<p><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp; keytool -import -file my_ldap_cert.cer -alias my_ldap_cert -keystore trusted.keystore<\/span><\/p>\n<p>Now add that to your Tomcat (version 5.0.27 or better) container. For example, <\/p>\n<p><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp; &lt;Connector port=&quot;443&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxThreads=&quot;150&quot; minSpareThreads=&quot;25&quot; maxSpareThreads=&quot;75&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; enableLookups=&quot;false&quot; disableUploadTimeout=&quot;true&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; acceptCount=&quot;100&quot; debug=&quot;0&quot; scheme=&quot;https&quot; secure=&quot;true&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; clientAuth=&quot;false&quot; sslProtocol=&quot;TLS&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keystoreFile=&quot;\/usr\/share\/ssl\/certs\/tomcat.p12&quot; keystorePass=&quot;xxxxxx&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; keystoreType=&quot;PKCS12&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; truststoreFile=&quot;\/usr\/share\/ssl\/certs\/trusted.keystore&quot; truststorePass=&quot;xxxx&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; truststoreType=&quot;JKS&quot;<\/span><br style=\"font-family: courier new\" \/><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp; \/&gt;<\/span><\/p>\n<p>Note that in this example, my Tomcat SSL cert is saved in PKCS12 (I generated my key and CSR with openssl), while my truststoreFile (created with keytool) is in JKS format.<\/p>\n<p>Looks good, on paper, and I found a number of web references that suggest this should work &#8212; but it didn&#8217;t<\/p>\n<p>Option 2, which did work (but I found a reference that said it didn&#8217;t, try option 1) was to put a copy of the LDAP servers cert into the default JAVA keystore: <\/p>\n<p><span style=\"font-family: courier new\">&nbsp;&nbsp;&nbsp; keytool -import -file my_ldap_cert.cer -alias my_ldap_cert -keystore $JAVA_HOME\/jre\/lib\/security\/cacerts<\/span><\/p>\n<p>This did work, thus ending 5 or 6 hours of head banging.<\/p>\n<p>Here&#8217;s one of my <a href=\"http:\/\/www.webhostingtalk.com\/showthread.php?threadid=299440\">references<\/a><\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Option 1, which should work, near as I can tell from several hours googling, is to build a &quot;Trusted Keystore&quot; &#8212; put a copy of the LDAP servers cert into a different keystore: &nbsp;&nbsp;&nbsp; keytool -import -file my_ldap_cert.cer -alias my_ldap_cert &hellip; <a href=\"https:\/\/blog.uvm.edu\/waw\/2005\/09\/16\/make-dspace-talk-to-ldap\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6517,8026],"tags":[],"class_list":["post-273","post","type-post","status-publish","format-standard","hentry","category-projects","category-systems-and-servers"],"_links":{"self":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/comments?post=273"}],"version-history":[{"count":0,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/posts\/273\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/media?parent=273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/categories?post=273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.uvm.edu\/waw\/wp-json\/wp\/v2\/tags?post=273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}