Skip to content

Add --insecure-allow-http flag to block insecure HTTP sources - #2119

Open
amarkdotdev wants to merge 1 commit into
fluxcd:mainfrom
amarkdotdev:feat/insecure-allow-http
Open

Add --insecure-allow-http flag to block insecure HTTP sources#2119
amarkdotdev wants to merge 1 commit into
fluxcd:mainfrom
amarkdotdev:feat/insecure-allow-http

Conversation

@amarkdotdev

Copy link
Copy Markdown

Summary

  • Add --insecure-allow-http (default true) via helper.ConnectionOptions (RFC-004 / Create a new flag to block use of HTTP endpoints for sources #806)
  • Block plain HTTP URLs, HTTP proxies, and spec.insecure when the flag is false for GitRepository, HelmRepository (default), HelmChart/OCI HelmRepository, Bucket, and OCIRepository
  • Stall Azure/GCP Buckets with spec.insecure as UnsupportedConnectionType
  • Reject HTTP→HTTPS redirect path for Git by disallowing http:// URLs when the flag is false (managed libgit2 transport removed; go-git redirect gated by scheme reject)

Test plan

  • Unit tests for GitRepository / HelmRepository / HelmChart / Bucket / OCIRepository insecure HTTP blocking
  • Controllers start with --insecure-allow-http=false and reject HTTP sources end-to-end

Fixes #806

Wire helper.ConnectionOptions into GitRepository, HelmRepository,
HelmChart, Bucket, and OCIRepository reconcilers so cluster admins
can disallow plain HTTP URLs, HTTP proxies, and spec.insecure when
the flag is set to false. Azure/GCP buckets with insecure stall as
UnsupportedConnectionType.

Fixes fluxcd#806

Signed-off-by: amarkdotdev <amarkdotdev@users.noreply.github.com>
@amarkdotdev
amarkdotdev force-pushed the feat/insecure-allow-http branch from 8579eed to c87250e Compare August 7, 2026 04:45
@amarkdotdev

Copy link
Copy Markdown
Author

Rebased onto latest main and resolved the conflict in bucket_controller_test.go (kept the new GCS fixture constants and the --insecure-allow-http tests).

@stefanprodan

Copy link
Copy Markdown
Member

@amarkdotdev thanks! We'll review your PR once we are done with Flux 2.9 patches, please bear with us a little longer. This will go in Flux 2.10

@stefanprodan stefanprodan added the area/security Security related issues and pull requests label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/security Security related issues and pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a new flag to block use of HTTP endpoints for sources

2 participants