{"id":590,"date":"2017-04-14T15:54:59","date_gmt":"2017-04-14T20:54:59","guid":{"rendered":"http:\/\/bitc.bme.emory.edu\/~lzhou\/blogs\/?p=590"},"modified":"2017-04-14T15:54:59","modified_gmt":"2017-04-14T20:54:59","slug":"ldaps-authentication-for-galaxy-when-you-use-self-signed-certificate","status":"publish","type":"post","link":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/?p=590","title":{"rendered":"LDAPS authentication for GALAXY when you use self-signed certificate"},"content":{"rendered":"<p>The current version of GALAXY (https:\/\/usegalaxy.org\/) will run into error when using ldaps authentication mechanics.  The error is<br \/>\nTraceback (most recent call last):<br \/>\nFile &#8220;\/home\/galaxy\/galaxy-dist\/lib\/galaxy\/auth\/providers\/ldap_ad.py&#8221;, line 117, in authenticate<br \/>\nldap.set_option(_opt)<br \/>\nFile &#8220;\/home\/galaxy\/galaxy-dist\/.venv\/local\/lib\/python2.7\/site-packages\/ldap\/functions.py&#8221;, line 135, in set_option<br \/>\nreturn _ldap_function_call(None,_ldap.set_option,option,invalue)<br \/>\nFile &#8220;\/home\/galaxy\/galaxy-dist\/.venv\/local\/lib\/python2.7\/site-packages\/ldap\/functions.py&#8221;, line 66, in _ldap_function_call<br \/>\nresult = func(_args,**kwargs)<br \/>\nValueError: option error<br \/>\nThe function in Python LDAP binary _ldap.so func(_args,**kwargs) does not take the option argument &#8220;OPT_X_TLS_REQUIRE_CERT&#8221; properly.<br \/>\nThe CentOS 7 system version of python-ldap binary has the same issue.<\/p>\n<p>To overcome this, you will need to download the python-ldap source from<br \/>\nwget https:\/\/pypi.python.org\/packages\/67\/d9\/fa0ea70d1792875745116ad62ac8d4bcb07550b15cded591bb57df6a6d9a\/python-ldap-2.4.32.tar.gz#md5=7c46c8a04acc227a778c7900c87cdfc7<br \/>\nthen install certain devel package using<br \/>\nyum install openldap-devel<br \/>\nthen build the source by running<br \/>\npython setup.py build<br \/>\nAfterward, you do not need to replace the entire ldap directory, but only overwrite the _ldap.so file in your galaxy\/.venv\/lib\/python2.7\/site-packages\/ by the file from your build in .\/build\/lib.linux-x86_64-2.7\/ folder.<br \/>\nThen the ldaps will work.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The current version of GALAXY (https:\/\/usegalaxy.org\/) will run into error when using ldaps authentication mechanics. The error is Traceback (most recent call last): File &#8220;\/home\/galaxy\/galaxy-dist\/lib\/galaxy\/auth\/providers\/ldap_ad.py&#8221;, line 117, in authenticate ldap.set_option(_opt) File &#8220;\/home\/galaxy\/galaxy-dist\/.venv\/local\/lib\/python2.7\/site-packages\/ldap\/functions.py&#8221;, line 135, in set_option return _ldap_function_call(None,_ldap.set_option,option,invalue) File &#8220;\/home\/galaxy\/galaxy-dist\/.venv\/local\/lib\/python2.7\/site-packages\/ldap\/functions.py&#8221;, line 66, in _ldap_function_call result = func(_args,**kwargs) ValueError: option error The function in Python LDAP [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-590","post","type-post","status-publish","format-standard","hentry","category-uncategorized","post-blog"],"_links":{"self":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=590"}],"version-history":[{"count":1,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/590\/revisions"}],"predecessor-version":[{"id":591,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=\/wp\/v2\/posts\/590\/revisions\/591"}],"wp:attachment":[{"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/csic.som.emory.edu\/~lzhou\/blogs\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}