8000 CIS 1.2.21: Ensure that the metrics are protected by RBAC by jhrozek · Pull Request #6594 · ComplianceAsCode/content · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

CIS 1.2.21: Ensure that the metrics are protected by RBAC #6594

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

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions applications/openshift/api-server/api_server_profiling/rule.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
prodtype: ocp4

title: 'Profiling is protected by RBAC'

description: |-
Ensure that the cluster-debugger cluster role includes the /metrics
resource URL. This demonstrates that profiling is protected by RBAC, with a
specific cluster role to allow access.

rationale: |-
Profiling allows for the identification of specific performance bottlenecks.
It generates a significant amount of program data that could potentially be
exploited to uncover system and program details.
To ensure the collected data is not exploited, profiling endpoints are secured
via RBAC (see cluster-debugger role). By default, the profiling endpoints are
accessible only by users bound to cluster-admin or cluster-debugger role.
Profiling can not be disabled.

identifiers:
cce@ocp4: CCE-84212-0

references:
cis: 1.2.21

severity: medium

ocil_clause: |-
The <tt>cluster-debugger</tt> role isn't protecting <tt>/metrics</tt>

ocil: |-
To verify that the <tt>cluster-debugger</tt> role is configured correctly,
run the following command:
<pre>$ oc get clusterroles cluster-debugger -o jsonpath='{.rules[0].nonResourceURLs}'</pre>
and verify that the <tt>/metrics</tt> path is included there.

warnings:
- general: |-
{{{ openshift_cluster_setting("/apis/rbac.authorization.k8s.io/v1/clusterroles/cluster-debugger") | indent(4) }}}

template:
name: yamlfile_value
vars:
ocp_data: "true"
filepath: /apis/rbac.authorization.k8s.io/v1/clusterroles/cluster-debugger
yamlpath: '.rules[0].nonResourceURLs[:]'
entity_check: 'at least one'
values:
- value: '\/metrics'
operation: 'pattern match'
entity_check: 'at least one'
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
default_result: PASS
4 changes: 1 addition & 3 deletions ocp4/profiles/cis.profile
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ selections:
# 1.2.20 Ensure that the --secure-port argument is not set to 0
- api_server_bind_address
# 1.2.21 Ensure that the --profiling argument is set to false
# (jhrozek): This rule should temporarily be commented out as OCP diverges from CIS
# and we need to improve our reply to this control
# - api_server_profiling
- api_server_profiling_protected_by_rbac
# 1.2.22 Ensure that the --audit-log-path argument is set
- api_server_audit_log_path
- openshift_api_server_audit_log_path
Expand Down
1 change: 0 additions & 1 deletion shared/references/cce-redhat-avail.txt
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ CCE-84203-9
CCE-84205-4
CCE-84206-2
CCE-84210-4
CCE-84212-0
CCE-84213-8
CCE-84214-6
CCE-84215-3
Expand Down
0