diff --git a/cloudinit/config/schemas/schema-cloud-config-v1.json b/cloudinit/config/schemas/schema-cloud-config-v1.json index 2b4a926f5c8..94a356747f4 100644 --- a/cloudinit/config/schemas/schema-cloud-config-v1.json +++ b/cloudinit/config/schemas/schema-cloud-config-v1.json @@ -361,6 +361,22 @@ }, "minItems": 1 }, + "ssh-authorized-keys": { + "allOf": [ + { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + { + "deprecated": true, + "deprecated_version": "18.3", + "deprecated_description": "Use ``ssh_authorized_keys`` instead." + } + ] + }, "ssh_import_id": { "description": "List of ssh ids to import for user. Can not be combined with ``ssh_redirect_user``. See the man page[1] for more details. [1] https://manpages.ubuntu.com/manpages/noble/en/man1/ssh-import-id.1.html", "type": "array", diff --git a/tests/unittests/config/test_cc_users_groups.py b/tests/unittests/config/test_cc_users_groups.py index 0f42b05f31e..ceb13a3dd10 100644 --- a/tests/unittests/config/test_cc_users_groups.py +++ b/tests/unittests/config/test_cc_users_groups.py @@ -505,6 +505,36 @@ class TestUsersGroupsSchema: ), True, ), + ( + { + "users": [ + { + "name": "lima", + "uid": "1000", + "homedir": "/home/lima.linux", + "shell": "/bin/bash", + "sudo": "ALL=(ALL) NOPASSWD:ALL", + "lock_passwd": True, + "ssh-authorized-keys": ["ssh-ed25519 ..."], + } + ] + }, + pytest.raises( + SchemaValidationError, + match=( + "Cloud config schema deprecations: " + "users.0.ssh-authorized-keys: " + " Deprecated in version 18.3." + " Use ``ssh_authorized_keys`` instead." + ", " + "users.0.uid: " + " Changed in version 22.3." + " The use of ``string`` type is deprecated." + " Use an ``integer`` instead." + ), + ), + False, + ), ], ) @skipUnlessJsonSchema() diff --git a/tools/.github-cla-signers b/tools/.github-cla-signers index 29e291facb5..8bd7583c2c4 100644 --- a/tools/.github-cla-signers +++ b/tools/.github-cla-signers @@ -3,6 +3,7 @@ aciba90 acourdavAkamai ader1990 adobley +afbjorklund ajmyyra akutz AlexBaranowski