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

Log failed keystore lookups in all cases

parent 45343413
No related branches found
No related tags found
No related merge requests found
...@@ -122,7 +122,9 @@ func (s *KeyLookupProxy) lookupPassdb(ctx context.Context, username, password st ...@@ -122,7 +122,9 @@ func (s *KeyLookupProxy) lookupPassdb(ctx context.Context, username, password st
// If the password is a SSO token, try to fetch the // If the password is a SSO token, try to fetch the
// unencrypted key from the keystore daemon. // unencrypted key from the keystore daemon.
priv, err := s.keystore.Get(ctx, s.config.Shard, username, password) priv, err := s.keystore.Get(ctx, s.config.Shard, username, password)
if err == nil { if err != nil {
log.Printf("keystore lookup for %s failed: %v", username, err)
} else {
log.Printf("passdb lookup for %s (from keystore)", username) log.Printf("passdb lookup for %s (from keystore)", username)
return &passdbResponse{PrivateKey: s.b64encode(priv)}, true, nil return &passdbResponse{PrivateKey: s.b64encode(priv)}, true, nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment