Bug 1317745

Summary: If the email address is not updated correctly in the LDAP server then while logining in to satellite webui with same username should throw valid error message.
Product: Red Hat Satellite Reporter: Ashish Humbe <ahumbe>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Ivan Necas <inecas>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.7CC: aperotti, bbuckingham, bkearney, chrobert, dconsoli, inecas, jcallaha, xdmoon
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/14720
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:51:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
verification screenshot none

Description Ashish Humbe 2016-03-15 04:44:10 UTC
Description of problem:

If the email address is not updated correctly in the LDAP, then while logging to satellite webui with same username fails with error "Incorrect username or password" error. 

But the error message from production log says "Email address is invalid"

Error message from log file: 

2016-03-11 04:18:15 [I] Failed to save User 'sat6-user2' ["Email address is invalid"]
2016-03-11 04:18:15 [I] invalid user
2016-03-11 04:18:15 [I] Redirected to https://satellite.example.com/users/login
2016-03-11 04:18:15 [I] Completed 302 Found in 945ms (ActiveRecord: 2.7ms)


The error message in the webui is misleading, so the customer's expectation is to have a proper error message in WEB GUI like "XXX (here email) parameter(s) are not correct please correct it".

Version-Release number of selected component (if applicable):
Satellite v 6.1.9

How reproducible:
Always when the invalid email address is stored in the LDAP server.

Steps to Reproduce:
1. Create a user in LDAP with invalid email ie: user#domain
2. Setup LDAP authentication on the satellite server
3. Try to login as a LDAP user to the satellite webui.

Actual results:
User login fails with error "Incorrect username or password" error. 

Expected results:
Correct error message should be displayed on the login page if any of the LDAP parameter is not set correctly. 

Additional info:

Comment 3 Bryan Kearney 2016-04-19 19:28:42 UTC
Connecting redmine issue http://projects.theforeman.org/issues/14720 from this bug

Comment 5 Bryan Kearney 2016-07-13 20:12:02 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14720 has been closed

Comment 10 Ivan Necas 2017-08-30 08:39:39 UTC
Verification version: Satellite 6.3 Snap 13

Steps:
1. configure the ldap authentication
2. set the user email to invalid. I was using FreeIPA, that didn't let me to
set up the email incorrectly via WebUI, so I did this

cat change-mail.ldif 
dn: uid=test2,cn=users,cn=accounts,dc=example,dc=test
changetype: modify
replace: mail
mail: test#domain

ldapmodify -D "uid=admin,cn=users,cn=accounts,dc=example,dc=test" -w Secret123  -h ibm-dx360m4-01.rhts.eng.bos.redhat.com -f change-mail.ldif 

3. try to login

Got: user created with info about invalid data and asking the user to update (see the screenhost)

Comment 11 Ivan Necas 2017-08-30 08:40:15 UTC
Created attachment 1319934 [details]
verification screenshot

Comment 12 Satellite Program 2018-02-21 16:51:07 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://access.redhat.com/errata/RHSA-2018:0336