Bug 1906120

Summary: 'Create Role Binding' form not setting user or group value when created from a user or group resource
Product: OpenShift Container Platform Reporter: Peter Kreuser <pkreuser>
Component: Management ConsoleAssignee: Cyril <cajieh>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, jokerman, yapei
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Incorrect code Consequence: Unable to create role binding Fix: Yes Result: Working as expected.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:41:51 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:
Attachments:
Description Flags
Creating binding from group
none
Create binding form not setting subject none

Description Peter Kreuser 2020-12-09 17:35:06 UTC
Created attachment 1737971 [details]
Creating binding from group

Description of problem:

When viewing the 'Role Bindings' tab inside of a User or Group resource (this tab doesn't exist for Service Accounts which I am not certain if is intentional) there is a "Create Binding" button to immediately begin creating a Role Binding for that User or Group. The issue is that this form does not correctly set the Subject area of the form to be either the User or Group subject of the resource the form was launched from, which is the point of creating it from that context.

I see this as a bug and not a feature because Role Bindings can also be created from Projects' Role Bindings tab and the Namespace field is correctly set, and Role Bindings can be created from Roles' Role Bindings tab and the Role Name is set (which incidentally is broken at the moment and tracked via 1903192. 

Version-Release number of selected component (if applicable):
4.7.0-0.nightly-2020-12-09-093341

How reproducible:
Always

Steps to Reproduce:
1.Navigate to either a User or Group resource and access its 'Role Bindings' tab.
2.Click 'Create Binding' button

Actual results:
The 'Create Role Binding' form is shown without the Subject Type or Name set to the resource it was opened from.

Expected results:
The 'Create Role Binding' form is opened with the Subject Type and Name set to the resource it was opened from.


Additional info:

Comment 1 Peter Kreuser 2020-12-09 17:35:47 UTC
Created attachment 1737972 [details]
Create binding form not setting subject

Comment 4 Yadan Pei 2020-12-21 07:54:28 UTC
1.Navigate to User resource and access its 'Role Bindings' tab.
2.Click 'Create Binding' button, 'Create Role Binding' form set Subject as User and Subject Name with the user name we previous viewed
3.Navigate to User resource and access its 'Role Bindings' tab.
4. Click 'Create Binding' button, 'Create Role Binding' form set Subject as Group and Subject Name with the group name we previous viewed

Verified on 4.7.0-0.nightly-2020-12-20-031835

Comment 6 errata-xmlrpc 2021-02-24 15:41:51 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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-2020:5633