diff --git a/.ci/image/Dockerfile b/.ci/image/Dockerfile index 937f1e30..f28a3157 100644 --- a/.ci/image/Dockerfile +++ b/.ci/image/Dockerfile @@ -1,12 +1,12 @@ ARG CLOUDFLARE_DOCKER_REGISTRY_HOST -FROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/cf/debian-images/trixie/main:2026.1.0@sha256:e32092fd01520f5ae7de1fa6bb5a721720900ebeaa48e98f36f6f86168833cd7 +FROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/cf/debian-images/trixie/main:2026.8.0@sha256:91760180b56946b46d1c6879a867604c01cda238dee0bdf21580317f4f2d63e8 RUN apt-get update && \ apt-get upgrade -y && \ apt-get install --no-install-recommends --allow-downgrades -y \ build-essential \ git \ - go-boring=1.26.8-1 \ + go=1.27.1-1 \ libffi-dev \ procps \ python3-dev \ diff --git a/.ci/linux.gitlab-ci.yml b/.ci/linux.gitlab-ci.yml index 1b70f558..3386dc30 100644 --- a/.ci/linux.gitlab-ci.yml +++ b/.ci/linux.gitlab-ci.yml @@ -4,8 +4,8 @@ outputDir: artifacts runner: linux-x86-8cpu-16gb stage: build - golangVersion: "boring-1.26" - imageVersion: "3625-1801d52@sha256:9261597bc2d229c997522848260de758567643d58ae1097196ae368db89a1d0f" + golangVersion: "1.27" + imageVersion: "3703-2fe662ebe6c7@sha256:60e4b3aac0f3558bfa85afc65b36b7cd09dd44aef71daaee65a6afd41c6e9458" CGO_ENABLED: 1 .default-packaging-job: &packaging-job-defaults @@ -30,7 +30,7 @@ include: ################### ### Linux Build ### ################### - - component: $CI_SERVER_FQDN/cloudflare/ci/golang/boring-make@~latest + - component: $CI_SERVER_FQDN/cloudflare/ci/golang/make@~latest inputs: <<: *golang_inputs jobPrefix: linux-build @@ -39,7 +39,7 @@ include: ######################## ### Linux FIPS Build ### ######################## - - component: $CI_SERVER_FQDN/cloudflare/ci/golang/boring-make@~latest + - component: $CI_SERVER_FQDN/cloudflare/ci/golang/make@~latest inputs: <<: *golang_inputs jobPrefix: linux-fips-build @@ -48,7 +48,7 @@ include: ################# ### Unit Tests ## ################# - - component: $CI_SERVER_FQDN/cloudflare/ci/golang/boring-make@~latest + - component: $CI_SERVER_FQDN/cloudflare/ci/golang/make@~latest inputs: <<: *golang_inputs stage: test @@ -58,7 +58,7 @@ include: ###################### ### Unit Tests FIPS ## ###################### - - component: $CI_SERVER_FQDN/cloudflare/ci/golang/boring-make@~latest + - component: $CI_SERVER_FQDN/cloudflare/ci/golang/make@~latest inputs: <<: *golang_inputs stage: test @@ -68,7 +68,7 @@ include: ################# ### Vuln Check ## ################# - - component: $CI_SERVER_FQDN/cloudflare/ci/golang/boring-make@~latest + - component: $CI_SERVER_FQDN/cloudflare/ci/golang/make@~latest inputs: <<: *golang_inputs runOnBranches: "^$" @@ -84,7 +84,7 @@ linux-component-tests: &linux-component-tests extends: .component-tests needs: - ci-image-get-image-ref - - linux-build-boring-make + - linux-build-make script: - ./.ci/scripts/component-tests.sh variables: &component-tests-variables @@ -103,7 +103,7 @@ linux-component-tests-fips: <<: *linux-component-tests needs: - ci-image-get-image-ref - - linux-fips-build-boring-make + - linux-fips-build-make variables: <<: *component-tests-variables COMPONENT_TESTS_FIPS: 1 diff --git a/.ci/scripts/linux/build-packages-fips.sh b/.ci/scripts/linux/build-packages-fips.sh index 4fec3bc5..6df356fe 100755 --- a/.ci/scripts/linux/build-packages-fips.sh +++ b/.ci/scripts/linux/build-packages-fips.sh @@ -11,8 +11,8 @@ arch=("amd64") export TARGET_ARCH=$arch export TARGET_OS=linux export FIPS=true -# For BoringCrypto to link, we need CGO enabled. Otherwise compilation fails. -export CGO_ENABLED=1 +# Go's native FIPS 140 module does not require CGO. +export CGO_ENABLED=0 make cloudflared-deb mv cloudflared-fips\_$VERSION\_$arch.deb $ARTIFACT_DIR/cloudflared-fips-linux-$arch.deb diff --git a/.ci/scripts/linux/build-packages.sh b/.ci/scripts/linux/build-packages.sh index 842b030b..71c8b5a2 100755 --- a/.ci/scripts/linux/build-packages.sh +++ b/.ci/scripts/linux/build-packages.sh @@ -15,8 +15,6 @@ arch=$1 VERSION=$(git describe --tags --always --match "[0-9][0-9][0-9][0-9].*.*") echo $VERSION -# Disable FIPS module in go-boring -export GOEXPERIMENT=noboringcrypto export CGO_ENABLED=0 # This controls the directory the built artifacts go into @@ -57,4 +55,3 @@ mv cloudflared-$RPMVERSION-1.$RPMARCH.rpm $ARTIFACT_DIR/cloudflared-linux-$RPMAR # finally move the linux binary as well. mv ./cloudflared $ARTIFACT_DIR/cloudflared-linux-$arch - diff --git a/.docker-images-internal b/.docker-images-internal index fbdf2f90..c8c47ee1 100644 --- a/.docker-images-internal +++ b/.docker-images-internal @@ -1,13 +1,13 @@ images: - name: cloudflared - dockerfile: Dockerfile.$ARCH + dockerfile: Dockerfile.internal.$ARCH context: . version_file: versions-internal architectures: - amd64 - arm64 - name: cloudflared-fips - dockerfile: Dockerfile.fips.$ARCH + dockerfile: Dockerfile.internal.$ARCH context: . version_file: versions-internal architectures: diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index e8a2aa0b..6ecfd4bd 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -4,7 +4,7 @@ jobs: check: strategy: matrix: - go-version: [1.22.x] + go-version: [1.27.1] os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3faed0d3..1985e1d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,5 @@ variables: - GO_VERSION: "1.26.8" + GO_VERSION: "1.27.1" MAC_GO_VERSION: "go@$GO_VERSION" WIN_GO_VERSION: "go$GO_VERSION" GIT_DEPTH: "0" diff --git a/AGENTS.md b/AGENTS.md index 29d1e42e..4f9412bd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -92,9 +92,6 @@ Notes on linting: protocols. - `features/`: Runtime feature flags including `PostQuantumMode` (`PostQuantumPrefer` = default, `PostQuantumStrict` = `--post-quantum`). -- `fips/`: Build-tag driven FIPS detection. Only `fips.IsFipsEnabled()` is - exposed; never branch on `fipsEnabled` inside a function if the two - branches return the same value. ### Function and Method Guidelines @@ -220,6 +217,10 @@ type TunnelProperties struct { `fipsEnabled` branch in curve-selection code; if the two modes ever diverge, express the divergence inside `crypto/` so call sites remain untouched. +- FIPS and non-FIPS artifacts remain separate. Ordinary builds use + `GOFIPS140=off`; `FIPS=true` builds and internal container images use + `GOFIPS140=latest`. This runtime-level distinction enforces FIPS algorithms + for origin connections without changing the explicit edge curve list above. - HTTP/2 supports post-quantum handshakes. Never re-add a `PostQuantumStrict`-based rejection to H2 code paths, and never force `--post-quantum` to select QUIC-only in protocol selection. diff --git a/Dockerfile b/Dockerfile index f3a18372..63f63f83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ # use a builder image for building cloudflare ARG TARGET_GOOS ARG TARGET_GOARCH -FROM golang:1.26.8 AS builder +FROM golang:1.27.1 AS builder +ARG TARGET_GOOS +ARG TARGET_GOARCH +ARG GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct ENV GO111MODULE=on \ CGO_ENABLED=0 \ - GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct \ + GOPROXY=${GOPROXY} \ TARGET_GOOS=${TARGET_GOOS} \ TARGET_GOARCH=${TARGET_GOARCH} \ # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index 812e7b67..a34d6d7f 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -1,8 +1,9 @@ # use a builder image for building cloudflare -FROM golang:1.26.8 AS builder +FROM golang:1.27.1 AS builder +ARG GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct ENV GO111MODULE=on \ CGO_ENABLED=0 \ - GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct \ + GOPROXY=${GOPROXY} \ # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual # which changes how cloudflared binds the metrics server CONTAINER_BUILD=1 diff --git a/Dockerfile.arm64 b/Dockerfile.arm64 index 9db8a45b..f509ba26 100644 --- a/Dockerfile.arm64 +++ b/Dockerfile.arm64 @@ -1,8 +1,9 @@ # use a builder image for building cloudflare -FROM golang:1.26.8 AS builder +FROM golang:1.27.1 AS builder +ARG GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct ENV GO111MODULE=on \ CGO_ENABLED=0 \ - GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct \ + GOPROXY=${GOPROXY} \ # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual # which changes how cloudflared binds the metrics server CONTAINER_BUILD=1 diff --git a/Dockerfile.fips.amd64 b/Dockerfile.internal.amd64 similarity index 81% rename from Dockerfile.fips.amd64 rename to Dockerfile.internal.amd64 index 5def9850..2c8ebe4c 100644 --- a/Dockerfile.fips.amd64 +++ b/Dockerfile.internal.amd64 @@ -1,9 +1,10 @@ -# use a builder image for building cloudflared +# use the internal builder image for building cloudflared ARG CLOUDFLARE_DOCKER_REGISTRY_HOST -FROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/plat/dockerfiles/debian-trixie-golang-boring/master:1.26.8-1@sha256:2cff81b1547df7c6bfe0cdba17b76678054d5054bedd71809be0829e5f3fc652 AS builder +FROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/plat/dockerfiles/debian-trixie-golang/master:1.27.1-1@sha256:80610a8a9aba72462b24ad9d306621f61524e8ae684d82777369640179ef5bba AS builder +ARG GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct ENV GO111MODULE=on \ - CGO_ENABLED=1 \ - GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct \ + CGO_ENABLED=0 \ + GOPROXY=${GOPROXY} \ # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual # which changes how cloudflared binds the metrics server CONTAINER_BUILD=1 diff --git a/Dockerfile.fips.arm64 b/Dockerfile.internal.arm64 similarity index 81% rename from Dockerfile.fips.arm64 rename to Dockerfile.internal.arm64 index eb2269fa..50bf02ab 100644 --- a/Dockerfile.fips.arm64 +++ b/Dockerfile.internal.arm64 @@ -1,9 +1,10 @@ -# use a builder image for building cloudflared +# use the internal builder image for building cloudflared ARG CLOUDFLARE_DOCKER_REGISTRY_HOST -FROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/plat/dockerfiles/debian-trixie-golang-boring/master:1.26.8-1@sha256:2cff81b1547df7c6bfe0cdba17b76678054d5054bedd71809be0829e5f3fc652 AS builder +FROM ${CLOUDFLARE_DOCKER_REGISTRY_HOST:-registry.cfdata.org}/stash/plat/dockerfiles/debian-trixie-golang/master:1.27.1-1@sha256:80610a8a9aba72462b24ad9d306621f61524e8ae684d82777369640179ef5bba AS builder +ARG GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct ENV GO111MODULE=on \ - CGO_ENABLED=1 \ - GOPROXY=https://athens.cfdata.org|https://proxy.golang.org|direct \ + CGO_ENABLED=0 \ + GOPROXY=${GOPROXY} \ # the CONTAINER_BUILD envvar is used set github.com/cloudflare/cloudflared/metrics.Runtime=virtual # which changes how cloudflared binds the metrics server CONTAINER_BUILD=1 diff --git a/Makefile b/Makefile index a18a42c3..46431c16 100644 --- a/Makefile +++ b/Makefile @@ -42,10 +42,10 @@ endif LINK_FLAGS := ifeq ($(FIPS), true) - LINK_FLAGS := -linkmode=external -extldflags=-static $(LINK_FLAGS) - # Prevent linking with libc regardless of CGO enabled or not. - GO_BUILD_TAGS := $(GO_BUILD_TAGS) osusergo netgo fips + export GOFIPS140 := latest VERSION_FLAGS := $(VERSION_FLAGS) -X "main.BuildType=FIPS" +else + export GOFIPS140 := off endif LDFLAGS := -ldflags='$(VERSION_FLAGS) $(LINK_FLAGS)' @@ -105,8 +105,10 @@ endif ifeq ($(TARGET_OS), windows) EXECUTABLE_PATH=./$(BINARY_NAME).exe + BUILT_BINARY_PATH=./cloudflared.exe else EXECUTABLE_PATH=./$(BINARY_NAME) + BUILT_BINARY_PATH=./cloudflared endif ifeq ($(FLAVOR), centos-7) @@ -143,21 +145,20 @@ vulncheck: .PHONY: cloudflared cloudflared: -ifeq ($(FIPS), true) - $(info Building cloudflared with go-fips) -endif + $(if $(filter true,$(FIPS)),$(info Building cloudflared with Go's FIPS 140 module)) GOOS=$(TARGET_OS) GOARCH=$(TARGET_ARCH) $(ARM_COMMAND) go build -mod=readonly $(GO_BUILD_TAGS) $(LDFLAGS) $(IMPORT_PATH)/cmd/cloudflared + ifeq ($(FIPS), true) - ./check-fips.sh cloudflared + ./check-fips.sh $(BUILT_BINARY_PATH) endif .PHONY: container container: docker build --build-arg=TARGET_ARCH=$(TARGET_ARCH) --build-arg=TARGET_OS=$(TARGET_OS) -t cloudflare/cloudflared-$(TARGET_OS)-$(TARGET_ARCH):"$(VERSION)" . -.PHONY: container-fips -container-fips: - docker build -f Dockerfile.fips.$(TARGET_ARCH) -t cloudflare/cloudflared-fips-linux-$(TARGET_ARCH):"$(VERSION)" . +.PHONY: container-internal +container-internal: + docker build -f Dockerfile.internal.$(TARGET_ARCH) -t cloudflare/cloudflared-internal-linux-$(TARGET_ARCH):"$(VERSION)" . .PHONY: generate-docker-version generate-docker-version: diff --git a/README.md b/README.md index 8665dd80..2a3f2f7b 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ For example, as of January 2023 Cloudflare will support cloudflared version 2023 ### Requirements - [GNU Make](https://www.gnu.org/software/make/) - [capnp](https://capnproto.org/install.html) -- [go >= 1.26](https://go.dev/doc/install) +- [go >= 1.27](https://go.dev/doc/install) - Optional tools: - [capnpc-go](https://pkg.go.dev/zombiezen.com/go/capnproto2/capnpc-go) - [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports) diff --git a/check-fips.sh b/check-fips.sh index 3b4a9d70..d242ec85 100755 --- a/check-fips.sh +++ b/check-fips.sh @@ -1,17 +1,16 @@ #!/bin/sh -# Pass the path to the executable to check for FIPS compliance +# Pass the path to the executable to check for FIPS compatibility. exe=$1 +build_info=$(go version -m "${exe}") -if [ "$(go tool nm "${exe}" | grep -c '_Cfunc__goboringcrypto_')" -eq 0 ]; then - # Asserts that executable is using FIPS-compliant boringcrypto - echo "${exe}: missing goboring symbols" >&2 +if ! printf '%s\n' "${build_info}" | grep -q 'GOFIPS140=latest'; then + echo "${exe}: missing GOFIPS140=latest build setting" >&2 exit 1 fi -if [ "$(go tool nm "${exe}" | grep -c 'crypto/internal/boring/sig.FIPSOnly')" -eq 0 ]; then - # Asserts that executable is using FIPS-only schemes - echo "${exe}: missing fipsonly symbols" >&2 +if ! printf '%s\n' "${build_info}" | grep -q 'DefaultGODEBUG=.*fips140=on'; then + echo "${exe}: FIPS 140 mode is not enabled by default" >&2 exit 1 fi -echo "${exe} is FIPS-compliant" +echo "${exe} is FIPS-compatible" diff --git a/cmd/cloudflared/tunnel/subcommands.go b/cmd/cloudflared/tunnel/subcommands.go index 2dc17f57..0cef7b05 100644 --- a/cmd/cloudflared/tunnel/subcommands.go +++ b/cmd/cloudflared/tunnel/subcommands.go @@ -30,7 +30,6 @@ import ( "github.com/cloudflare/cloudflared/config" "github.com/cloudflare/cloudflared/connection" "github.com/cloudflare/cloudflared/diagnostic" - "github.com/cloudflare/cloudflared/fips" "github.com/cloudflare/cloudflared/metrics" ) @@ -155,7 +154,6 @@ var ( Usage: "When given creates an experimental post-quantum secure tunnel", Aliases: []string{"pq"}, EnvVars: []string{"TUNNEL_POST_QUANTUM"}, - Hidden: fips.IsFipsEnabled(), }) sortInfoByFlag = &cli.StringFlag{ Name: "sort-by", diff --git a/connection/http2_test.go b/connection/http2_test.go index 644938b6..9a4b3f9d 100644 --- a/connection/http2_test.go +++ b/connection/http2_test.go @@ -18,7 +18,6 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "golang.org/x/net/http2" "github.com/cloudflare/cloudflared/client" "github.com/cloudflare/cloudflared/tracing" @@ -27,7 +26,17 @@ import ( "github.com/cloudflare/cloudflared/tunnelrpc/pogs" ) -var testTransport = http2.Transport{} +func newTestHTTP2ClientConn(ctx context.Context, conn net.Conn) (*http.ClientConn, error) { + protocols := new(http.Protocols) + protocols.SetUnencryptedHTTP2(true) + transport := &http.Transport{ + DialContext: func(context.Context, string, string) (net.Conn, error) { + return conn, nil + }, + Protocols: protocols, + } + return transport.NewClientConn(ctx, "http", "localhost:8080") +} func newTestHTTP2Connection() (*HTTP2Connection, net.Conn) { edgeConn, cfdConn := net.Pipe() @@ -69,7 +78,7 @@ func TestHTTP2ConfigurationSet(t *testing.T) { _ = http2Conn.Serve(ctx) }() - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeConn) require.NoError(t, err) reqBody := []byte(`{ @@ -137,7 +146,7 @@ func TestServeHTTP(t *testing.T) { _ = http2Conn.Serve(ctx) }() - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeConn) require.NoError(t, err) for _, test := range tests { @@ -309,8 +318,7 @@ func TestNoWriteAfterServeHTTPReturns(t *testing.T) { _ = cfdHTTP2Conn.Serve(ctx) }() - edgeTransport := http2.Transport{} - edgeHTTP2Conn, err := edgeTransport.NewClientConn(edgeTCPConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeTCPConn) require.NoError(t, err) message := []byte(t.Name()) @@ -390,7 +398,7 @@ func TestServeControlStream(t *testing.T) { require.NoError(t, err) req.Header.Set(InternalUpgradeHeader, ControlStreamUpgrade) - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeConn) require.NoError(t, err) wg.Add(1) @@ -444,7 +452,7 @@ func TestFailRegistration(t *testing.T) { require.NoError(t, err) req.Header.Set(InternalUpgradeHeader, ControlStreamUpgrade) - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeConn) require.NoError(t, err) resp, err := edgeHTTP2Conn.RoundTrip(req) require.NoError(t, err) @@ -495,7 +503,7 @@ func TestGracefulShutdownHTTP2(t *testing.T) { require.NoError(t, err) req.Header.Set(InternalUpgradeHeader, ControlStreamUpgrade) - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeConn) require.NoError(t, err) wg.Add(1) @@ -543,7 +551,7 @@ func TestServeTCP_RateLimited(t *testing.T) { _ = http2Conn.Serve(ctx) }() - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(t.Context(), edgeConn) require.NoError(t, err) req, err := http.NewRequestWithContext(ctx, http.MethodGet, "http://localhost:8080", nil) @@ -577,7 +585,7 @@ func benchmarkServeHTTP(b *testing.B, test testRequest) { req, err := http.NewRequestWithContext(ctx, http.MethodGet, endpoint, nil) require.NoError(b, err) - edgeHTTP2Conn, err := testTransport.NewClientConn(edgeConn) + edgeHTTP2Conn, err := newTestHTTP2ClientConn(b.Context(), edgeConn) require.NoError(b, err) b.ResetTimer() diff --git a/fips/fips.go b/fips/fips.go deleted file mode 100644 index cd5d1617..00000000 --- a/fips/fips.go +++ /dev/null @@ -1,11 +0,0 @@ -//go:build fips - -package fips - -import ( - _ "crypto/tls/fipsonly" -) - -func IsFipsEnabled() bool { - return true -} diff --git a/fips/nofips.go b/fips/nofips.go deleted file mode 100644 index c8d98ed2..00000000 --- a/fips/nofips.go +++ /dev/null @@ -1,7 +0,0 @@ -//go:build !fips - -package fips - -func IsFipsEnabled() bool { - return false -} diff --git a/go.mod b/go.mod index 8c737df1..fdfcd706 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cloudflare/cloudflared -go 1.26 +go 1.27 require ( github.com/cloudflare/backoff v0.0.0-20240920015135-e46b80a3a7d0 @@ -36,11 +36,11 @@ require ( go.opentelemetry.io/proto/otlp v1.11.0 go.uber.org/automaxprocs v1.6.0 go.uber.org/mock v0.5.2 - golang.org/x/crypto v0.55.0 - golang.org/x/net v0.58.0 - golang.org/x/sync v0.22.0 - golang.org/x/sys v0.47.0 - golang.org/x/term v0.45.0 + golang.org/x/crypto v0.57.0 + golang.org/x/net v0.59.0 + golang.org/x/sync v0.23.0 + golang.org/x/sys v0.48.0 + golang.org/x/term v0.46.0 google.golang.org/protobuf v1.36.11 gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v3 v3.0.1 @@ -89,7 +89,7 @@ require ( go.opentelemetry.io/otel/metric v1.45.0 // indirect golang.org/x/arch v0.4.0 // indirect golang.org/x/oauth2 v0.36.0 // indirect - golang.org/x/text v0.41.0 // indirect + golang.org/x/text v0.42.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20260720211330-0afa2a65878a // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20260720211330-0afa2a65878a // indirect google.golang.org/grpc v1.83.2 // indirect diff --git a/go.sum b/go.sum index 32ae4c92..6dc12332 100644 --- a/go.sum +++ b/go.sum @@ -237,19 +237,19 @@ golang.org/x/arch v0.4.0 h1:A8WCeEWhLwPBKNbFi5Wv5UTCBx5zzubnXDlMOFAzFMc= golang.org/x/arch v0.4.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.55.0 h1:+KWHjbgOaAQ66dh/YlkZKHlz9ZUlq61AFirAR9ntP8M= -golang.org/x/crypto v0.55.0/go.mod h1:uq0V9dE/fzQuJtbnL+2EhWOE63vo164FY8xqEnV9xis= +golang.org/x/crypto v0.57.0 h1:3ZVCjf8Ggz7zneR/EHRVx68Ctf+2pmIMP2UFhh9cC6M= +golang.org/x/crypto v0.57.0/go.mod h1:Fdz0i5U6CoizGwLda9DttjSk6qlZo25zYNtR+ycvuZA= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.58.0 h1:ynWG7rqYi4ccpTEuPZ2QGWHktVEM9DMCj9yzDE0Q7To= -golang.org/x/net v0.58.0/go.mod h1:YwCddHnFlT7eLQqVprV19OnhLGtc5xOKgE0RyqgfWAU= +golang.org/x/net v0.59.0 h1:5zfYln+w5XCxwrnMMJPufRgNoXEaGxl0wo5GqPXyues= +golang.org/x/net v0.59.0/go.mod h1:2DA/G1UfVbCpQPeWTmMPGY7Cs2PkBkwu743bVX5PIVg= golang.org/x/oauth2 v0.36.0 h1:peZ/1z27fi9hUOFCAZaHyrpWG5lwe0RJEEEeH0ThlIs= golang.org/x/oauth2 v0.36.0/go.mod h1:YDBUJMTkDnJS+A4BP4eZBjCqtokkg1hODuPjwiGPO7Q= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.22.0 h1:SZjpbeLmrCk4xhRSZFNZW5gFUeCeFgjekvI/+gfScek= -golang.org/x/sync v0.22.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= +golang.org/x/sync v0.23.0 h1:KameEIfc1IkluZyXWLn39Wd4tURc6GbCiISGiZm2bQk= +golang.org/x/sync v0.23.0/go.mod h1:sUUOizhqBxiL6pEWpqNLUiaJn1ShEbZ6BBqskPbjZm0= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -259,14 +259,14 @@ golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= -golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= -golang.org/x/term v0.45.0 h1:NwWyBmoJCbfTHpxrWoZ9C6/VxOf7ic219I8xZZFdrf0= -golang.org/x/term v0.45.0/go.mod h1:9aqxs0blBcrm/n0L9QW0aRVD+ktan8ssZromtqJC43w= +golang.org/x/sys v0.48.0 h1:bbX/i/6MgT9BVLM9RT1thmxL04yeTAhbEz4SyadbXoo= +golang.org/x/sys v0.48.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og= +golang.org/x/term v0.46.0 h1:3+OXuTbaKDgwk8jTi3aSLHRlmWqHEUDUtxnbFigO4YE= +golang.org/x/term v0.46.0/go.mod h1:+K02xbkittuwc0Am4abfA3Fc+XRGXkvBXNO88NCXPoc= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.41.0 h1:vz/seA0lnX87Othu2f/0L24RcgrXD9/YFTSuGjj3rH8= -golang.org/x/text v0.41.0/go.mod h1:jvf1O8ajNzZqhSrQBPbutR/EB83Cc0CFrezNQIwbb5M= +golang.org/x/text v0.42.0 h1:JbOZXgfeCPU9gacVtYliJqOhD+zhrEqK4LfdpmlUZqI= +golang.org/x/text v0.42.0/go.mod h1:ojzP1Z+2QtioaF8DTtO8K5q7JWVVYwZKenzujK0Zd0E= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190828213141-aed303cbaa74/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= diff --git a/supervisor/tunnel.go b/supervisor/tunnel.go index 01cca579..3aaf97fd 100644 --- a/supervisor/tunnel.go +++ b/supervisor/tunnel.go @@ -23,7 +23,6 @@ import ( "github.com/cloudflare/cloudflared/edgediscovery" "github.com/cloudflare/cloudflared/edgediscovery/allregions" "github.com/cloudflare/cloudflared/features" - "github.com/cloudflare/cloudflared/fips" "github.com/cloudflare/cloudflared/ingress" "github.com/cloudflare/cloudflared/ingress/origins" "github.com/cloudflare/cloudflared/management" @@ -676,10 +675,9 @@ func (e *EdgeTunnelServer) reportErrorToSentry(err error, pqMode features.PostQu transportErr, ok := dialErr.Cause.(*quic.TransportError) if ok && transportErr.ErrorCode.IsCryptoError() && - fips.IsFipsEnabled() && pqMode == features.PostQuantumStrict { - // Only report to Sentry when using FIPS, PQ, - // and the error is a Crypto error reported by + // Only report to Sentry when using strict PQ and the error + // is a Crypto error reported by // an EdgeQuicDialError sentry.CaptureException(err) }