https://bugzilla.redhat.com/show_bug.cgi?id=741999
I have tried to use a SASL/PLAIN bind in order to do binds with a user id that is not a DN. Because SASL mappings can resolve an arbitrary uid into a DN I was hoping to use that to bind to a directory where anonymous searches are disabled (therefore the client can't use an anonymous bind to search the DN itself. Unfortunately it appears the current DS code is not able to perform SASL/PLAIN authentication. Sasl mapping is incorrectly performed. It happens twice, the first time it properly maps the provided user name to a DN the second time it tries to map the found DN again as if it were a user name. Rich says DS may no be able to properly provide SASL with callback to handle checking the password.
Linked to Bugzilla bug: https://bugzilla.redhat.com/show_bug.cgi?id=742054
Bug description: ids_sasl_canon_user failed to set "dn: " in front of the dn string in the output argument out_user. The dn string is used in the next session and the corresponding entry was not found due to the bad dn format (missing "dn: ").
Fix description: This patch adds the proper prefix.
PR_snprintf guarantees the buffer is properly NULL terminated, so you don't have to set the '\0' in the string. Also, PR_snprintf will return the number of characters written to the string (i.e. the string length) so you can use the return value rather than doing another strlen().
revised git patch file (master) 0001-Trac-Ticket-27-SASL-PLAIN-binds-do-not-work.patch
Reviewed by Rich (Thanks!!!)
Pushed to master.
$ git merge trac27 Updating 3e60f7f..d962cea Fast-forward ldap/servers/slapd/saslbind.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-)
$ git push Counting objects: 11, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 865 bytes, done. Total 6 (delta 4), reused 0 (delta 0) To ssh://git.fedorahosted.org/git/389/ds.git 3e60f7f..d962cea master -> master
Bug verification info is in bz741999.
Added initial screened field value.
Metadata Update from @nhosoi: - Issue assigned to nhosoi - Issue set to the milestone: 1.2.11.a1
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/27
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: Fixed)
Login to comment on this ticket.