Bug 1398487

Summary: Allow per IDP custom message when a login doesn't match the Email Regex
Product: [Community] Bugzilla Reporter: Patrick Uiterwijk <puiterwijk>
Component: ExtensionsAssignee: Jeff Fearn 🐞 <jfearn>
Extensions sub component: SAML2Auth QA Contact: tools-bugs <tools-bugs>
Status: CLOSED NEXTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: huiwang, qgong, yijli
Version: 5.0   
Target Milestone: 5.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.0.3-rh18 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-01 23:43:42 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:

Description Patrick Uiterwijk 2016-11-25 01:27:56 UTC
It would be great if instead of the regexp and vague-ish text, something like "Sorry, you can't use the Fedora IdP for a Red Hat account, please use the corresponding option." could be shown when the Fedora IdP is used for an @redhat.com email.

Comment 1 Rony Gong 🔥 2016-11-30 06:42:45 UTC
Tested on QA environment(5.0.3-rh18)
Result: Failed
Steps:
1.Can't trigger out the prompt of "Sorry, you can't use the Fedora IdP for a Red Hat account, please use the corresponding option." could be shown when the Fedora IdP is used for an @redhat.com email."

@Dev, Could you give some guide for this test?

Comment 2 Jeff Fearn 🐞 2016-11-30 23:03:57 UTC
Bah, the regex needs to be the same as the Red Hat Customer regex.

^(?!.*@redhat.com)

I updated it in your database and it works properly now.

Comment 3 Rony Gong 🔥 2016-12-01 02:50:40 UTC
Tested on QA environment(5.0.3-rh18)
Result: Pass
1.When login using fedora account which endwith @redhat.com
==>login failed with: 
@redhat.com address must use the Red Hat Associate IDP to login.