Files
floci/docs/services
Jackson Price 9f9c16a181 fix(ec2): honor IncludePublicKey when describing key pairs (#6055)
* fix(ec2): honor IncludePublicKey when describing key pairs

DescribeKeyPairs ignored IncludePublicKey. With IncludePublicKey=true each
key pair now carries its OpenSSH public key, with the key-pair name as the
comment in place of any comment an imported key had; omitted or false
leaves it out. Imported material that is not a whole OpenSSH key, such as
PEM or RFC 4716 text, a blob missing a field its type needs, a line that
names another type than its blob, or a key type other than RSA, ED25519,
ECDSA and their security-key forms, is kept as given and described without
a public key. SshPublicKeys.carriesAKey checks the fields each type needs.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): describe a key pair's key only when it is exactly one key

DescribeKeyPairs with IncludePublicKey=true still described a blob with
bytes after its key, which OpenSSH and Go's ssh package refuse, and the
first of several key lines, although an instance launched with the key
pair trusts every line. Both are now described without a public key. A
key pair stored before KeyName was required gets no comment instead of
"null". carriesAKey reads the RSA fields once through the reader.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* fix(ec2): leave a key-pair name that cannot be a comment off the key

ImportKeyPair accepts a key-pair name with a line break, and as the comment
of the described key such a name split it into lines that authorized_keys
reads as further keys. A name holding a control character is now left
off. carriesAKey names each ECDSA curve's coordinate size and reads a
security key's application field directly, and its docs say it checks
the format only.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* docs(ec2): name the key types and formats a described key pair needs

The Key Pairs section now names DER beside PEM and RFC 4716, and the two
security-key types OpenSSH has, instead of a security-key form for every
type. The SshPublicKeys class comment covers the whole-key check, and a
test comment no longer says a tab would split the described key.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

* docs(ec2): list the described key types by their wire names

The Key Pairs section lists the key types a key pair is described with by
their OpenSSH names, which reads one way only, and the SshPublicKeys
comments name the two security-key types instead of implying a
security-key form for every key type.

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>

---------

Signed-off-by: Jackson Price <59149601+jprice8@users.noreply.github.com>
2026-10-20 09:54:54 -04:00
..
2026-08-21 00:09:04 -04:00