-
Notifications
You must be signed in to change notification settings - Fork 275
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
Terraform Standalone Use Case: Hardened #4768
Comments
The approach on this one will be to enable immutable infrastructure:
|
focus on RHEL as first hardened OS |
The CIS Benchmarks appear to be the standard for how to achieve the hardened OS, CIS also provides custom AMIs on AWS that are pre-configured for their benchmarks. The STIG benchmark for RHEL is the one which we should use for servers. There is also a distribution independent benchmark that we might use for other server types, it contains multiple levels of suggestions, look for the "server - level 2" suggestions. |
To harden RKE2 on Rhel8 we should be able to get by with setting the cis config as follows along with adding a user for etcd and setting the small script to enable cis conf:
example cis profile enabled rke2 config:
This requires enabling an extra config on top of what is necessary for clustering, adding the ability to inject a script to prep the OS for running rke2 after install, but before first start. |
Enabling the RHEL8 STIG AMI: rancher/terraform-aws-server#20 |
The changes there will need to be propagated to the install and rke2 modules and their examples. |
Propagate CIS to install module with example cis configuration: rancher/terraform-null-rke2-install#51 |
I am currently working on adding a local repo to the server to enable air-gapped rpm installs with selinux enforcing on the CIS AMI. |
Status
|
the latest changes to aws-rke2 module include:
Next up:
|
Prioritizing by difficulty/time consumption:
|
|
These are not small items unfortunately, it will take me some time to get these things figured out. In the mean time here is a repo showing how to get everything else running: This has a full IAC of an RKE2 node with an airgapped server that you can only access via the AWS serial console. It deploys a "prototype" server which has access to download the things it needs before shutting down and getting turned into an image. |
State is stored encrypted in the repo, as well as all of the access necessary for the CI to deploy. |
CI access is created before every run and destroyed at the end making it very limited. CI never has access to production servers (they don't have public IP addresses). |
I am going to move this issue to our backlog as I don't have a clear timeline. |
This now aligns with #5541. |
Dualstack and SLE micro are being propagated through the system, next challenge is the embedded registry. |
This tracks progress on satisfying a hardened RKE2 use case.
We will need to harden the OS
We will need to follow the hardening guide for RKE2: https://docs.rke2.io/security/hardening_guide
The text was updated successfully, but these errors were encountered: