source-controller icon indicating copy to clipboard operation
source-controller copied to clipboard

Add support for Insecure in cosign verifier

Open souleb opened this issue 3 years ago • 1 comments

We cannot connect to insecure (plain http) registries with the cosign verifier because cosign does not propagate the insecure flag from their RegistryOptions to the name.Registry scheme, so it stays on HTTPS (when the host is not localhost).

This needs to be adressed on cosign first, see https://github.com/sigstore/cosign/issues/2290.

souleb avatar Sep 28 '22 08:09 souleb

I'd like to take this on cosign side. ☝️

developer-guy avatar Oct 05 '22 11:10 developer-guy

Hi @souleb, the PR^1 on cosign side seems to be merged; what will be the next step ☝️

developer-guy avatar Oct 24 '22 07:10 developer-guy

We need to wait for this to be included in a cosign release, then test if it really works and remove the condition where we error out when verifying with insecure.

stefanprodan avatar Oct 24 '22 07:10 stefanprodan

To complete @stefanprodan comment, we error out here https://github.com/fluxcd/source-controller/blob/main/controllers/ocirepository_controller.go#L405.

Then it's just a matter of passing the insecure option when creating the verifier options.

souleb avatar Oct 24 '22 12:10 souleb

kindly ping @souleb @stefanprodan ☝️

developer-guy avatar Dec 10 '22 12:12 developer-guy

I think this still has not been released. I seems to be targeting v1.14.0 in cosign.

souleb avatar Dec 11 '22 12:12 souleb

I think this still has not been released. I seems to be targeting v1.14.0 in cosign.

This is now merged.

souleb avatar Feb 19 '23 07:02 souleb

kindly ping, I can take care of this one, I think, it will be resolved once we upgrade cosign dep on Flux side.

developer-guy avatar Apr 09 '23 19:04 developer-guy

@developer-guy I think there is an opportunity to add this to #1103

souleb avatar May 22 '23 15:05 souleb

Now that we've updated Cosign to 2.1 we can map Cosign's AllowHTTP to our insecure flag.

stefanprodan avatar Jun 27 '23 07:06 stefanprodan