-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolicy-check-certexpiration.yaml
31 lines (27 loc) · 1.1 KB
/
policy-check-certexpiration.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
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 1 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname"
# oc create secret tls expcert --cert=cert.pem --key=key.pem
apiVersion: policy.open-cluster-management.io/v1
kind: Policy
metadata:
name: policy-flag-expiring-certificate
namespace: openshift-acm-policies
annotations:
policy.open-cluster-management.io/categories: AC Access Control, SC System and Communications Protection
policy.open-cluster-management.io/standards: NIST SP 800-53
policy.open-cluster-management.io/controls: AC-3 Access Enforcement, SC-8 Transmission Confidentiality and Integrity
spec:
disabled: false
remediationAction: inform
policy-templates:
- objectDefinition:
apiVersion: policy.open-cluster-management.io/v1
kind: CertificatePolicy
metadata:
name: policy-certificate
spec:
namespaceSelector:
include:
- "*"
remediationAction: inform
severity: medium
minimumDuration: 300h