Remove debug logging, keep fingerprint passthrough
This commit is contained in:
parent
a6c717777e
commit
4a3de923de
1 changed files with 1 additions and 7 deletions
|
|
@ -193,8 +193,6 @@ func (p *SkelPlugin) PasswordCallback(conn libplugin.ConnMetadata, password []by
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *SkelPlugin) PublicKeyCallback(conn libplugin.ConnMetadata, publicKey []byte) (*libplugin.Upstream, error) {
|
func (p *SkelPlugin) PublicKeyCallback(conn libplugin.ConnMetadata, publicKey []byte) (*libplugin.Upstream, error) {
|
||||||
log.Infof("PublicKeyCallback called for user %s, key len=%d", conn.User(), len(publicKey))
|
|
||||||
|
|
||||||
pubKey, err := ssh.ParsePublicKey(publicKey)
|
pubKey, err := ssh.ParsePublicKey(publicKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
@ -274,13 +272,11 @@ func (p *SkelPlugin) PublicKeyCallback(conn libplugin.ConnMetadata, publicKey []
|
||||||
}
|
}
|
||||||
|
|
||||||
// Pass the client's public key so their fingerprint can be included in the upstream username
|
// Pass the client's public key so their fingerprint can be included in the upstream username
|
||||||
log.Infof("Creating upstream with client key len=%d", len(publicKey))
|
|
||||||
u, err := p.createUpstreamWithClientKey(conn, to, nil, publicKey)
|
u, err := p.createUpstreamWithClientKey(conn, to, nil, publicKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Infof("Upstream created with username=%s", u.UserName)
|
|
||||||
return u, nil
|
return u, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,9 +303,7 @@ func (p *SkelPlugin) createUpstreamWithClientKey(conn libplugin.ConnMetadata, to
|
||||||
// Replace any dots in fingerprint with underscores to avoid parsing issues
|
// Replace any dots in fingerprint with underscores to avoid parsing issues
|
||||||
fingerprint = strings.ReplaceAll(fingerprint, ".", "_")
|
fingerprint = strings.ReplaceAll(fingerprint, ".", "_")
|
||||||
user = "fp:" + fingerprint + "." + user
|
user = "fp:" + fingerprint + "." + user
|
||||||
log.Infof("passing client fingerprint in username: %s", user)
|
log.Debugf("passing client fingerprint in username: %s", user)
|
||||||
} else {
|
|
||||||
log.Infof("no client public key provided, using original username: %s", user)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
p.cache.SetDefault(conn.UniqueID(), to)
|
p.cache.SetDefault(conn.UniqueID(), to)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue