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
On Linux® and macOS: The default configuration for the signing tools is to store the signatures locally. Storing signatures locally can lead to signature verification failure because the signature is not in the registry. To fix this problem, you can modify or delete the configuration file. On Linux®, the configuration is saved in /etc/containers/registries.d/default.yaml. On macOS, the configuration file is saved in /usr/local/etc/containers/registries.d/default.yaml. If you sign images in your container registry, yet your deployments are failing with the message `policy denied the request: A signature was required, but no signature exists`, then the default configuration is likely saving your image signatures locally instead of pushing the signature to the registry API server and you need to modify the tools configuration.
133
+
134
+
135
+
136
+
131
137
### Create image policies
132
138
133
-
Finally, image policies need to be created to instruct Portieris which keys should be used to sign images from specific container registries. These policies can be applied globally to the entire cluster using a `ClusterImagePolicy`, or to a specific namespace using an `ImagePolicy`. In those policies, rules can be defined for enforcement for specific container registries/namespaces, or globally to all container registries used by the cluster.
139
+
Finally, image policies need to be created to instruct Portieris which keys should be used to sign images from specific container registries. These policies can be applied globally to the entire cluster using a `ClusterImagePolicy`, or to a specific namespace using an `ImagePolicy` resource. In those policies, rules can be defined for enforcement for specific container registries/namespaces, or globally to all container registries used by the cluster.
134
140
135
-
For example, the following `ClusterImagePolicy` enforces a policy that all images in the container registry `icr.io/mynamespace/*` must be signed by the public key that was earlier created and placed into the `image-signing-public-key` cluster secret.
141
+
For example, the following `ClusterImagePolicy` enforces a policy that all images in the container registry `private.us.icr.io/mynamespace/*` must be signed by the public key that was earlier created and placed into the `image-signing-public-key` cluster secret. This policy should be updated for your own registry namespace and images.
136
142
137
143
```yaml
138
144
apiVersion: portieris.cloud.ibm.com/v1
@@ -141,15 +147,17 @@ metadata:
141
147
name: mynamespace-cluster-image-policy
142
148
spec:
143
149
repositories:
144
-
- name: "icr.io/mynamespace/*"
150
+
- name: "private.us.icr.io/mynamespace/*"
145
151
policy:
152
+
mutateImage: false
146
153
simple:
147
154
requirements:
148
155
- type: "signedBy"
149
156
keySecret: image-signing-public-key
150
157
```
151
158
152
-
More information about policies and enforcement can be found in the [Portieris Policies documentation](https://github.com/IBM/portieris/blob/master/POLICIES.md)
159
+
This policy also uses the `mutateImage:false` configuration so that the GitOps operations using ArgoCD do not enter an infinite loop due to mutated image paths.
160
+
More information about [policies and enforcement](https://github.com/IBM/portieris/blob/master/POLICIES.md) and [image mutation](https://github.com/IBM/portieris#image-mutation-option) can be found in the Portieris Policies documentation.
0 commit comments