fails to log auth headers, request logging incomplete

Bug #1700858 reported by John Dennis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystoneauth
Triaged
Wishlist
Unassigned

Bug Description

If you enable debug logging the logging of requests performed by Session._http_log_request() in keystoneauth/keystoneauth1/session.py omits any modification of the request by the request auth callback.

Session.request does this:

        if requests_auth:
            kwargs['auth'] = requests_auth

just before calling self._http_log_request()

In the case of SAML ECP the requests_auth callback is:

keystoneauth1.extras._saml2.v3.saml2._SamlAuth

which modifies the request headers, but the auth callback is not invoked until send() is called which is after the request is logged. The net result is the headers set the by the auth callback are missing from the logged request making it look as if the request is malformed.

The logging should either be performed at the moment the request is emitted by python-requests (not sure but there may be a hook for this) or after the request returns.

Changed in keystoneauth:
importance: Undecided → Low
status: New → Triaged
John Dennis (jdennis-a)
Changed in keystoneauth:
assignee: nobody → John Dennis (jdennis-a)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Automatically unassigning due to inactivity.

Changed in keystoneauth:
assignee: John Dennis (jdennis-a) → nobody
Changed in keystoneauth:
importance: Low → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.