Commit e180f49a authored by michael.simon's avatar michael.simon
Browse files

more specific logging for ssh keys

parent 9b32c87a
......@@ -157,27 +157,27 @@ public class SshLoginServiceImpl implements SshLoginService {
if ((System.currentTimeMillis() - twofaLoginInfo.getLoginDate().getTime()) < expiry &&
(System.currentTimeMillis() - localLoginInfo.getLoginDate().getTime()) < expiry) {
List<SshPubKeyRegistryEntity> regKeyList = sshPubKeyRegistryDao.findByRegistryForLogin(registry.getId());
logger.debug("Sending out {} keys for registry {}", regKeyList.size(), registry.getId());
logger.debug("Sending out {} keys (command and interactive, 2fa success) for registry {}", regKeyList.size(), registry.getId());
return buildKeyList(regKeyList, user);
}
else {
// always return command keys
List<SshPubKeyRegistryEntity> regKeyList = sshPubKeyRegistryDao.findByRegistryForCommandLogin(registry.getId());
logger.debug("Sending out {} keys for registry {}", regKeyList.size(), registry.getId());
logger.debug("Sending out {} keys (only command, 2fa expired) for registry {}", regKeyList.size(), registry.getId());
return buildKeyList(regKeyList, user);
}
}
else {
// always return command keys
List<SshPubKeyRegistryEntity> regKeyList = sshPubKeyRegistryDao.findByRegistryForCommandLogin(registry.getId());
logger.debug("Sending out {} keys for registry {}", regKeyList.size(), registry.getId());
logger.debug("Sending out {} keys (only command, no 2fa login) for registry {}", regKeyList.size(), registry.getId());
return buildKeyList(regKeyList, user);
}
}
else {
// return all keys if twofa is disabled for service
List<SshPubKeyRegistryEntity> regKeyList = sshPubKeyRegistryDao.findByRegistryForLogin(registry.getId());
logger.debug("Sending out {} keys for registry {}", regKeyList.size(), registry.getId());
logger.debug("Sending out {} keys (command and interactive, 2fa disabled for service) for registry {}", regKeyList.size(), registry.getId());
return buildKeyList(regKeyList, user);
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment