Yaniv Bronhaim has posted comments on this change.

Change subject: Wrap validation of fingerprint in each connect using 
EngineSSHClient
......................................................................


Patch Set 3: (3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVdsCommand.java
Line 368:         if 
(getParameters().getvds().getSSHKeyFingerprint().isEmpty()) {
Line 369:             sshclient.setVds(getParameters().getvds());
Line 370:             try {
Line 371:                 
getParameters().getvds().setSSHKeyFingerprint(sshclient.getHostFingerprint());
Line 372:                 
DbFacade.getInstance().getVdsStaticDao().save(getParameters().getVdsStaticData());
there is no such function, all around this file you get the dao this way.
Line 373:             } catch (Exception e) {
Line 374:                 log.warnFormat(
Line 375:                         "couldn't set fingerprint for vds",
Line 376:                         e);


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssh/EngineSSHClient.java
Line 50:         super.connect();
Line 51:         if (_vds != null) {
Line 52:             String actual = getHostFingerprint();
Line 53:             String expected = _vds.getSSHKeyFingerprint();
Line 54:             if (!actual.equals(expected)) {
i don't understand... do you mean if expected is empty, store actual in db?
Line 55:                 throw new GeneralSecurityException(
Line 56:                     String.format(
Line 57:                         "Invalid fingerprint %s, expected %s",
Line 58:                         actual,


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ssh/EngineSSHDialog.java
Line 17: 
Line 18:     protected SSHClient _getSSHClient() {
Line 19:         EngineSSHClient client = new EngineSSHClient();
Line 20:         client.setVds(_vds);
Line 21:         return (SSHClient) client;
i don't understand . can you explain what do mean by SSHDialog::getSSHClient()? 
make it static public, or make getClient method in SSHDialog?
Line 22:     }
Line 23: 
Line 24:     public void setVds(VDS vds) {
Line 25:         _vds = vds;


-- 
To view, visit http://gerrit.ovirt.org/16126
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic01517a153406c8bafc672c20b0bf8686763a2f5
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to