Skip to content
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

Deprecate the users ssh-authorized-keys property #5162

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions cloudinit/config/schemas/schema-cloud-config-v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
30 changes: 30 additions & 0 deletions tests/unittests/config/test_cc_users_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions tools/.github-cla-signers
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ aciba90
acourdavAkamai
ader1990
adobley
afbjorklund
ajmyyra
akutz
AlexBaranowski
Expand Down