@@ -240,6 +240,102 @@ in a new Artifact. When the field is set to `false` or removed, it will resume.
240240For practical information, see
241241[suspending and resuming](#suspending-and-resuming).
242242
243+ # ## Verification
244+
245+ **Note:** This feature is available only for Helm charts fetched from an OCI Registry.
246+
247+ ` .spec.verify` is an optional field to enable the verification of [Cosign](https://github.com/sigstore/cosign)
248+ signatures. The field offers two subfields :
249+
250+ - ` .provider` , to specify the verification provider. Only supports `cosign` at present.
251+ - ` .secretRef.name` , to specify a reference to a Secret in the same namespace as
252+ the HelmChart, containing the Cosign public keys of trusted authors.
253+
254+ ` ` ` yaml
255+ ---
256+ apiVersion: source.toolkit.fluxcd.io/v1beta2
257+ kind: HelmChart
258+ metadata:
259+ name: podinfo
260+ spec:
261+ verify:
262+ provider: cosign
263+ secretRef:
264+ name: cosign-public-keys
265+ ` ` `
266+
267+ When the verification succeeds, the controller adds a Condition with the
268+ following attributes to the HelmChart's `.status.conditions` :
269+
270+ - `type : SourceVerified`
271+ - `status : " True" `
272+ - ` reason: Succeeded`
273+
274+ # ### Public keys verification
275+
276+ To verify the authenticity of HelmChart hosted in an OCI Registry, create a Kubernetes
277+ secret with the Cosign public keys :
278+
279+ ` ` ` yaml
280+ ---
281+ apiVersion: v1
282+ kind: Secret
283+ metadata:
284+ name: cosign-public-keys
285+ type: Opaque
286+ data:
287+ key1.pub: <BASE64>
288+ key2.pub: <BASE64>
289+ ` ` `
290+
291+ Note that the keys must have the `.pub` extension for Flux to make use of them.
292+
293+ Flux will loop over the public keys and use them verify a HelmChart's signature.
294+ This allows for older HelmCharts to be valid as long as the right key is in the secret.
295+
296+ # ### Keyless verification
297+
298+ For publicly available HelmCharts, which are signed using the
299+ [Cosign Keyless](https://github.com/sigstore/cosign/blob/main/KEYLESS.md) procedure,
300+ you can enable the verification by omitting the `.verify.secretRef` field.
301+
302+ Example of verifying HelmCharts signed by the
303+ [Cosign GitHub Action](https://github.com/sigstore/cosign-installer) with GitHub OIDC Token :
304+
305+ ` ` ` yaml
306+ apiVersion: source.toolkit.fluxcd.io/v1beta2
307+ kind: HelmChart
308+ metadata:
309+ name: podinfo
310+ spec:
311+ interval: 5m
312+ reconcileStrategy: ChartVersion
313+ sourceRef:
314+ kind: HelmRepository
315+ name: podinfo
316+ version: ">=6.1.6"
317+ verify:
318+ provider: cosign
319+ ` ` `
320+
321+ ` ` ` yaml
322+ ---
323+ apiVersion: source.toolkit.fluxcd.io/v1beta2
324+ kind: HelmRepository
325+ metadata:
326+ name: podinfo
327+ spec:
328+ interval: 1m0s
329+ url: oci://ghcr.io/stefanprodan/charts
330+ type: "oci"
331+ ` ` `
332+
333+ The controller verifies the signatures using the Fulcio root CA and the Rekor
334+ instance hosted at [rekor.sigstore.dev](https://rekor.sigstore.dev/).
335+
336+ Note that keyless verification is an **experimental feature**, using
337+ custom root CAs or self-hosted Rekor instances are not currently supported.
338+
243339# # Working with HelmCharts
244340
245341# ## Triggering a reconcile
0 commit comments