Jelle
I did all that and it looks correct.. it is retrieving the correct field. This is the error i am still getting.. I am using pretty much the same option in other apps..
galaxy.webapps.galaxy.controllers.user DEBUG 2017-06-14 12:04:40,648 trans.app.config.auth_config_file: ./config/auth_conf.xml
galaxy.auth.providers.ldap_ad DEBUG 2017-06-14 12:04:40,648 LDAP authenticate: email is johnuser@example.org
galaxy.auth.providers.ldap_ad DEBUG 2017-06-14 12:04:40,648 LDAP authenticate: username is None
galaxy.auth.providers.ldap_ad DEBUG 2017-06-14 12:04:40,648 LDAP authenticate: options are {'bind-user': '{dn}', 'search-fields': 'uid,mail', 'login-use-username': 'False', 'allow-register': 'True', 'ldap-options': 'OPT_X_TLS_REQUIRE_CERT=OPT_X_TLS_ALLOW', 'auto-register-email': '{email}', 'server': 'ldap://ldap.nyumc.org', 'auto-register': 'True', 'search-base': 'DC=example,DC=org', 'search-filter': '(mail={email})', 'continue-on-failure': 'True', 'auto-register-username': '{sAMAccountName', 'bind-password': '{password}', 'allow-password-change': 'False'}
galaxy.auth.providers.ldap_ad DEBUG 2017-06-14 12:04:40,648 LDAP authenticate: Valid LDAP option pair OPT_X_TLS_REQUIRE_CERT=OPT_X_TLS_ALLOW -> 24582=3
galaxy.auth.providers.ldap_ad ERROR 2017-06-14 12:04:40,648 LDAP authenticate: search exception
Traceback (most recent call last):
File "/home/galaxy/galaxy/lib/galaxy/auth/providers/ldap_ad.py", line 118, in authenticate
ldap.set_option(*opt)
File "/home/galaxy/galaxy/.venv/lib/python2.7/site-packages/ldap/functions.py", line 135, in set_option
return _ldap_function_call(None,_ldap.set_option,option,invalue)
File "/home/galaxy/galaxy/.venv/lib/python2.7/site-packages/ldap/functions.py", line 66, in _ldap_function_call
result = func(*args,**kwargs)
ValueError: option error
Are you running MS AD ? if so, could i take a look at your config file?
Thanks
John
From: Jelle Scholtalbers <j.scholtalbers@gmail.com>
To: Hans-Rudolf Hotz <hrh@fmi.ch>
Cc: John Chen <jchen162@yahoo.com>; Galaxy Dev List <galaxy-dev@lists.galaxyproject.org>
Sent: Monday, June 12, 2017 3:16 AM
Subject: Re: [galaxy-dev] AD Intergration
Hi John,
as a tip, you can use the tool "ldapsearch", from e.g. the package "openldap-client", to figure out with which attributes you search and which attributes you can retrieve.
Examples:
$ ldapsearch -vv -x -H ldap://dc1.example.com -b cn=Users,dc=exampke,dc=org" # retrieve all AD/ldap entries$ ldapsearch -vv -x -H ldap://dc1.example.com -b cn=Users,dc=exampke,dc=org "uid=a_username" # retrieve all attributes for user with uid "a_username" $ ldapsearch -vv -x -H ldap://dc1.example.com -b cn=Users,dc=exampke,dc=org "sAMAccountName=a_username" mail # only retrieve the mail attribute by searching for the sAMAccountName In addition, if you get it working, you might want to switch to the more secure ldap
s if that is supported by your IT.
Cheers,