Last active
June 23, 2022 05:26
-
-
Save ralvares/75aee4f06c489d713700dafff6f06e8b to your computer and use it in GitHub Desktop.
policy-anyuid-root-user
This file contains hidden or 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
apiVersion: policy.open-cluster-management.io/v1 | |
kind: Policy | |
metadata: | |
name: policy-anyuid-status | |
namespace: default | |
annotations: | |
policy.open-cluster-management.io/categories: AC Access Control | |
policy.open-cluster-management.io/controls: AC-3 Access Enforcement | |
policy.open-cluster-management.io/standards: NIST SP 800-53 | |
spec: | |
disabled: false | |
policy-templates: | |
- objectDefinition: | |
apiVersion: policy.open-cluster-management.io/v1 | |
kind: ConfigurationPolicy | |
metadata: | |
name: policy-rolebinding-anyuid-status | |
spec: | |
namespaceSelector: | |
exclude: | |
- kube-* | |
- openshift* | |
- open-management* | |
- rhacs* | |
- stackrox* | |
include: | |
- "*" | |
object-templates: | |
- complianceType: mustnothave | |
objectDefinition: | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
name: system:openshift:scc:anyuid | |
roleRef: | |
name: system:openshift:scc:anyuid | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
subjects: | |
- name: default | |
apiGroup: rbac.authorization.k8s.io | |
kind: ServiceAccount | |
remediationAction: inform | |
severity: high | |
remediationAction: inform | |
--- | |
apiVersion: apps.open-cluster-management.io/v1 | |
kind: PlacementRule | |
metadata: | |
name: policy-anyuid-status-placement | |
namespace: default | |
spec: | |
clusterConditions: | |
- status: "True" | |
type: ManagedClusterConditionAvailable | |
clusterSelector: | |
matchExpressions: | |
- key: env | |
operator: In | |
values: | |
- prod | |
--- | |
apiVersion: policy.open-cluster-management.io/v1 | |
kind: PlacementBinding | |
metadata: | |
name: policy-anyuid-status-placement | |
namespace: default | |
placementRef: | |
name: policy-anyuid-status-placement | |
apiGroup: apps.open-cluster-management.io | |
kind: PlacementRule | |
subjects: | |
- name: policy-anyuid-status | |
apiGroup: policy.open-cluster-management.io | |
kind: Policy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment