Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add host-key verification strategy check-static #483

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

cgroschupp
Copy link

No description provided.

@cgroschupp
Copy link
Author

ready to review.

@KarstenSiemer
Copy link

KarstenSiemer commented Aug 12, 2020

+1 for this change
what do you think @res0nance @fcojfernandez ?

String instanceCapStr, String iamInstanceProfile, boolean deleteRootOnTermination,
boolean useEphemeralDevices, boolean useDedicatedTenancy, String launchTimeoutStr, boolean associatePublicIp,
String customDeviceMapping, boolean connectBySSHProcess, boolean monitoring,
boolean t2Unlimited, ConnectionStrategy connectionStrategy, int maxTotalUses, List<? extends NodeProperty<?>> nodeProperties, String staticHostKeys) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't modify existing constructors

@fcojfernandez
Copy link
Contributor

I don't have bandwith these days. @MRamonLeon could you please have a look at this PR? Because you worked on the host-key verification, your review might be actual valuable.

@KarstenSiemer
Copy link

Any progress on this?

while (scanner.hasNextLine()) {
String hostKeyString = scanner.nextLine();
String[] hostKeyParts = hostKeyString.split(" ");
if (hostKeyParts.length < 2 || hostKeyParts.length > 3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (hostKeyParts.length < 2 || hostKeyParts.length > 3) {
if (hostKeyParts.length != 2) {

String hostKeyString = scanner.nextLine();
String[] hostKeyParts = hostKeyString.split(" ");
if (hostKeyParts.length < 2 || hostKeyParts.length > 3) {
EC2Cloud.log(LOGGER, Level.WARNING, computer.getListener(), "The provided static SSH key is invalid");
Copy link
Contributor

Choose a reason for hiding this comment

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

If you add the reason it would be appreciated, like:

the format is algorithm base64-public-key, example: ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHm0sVqkjSuaPg8e7zfaKXt3b1hE1tBwFsB18NOWv5ow

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