Skip to content
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

Extend support from memberof to other multi-value attribute for group membership #17497

Merged
merged 1 commit into from
Jun 1, 2018

Conversation

jvlcek
Copy link
Member

@jvlcek jvlcek commented May 30, 2018

MiqLdap currently has the group membership attribute hardcodes to memberof.

This PR moves this same hardcoded value into ::Settings.authentication.group_attribute.
The result being that by default the current functionality will not change but it will now be
possible for uses who want to use a different multi-value attribute for group membership
to do so by manually setting the Advanced Configuration option group_attribute.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1353037

Steps for Testing/QA [Optional]

  • Configure your LDAP directory to have groupMembership attribute to contain a user's group membership
  • Configure MiQ authentication mode LDAP or LDAPS.
  • Manually configure group_attribute in MiQ UI under Configuration/Advanced
    -- From: :group_attribute: memberof
    -- To: :group_attribute: groupmembership
  • Test by adding a group for the user configured in you LDAP directory with the groupMembership attribute by looking up groups by checking: (Look up LDAP Groups) and providing the needed input.

Note: ldapsearch can be used to confirm the multi-value attribute, groupmembership, is correctly configured in LDAP:

ldapsearch -x -LLL -H ldap://<my ldap>:389  -b "dc=example,dc=com"  -D "cn=Manager,dc=example,dc=com" -w ******** -s sub "(CN=ldaptest1)" "groupmembership"
dn: cn=ldaptest1,ou=people,ou=prod,dc=example,dc=com
groupmembership: cn=ldap-group-2,ou=groups,ou=prod,dc=example,dc=com
groupmembership: cn=ldap-group-1,ou=groups,ou=prod,dc=example,dc=com

@jvlcek
Copy link
Member Author

jvlcek commented May 30, 2018

@miq-bot add_label bug

@jvlcek
Copy link
Member Author

jvlcek commented May 30, 2018

@miq-bot add_label authentication

@jvlcek
Copy link
Member Author

jvlcek commented May 30, 2018

@miq-bot assign @abellotti

@jvlcek
Copy link
Member Author

jvlcek commented May 30, 2018

@abellotti Please review.

@miq-bot
Copy link
Member

miq-bot commented May 30, 2018

Checked commit jvlcek@f290134 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@gtanzillo gtanzillo added this to the Sprint 87 Ending Jun 4, 2018 milestone Jun 1, 2018
@gtanzillo gtanzillo merged commit 7979215 into ManageIQ:master Jun 1, 2018
@abellotti
Copy link
Member

just saw this, LGTM!! Thanks @jvlcek for the enhancement 👍

@jvlcek jvlcek deleted the bz_1353037_group_attribute branch October 1, 2018 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants