You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrity Shield Operator Update to 0.3.0 in OperatorHub.io (#37)
* Operator update (#1)
* Prepare for Operatorhub.io submission, fixed Makefile,scripts for generating bundle for local olm test, generated new bundle
* Prepare for Operatorhub.io submission: fixed previous version, replaces in CSV
* Prepare for Operatorhub.io submission: changed to operator-sdk version v1.10.1 to deal validation test issue
* Prepare for Operatorhub.io submission: fixed makefile
* Operator update (#2)
* Prepare for Operatorhub.io submission, fixed Makefile,scripts for generating bundle for local olm test, generated new bundle
* Prepare for Operatorhub.io submission: fixed previous version, replaces in CSV
* Prepare for Operatorhub.io submission: changed to operator-sdk version v1.10.1 to deal validation test issue
* Prepare for Operatorhub.io submission: fixed makefile
* Prepare for Operatorhub.io submission: fixed scripts and odoc
* Prepare for Operatorhub.io submission: fixed script
* Operator update (#3)
* Prepare for Operatorhub.io submission, fixed Makefile,scripts for generating bundle for local olm test, generated new bundle
* Prepare for Operatorhub.io submission: fixed previous version, replaces in CSV
* Prepare for Operatorhub.io submission: changed to operator-sdk version v1.10.1 to deal validation test issue
* Prepare for Operatorhub.io submission: fixed makefile
* Prepare for Operatorhub.io submission: fixed scripts and odoc
* Prepare for Operatorhub.io submission: fixed script
* Prepare for Operatorhub.io submission: fixed docs
* Integrity Shield Operator Update to 0.3.0 in OperatorHub.io (#4)
* Prepare for Operatorhub.io submission, fixed makefile, scripts
* Integrity Shield Operator Update to 0.3.0 in OperatorHub.io (#5)
* Prepare for Operatorhub.io submission: fixed script
* Prepare for Operatorhub.io submission: update csv with latest doc (#6)
* Integrity Shield Operator Update to 0.3.0 in OperatorHub.io (#7)
* Prepare for Operatorhub.io submission: update csv with latest doc
* Prepare for Operatorhub.io submission: update csv with latest doc and fixed make bundle script
* Integrity Shield Operator Update to 0.3.0 in OperatorHub.io Prepare bundle (#8)
* Prepare for Operatorhub.io submission: update csv with latest doc
* Prepare for Operatorhub.io submission: update csv with latest doc and fixed make bundle script
* Prepare for Operatorhub.io submission: fixed csv
* Integrity Shield Operator Update to 0.3.0 in OperatorHub.io Prepare bundle (#9)
* Prepare for Operatorhub.io submission: update csv with latest doc
* Prepare for Operatorhub.io submission: update csv with latest doc and fixed make bundle script
* Prepare for Operatorhub.io submission: fixed csv
* Prepare for Operatorhub.io submission: fixed csv
Kubernetes resources are represented as YAML files, which are applied to clusters when you create and update the resource. The YAML content is designed carefully to achieve the application desired state and should not be tampered with. If the YAML content is modified maliciously or accidentally, and applied to a cluster without notice, the cluster moves to an unexpected state.
95
95
96
-
K8s Integrity Shield is a tool for built-in preventive integrity control for regulated cloud workloads. It includes signature based configuration drift prevention based on Admission Webhook on Kubernetes cluster.
96
+
[K8s Integrity Shield](https://github.com/open-cluster-management/integrity-shield) provides preventive control for enforcing signature verification for any requests to create or update resources. This operator supports the installation and management of K8s Integrity Shield on cluster.
97
97
98
-
K8s Integrity Shield's capabilities are
98
+
Two modes are selectively enabled on your cluster.
99
+
- Enforce (Admission Control): Block to deploy unauthorized Kubernetes resources. K8s Integrity Shield works with [OPA/Gatekeeper](https://github.com/open-policy-agent/gatekeeper) to enable admission control based on signature verification for Kubernetes resources.
100
+
- Detect (Continuous Monitoring): monitor Kubernetes resource integrity and report if unauthorized Kubernetes resources are deployed on cluster
99
101
100
-
- Allow to deploy authorized application pakcages only
101
-
- Allow to use signed deployment params only
102
-
- Zero-drift in resource configuration unless whitelisted
103
-
- Perform all integrity verification on cluster (admission controller, not in client side)
104
-
- Handle variations in application packaging and deployment (Helm /Operator /YAML / OLM Channel) with no modification in app installer
102
+
X509, PGP and Sigstore signing are supported for singing Kubernetes manifest YAML. K8s Integrity Shield supports Sigstore signing by using [k8s-manifest-sigstore](https://github.com/sigstore/k8s-manifest-sigstore).
105
103
106
104
## Preparations before installation
107
105
108
-
Two preparations on cluster below must be completed before installation.
106
+
OPA/Gatekeeper should be deployed before installing K8s Integrity Shield.
107
+
The installation instructions to deploy OPA/Gatekeeper components is [here](https://open-policy-agent.github.io/gatekeeper/website/docs/install/).
109
108
110
-
1. Create a namespace `integrity-shield-operator-system`.
111
109
112
-
2. Create secret to register signature verification key.
110
+
## Installation
111
+
Install K8s Integrity Shield Operator by following the instruction after clicking Install button at the top right. Then you can create the operator Custom Resource `IntegrityShield` to complete installation.
113
112
113
+
If you want to change the settings such as default run mode (detection/enforcement) or audit interval, please check [here](https://github.com/open-cluster-management/integrity-shield/blob/master/docs/README_ISHIELD_OPERATOR_CR.md).
114
114
115
-
See the following example to register public verification key from your signing host. As default, export public verification key to file "pubring.gpg" and create secret "keyring-secret" on cluster by the following command. (You can define any other name in CR if you want. See [doc](README_SIGNER_CONFIG.md))
Default CR already includes signer configuration with filename "pubring.gpg" and secret name "keyring-secret", so all you need is to create a secret resource.
126
-
127
-
128
-
## How to protect resources with signature
129
-
130
-
After installation, you can configure cluster to protect resources from creation and changes without signature.
131
-
132
-
For enabling protection, create a custom resource `ResourceSigningProfile` (RSP) that defines which resource(s) should be protected, in the same namespace as resources.
133
-
134
-
Here is an example of creating RSP for protecting resources in a namespace `secure-ns`.
135
-
136
-
```
137
-
$ cat <<EOF | oc apply -n secure-ns -f -
138
-
apiVersion: apis.integrityshield.io/v1alpha1
139
-
kind: ResourceSigningProfile
140
-
metadata:
141
-
name: sample-rsp
142
-
spec:
143
-
protectRules:
144
-
- match:
145
-
- kind: ConfigMap
146
-
- kind: Deployment
147
-
- kind: Service
148
-
EOF
149
-
150
-
resourcesigningprofile.apis.integrityshield.io/sample-rsp created
151
-
```
152
-
153
-
After creating the RSP above, any resources of kinds configmap, deployment, and service can not be created or modified without valid signature.
154
-
155
-
For example, let's see what happens when creating configmap below without signature.
156
-
157
-
```
158
-
cat << EOF > /tmp/test-cm.yaml
159
-
apiVersion: v1
160
-
kind: ConfigMap
161
-
metadata:
162
-
name: test-cm
163
-
data:
164
-
key1: val1
165
-
key2: val2
166
-
key4: val4
167
-
EOF
168
-
```
169
-
170
-
Creation of configmap is blocked, since no signature is attached to it.
171
-
172
-
```
173
-
$ oc apply -f /tmp/test-cm.yaml -n secure-ns
174
-
Error from server: error when creating "/tmp/test-cm.yaml": admission webhook "ac-server.integrity-shield-operator-system.svc" denied the request: Signature verification is required for this request, but no signature is found. Please attach a valid signature to the annotation or by a ResourceSignature. (Request: {"kind":"ConfigMap","name":"test-cm","namespace":"secure-ns","operation":"CREATE","request.uid":"61f4aabd-df4b-4d12-90e7-11a46ee28cb0","scope":"Namespaced","userName":"IAM#cluser-user"})
175
-
```
176
-
177
-
Event is reported.
178
-
179
-
```
180
-
$ oc get event -n secure-ns --field-selector type=IntegrityShield
181
-
LAST SEEN TYPE REASON OBJECT MESSAGE
182
-
65s IntegrityShield no-signature configmap/test-cm [IntegrityShieldEvent] Result: deny, Reason: "Signature verification is required for this request, but no signature is found. Please attach a valid signature to the annotation or by a ResourceSignature.", Request: {"kind":"ConfigMap","name":"test-cm","namespace":"secure-ns","operation":"CREATE","request.uid":"46cf5fde-2b46-4819-b876-a2998043c8ef","scope":"Namespaced","userName":"IAM#cluser-user"}
183
-
184
-
```
185
-
186
-
### How to sign a resource
187
-
188
-
You can sign resources with the utility script, which is available from our repository. Two prerequisites for using the script on your host.
189
-
190
-
- [yq](https://github.com/mikefarah/yq) command is available.
191
-
- you can sign file with GPG signing key of the signer registered in preparations.
192
-
193
-
For example of singing a YAML file `/tmp/test-cm.yaml` as `[email protected]`, use the utility script as shown below. This script would modify the original input file (`/tmp/test-cm.yaml`) by adding signature, message annotations to it.
Creating configmap with this YAML file should be successful because signature in annotation is valid.
218
-
219
-
```
220
-
$ oc create -f /tmp/test-cm.yaml -n secure-ns
221
-
configmap/test-cm created
222
-
```
126
+
After installation, you can protect Kubernetes resources by following this [document](https://github.com/open-cluster-management/integrity-shield/blob/master/docs/README_GETTING-STARTED-TUTORIAL.md).
223
127
224
-
## Supported Platforms
128
+
## Supported Versions
129
+
### Platform
130
+
K8s Integrity Shield can be deployed with the operator. We have verified the feasibility on the following platforms:
225
131
226
-
K8s Integrity Shield works as Kubernetes Admission Controller using Mutating Admission Webhook, and it can run on any Kubernetes cluster by design.
227
-
We have verified the feasibility on the following platforms:
132
+
- [RedHat OpenShift 4.7.1 and 4.9.0](https://www.openshift.com)
133
+
- [Kuberenetes v1.19.7 and v1.21.1](https://kubernetes.io)
228
134
229
-
- [RedHat OpenShift 4.5 and 4.6](https://www.openshift.com/)
230
-
- [RedHat OpenShift 4.5 on IBM Cloud (ROKS)](https://www.openshift.com/products/openshift-ibm-cloud)
231
-
- [IBM Kuberenetes Service (IKS)](https://www.ibm.com/cloud/container-service/) 1.17.14
0 commit comments