http signatures: log when http signature validation fails

This commit is contained in:
kaniini 2018-10-31 02:14:01 +00:00
parent 6e493ca9e1
commit 5fcdfbd596

View file

@ -112,6 +112,7 @@ async def http_signatures_middleware(app, handler):
actor = data["actor"] actor = data["actor"]
if not (await validate(actor, request)): if not (await validate(actor, request)):
logging.info('Signature validation failed for: %r', actor)
raise aiohttp.web.HTTPUnauthorized(body='signature check failed, signature did not match key') raise aiohttp.web.HTTPUnauthorized(body='signature check failed, signature did not match key')
return (await handler(request)) return (await handler(request))