Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-3873

User can't get useroauthaccesstoken in hypershift hosted cluster due to missing RBAC objects

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.13, 4.12, 4.14
    • HyperShift
    • Important
    • Hypershift Sprint 241, Hypershift Sprint 242
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      In hypershift hosted cluster, user hits below error:$ oc get useroauthaccesstoken --kubeconfig hypershift-ci-4200.kubeconfig 
      Error from server (Forbidden): useroauthaccesstokens.oauth.openshift.io is forbidden: User "testuser-1" cannot list resource "useroauthaccesstokens" in API group "oauth.openshift.io" at the cluster scope

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

      4.12.0-0.nightly-2022-11-17-164258

      How reproducible:

      Always

      Steps to Reproduce:

      1. Prepare a hypershift env
      2. Login to the hypershift hosted cluster
      oc login -u testuser-1
      3. As normal user, get useroauthaccesstoken
      oc get useroauthaccesstoken
      

      Actual results:

      Fails with below:Error from server (Forbidden): useroauthaccesstokens.oauth.openshift.io is forbidden: User "testuser-1" cannot list resource "useroauthaccesstokens" in API group "oauth.openshift.io" at the cluster scope

      Expected results:

      3. Should succeed as works in OCP env.

      Additional info:

      Checked the hypershift hosted cluster, the clusterrole and clusterrolebinding of name system:openshift:useroauthaccesstoken-manager are missing, while they exist in OCP env. Manually create them in the hypershift hosted cluster, the error will be gone.

            pstefans@redhat.com Patryk Stefanski
            xxia-1 Xingxing Xia
            Giriyamma Karagere Ramaswamy Giriyamma Karagere Ramaswamy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: