-
Notifications
You must be signed in to change notification settings - Fork 35
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
Use GSSAPI for directory authentication #630
Comments
Yes, GSSAPI is missing from ldap2pg 6.0. go-ldap just released with GSSAPI support. However, I don't know how to reproduce kerberose auth in development environment and CI. Any help accepted ! |
Do you want ldap2pg to ask you the Kerberos password ? Do you use kinit or something like that ? |
Thank you for your very quick feedback! It seems that authentication based on a keytab is supported by go-ldap: https://github.com/go-ldap/ldap/blob/56e5759aadc48129a33935b9de05b17151c1172e/gssapi/client.go#L31 If it can be used, this would be perffect in my case. I will gladly help with the testing. Regarding the setup of kerberos in the development environment, I am not sure what would be needed. Not sure if I could help there but if I can, I would do. |
samba support for KDC is very experimental. Thus, implementing this is completely wild. How do you configure ldapsearch to authenticate to AD using GSSAPI/Kerberos ? |
I am using MIT Kerberos (no AD, no Samba involved). The set-up I have for such an environment is the following on Debian 12:
If the If I understand correctly what the library you referred to is doing, the |
Hi @phasenohr . Thanks for the details. Trying to authenticate ldapsearch against Samba with GSSAPI with Kerberos: $ kinit -V -kt $PWD/administrator.keytab administrator
Using default cache: /tmp/krb5cc_1000
Using principal: administrator@BRIDOULOU.FR
Using keytab: /home/bersace/src/dalibo/ldap2pg/administrator.keytab
Authenticated to Kerberos v5
$ ldapsearch -U administrator@BRIDOULOU.FR -H ldaps://samba1.ldap2pg.docker -l 5 -Y GSSAPI -b cn=users,dc=bridoulou,dc=fr -s sub '(|(cn=owners)(cn=readers)(cn=writers))' member cn
SASL/GSSAPI authentication started
ldap_sasl_interactive_bind: Local error (-2)
additional info: SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server not found in Kerberos database) I guess Samba AD needs to have itself declared as a server in one database. I don't know how or what. I have |
Hi @bersace It probably means that the LDAP server is missing a keytab authorising it to authenticate through Kerberos. Also, you might need to update the |
cf. #268 for reference. |
Hello,
I am trying to have ldap2pg authenticate against my LDAP directory through GSSAPI (in order to use Kerberos ultimately). According to https://ldap2pg.readthedocs.io/en/latest/ldap/ it seems that I should be able to specify
SASL_MECH
but I do not find how to do it.Here is the anonymised ldaprc file I am trying to use (it works fine if I do a
ldapwhoami
):This leads to the following error when running
ldap2pg
:If I use
BINDDN
andPASSWORD
in myldaprc
file instead of theSASL_*
variables,ldap2pg
works fine.Am I doing something wrong or can it be that support for GSSAPI has not been implemented in version 6?
Thank you for your support.
Best regards,
Paul
The text was updated successfully, but these errors were encountered: