forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ComplianceAsCode:master' into demo-pst
- Loading branch information
Showing
8 changed files
with
285 additions
and
189 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,30 @@ | ||
documentation_complete: true | ||
|
||
title: Configure Recurring Backups For etcd | ||
|
||
description: |- | ||
<p> | ||
Back up your clusters etcd data regularly and store in a secure location ideally outside the OpenShift Container Platform environment. Do not take an etcd backup before the first certificate rotation completes, which occurs 24 hours after installation, otherwise the backup will contain expired certificates. It is also recommended to take etcd backups during non-peak usage hours because the etcd snapshot has a high I/O cost. | ||
</p> | ||
<p> | ||
For more information, follow | ||
{{{ weblink(link="https://docs.openshift.com/container-platform/latest/backup_and_restore/control_plane_backup_and_restore/backing-up-etcd.html#backing-up-etcd-data_backup-etcd", | ||
text="the relevant documentation") }}}. | ||
</p> | ||
rationale: |- | ||
While etcd automatically recovers from temporary failures, issues may arise if an etcd cluster loses more than (N-1)/2 or when an update goes wrong. | ||
Recurring backups of etcd enable you to recover from a disastrous fail. | ||
identifiers: | ||
cce@ocp4: CCE-88188-8 | ||
|
||
references: | ||
bsi: APP.4.4.A5 | ||
|
||
severity: medium | ||
|
||
ocil_clause: 'etcd backup needs review' | ||
|
||
ocil: |- | ||
Ensure, that you have a process in place, that ensures that you do recurring backups for etcd. |
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,2 @@ | ||
--- | ||
default_result: MANUAL |
44 changes: 44 additions & 0 deletions
44
applications/openshift/general/general_backup_solution_installed/rule.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,44 @@ | ||
documentation_complete: true | ||
|
||
title: A Backup Solution Has To Be Installed | ||
|
||
description: |- | ||
Backup and Restore are fundamental practices when it comes to disaster recovery. By utilizing a Backup Software you are able to backup (and restore) data, which is lost, if your cluster crashes beyong recoverability. | ||
There are multiple Backup Solutions on the Market which diverge in Features. Thus some of them might only backup your cluster, others might also be able to backup VMs or PVCs running in your Cluster. | ||
rationale: |- | ||
Backup and Recovery abilities are a necessity to recover from a disaster. | ||
identifiers: | ||
cce@ocp4: CCE-90185-0 | ||
|
||
references: | ||
bsi: APP.4.4.A5 | ||
|
||
severity: medium | ||
|
||
ocil_clause: 'No CRDs from a known backup solution installed' | ||
|
||
ocil: |- | ||
Run the following command to retrieve the customresourcedefinitions objects in the system: | ||
<pre>$ oc crds </pre> | ||
Make sure there is a crd of a backup solution. Also make sure, that the backup solution is properly configured and that you are able to recover from the backups. | ||
You can add your known CRD to the var_backup_solution_crds_regex, to allowlist your own backup solution. | ||
{{% set jqfilter = '[.items[] | if select(.metadata.name | test("{{.var_backup_solution_crds_regex}}"))!=null then true else false end]' %}} | ||
|
||
warnings: | ||
- general: |- | ||
{{{ openshift_filtered_cluster_setting({'/apis/apiextensions.k8s.io/v1/customresourcedefinitions?limit=500': jqfilter}) | indent(4) }}} | ||
template: | ||
name: yamlfile_value | ||
vars: | ||
ocp_data: 'true' | ||
filepath: "{{{ openshift_filtered_path('/apis/apiextensions.k8s.io/v1/customresourcedefinitions?limit=500', jqfilter) }}}" | ||
yamlpath: "[:]" | ||
entity_check: "at least one" | ||
values: | ||
- value: 'true' | ||
type: "string" | ||
entity_check: "at least one" |
3 changes: 3 additions & 0 deletions
3
applications/openshift/general/general_backup_solution_installed/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 | ||
|
15 changes: 15 additions & 0 deletions
15
applications/openshift/general/var_backup_solution_crds_regex.var
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,15 @@ | ||
documentation_complete: true | ||
|
||
title: 'Known CRDs which are provided by backup solutions' | ||
|
||
description: |- | ||
'A regular expression that lists all CRDs that are known to be part of a backup solution' | ||
|
||
type: string | ||
|
||
operator: equals | ||
|
||
interactive: true | ||
|
||
options: | ||
default: '^DataProtectionApplication\\.oadp\\.openshift\\.io$|^backups\\.velero\\.io$|^policies\\.config\\.kio\\.kasten\\.io$' |
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
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