Skip to content
Snippets Groups Projects
Commit d54a3925 authored by ale's avatar ale
Browse files

Log mTLS auth failures

parent 93632096
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,8 @@ def tls_auth(fn):
for acl_path, acl_cn_rx in current_app.tls_auth_acls:
if request.path.startswith(acl_path) and _regexp_match(acl_cn_rx, cn):
return fn(*args, **kwargs)
current_app.logger.error(
'unauthenticated mTLS request, path=%s peer=%s', request.path, cn)
abort(403)
return _tls_auth_wrapper
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment