Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-22827

Add logs for internal RBAC endpoint requests

XMLWordPrintable

    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • Hide
      • When I make a request to an internal RBAC endpoint, I should see the request information being logged prior to the response with the following fields:
      {'method': 'GET', 'path': '/api/rbac/v1/groups/', 'status': 200, 'is_internal': True, 'username': <email>}
      
      Show
      When I make a request to an internal RBAC endpoint, I should see the request information being logged prior to the response with the following fields: { 'method' : 'GET' , 'path' : '/api/rbac/v1/groups/' , 'status' : 200, 'is_internal' : True, 'username' : <email>}
    • Unset
    • No
    • Platform A&M Sprint 57, Platform A&M Sprint 58

      Currently, in our middleware when we process the response [1] we check to see if the request is internal, and if so we'll short-circuit and return out of process_response. What follows is the actual logging, which we don't get for internal requests.

      We should add similar logging to the internal middleware process_response method [2] to ensure we're capturing these requests in pod logs as well as in Kibana.

      We should avoid duplication where possible, and abstract anything reusable out into a shared module (if it makes sense).

      [1] https://github.com/RedHatInsights/insights-rbac/blob/master/rbac/rbac/middleware.py#L277-L286
      [2] https://github.com/RedHatInsights/insights-rbac/blob/master/rbac/internal/middleware.py#L66

            abaiken Ashley Aiken
            kwalsh@redhat.com Keith Walsh
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: