Kubernetes authenticator inject_client_cert
produces audit record on failure
#1538
Labels
inject_client_cert
produces audit record on failure
#1538
Overview
When the
authn-k8s
/inject_client_cert
endpoint fails, it should produce an authentication failed audit event including the failure information.Currently, the only way to determine the reason for certificate injection failure is to enable
DEBUG
logging on the Conjur server and view the stack trace in the server logs. This is also different from the the/authenticate
endpoint, which does include initial failure information in the audit log.This is an alternative to logging the top-line error information at the
WARN
level, and better protects audit failure reasons from leaking any authentication information, since audit records are protected by RBAC.Technical Notes
Consider the
authenticate/
error handling, where all failure causes are audit logged before returning the error to the end user as a generic401 Unauthorized
:conjur/app/domain/authentication/authenticate.rb
Lines 22 to 32 in 12494b3
In contrast,
inject_client_cert
only returns the401
without logging the failure in the audit records:conjur/app/controllers/authenticate_controller.rb
Lines 110 to 123 in 12494b3
conjur/app/domain/authentication/authn_k8s/inject_client_cert.rb
Lines 22 to 26 in 12494b3
The text was updated successfully, but these errors were encountered: