Associate a request_name with each verify request, for logging

Also:
* rename VerifyKeyRequest->VerifyJsonRequest
* calculate key_ids on VerifyJsonRequest construction
* refactor things to pass around VerifyJsonRequests instead of 4-tuples
This commit is contained in:
Richard van der Hoff 2019-06-04 16:12:57 +01:00
parent 14f13babb0
commit cea9750d11
6 changed files with 86 additions and 56 deletions

View file

@ -140,7 +140,9 @@ class Authenticator(object):
401, "Missing Authorization headers", Codes.UNAUTHORIZED,
)
yield self.keyring.verify_json_for_server(origin, json_request, now)
yield self.keyring.verify_json_for_server(
origin, json_request, now, "Incoming request"
)
logger.info("Request from %s", origin)
request.authenticated_entity = origin