-
Notifications
You must be signed in to change notification settings - Fork 72
Allow importing multiple ssh keys when configuring users #3274
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
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
b4585cf
Cleanup: "unused" warnings
mchf c9c5a4c
Refactoring: function for storing ssh keys modified to handle vector
mchf 9412e85
Store ssh keys for user if any
mchf 5295715
Handling of multiple ssh keys for root in users service
mchf 1c4851f
Updated schema
mchf 5012534
Modified AutoYast root reader to convert list of ssh keys
mchf c843ba0
Modified AutoYast user reader to allow conversion of authorized keys
mchf 8213b9a
Happy rubocop
mchf 3b3c78f
Fixed FirsUserConfig test
mchf 33b371e
Fixed ruby tests
mchf eb4cbac
Fixed FirstUserConfig test
mchf b14d897
Merge branch 'master' into multiple_ssh_keys
mchf 9012bef
Made sshPublicKeys an alias for sshPublicKey in case of root user
mchf 13d46a7
Fixed tests
mchf d13f719
Formatting
mchf 4a6f56d
Fixed OpenApi
mchf da6ab1f
Improvement for OpenAPI fix
mchf 30412a4
Cleanup: removed duplicities using serde alias
mchf 1707679
Merge branch 'master' into multiple_ssh_keys
mchf c938bb8
Open SSH port and activate SSH service even when for first user
mchf 49b0190
Refactoring: parsing of sshPublicKey for user and root
mchf 2f37766
Refactoring: replaced if ! with unless on request :-/
mchf 0180da4
Refactoring: cleaned according to clippy
mchf cb20375
Temporal adjustment to the system schema
ancorgs a3d696d
service: Hotfix for wrong report of TpmFde encryption
ancorgs ef005fc
web: Adapt system openAPI export
ancorgs 700ad4b
Changelogs
ancorgs e42a209
Fixed rust tests
mchf a904e95
Updated changelog
mchf 02d8f36
StringOrList for user as is for root user. Second try.
mchf c7b2907
Merge branch 'master' into multiple_ssh_keys
mchf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -46,8 +46,7 @@ def read | |
| hsh["hashedPassword"] = true if password.value.encrypted? | ||
| end | ||
|
|
||
| public_key = root_user.authorized_keys.first | ||
| hsh["sshPublicKey"] = public_key if public_key | ||
| hsh = hsh.merge(setup_ssh(root_user)) | ||
|
|
||
| return {} if hsh.empty? | ||
|
|
||
|
|
@@ -66,6 +65,17 @@ def config | |
| result = reader.read | ||
| @config = result.config | ||
| end | ||
|
|
||
| def setup_ssh(root_user) | ||
| hsh = {} | ||
|
|
||
| public_key = root_user.authorized_keys.first | ||
|
|
||
| hsh["sshPublicKey"] = public_key if public_key | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you exporting the |
||
| hsh["sshPublicKeys"] = root_user.authorized_keys unless root_user.authorized_keys.empty? | ||
|
|
||
| hsh | ||
| end | ||
| end | ||
| end | ||
| end | ||
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.