Skip to content

Conversation

@lanchongyizu
Copy link
Member

@lanchongyizu lanchongyizu commented Nov 3, 2016

Public key is required for ssh connection for Inband management, and private key is optional.
This is related with ODR-972.

@RackHD/corecommitters @panpan0000 @iceiilin @benbp

@lanchongyizu
Copy link
Member Author

lanchongyizu commented Nov 3, 2016

depends on RackHD/on-tasks#369

@lanchongyizu lanchongyizu force-pushed the bugfix/odr-972 branch 2 times, most recently from 23b1637 to 098702a Compare November 3, 2016 09:13
@iceiilin
Copy link
Member

iceiilin commented Nov 3, 2016

👍

@JenkinsRHD
Copy link
Contributor

BUILD on-http #2785 : UNSTABLE

BUILD unit-tests #9983 Error Logs ▼

Test Name: Ssh Serializable V1 deserialize should fail on a bad host/user/password key schema
Error Details: expected promise to be rejected with an error matching /SchemaError/ but it was fulfilled with { Object (host, user, ...) }
Stack Trace: AssertionError: expected promise to be rejected with an error matching /SchemaError/ but it was fulfilled with { Object (host, user, ...) }

Test Name: Ssh Serializable V1 deserialize should fail on a bad host/user/public/private key schema
Error Details: expected promise to be rejected with an error matching /SchemaError/ but it was fulfilled with { Object (host, user, ...) }
Stack Trace: AssertionError: expected promise to be rejected with an error matching /SchemaError/ but it was fulfilled with { Object (host, user, ...) }

Copy link
Contributor

@johren johren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of things about the private and public keys. We do not need to encrypt or redact public keys. These can be freely shared with anyone.
Private keys, on the other hand, should never be shared with anyone. Therefore, we should not be asking the user to give us their private key. The only private keys we should be handling are those that we generate for ourselves.

}
if (this.publicKey) {
this.publicKey = 'REDACTED';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public keys do not need to be encrypted or redacted. These can be safely revealed to anyone.

}
if (self.publicKey) {
self.publicKey = encryption.encrypt(self.publicKey);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public key does not need to be encrypted.

}
).should.eventually.have.property('publicKey').that.equals('REDACTED');
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public key does not need to be encrypted or redacted.

'publicKey'
).and.not.equal('fake-public-key');
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Public key does not need to be encrypted.

@anhou anhou merged commit 6b1ce88 into RackHD:master Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants