-
Notifications
You must be signed in to change notification settings - Fork 44
Rebase to Amazon Linux 2023 and enable FIPS #125
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
base: develop
Are you sure you want to change the base?
Conversation
Upgrade the base image from Amazon Linux 2 to Amazon Linux 2023 for improved security, performance, and long-term support. Signed-off-by: Maher Homsi <[email protected]>
This change ensures cgroup consistency between the Bottlerocket host system and the admin container, preventing resource management conflicts. The implementation synchronizes cgroup configurations between the host and admin container. Signed-off-by: Maher Homsi <[email protected]>
This change updates bash from 5.1.16 to 5.2.15. Signed-off-by: Maher Homsi <[email protected]>
Add FIPS 140-2 cryptographic module support to ensure compliance with federal security standards. The change includes FIPS-approved algorithms and proper key management to meet certification requirements. Signed-off-by: Maher Homsi <[email protected]>
e020c0e to
b053194
Compare
39e81ae to
f789d98
Compare
Signed-off-by: Maher Homsi <[email protected]>
f789d98 to
0b10ea1
Compare
| @@ -1,16 +1,16 @@ | |||
| ################################################################################ | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for your commit messages please break lines at 75 characters
| export XDG_RUNTIME_DIR="/run/user/${UID}" | ||
| mkdir -p /run/systemd/system "${XDG_RUNTIME_DIR}" | ||
| exec /usr/lib/systemd/systemd "${systemd_options[@]}" --user --unit=admin.target | ||
| exec /usr/lib/systemd/systemd "${systemd_options[@]}" --user --unit=admin.target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are missing a new line at the end of this file.
| # https://ftp.gnu.org/gnu/bash/bash-5.1.16.tar.gz | ||
| SHA512 (bash-5.1.16.tar.gz) = a32a343b6dde9a18eb6217602655f72c4098b0d90f04cf4e686fb21b81fc4ef26ade30f7226929fbb7c207cde34617dbad2c44f6103161d1141122bb31dc6c80 | ||
| # https://ftp.gnu.org/gnu/bash/bash-5.2.15.tar.gz | ||
| SHA512 (bash-5.2.15.tar.gz) = 08a67f6da4af7a75ff2b2d5a9eb8fc46d8c6e9ae80ccaf73b51736d6609916861b1f3fced938ce3ea16d014edb324e1a3d8e03f4917f68dc56ffb665316f26c7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, you are missing a newline
| mkdir -p "${SSH_HOST_KEY_DIR}" | ||
| for key_alg in rsa ecdsa ed25519; do | ||
| # Skip ED25519 in FIPS mode as it's not allowed | ||
| key_algorithms=(rsa ecdsa) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the default size of the RSA key? It must be >= 2048 bits. And for ECDSA, make sure you use FIPS curve.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like for RSA its 3072 bits (changed from 2048 in OpenSSH 8.2). ECSDA defaults to P-256 which is a FIPS curve. Of course if we wanted to be extra sure we could set these explicitly to avoid changes in behavior.
Issue number:
#109, #113
Description of changes:
This PR modernizes the admin container with three key improvements:
Base image upgrade from Amazon Linux 2 to AL2023 and bash updated to 5.2.15. Removed legacy configuration from the Dockerfile that is no longer required.
FIPS 140 enabled for environments requiring federal cryptographic standards. Implements proper FIPS-approved algorithms and key management protocols.
Enabled cgroupv2 compatibility and removed previous patches needed for cgroupv2 availability. Added cgroup synchronization between host and container.
Testing Done
Image compatibility: Validated builds and launches on Bottlerocket Kubernetes and metal-dev instances
Able to connect to metal-dev instance and ssh into the admin container
glibc Version: 2.34 - compatible with AL2023
systemd Version: 252 (AL2023)
Serial Console: ARM serial ports (/dev/ttyAMA0) accessible
AL2023 functionality: Confirmed all Amazon Linux 2023 commands operate correctly within the admin container
FIPS compliance: Verified FIPS-relevant flags are present in admin container on FIPS-enabled AMIs
Bash version: Confirmed bash 5.2.15 installation and functionality
Cgroup synchronization: Validated cgroup versions match between host system and container
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.