From 36d713621005d47bf4608b5e927fed6b87cfebdc Mon Sep 17 00:00:00 2001 From: McMatts Date: Fri, 8 Mar 2019 15:45:46 +0000 Subject: [PATCH] Add diagnostic message for LDAP auth --- domain/auth/ldap/endpoint.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/domain/auth/ldap/endpoint.go b/domain/auth/ldap/endpoint.go index b79d6ff9..e8c713bd 100644 --- a/domain/auth/ldap/endpoint.go +++ b/domain/auth/ldap/endpoint.go @@ -273,6 +273,7 @@ func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request) { // Check for required fields. if len(username) == 0 || len(password) == 0 { response.WriteUnauthorizedError(w) + h.Runtime.Log.Info("LDAP authentication aborted due to missing username/password") return } @@ -313,6 +314,7 @@ func (h *Handler) Authenticate(w http.ResponseWriter, r *http.Request) { return } if !ok { + h.Runtime.Log.Info("LDAP failed login request for " + username + " @ " + dom) response.WriteUnauthorizedError(w) return }