Skip to content

Conversation

@cappyzawa cappyzawa force-pushed the feat/helm-oci-controllers-runtime-secrets-v076 branch from 054ef2b to 5729ede Compare July 28, 2025 16:44
@cappyzawa cappyzawa changed the title Remove insecure parameter from Helm and OCI Repository controllers Enforce TLS certificate verification in Helm/OCI Repository controllers Jul 28, 2025
Name: obj.Spec.CertSecretRef.Name,
}
return secrets.TLSConfigFromSecretRef(ctx, r.Client, secretName, obj.Spec.URL, obj.Spec.Insecure)
return secrets.TLSConfigFromSecretRef(ctx, r.Client, secretName, obj.Spec.URL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, when InsecureSkipVerify: true, we dont even need TLS config from the secret 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if it has client certs?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, for authentication, true

Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

Remove the insecure parameter from TLS configuration function calls to prevent
InsecureSkipVerify from being set when using certificate-based authentication.
This ensures TLS certificate verification is always performed when certificates
are provided, aligning with our security policy.

Updated pkg/runtime to v0.76.0 which no longer accepts the insecure parameter
in TLS configuration functions. For OCIRepository, maintain backward compatibility
by handling the specific case where no certificate is provided and insecure is
explicitly set to true. This is the only allowed exception in Flux controllers.

Signed-off-by: cappyzawa <[email protected]>
@cappyzawa cappyzawa force-pushed the feat/helm-oci-controllers-runtime-secrets-v076 branch from e9464fb to 4b1ace6 Compare July 28, 2025 17:42
@matheuscscp matheuscscp merged commit c43a339 into fluxcd:main Jul 29, 2025
8 checks passed
@cappyzawa cappyzawa deleted the feat/helm-oci-controllers-runtime-secrets-v076 branch July 29, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants