-
Notifications
You must be signed in to change notification settings - Fork 49
/
restrict-creation-with-default-serviceaccount.yaml
32 lines (32 loc) · 1.86 KB
/
restrict-creation-with-default-serviceaccount.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
# Copyright 2024 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: K8sBlockCreationWithDefaultServiceAccount
metadata:
name: pci-dss-v4.0-restrict-creation-with-default-serviceaccount
labels:
policycontroller.gke.io/bundleName: pci-dss-v4.0
annotations:
policycontroller.gke.io/bundleVersion: "202403.0"
policycontroller.gke.io/constraintData: |-
"{
bundleName: 'pci-dss-v4.0',
bundleDisplayName: 'PCI DSS v4.0',
bundleLink: 'https://cloud.google.com/anthos-config-management/docs/how-to/using-pci-dss-v4',
bundleVersion: '202403.0',
bundleDescription: 'Use the PCI DSS v4.0 policy bundle with Policy Controller to evaluate the compliance of your cluster resources against some aspects of the Payment Card Industry (PCI) Data Security Standard (DSS) v4.0.',
controlNumbers: '[2.2.2]',
severity: 'UNSPECIFIED',
description: 'Restricts the creation of resources using a default service account. Has no effect during audit.',
remediation: 'Cannot create resources using a default service account. Use a different account. See "Configure Service Accounts" for more information: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/',
minimumTemplateLibraryVersion: '1.14.0',
constraintHash: '6a8d6c1f91d334337012e02564efc999b80bb7a2802bd2c1d06f13ee91c95465'
}"
spec:
enforcementAction: dryrun