Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-470

Add RBAC integration to all needed backend API endpoints

    • Icon: Task Task
    • Resolution: Done
    • Icon: Undefined Undefined
    • hms-0.6
    • None
    • Content
    • None

      API integration is handled through calling RBAC’s GET List API as follows:
      <selected environment>/access/?application=<app> , resulting in the following response:

       

       

      {
         "meta": {...},
         "links":  {...},
         "data": [
            {
               "permission": "<app>:<resource0>:*",
               "resourceDefinitions": []
            },
            {
               "permission": "<app>:<resource1>:write",
               "resourceDefinitions": []
            }
         ]
      }
       
      

       

      See the RBAC role API documentation here.

      Further discussion around how often we call said api (every api call?) and caching needs to be discussed for implementation.

      avisiedo@redhat.com has also suggested that we consider maybe creating a middleware, similar to what is seen here and here in the playbook-dispatcher app. 

      To quote avisiedo@redhat.com, "The middleware should allow us to centralize in one component, so RBAC would have almost zero impact on the backend handlers"

       

      Go library for get access here

      Reference to turning RBAC on or off example.

              avisiedo@redhat.com Alejandro Visiedo
              adewar@redhat.com Andrew Dewar (Inactive)
              Justin Sherrill, Ryan Verdile
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: