Task/3303 driver new field LoginSshKey with annotation of type: file-to-field-aliases#39
Draft
lukasz-piotrowski-fujitsu wants to merge 3 commits intostory/3302from
Draft
Task/3303 driver new field LoginSshKey with annotation of type: file-to-field-aliases#39lukasz-piotrowski-fujitsu wants to merge 3 commits intostory/3302from
lukasz-piotrowski-fujitsu wants to merge 3 commits intostory/3302from
Conversation
…first log in instead of password;
Comment on lines
+532
to
+534
| if d.LoginSshKey == "" { | ||
| return fmt.Errorf(errorMandatoryOption, "Login SSH key", "--fsas-login-ssh-key") | ||
| } |
Collaborator
There was a problem hiding this comment.
We could use some more detailed validation. Perhaps we could employ similar approach as for OsImageSshHostPubKey - validate the key through parsing it?
Collaborator
Author
There was a problem hiding this comment.
Good idea, but implementation is not so trivial.
- Field FirstLoginSshKey contains path e.g. /path/to/machine/files/firstLoginSshKey, not the ssh key
- Even if I read the content of the file /path/to/machine/files/firstLoginSshKey, then parsing to ssh key fails because Rancher UI flattens the content of the field FirstLoginSshKey, or in other words, it replaces all new line chars (\n) with spaces; this is not a valid PEM format, and ssh parser returns an error. According to Rancher manual, fields that are annotated as file-to-field-aliases should be rendered in UI as buttons "Load From File" but in our case, instead of this button, there is a simple one-line text field.
I am trying to solve/workaround this problem in my current task task/3304.
Collaborator
There was a problem hiding this comment.
I guess it is the same issue we have with custom userdata then. We might need to stop this story implementation until UI issue is resolved. Let's discuss further steps on private chat.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.