Bug 1203713 - LDAP login is broken
Summary: LDAP login is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: GA
: 5.4.0
Assignee: Martin Hradil
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On: 1203184
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-19 14:03 UTC by Eric Winchell
Modified: 2015-06-16 12:54 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1203184
Environment:
Last Closed: 2015-06-16 12:54:13 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Ldap (98.71 KB, image/png)
2015-05-14 22:36 UTC, Shveta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1100 0 normal SHIPPED_LIVE CFME 5.4.0 bug fixes, and enhancement update 2015-06-16 16:28:42 UTC

Comment 3 Dave Johnson 2015-03-19 16:37:29 UTC
Milan, can you look into this please and work with Martin, thanks!

Comment 4 Milan Falešník 2015-03-20 15:35:12 UTC
The login works properly IF the LDAP configuration is correct. Funny things start to happen when the configuration is not connect and Validate does not detect it. (AFAIK)

Comment 5 Dave Johnson 2015-03-24 17:28:24 UTC
Eric, can we close this as not a bug?  QE believes this is working.

Comment 6 Martin Hradil 2015-03-24 17:38:56 UTC
Dave, please note that there *is* a bug, and the crash *does* happen.

However, the bug is only triggered with incorrect (or even slightly incorrect) configurations, and the resolution should be to add some checks and an error message more useful than a crash. (I'm working on that.)

So the severity is probably not high, but I think you shouldn't close it completely. Or, if you do, please create a new one along the lines of "LDAP login attempt with incorrect configuration crashes miq" and assign or notify me about it.

Comment 8 Dave Johnson 2015-03-25 22:16:17 UTC
Ok, so we reopened this one, sounds like we should update the summary to 

LDAP login attempt with incorrect configuration crashes miq

Right Martin?

Comment 9 CFME Bot 2015-03-26 14:15:58 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4a42855f610dd0ff8036e2d86a4cdff2a921e7ac

commit 4a42855f610dd0ff8036e2d86a4cdff2a921e7ac
Author:     Martin Hradil <mhradil>
AuthorDate: Wed Mar 25 12:58:53 2015 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Wed Mar 25 13:17:51 2015 +0000

    Prevent crash when LDAP user authentication succeeds but the user shouldn't login anyway
    
    In these cases, the user is not created nor found and UserValidationService#validate_user passes nil to session_reset, which couldn't handle it.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1203713

 vmdb/app/controllers/dashboard_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 10 Martin Hradil 2015-03-26 14:40:08 UTC
Agreed.

Comment 13 Shveta 2015-05-14 22:36:46 UTC
Created attachment 1025628 [details]
Ldap

With no Base DN and Bind DN also validate button says :LDAP Settings validation was successful

Comment 14 Shveta 2015-05-14 22:37:52 UTC
Build 5.4.0.0.26.20150511144816_f924bd4

Comment 15 Martin Hradil 2015-05-18 13:51:05 UTC
sshveta.. Please, ask an actual question when you add needinfo, I'm really not sure what you need..

However, LDAP validation does not actually check Base DN at all, and not having a Bind DN is ..not wrong. (In fact, with the QE LDAP server at least, Net::LDAP's ldap.bind does return true after calling ldap.auth with empty bind_dn and password.)

So from my POV, this is correct. (Note that when you do specify Bind DN, it does fail with invalid password.)

Comment 16 Shveta 2015-05-18 18:10:24 UTC
Verified in 5.4.0.0.26.20150511144816_f924bd4

Comment 18 errata-xmlrpc 2015-06-16 12:54:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1100.html


Note You need to log in before you can comment on or make changes to this bug.