forked from GoogleCloudPlatform/gke-policy-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblock-secrets-of-type-basic-auth.yaml
39 lines (39 loc) · 1.72 KB
/
block-secrets-of-type-basic-auth.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Copyright 2023 Google LLC
#
# This is “Software” that is licensed under the “General Software” section of
# the Service Specific Terms (https://cloud.google.com/terms/service-terms) for
# usage in accordance with the following “Scope of Use”: This file may only be
# used on an Anthos cluster, including any associated ci/cd use. “Anthos
# cluster” is defined as “A Cluster (of any kind) registered to a fleet project
# where the Anthos API is enabled”.
apiVersion: constraints.gatekeeper.sh/v1beta1
kind: K8sBlockObjectsOfType
metadata:
name: nist-sp-800-190-block-secrets-of-type-basic-auth
labels:
policycontroller.gke.io/bundleName: nist-sp-800-190
annotations:
policycontroller.gke.io/constraintData: |-
"{
bundleName: 'nist-sp-800-190',
bundleDisplayName: 'NIST SP 800-190',
bundleLink: 'https://cloud.google.com/anthos-config-management/docs/how-to/using-nist-sp-800-190',
bundleVersion: '202307.0',
bundleDescription: 'Use the NIST SP 800-190 policy bundle with Policy Controller to evaluate the compliance of your cluster resources against some aspects of the NIST SP 800-190 Appendix B controls.',
controlNumbers: '[CM-3,CM-6,AC-4,SI-7]',
severity: 'UNASSIGNED',
description: 'Restricts the use of basic-auth type secrets.',
remediation: 'Cannot use basic-auth type secrets. Use an alternative. See "Secrets" for more information: https://kubernetes.io/docs/concepts/configuration/secret/',
minimumTemplateLibraryVersion: '1.14.0'
}"
spec:
enforcementAction: dryrun
match:
kinds:
- apiGroups:
- ""
kinds:
- Secret
parameters:
forbiddenTypes:
- kubernetes.io/basic-auth