Commit Graph

7 Commits

Author SHA1 Message Date
Lubomir I. Ivanov
2cab79710d kubeadm: enhance encryption algorithm support in v1beta4
Previous v1beta4 work added support for
ClusterConfiguration.EncryptionAlgorithm, however the possible
values were limited to just "RSA" (2048 key size) and "ECDSA" (P256).

Allow more arbitrary algorithm types, that can also include key size
or curve type encoded in the name:
"RSA-2048" (default), "RSA-3072", "RSA-4096" or "ECDSA-P256".

Update the deprecation notice of the PublicKeysECDSA FeatureGate
as ideally it should be removed only after v1beta3 is removed.
2024-01-31 23:49:21 +02:00
Lubomir I. Ivanov
b5bffb6d97 kubeadm: add v1beta4.ClusterConfiguration.EncryptionAlgorithm
Add v1beta4.ClusterConfiguration.EncryptionAlgorithm field (string)
and allow the user to configure the cluster asymetric encryption
algorithm to be either "RSA" (default, 2048 pkey size) or "ECDSA" (P-256).
Add validation and fuzzing. Conversion from v1beta3 is not required
because an empty field value is accepted and defaulted to RSA if needed.

Leverage the existing configuration option (feature gate) PublicKeysECDSA
but rename the backend fields, arguments, function names to be more
generic - EncryptionAlgorithm instead of PublicKeyAlgorithm.
That is because once the feature gate is enabled the algorithm
configuration also applies to private keys. It also uses the kubeadm API
type (string) instead of the x509.PublicKeyAlgorithm enum (int).

Deprecate the PublicKeysECDSA feature gate with a message.
It should be removed with the release of v1beta4 or maximum one release
later (it is an alpha FG).
2023-09-21 11:48:48 +03:00
SataQiu
170d5ef9fa code cleanup for kubeadm 2023-04-26 23:51:39 +08:00
jiepeng
211e0a6496 simplified regexp 2022-09-07 15:51:36 +08:00
Lubomir I. Ivanov
518fa1a412 kubeadm: add more *rsa.key files in util/pkiutil/testing/testdata
Running "go test ./cmd/kubeadm/app/..." results in these 3 files
being generated, since we have more callers to the functions
for generating unique private keys during pkiutil tests.

Add the files to ensure they are not generated locally all the time.
2021-05-11 22:58:38 +03:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Jordan Liggitt
8761972f68 Use private key fixtures for kubeadm unit tests 2021-02-01 10:06:10 -05:00