-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ING RKE2-CIS-1.24 CHECKS #1685
ING RKE2-CIS-1.24 CHECKS #1685
Conversation
Saurabh Misra seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
Hi guys! |
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.
@sm171190
I left some comments. Please feel free to correct me. thanks
@@ -318,6 +319,7 @@ groups: | |||
For example, | |||
chmod -R 600 /var/lib/rancher/rke2/server/tls/*.crt | |||
scored: false | |||
type: manual |
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.
it seems this check (1.1.20) is automated by the docs.
and text
field contains a mistake.
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.
@afdesk I was referring to https://docs.rke2.io/security/cis_self_assessment124#1110-ensure-that-the-container-network-interface-file-ownership-is-set-to-root-manual. Here 1.1.10,1.1.20 and 1.1.21 are mentioned as manual
Would you like me to revert the change?
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.
in this doc: 1.1.20 is manual: https://docs.rke2.io/security/cis_self_assessment124#1120-ensure-that-the-kubernetes-pki-certificate-file-permissions-are-set-to-600-or-more-restrictive-manual
but 1.1.21 is automated... https://docs.rke2.io/security/cis_self_assessment124#1121-ensure-that-the-kubernetes-pki-key-file-permissions-are-set-to-600-automated
I'd like to clarify the correct source at first.
@@ -159,6 +159,7 @@ groups: | |||
For example, | |||
chown root:root <path/to/cni/files> | |||
scored: false | |||
type: manual |
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.
it's a bit strange. because the same test for RKE1 is automated.
and audit
shows commands for check...
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.
but it doesn't matter
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.
cfg/rke2-cis-1.24/node.yaml
Outdated
@@ -432,14 +432,14 @@ groups: | |||
- flag: RotateKubeletServerCertificate | |||
path: '{.featureGates.RotateKubeletServerCertificate}' | |||
set: false | |||
type: skip |
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.
I can see that check 1.3.6 isn't applicable for RKE2: the docs
but 4.2.12 is manual check and should pass: 4.2.12 Verify that the RotateKubeletServerCertificate argument is set to true (Manual)
maybe we shouldn't skip it?
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.
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.
@sm171190 could you sign CLA for tests? |
278639e
to
5805d20
Compare
In this change we are making 2 changes: 1. Seom CIS-1.24 checks(1.3.6 , 4.2.12 are not relevant for RKE clusters). So we will skip them. 2. SomeCIS-1.24 tests(1.1.10,1.1.20) are manual checks yet they don't have the type correctly set causing KB to run them with all automated tests.
5805d20
to
ba6cb26
Compare
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.
@sm171190 I'd like your point about this diffs?
what is the reason of these updates? thanks!
@@ -335,6 +337,7 @@ groups: | |||
For example, | |||
chmod -R 600 /var/lib/rancher/rke2/server/tls/*.key | |||
scored: false | |||
type: manual |
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.
based on docs.rke2.io, 1.1.21 is automated: https://docs.rke2.io/security/cis_self_assessment124#1121-ensure-that-the-kubernetes-pki-key-file-permissions-are-set-to-600-automated
Do you think we should ignore it?
@@ -432,6 +432,7 @@ groups: | |||
- flag: RotateKubeletServerCertificate | |||
path: '{.featureGates.RotateKubeletServerCertificate}' | |||
set: false | |||
type: manual |
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.
also it makes sense to update the PR description, and add a link to the docs there. |
just note
|
In this change we are making 2 changes:
Some checks are being skipped(1.3.6,4.2.12)as they are not applicable for an RKE2 cluster
checks 1.3.6 and 4.2.12 check whether the cluster has been configured with the flags to rotate TLS certificates. However, RKE Internally handles certificate rotation : Rotate certificates for RKE2 provisioned clusters rancher/dashboard#4485