Bug 2035703 - Roles -> RoleBindings tab doesn't show RoleBindings correctly
Summary: Roles -> RoleBindings tab doesn't show RoleBindings correctly
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.10.0
Assignee: Cyril
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks: 2078554
TreeView+ depends on / blocked
 
Reported: 2021-12-27 03:41 UTC by Yadan Pei
Modified: 2022-04-25 15:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:36:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
No RoleBindings found (331.55 KB, image/png)
2021-12-27 03:41 UTC, Yadan Pei
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 10846 0 None open Bug 2035703: - Roles -> RoleBindings tab doesn't show RoleBindings correctly 2022-01-14 14:42:49 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:36:48 UTC

Description Yadan Pei 2021-12-27 03:41:19 UTC
Created attachment 1847887 [details]
No RoleBindings found

Description of problem:


Version-Release number of selected component (if applicable):
4.10.0-0.nightly-2021-12-23-153012

How reproducible:
Always

Steps to Reproduce:
1. Create a Role and a RoleBinding for the new role
$ cat > example-role.yaml << EOF
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: example-yapei-role
  namespace: yapei
rules:
  - apiGroups:
      - ''
    resources:
      - pods
    verbs:
      - get
      - watch
      - list
EOF
cat > example-rolebinding.yaml << EOF

EOF

3. Check role and rolebinding info with CLI
$ oc get role -n yapei 
NAME                                          CREATED AT
example-yapei-role                            2021-12-27T03:32:50Z

$ oc describe role example-yapei-role  -n yapei
Name:         example-yapei-role
Labels:       <none>
Annotations:  <none>
PolicyRule:
  Resources  Non-Resource URLs  Resource Names  Verbs
  ---------  -----------------  --------------  -----
  pods       []                 []              [get watch list]

$ oc get rolebinding -n yapei
NAME                                          ROLE                                               AGE
example-rolebinding                           Role/example-yapei-role                            85s

$ oc describe rolebinding example-rolebinding -n yapei
Name:         example-rolebinding
Labels:       <none>
Annotations:  <none>
Role:
  Kind:  Role
  Name:  example-yapei-role
Subjects:
  Kind  Name  Namespace
  ----  ----  ---------
  User  pm1   

We can see that rolebinding/example-rolebinding is binding with role/example-yapei-role

4. User Management -> Roles -> example-yapei-role -> click 'RoleBindings' tab

Actual results:
4. it shows 'No RoleBindings found', even user create a new RoleBinding via UI(click 'Create binding' on RoleBindings tab) it still shows 'No RoleBindings found' when visit RoleBindings tab of Roles


Expected results:
4. Role's RoleBindings should be shown correctly

Additional info:
If we create RoleBindings from Roles -> RoleBindings tab, the RoleBinding YAML looks like:
kind: RoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: example-rolebinding-two
  namespace: yapei
subjects:
  - kind: User
    apiGroup: rbac.authorization.k8s.io
    name: uiauto2
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: Role
  name: example-yapei-role

Comment 4 Yadan Pei 2022-01-17 08:09:46 UTC
1. Create Role and its RoleBinding
 ~/test-files/ cat example-role.yaml 
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
  name: example-yapei-role
  namespace: yapei
rules:
  - apiGroups:
      - ''
    resources:
      - pods
    verbs:
      - get
      - watch
      - list
 ~/test-files/ oc create -f example-role.yaml 
role.rbac.authorization.k8s.io/example-yapei-role created
 ~/test-files/ oc get rolebinding -n yapei
NAME                        ROLE                               AGE
admin                       ClusterRole/admin                  110s
admin-0                     ClusterRole/admin                  73s
example-yapei-rolebinding   Role/example-yapei-role            11s
system:deployers            ClusterRole/system:deployer        110s
system:image-builders       ClusterRole/system:image-builder   110s
system:image-pullers        ClusterRole/system:image-puller    110s
 ~/test-files/ oc describe rolebinding example-yapei-rolebinding
Name:         example-yapei-rolebinding
Labels:       <none>
Annotations:  <none>
Role:
  Kind:  Role
  Name:  example-yapei-role
Subjects:
  Kind  Name     Namespace
  ----  ----     ---------
  User  uiauto3  

2. Navigate to User Management -> Roles -> example-yapei-role -> visit RoleBindings tab, the rolebindings are shown correctly

Verified on 4.10.0-0.nightly-2022-01-15-092722

Comment 7 errata-xmlrpc 2022-03-10 16:36:35 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.10.3 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-2022:0056


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