Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Mar 17 14:49:14 UTC 2026 - Michal Filka <mfilka@suse.com>

- jsc#PED-15434
- fixed autoyast_compat.json to cover earlier patch which
extended capabilities of sshPublicKey / sshPublicKeys
- fixed AY root_reader. authorized_keys are converted as an array
into sshPublicKeys now (no first key only anymore)

-------------------------------------------------------------------
Tue Mar 17 12:15:22 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
3 changes: 0 additions & 3 deletions service/lib/agama/autoyast/root_reader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ def config
def setup_ssh(root_user)
hsh = {}

public_key = root_user.authorized_keys.first

hsh["sshPublicKey"] = public_key if public_key
hsh["sshPublicKeys"] = root_user.authorized_keys unless root_user.authorized_keys.empty?

hsh
Expand Down
7 changes: 1 addition & 6 deletions service/share/autoyast-compat.json
Original file line number Diff line number Diff line change
Expand Up @@ -666,12 +666,7 @@
"agama": "user.hashedPassword",
"notes": "If set to true, it uses \"hashedPassword\" instead of \"password\""
},
{
"key": "authorized_keys",
"support": "yes",
"agama": "root.sshPublicKey",
"notes": "It only considers a single key."
}
{ "key": "authorized_keys", "support": "yes", "agama": "root.sshPublicKeys" }
]
},
{ "key": "zfcp", "support": "yes" }
Expand Down
2 changes: 1 addition & 1 deletion service/test/agama/autoyast/converter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
it "exports the root password and/or public SSH key" do
result = subject.to_agama(profile)
expect(result["root"]).to include("password" => "nots3cr3t",
"sshPublicKey" => "ssh-rsa ...")
"sshPublicKeys" => ["ssh-rsa ..."])
end
end

Expand Down
1 change: 0 additions & 1 deletion service/test/agama/autoyast/root_reader_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
root = subject.read["root"]
expect(root).to eq(
"password" => "123456",
"sshPublicKey" => "ssh-key 1",
"sshPublicKeys" => ["ssh-key 1", "ssh-key 2"]
)
end
Expand Down
Loading