Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't concatenate 2 LDAP fields to format FullName mapping #54

Open
symzation opened this issue May 2, 2019 · 4 comments
Open

Can't concatenate 2 LDAP fields to format FullName mapping #54

symzation opened this issue May 2, 2019 · 4 comments

Comments

@symzation
Copy link

Hi all,
I love using this plugin except for I can't format fullname configuration the way I would like the name to be displayed. I know it maps to the ldap field you specify in the configuration but it would be nice to be able to format the fullname. The ldap server I am using returns fullname as lastname, firstname but I would like to be able to concatenate 2 ldap fields to configure fullname to become firstname lastname.

Right now configuration is mapped to onefiled (ex. ckanext.ldap.fullname = fullname). Would like the option to be able to format fullname like so (ex. ckanext.ldap.fullname = givenName + ' ' + sn)

@symzation symzation changed the title Would like to concatenate 2 LDAP fields to format FullName mapping Can't concatenate 2 LDAP fields to format FullName mapping May 2, 2019
@apoorv0612
Copy link

Hi
Which version of Ckan you are using? I am trying to install this extension on my CKAN 2.8 but it's not working? Can you guide me how did you install it and on what version of CKAN?
Thanks

@symzation
Copy link
Author

I am using ckan 2.8.1

@apoorv0612
Copy link

is it working perfectly for you? I try using this extension on 2.8 but it was not working for me so i switched on to CKAN 2.7 but still it's not working.
My configuration looks like this --
ckanext.ldap.uri = ldap://x.x.x.x:389
ckanext.ldap.auth.password = secret
ckanext.ldap.base_dn = ou=users,dc=example,dc=com
ckanext.ldap.search.filter = abc={login}
ckanext.ldap.username = abc
ckanext.ldap.email = abc@zaq.com
On CKAN 2.7

Logs showing something like this /ldap_login_handler render time 0.041 seconds

@symzation
Copy link
Author

It is working for me. There are 3 things I see wrong with your configurations.

  1. You are missing parentheses around your ckanext.ldap.search.filter value. It should look like this: ckanext.ldap.search.filter = (abc={login}) Note: abc should be the mapping of the table column that is in your ldap server. (ex. uid={login}).
  2. ckan.ldap.username should equal the mapping of the username table column on your ldap server. (ex. ckan.ldap.username = uid.
  3. ckanext.ldap.email should equal the mapping of the email table column on your ldap server. (ex. ckan.ldap.email = email.

Also does your ldap server require user credentials to connect to your server. If not you don't need ckanext.ldap.auth.password. If it does you would need ckanext.ldap.auth.username.

Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants