diff --git a/rust/package/agama.changes b/rust/package/agama.changes index 31c386b86f..aa4773211d 100644 --- a/rust/package/agama.changes +++ b/rust/package/agama.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Mar 17 14:49:14 UTC 2026 - Michal Filka + +- 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 diff --git a/service/lib/agama/autoyast/root_reader.rb b/service/lib/agama/autoyast/root_reader.rb index c5add56bd0..eb6ddc660f 100755 --- a/service/lib/agama/autoyast/root_reader.rb +++ b/service/lib/agama/autoyast/root_reader.rb @@ -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 diff --git a/service/share/autoyast-compat.json b/service/share/autoyast-compat.json index c9007ca6b5..6259c1bdfd 100644 --- a/service/share/autoyast-compat.json +++ b/service/share/autoyast-compat.json @@ -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" } diff --git a/service/test/agama/autoyast/converter_test.rb b/service/test/agama/autoyast/converter_test.rb index 7f2f618134..c6cfccc7f8 100644 --- a/service/test/agama/autoyast/converter_test.rb +++ b/service/test/agama/autoyast/converter_test.rb @@ -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 diff --git a/service/test/agama/autoyast/root_reader_test.rb b/service/test/agama/autoyast/root_reader_test.rb index 1bb011fc36..52e640a918 100644 --- a/service/test/agama/autoyast/root_reader_test.rb +++ b/service/test/agama/autoyast/root_reader_test.rb @@ -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