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

Support logins when "Get User Groups from LDAP" is not checked #15661

Merged
merged 6 commits into from
Aug 11, 2017

Conversation

jvlcek
Copy link
Member

@jvlcek jvlcek commented Jul 26, 2017

When not getting groups from LDAP the user is manually created in
the DB. The name must be created in the format supported by the
directory being used. When the directory is Active Directory the username
must be in UPN format. When the directory is LDAP the username must be the
full DN. The admin will create the user in the UPN or DN formats as return from
searching the given directory.

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

Steps for Testing/QA

  1. Configure MiQ authentication with mode LDAP(S)
  2. Do not select Get User Groups from LDAP
  3. Ensure Base DN and Bind DN had not been filled in.
  4. Manually create a test user with a simple username, must be the full DN or UPN e.g. adtestuser@example.com or cn=ldaptestuser,ou=people,ou=prod,dc=example,dc=com, and assign the user a group.
  5. Confirm attempts to log in with the test user succeed.

When not getting groups from LDAP the user is manually created in
the DB. It is unlikely the admin will create the user in the UPN
or DN formats as return from searching the directory. So this PR
will also try to find the user by simple username.

https://bugzilla.redhat.com/show_bug.cgi?id=1442791
@jvlcek
Copy link
Member Author

jvlcek commented Jul 26, 2017

@gtanzillo and @abellotti please review.

@jvlcek
Copy link
Member Author

jvlcek commented Jul 26, 2017

@miq-bot add_label authentication, bug

@jvlcek
Copy link
Member Author

jvlcek commented Jul 26, 2017

After configuring authentication to not Get User Groups from LDAP and manually creating users, if the authentication configuration is update to Get User Groups from LDAP duplicate user records could be created. I think we can manage this unlikely side effect by documenting it.
MattP, of QE, agreed that documenting this side effect for this unlikely scenario would be acceptable.

@miq-bot
Copy link
Member

miq-bot commented Aug 10, 2017

Checked commits jvlcek/manageiq@c045aff~...0119cda with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
3 files checked, 0 offenses detected
Everything looks fine. ⭐

@jvlcek
Copy link
Member Author

jvlcek commented Aug 10, 2017

@abellotti and @gtanzillo Updates made as discussed. If you are good with this let me know and I will squash the extra commits.

@jvlcek jvlcek changed the title If userid in UPN or DN format not found try simple username Support logins when "Get User Groups from LDAP" is not checked Aug 10, 2017
Copy link
Member

@gtanzillo gtanzillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@gtanzillo gtanzillo added this to the Sprint 67 Ending Aug 21, 2017 milestone Aug 11, 2017
@gtanzillo gtanzillo merged commit 6e95e67 into ManageIQ:master Aug 11, 2017
@jvlcek jvlcek deleted the bz1442791_no_groups_from_ldap branch November 10, 2017 19:47
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