forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIS 1.2.34: update api_server_encryption_provider_cipher
- Loading branch information
Matt Rogers
committed
Jan 25, 2021
1 parent
ebba138
commit 6ef0dd8
Showing
4 changed files
with
56 additions
and
18 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...ications/openshift/api-server/api_server_encryption_provider_cipher/kubernetes/shared.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# platform = multi_platform_ocp | ||
apiVersion: config.openshift.io/v1 | ||
kind: APIServer | ||
metadata: | ||
name: cluster | ||
spec: | ||
encryption: | ||
type: aescbc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
.../openshift/api-server/api_server_encryption_provider_cipher/tests/ocp4/e2e-remediation.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# | ||
# This waits for etcd encryption to be enabled. The operator can apply the | ||
# remediation, but waiting for this to get applied is still something that | ||
# needs to be done outside of the operator. | ||
# | ||
# This patch sets the encryption setting and waits for it to be applied | ||
|
||
while true; do | ||
status=$(oc get openshiftapiserver -o=jsonpath='{range .items[0].status.conditions[?(@.type=="Encrypted")]}{.reason}') | ||
|
||
echo "Current Encryption Status:" | ||
oc get openshiftapiserver -o=jsonpath='{range .items[0].status.conditions[?(@.type=="Encrypted")]}{.reason}{"\n"}{.message}{"\n"}' | ||
|
||
if [ "$status" == "EncryptionCompleted" ]; then | ||
exit 0 | ||
fi | ||
|
||
sleep 5 | ||
done |
3 changes: 3 additions & 0 deletions
3
applications/openshift/api-server/api_server_encryption_provider_cipher/tests/ocp4/e2e.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
default_result: FAIL | ||
result_after_remediation: PASS |