I have a use case where I don't need any sort of granular authorization based on ldap roles/memberships/etc, but I do need to be able to distinguish LDAP users vs Drupal users when assigning drupal permissions. I added a simple setting to the authentication module to allow users to select a Drupal role to apply to any LDAP user that's created.

Comments

johnbarclay’s picture

Title: Add Drupal role for all LDAP users » LDAP Authorization: Add Drupal role for all LDAP users
Status: Needs review » Needs work

Thanks. Seems like a handy use case.

This should go in LDAP Authorization and allow for working with all types of authorization plugins (drupal role, og, etc.). Without this approach, sites using shib, sso, cas etc won't be able to leverage this functionality. Most larger organizations aren't likely to use ldap authentication module for security reasons, but will use ldap authorization.

The coupling of authorization and authentication created a great deal of implementation issues in the drupal 6 version of ldap_integration.

fearlsgroove’s picture

OK that makes sense, although in my case I'm going with the opposite -- using authorization for shared logins but not authorization since they don't want to manage permissions directly via AD. Would you add this setting to the drupal roles plugin or a standalone plugin?

johnbarclay’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

It should be in the parent class/module ldap_authorization so roles, og, etc can all leverage it.

altcom_alan’s picture

Issue summary: View changes
StatusFileSize
new5.2 KB

Hi,

I needed exactly the same functionality so I've had a stab at patching ldap_authorization, it works fine for me in testing.

grahl’s picture

Status: Needs work » Needs review

The last submitted patch, ldap-auth-add-drupal-role.patch, failed testing.

The last submitted patch, ldap-auth-add-drupal-role.patch, failed testing.

The last submitted patch, ldap-auth-add-drupal-role.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 4: ldap_authorization_add_drupal_role.patch, failed testing.

rafuel92’s picture

StatusFileSize
new5.73 KB

Hello @Grahl, i've rerolled the patch again, i think that now it should be ok.

rafuel92’s picture

i've also queued auomated testing again.

rafuel92’s picture

StatusFileSize
new5.7 KB

i've also identified an error on the update function (the function that adds the field 'add_drupal_role') to ldap_authorization, that's another patch that fixes also this problem.

grahl’s picture

Version: 7.x-2.x-dev » 8.x-3.x-dev

Needs to go in 8 first.

grahl’s picture

Version: 8.x-3.x-dev » 7.x-2.x-dev

With wildcards (e.g.: /.*/) in ldap_authorization in 8.x it's possible to assign a group to all users.

Therefore I'm moving the issue back to 7 and marking it as postponed, because I don't plan on committing to this different approach.

grahl’s picture

Status: Needs work » Postponed
grahl’s picture

Status: Postponed » Closed (outdated)

Closing issue as outdated due to no further development on 7.x, if you feel this issue is still relevant and you are willing to work on a patch and/or debug the problem, please reopen.