View Issue Details

This issue affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09431Bug reportsAuthenticationpublic2015-03-15 18:37
Reporteraesteban Assigned Toaesteban  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Summary09431: Create LDAP users taking email and full name from LDAP server
Description

Currently, we can use LDAP authentication for existing users but we can not create exclusive LDAP users. Problems:

  • We have to create the user and send him a password that we have to invalidate if we want him to access LimeSurvey exclusively using LDAP credentials.
  • There is no way to take email and full name from standard LDAP attributes.

I could develop a new way to create LDAP users (see screenshot attached) and:

  • Don't send any password in welcome email, just username and URL.
  • Save an invalid password in DB, forcing user to use LDAP credentials
Additional Information

By the way, a new event would be created: something like "createUser". I will try to move user creation code to Authdb and AuthLDAP plugins.

TagsNo tags attached.
Attached Files
add-ldap-user.png (62,464 bytes)   
add-ldap-user.png (62,464 bytes)   
Bug heat4
Complete LimeSurvey version number (& build)
I will donate to the project if issue is resolved
Browser
Database type & version
Server OS (if known)
Webserver software & version (if known)
PHP Version
Git branch / Pull Request URL

Relationships

related to 09219 closedmdekker blocked LDAP users can use "forgot password" to login locally -> security issue 
related to 08865 closedaesteban User not in LDAP or in WebServer can log again 

Users monitoring this issue

There are no users monitoring this issue.

Activities

aesteban

aesteban

2014-12-29 22:16

developer   ~31391

Reading the code, I found that we can disable sending password in welcome email. Anyway, problem of getting email and fullname from LDAP attributes persists.

Question: Should we allow modify LDAP attributes after initial load at creation process?

DenisChenu

DenisChenu

2015-01-04 11:41

developer   ~31413

See : http://bugs.limesurvey.org/view.php?id=8865 ;)

Think blank email and password can be great too.

aesteban

aesteban

2015-01-04 16:34

developer   ~31414

Last edited: 2015-01-04 16:35

Users created by the new way, i.e. LDAP users, will have a invalid password ('INVALID_PASSWORD-LDAP_USER' instead of hash). Initially, they won't be able to login using DB. The problem is forgotten password functionality. They will be able to use it and reset password. We could try a temporal fix to prevent edition of passwords for these users but I think we should find a permanent solution for issue 08865. In fact, after commit this code, I will work on it.

In the code I'm writing for this issue I move "create user" code to auth plugins. My plan is moving update user, send emails, etc, to auth plugins too. This way, fixing 08865 will be very easy and more clear. Do you agree? Any suggestion is welcome.

aesteban

aesteban

2015-03-15 18:33

developer   ~31827

Fix committed to 2.06 branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=15026

Related Changesets

LimeSurvey: 2.06 afd22fcf

2015-03-15 18:06

aesteban


Details Diff
New feature: New authentication method management

Fixed issue 08865: User not in LDAP or in WebServer can log again
New feature 09431: Create LDAP users taking email and full name from LDAP server

Dev: Users have new permissions: Use DB internal authentication, use LDAP authentication, use WS authentication
Dev: When creating a user, we can choose LDAP or internal authentication. This configuration can be changed later. For example, we can change an user from internal to LDAP or we can allow both authentication methods for specific users.
Dev: If we choose LDAP authentication method, full name and email address are taken from LDAP at creation time (user and/or admins can change them later).
Dev: User not allowed to use internal DB authentication is not allowed to reset their password using "forgotten password" functionality
Dev: User not allowed to use internal DB authentication doesn't receive any password in welcome email
Affected Issues
08865, 09431
mod - application/controllers/admin/authentication.php Diff File
mod - application/controllers/admin/useraction.php Diff File
mod - application/core/plugins/AuthLDAP/AuthLDAP.php Diff File
mod - application/core/plugins/Authdb/Authdb.php Diff File
mod - application/core/plugins/Authwebserver/Authwebserver.php Diff File
mod - application/libraries/PluginManager/AuthPluginBase.php Diff File
mod - application/libraries/PluginManager/PluginManager.php Diff File
mod - application/models/Permission.php Diff File
mod - application/views/admin/user/editusers.php Diff File
mod - application/views/admin/user/setuserpermissions.php Diff File
mod - scripts/admin/users.js Diff File

Issue History

Date Modified Username Field Change
2014-12-29 21:34 aesteban New Issue
2014-12-29 21:34 aesteban Status new => assigned
2014-12-29 21:34 aesteban Assigned To => aesteban
2014-12-29 21:34 aesteban File Added: add-ldap-user.png
2014-12-29 22:16 aesteban Note Added: 31391
2015-01-03 19:50 aesteban Relationship added related to 09219
2015-01-03 19:50 aesteban Relationship added related to 08865
2015-01-04 11:41 DenisChenu Note Added: 31413
2015-01-04 16:34 aesteban Note Added: 31414
2015-01-04 16:35 aesteban Note Edited: 31414
2015-03-15 18:33 aesteban Changeset attached => LimeSurvey 2.06 afd22fcf
2015-03-15 18:33 aesteban Note Added: 31827
2015-03-15 18:33 aesteban Resolution open => fixed
2015-03-15 18:36 aesteban Status assigned => resolved
2015-03-15 18:37 aesteban Status resolved => closed