-
Notifications
You must be signed in to change notification settings - Fork 709
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 patch-1
- Loading branch information
Showing
946 changed files
with
11,828 additions
and
3,567 deletions.
There are no files selected for viewing
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
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
18 changes: 11 additions & 7 deletions
18
...cations/openshift/api-server/api_server_api_priority_flowschema_catch_all/oval/shared.xml
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
67 changes: 67 additions & 0 deletions
67
applications/openshift/api-server/api_server_api_priority_v1_flowschema_catch_all/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,67 @@ | ||
documentation_complete: true | ||
|
||
title: 'Ensure catch-all FlowSchema object for API Priority and Fairness Exists' | ||
|
||
description: |- | ||
Using <tt>APIPriorityAndFairness</tt> feature provides a fine-grained way | ||
to control the behaviour of the Kubernetes API server in an overload | ||
situation. The well-known FlowSchema <tt>catch-all</tt> should be available | ||
to make sure that every request gets some kind of classification. By default, | ||
the <tt>catch-all</tt> priority level only allows one concurrency share and | ||
does not queue requests. To inspect all the <tt>FlowSchema</tt> objects, run: | ||
<pre>oc get flowschema</pre> | ||
To inspect the well-known <tt>catch-all</tt> object, run the following: | ||
<pre>oc describe flowschema catch-all</pre> | ||
rationale: |- | ||
The <tt>FlowSchema</tt> API objects enforce a limit on the | ||
number of events that the API Server will accept in a given time slice | ||
In a large multi-tenant cluster, there might be a small percentage of | ||
misbehaving tenants which could have a significant impact on the | ||
performance of the cluster overall. It is recommended to limit the rate | ||
of events that the API Server will accept. | ||
identifiers: | ||
cce@ocp4: CCE-86097-3 | ||
|
||
platforms: | ||
- ocp4.16 | ||
|
||
severity: medium | ||
|
||
references: | ||
cis@ocp4: 1.2.10 | ||
nerc-cip: CIP-003-8 R6,CIP-004-6 R3,CIP-007-3 R6.1 | ||
nist: CM-6,CM-6(1) | ||
pcidss: Req-2.2 | ||
srg: SRG-APP-000516-CTR-001325 | ||
|
||
ocil_clause: 'A FlowSchema object <tt>catch-all</tt> exists' | ||
|
||
ocil: |- | ||
Run the following commands: | ||
<pre>oc get flowschema</pre> | ||
and inspect the FlowSchema objects. Make sure that at least the <tt>catch-all</tt> | ||
object exists by calling: | ||
<pre>oc describe flowschema catch-all</pre> | ||
warnings: | ||
- general: |- | ||
{{{ openshift_cluster_setting("/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/catch-all", true) | indent(4) }}} | ||
- dependency: |- | ||
Note that this is only applicable in OpenShift Container Platform version 4.16 | ||
and higher | ||
template: | ||
name: yamlfile_value | ||
vars: | ||
ocp_data: "true" | ||
filepath: "/apis/flowcontrol.apiserver.k8s.io/v1/flowschemas/catch-all" | ||
yamlpath: '.spec.rules[0].subjects[:].group["name"]' | ||
check_existence: "at_least_one_exists" | ||
entity_check: "at least one" | ||
values: | ||
- value: "system:authenticated" | ||
operation: "pattern match" | ||
check_existence: "at_least_one_exists" | ||
entity_check: "at least one" |
3 changes: 3 additions & 0 deletions
3
.../openshift/api-server/api_server_api_priority_v1_flowschema_catch_all/tests/ocp4/4.16.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: PASS | ||
|
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
3 changes: 3 additions & 0 deletions
3
...shift/api-server/api_server_api_priority_v1beta2_flowschema_catch_all/tests/ocp4/4.14.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: PASS | ||
|
3 changes: 3 additions & 0 deletions
3
...shift/api-server/api_server_api_priority_v1beta2_flowschema_catch_all/tests/ocp4/4.15.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: PASS | ||
|
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
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
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
16 changes: 16 additions & 0 deletions
16
applications/openshift/authentication/var_oauth_token_maxage.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,16 @@ | ||
documentation_complete: true | ||
|
||
title: 'OAuth Token Maximum Age' | ||
|
||
description: 'Enter OAuth Token Maximum Age Timeout' | ||
|
||
type: number | ||
|
||
operator: equals | ||
|
||
interactive: true | ||
|
||
options: | ||
default: 86400 | ||
24h: 86400 | ||
8h: 28800 |
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
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
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
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
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
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
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
Oops, something went wrong.