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

When creating Route object with cluster role "edit" - Error from server (Forbidden): routes.route.openshift.io is forbidden

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 1
    • Low
    • None
    • None
    • None
    • uShift Sprint 265, uShift Sprint 266
    • 2
    • None
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      When trying to expose a service to create a route, user with the "clusterrole/edit" on the namespace is getting:
      
      //////////
      Error from server (Forbidden): routes.route.openshift.io is forbidden: User "system:serviceaccount:<>" cannot create resource "routes" in API group "route.openshift.io" in the namespace 
      
      This is caused by missing permissions on the route in the cluster role edit.
      
      ~~~
      # oc get clusterrole edit -o yaml | grep -i route
      ~~~
      
      However, checking the OpenShift, the same role, the output is:
      
      ~~~
      # oc get clusterrole edit -o yaml | grep -i route
        - route.openshift.io
        - routes
        - route.openshift.io
        - routes/custom-host
        - route.openshift.io
        - routes/status
        - route.openshift.io
        - routes
      ~~~
      
      It means that either the role is incomplete or incorrectly added. 

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

      MicroShift 4.17

      How reproducible:

      # oc get clusterrole edit -o yaml | grep -i route
      
      Or create service account, add the "edit" role and check if you can create Route under the service account.

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

      I wasn't able to find the reference to the clusterrole/edit in the github repo.

              pacevedo@redhat.com Pablo Acevedo Montserrat
              rhn-support-vwalek Vladislav Walek
              None
              None
              Douglas Hensel Douglas Hensel
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: