Bug 1537171

Summary: Duplicate RBAC Role and Group names allowed when using different capitalization from the original name
Product: Red Hat CloudForms Management Engine Reporter: Landon LaSmith <llasmith>
Component: ApplianceAssignee: Hilda Stastna <hstastna>
Status: CLOSED CURRENTRELEASE QA Contact: Landon LaSmith <llasmith>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8.0CC: abellott, hkataria, lavenel, lpichler, mpovolny, obarenbo, smallamp, yrudman
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: All   
OS: All   
Whiteboard: rbac:webui
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1561076 1561077 (view as bug list) Environment:
Last Closed: 2019-02-11 14:09:23 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:
Bug Depends On:    
Bug Blocks: 1561076, 1561077    

Description Landon LaSmith 2018-01-22 15:38:38 UTC
Description of problem: When creating a new group or role, a duplicate group name is allowed when at least one of the characters in the new name are a different case from the original name.

Version: 5.8.3.1

How reproducible: 100%

Steps to Reproduce:
1. Create a new Group or Role with the same name as an existing Group or Role but a different case for any character
Example: Original Role: EvmRole-super_administrator -> Duplicate Role: EvmRole-Super_Administrator

Actual results: Group or role creation is allowed with duplicate name

Expected results: Creation is blocked with an error. Duplicate user names aren't allowed and return the error message "Userid is not unique within region 0"

Additional info: Duplicate user names aren't allowed even when mixed case is used

Comment 2 Landon LaSmith 2018-01-22 19:08:11 UTC
This bug is also present in 5.9.0.17

Comment 4 CFME Bot 2018-03-26 20:16:16 UTC
New commits detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/db23d6329508714417426929cddc2a11e76cb620
commit db23d6329508714417426929cddc2a11e76cb620
Author:     Hilda Stastna <hstastna>
AuthorDate: Fri Mar 23 18:31:49 2018 -0400
Commit:     Hilda Stastna <hstastna>
CommitDate: Fri Mar 23 18:31:49 2018 -0400

    Add case insensitivity when validating uniqueness of name of new group

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1537171

    Add case insensitivity when validating uniqueness of name of a new group within a region.

 app/models/miq_group.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


https://github.com/ManageIQ/manageiq/commit/4ddb14295cdc16ef24adf8e210ffcc4cad1ac426
commit 4ddb14295cdc16ef24adf8e210ffcc4cad1ac426
Author:     Hilda Stastna <hstastna>
AuthorDate: Fri Mar 23 18:38:59 2018 -0400
Commit:     Hilda Stastna <hstastna>
CommitDate: Fri Mar 23 18:38:59 2018 -0400

    Add case insensitivity when validating uniqueness of name of new role

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1537171

    Add case insensitivity when validating uniqueness of the name of a new role,
    when creating a new role under Configuration > Access Control > Roles.

 app/models/miq_user_role.rb | 3 +-
 1 file changed, 1 insertion(+), 2 deletions(-)

Comment 7 Landon LaSmith 2018-07-12 15:08:37 UTC
VERIFIED in 5.10.0.3. I was prevented from naming new roles or groups with  duplicate capitalization from an existing default or custom role or group