aws / aws/eks-anywhere

More validations around SSH keys

Open
#3,960 1 comment 0 reactions 0 assignees View on GitHub
area/cli team/cli
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

The SSH key(s) for a user is one of the input fields in the provider Machine configs, to allow connecting to a node via SSH. This field is made mutable during upgrades to allow rotation of keys for security purposes. However, there is no guard around setting the field to empty (`""`) or if there is a typo in the public key field, which would lead to the user losing access to the nodes because the private key they use for SSH will not match the current public key on the node. Although an upgrade with the proper key would fix this, this puts too much belief on the upgrade not failing.

We should make this more robust by adding more validations around SSH keys during upgrade, such as:
* Checking for empty string input
* Warning user when changing SSH keys to a new value
* Possible `ssh-keygen` checks to validate the public key matches private key (although this would mean the CLI reads the private key)

Contributor guide

Open the contributing guide

Research direction

Start by locating the provider Machine configs and the upgrade path that accepts SSH key changes. Review how validation and user warnings are handled there, then define completion as rejecting empty keys, warning on changes, and determining whether public/private key matching is in scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
infrastructure, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.