This patch adds more flexibility to the password encryption feature.
The old mechanism would only write cleartext or MD5 password hashes back to LDAP wherein this new method handles many more encryption types like salted hashes and SHA. It does check to see if these additional encryption types are supported by PHP at configuration time.
The patch includes a database update (currently number 6003) that renames the "encrypted" column to "enc_type" to better reflect the data stored. Also, the old values of the column were not remapped to keep disruption at a minimum ( '0' = clear, '1' = MD5).
Tested with D6.14 and OpenLDAP.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | ldap_integration-encryption-580786-8.patch | 13.62 KB | cgmonroe |
| #5 | ldap_integration-6.x_1.0_beta2-encryption_3.patch | 13.64 KB | landry |
| #5 | ldap_provisioning-encryption.patch | 3.32 KB | landry |
| #2 | ldap_integration-6.x_1.0_beta2-encryption.patch | 12.68 KB | retsamedoc |
| #1 | ldap_integration-6.x_1.0_beta2-encryption.patch | 12.68 KB | retsamedoc |
Comments
Comment #1
retsamedoc commentedUpdated for 6.x-1.0-beta2. Please test.
Comment #2
retsamedoc commentedOops, forgot to increment the database update to 6004. Fixed here.
Comment #3
thtas commentedTested this and it works well with SSHA for authentication. thanks!
The patch just needs to change the LDAPInterface.inc to change the set/get option name from "encrypted" to "enc_type"
otherwise it only sets plain text passwords in the LDAP directory.
Comment #4
arthur.duarte commentedHi,
The patch works, but I needed to do some modifications:
In the Database:
- I had to go the ldapauth table and change manually column "encrypted" to column "enc_type"
In the LDAPInterface.inc file:
- I modified all entries from "encrypted" to "enc_type"
Now, I can have Drupal as a password manager to my LDAP.
Thank you Dude.
Comment #5
landry commentedAttaching new patch with LDAPInterface.inc change for getOption/setOption.
Tested working fine with ldapprov, with the added patch changing encrypted occurences to enc_type, and adding ldapprov_encode_password(). encode_password() in ldapdata could take a server as arg, instead of relying on global $_ldapdata_ldap.
Could be good to have that integrated. Of course tested working fine here.
Comment #6
john franklin commentedApplied and tested on one of my sites, works as expected. Thanks.
Comment #7
johnbarclay commentedComment #8
cgmonroe commentedHere is a new version of the ldap_integration patch that will apply to the 6.x-1.x head.
Same as #5 but with some line number changes and updates ldapsync.module to use enc_type and not encryption.
Comment #9
cgmonroe commentedThis has been committed to the 6.x-1.x branch. Marking as fixed/closed.