Bug 1642022

Summary: Runtime error when logging in with complex username
Product: Red Hat CloudForms Management Engine Reporter: Radim Hrazdil <rhrazdil>
Component: ApplianceAssignee: Joe Vlcek <jvlcek>
Status: CLOSED DUPLICATE QA Contact: Sudhir Mallamprabhakara <smallamp>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.5CC: abellott, bascar, hkataria, lavenel, mfeifer, mpovolny, obarenbo, rhrazdil, yrudman
Target Milestone: GAKeywords: Automation
Target Release: 5.9.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-23 15:10:28 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
logs and screenshots none

Description Radim Hrazdil 2018-10-23 12:07:33 UTC
Created attachment 1496687 [details]
logs and screenshots

Description of problem:

When a new user is created in CFME UI, logging in as the created user in some cases fails with 500 Internal Server Error.

Data {"error":{"kind":"internal_server_error","message":"Invalid userid uidzzj5dmgyuv specified","klass":"RuntimeError"}} 

From what I tried, the issue doesn't depend solely on username length or combination of alphanumerical characters. With generated username in the following format:
user_[a-zA-Z0-9] in total 13 chars long it happens every time.

As can also be observed in the screenshot, the user has a Last Logon timestamp, so the problem is not wrong username/password.

Documentations provides an example for creating a user with username 'my_user', which works along with usernames like 'test' or. '01234567891'.

These usernames lead to the error:
user_487UIXkKM2, user_bOVmgFk5d2, user_e8EpvBRg5z, user_e8EpvBRg5z

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

How reproducible:
always with generated username in format 'user_[a-zA-Z0-9]'  

Steps to Reproduce:
1. Create a user with username user_[a-zA-Z0-9], for example user_bOVmgFk5d2
2. Try to log in as the user

Actual results:
error 500

Expected results:
successful login

Additional info:

Comment 4 Joe Vlcek 2018-10-23 15:10:28 UTC
I'm closing this as it is a duplicate of BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1638501 which is fixed by this PR:
https://github.com/ManageIQ/manageiq-api/pull/396

PR 396 does have the gaprindashvili/yes flag. So it will be backported to
gaprindashvili and address this issue also.

*** This bug has been marked as a duplicate of bug 1638501 ***