From 33b654dd0a9fe7b1c697d84e1e93f2ef5c4bd828 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Wed, 9 May 2018 17:32:20 +0000 Subject: [PATCH 1/4] more disclosures --- cmd/keymasterd/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/keymasterd/main.go b/cmd/keymasterd/main.go index 8cd41ef..07b6b3a 100644 --- a/cmd/keymasterd/main.go +++ b/cmd/keymasterd/main.go @@ -1494,7 +1494,7 @@ func (state *RuntimeState) vipPushStartHandler(w http.ResponseWriter, r *http.Re return } - logger.Printf(" Vip push start authuser=%s", authUser) + logger.Debugf(0, "Vip push start authuser=%s", authUser) vipPushCookie, err := r.Cookie(vipTransactionCookieName) if err != nil { logger.Printf("%v", err) @@ -1864,7 +1864,7 @@ func (state *RuntimeState) u2fSignResponse(w http.ResponseWriter, r *http.Reques return } - logger.Printf("signResponse: %+v", signResp) + logger.Debugf(1, "signResponse: %+v", signResp) profile, ok, _, err := state.LoadUserProfile(authUser) if err != nil { @@ -1904,7 +1904,7 @@ func (state *RuntimeState) u2fSignResponse(w http.ResponseWriter, r *http.Reques if authErr == nil { metricLogAuthOperation(getClientType(r), proto.AuthTypeU2F, true) - logger.Printf("newCounter: %d", newCounter) + logger.Debugf(0, "newCounter: %d", newCounter) //counter = newCounter u2fReg.Counter = newCounter //profile.U2fAuthData[i].Counter = newCounter From c5b6adc2456cebcdff10d9b615872e5fd8c53f52 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Wed, 9 May 2018 23:44:59 +0000 Subject: [PATCH 2/4] adding message for using local hash db --- lib/pwauth/ldap/impl.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pwauth/ldap/impl.go b/lib/pwauth/ldap/impl.go index aa9644a..a601770 100644 --- a/lib/pwauth/ldap/impl.go +++ b/lib/pwauth/ldap/impl.go @@ -100,6 +100,7 @@ func (pa *PasswordAuthenticator) passwordAuthenticate(username string, } } if pa.storage != nil { + pa.logger.Printf("Failed to check password against LDAP servers, using local hash db") ok, hash, err := pa.storage.GetSigned(username, passwordDataType) if err != nil { return false, nil From 78bcb15ba92262bae9255e6e65b155b4b68e8af8 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Thu, 10 May 2018 00:29:25 +0000 Subject: [PATCH 3/4] upping version --- Makefile | 2 +- keymaster.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4881a82..081e1f5 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ endif BINARY=keymaster # These are the values we want to pass for Version and BuildTime -VERSION=1.4.2 +VERSION=1.4.3 #BUILD_TIME=`date +%FT%T%z` # Setup the -ldflags option for go build here, interpolate the variable values diff --git a/keymaster.spec b/keymaster.spec index e309403..7e03d4a 100644 --- a/keymaster.spec +++ b/keymaster.spec @@ -1,5 +1,5 @@ Name: keymaster -Version: 1.4.2 +Version: 1.4.3 Release: 1%{?dist} Summary: Short term access certificate generator and client From df6b8f8edcfefe3757b5aa2ac71dd5239044f395 Mon Sep 17 00:00:00 2001 From: Camilo Viecco Date: Thu, 10 May 2018 00:40:16 +0000 Subject: [PATCH 4/4] fixing bug, log, only if logger is no nil --- lib/pwauth/ldap/impl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/pwauth/ldap/impl.go b/lib/pwauth/ldap/impl.go index a601770..26d11de 100644 --- a/lib/pwauth/ldap/impl.go +++ b/lib/pwauth/ldap/impl.go @@ -100,7 +100,9 @@ func (pa *PasswordAuthenticator) passwordAuthenticate(username string, } } if pa.storage != nil { - pa.logger.Printf("Failed to check password against LDAP servers, using local hash db") + if pa.logger != nil { + pa.logger.Printf("Failed to check password against LDAP servers, using local hash db") + } ok, hash, err := pa.storage.GetSigned(username, passwordDataType) if err != nil { return false, nil