Bug 1293443

Summary: Validation failed: Email address is invalid when adding IPA user with more than one email
Product: Red Hat Satellite Reporter: Luc de Louw <ldelouw>
Component: Users & RolesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.5CC: bkearney, dlobatog
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/18442
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 20:33:57 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:

Description Luc de Louw 2015-12-21 18:53:54 UTC
Description of problem:
When using IPA/IdM authentication and the user has more than one email address, the user is not created and the following error message appears:

ActiveRecord::RecordInvalid
Validation failed: Email address is invalid
app/models/user.rb:253:in `block in find_or_create_external_user'
app/models/concerns/foreman/thread_session.rb:73:in `as'
app/models/concerns/foreman/thread_session.rb:79:in `as_anonymous_admin'
app/models/user.rb:251:in `find_or_create_external_user'
app/services/sso/apache.rb:38:in `authenticated?'
app/controllers/users_controller.rb:68:in `login'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

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


How reproducible:
Always

Steps to Reproduce:
1. ipa user-add --first=Hans --last=Wurst --email=hwurst --email=hanswurst hwurst
2. Log in to the WebUI

Actual results:
User not created

Expected results:
User created


Additional info:
Workaround: Remove all but a single email address from the user, log in to create the user and add the additional email addresses again.

Comment 1 Bryan Kearney 2016-07-26 19:07:35 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 3 Daniel Lobato Garcia 2017-02-09 12:37:12 UTC
Bryan - No, it looks like the issue here is that having two emails in the external authentication source isn't expected here. I'll clone to Redmine.

Comment 4 Daniel Lobato Garcia 2017-02-09 12:37:42 UTC
Created redmine issue http://projects.theforeman.org/issues/18442 from this bug

Comment 5 Bryan Kearney 2017-08-01 20:33:57 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.