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

Default value of ldap_user_certificate = userCertificate;binary + 389ds = silent failure #7652

Open
minfrin opened this issue Oct 17, 2024 · 1 comment

Comments

@minfrin
Copy link
Contributor

minfrin commented Oct 17, 2024

Making an attempt to set up smartcard login where the certificate is in the directory, and the directory is 389ds.

If we rely on the default value of ldap_user_certificate, which is userCertificate;binary, and we attempt to look up certificate in 389ds, the query silently fails.

Silently fails means that zero users are successfully returned for the LDAP search, and the code path follows "you don't exist" when the user does exist.

Changing the value to userCertificate (dropping the ;binary) makes 389ds work, meaning that suddenly one user is returned and the "hey, come on in" path is followed.

Not sure if this attribute name is wrong, or if it is as a result of different behaviour between openldap and 389ds.

At the very least the docs for ldap_user_certificate need to be updated to be clear what it should be set to depending on the server used, or more accurately the certificate syntax used, which I understand to be the cause of the difference in behaviour.

@sumit-bose
Copy link
Contributor

Hi,

this might depend on how the certificate is stored in the LDAP server. E.g. if I add a certificate to a user in FreeIPA which uses 389ds I see:

# ldapsearch uid=scuser
...
dn: uid=scuser,cn=users,cn=accounts,dc=ipa,dc=test
givenName: sc
sn: user
uid: scuser
gecos: sc user
loginShell: /bin/sh
homeDirectory: /home/scuser
userCertificate;binary:: MIIE/TCCAuWgAwIBAgIBATANBgkqhkiG9w0BAQsFADA6MQ0wCwYDV
....

bye,
Sumit

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

No branches or pull requests

2 participants