Bug 1949410 - The referred role doesn't exist if create rolebinding from rolebinding tab of role page
Summary: The referred role doesn't exist if create rolebinding from rolebinding tab of...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.8.0
Assignee: Samuel Padgett
QA Contact: Yanping Zhang
URL:
Whiteboard: Scrubbed
Depends On:
Blocks: 1950489
TreeView+ depends on / blocked
 
Reported: 2021-04-14 08:39 UTC by Yanping Zhang
Modified: 2021-07-27 23:00 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously, when creating a new binding from the role bindings tab of the role page, the web console would prefill the incorrect role name and namespace in the resulting form. This has been fixed.
Clone Of:
Environment:
Last Closed: 2021-07-27 23:00:24 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 8653 0 None open Bug 1949410: Fix "Create binding" link from Role page, RoleBindings tab 2021-04-14 13:58:08 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 23:00:47 UTC

Description Yanping Zhang 2021-04-14 08:39:51 UTC
Description of problem:
Under "RoleBindings" tab of one role page, click "Create binding", no role name could be set and after click "Create", the referred role name in the new rolebinding is the chosen role name with "undefined" suffix, which is not a real existing role.

Version-Release number of selected component (if applicable):
4.8.0-0.nightly-2021-04-13-171608

How reproducible:
Always

Steps to Reproduce:
1.Go to "User Management"->"Roles" page, click into role "cluster-admin".
2.Under "RoleBindings" tab, create rolebinding by click "Create binding".
3.Check the new rolebinding yaml.

Actual results:
2. In the "Role name" part, no role name is set or could be chosen.
3.The referred role "cluster-adminundefined" doesn't exist:
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-adminundefined

Expected results:
2.Should set default role name for "Role name" field if user needn't set it manually.
3.The role name should be "cluster-admin" by default.

Additional info:

Comment 1 Samuel Padgett 2021-04-14 13:53:47 UTC
This is a regression from https://github.com/openshift/console/pull/6035 and is present in 4.6 and 4.7.

Comment 4 Yanping Zhang 2021-04-19 07:22:51 UTC
Checked on ocp 4.8 cluster with payload 4.8.0-0.nightly-2021-04-18-101412.
Steps to verify:
1.Go to "User Management"->"Roles" page, click into role "cluster-admin".
2.Under "RoleBindings" tab, create rolebinding by click "Create binding". Now the "Role name" is set to "cluster-admin" by default.
3.Check the new rolebinding yaml. The "roleRef:name" is "cluster-admin", and the user is granted "cluster-admin" role correctly.
The bug is fixed.

Comment 7 errata-xmlrpc 2021-07-27 23:00:24 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.8.2 bug fix and security 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-2021:2438


Note You need to log in before you can comment on or make changes to this bug.