diff --git a/Makefile b/Makefile index 3e9ce94a31f..c4d80cea5cb 100644 --- a/Makefile +++ b/Makefile @@ -86,8 +86,7 @@ FIPS_TAG := fips FIPS_MESSAGE := with-FIPS-support RELEASE = teleport-$(GITTAG)-$(OS)-$(ARCH)-fips-bin GOEXPERIMENT = boringcrypto -OPENSSL_FIPS = 1 -export GOEXPERIMENT OPENSSL_FIPS +export GOEXPERIMENT ifeq ($(BUILDBOX_MODE),cross) # We need to set CGO_ENABLED=0 when building rdpclient as the build of # boring-sys builds and runs a Go program as part of its integrity testing. diff --git a/build.assets/Dockerfile-centos7 b/build.assets/Dockerfile-centos7 index 28336a2e267..0717b74f787 100644 --- a/build.assets/Dockerfile-centos7 +++ b/build.assets/Dockerfile-centos7 @@ -317,7 +317,7 @@ EXPOSE 6600 2379 2380 ## BUILDBOX-FIPS ############################################################## # Build the `buildbox-fips` target to create a buildbox that creates a FIPS -# Teleport binary. It enables FIPS in the Go toolchain and in OpenSSL, and +# Teleport binary. It enables FIPS in the Go toolchain and # builds a test binary to ensure binaries are FIPS-compliant. FROM buildbox as buildbox-fips @@ -325,21 +325,12 @@ FROM buildbox as buildbox-fips # Set environment variables used for enabling FIPS mode # `GOEXPERIMENT=boringcrypto` -- enable FIPS mode (BoringCrypto) for Go # https://github.com/golang/go/blob/master/src/crypto/internal/boring/README.md -# `OPENSSL_FIPS=1` -- enable FIPS mode for OpenSSL -# https://www.openssl.org/docs/man3.0/man7/fips_module.html -ENV GOEXPERIMENT=boringcrypto \ - OPENSSL_FIPS=1 - -# Enable OpenSSL FIPS mode by default -# https://www.openssl.org/docs/man3.0/man7/fips_module.html -COPY fips-files/openssh.cnf /usr/local/ssl/openssl.cnf +ENV GOEXPERIMENT=boringcrypto USER ci # Validate that environment variables were set -RUN echo "Ensure environment variables are set" && \ - [ -n "$GOEXPERIMENT" ] && \ - [ -n "$OPENSSL_FIPS" ] +RUN echo "Ensure environment variables are set" && [ -n "$GOEXPERIMENT" ] # Validate that Go binaries have BoringCrypto enabled COPY --chown=ci fips-files/boringtest.nogo /tmp/boringtest.go @@ -347,10 +338,5 @@ COPY --chown=ci fips-files/boringtest.nogo /tmp/boringtest.go RUN echo "Ensure Go is using BoringCrypto" && \ go run /tmp/boringtest.go -RUN echo "Ensure OpenSSL is using FIPS module" && \ - ! openssl md5 /tmp/boringtest.go > /dev/null 2>&1 - -RUN rm /tmp/boringtest.go - VOLUME ["/go/src/github.com/gravitational/teleport"] EXPOSE 6600 2379 2380 diff --git a/build.assets/fips-files/openssh.cnf b/build.assets/fips-files/openssh.cnf deleted file mode 100644 index 55068871daa..00000000000 --- a/build.assets/fips-files/openssh.cnf +++ /dev/null @@ -1,14 +0,0 @@ -config_diagnostics = 1 -openssl_conf = openssl_init - -.include /usr/local/ssl/fipsmodule.cnf - -[openssl_init] -providers = provider_sect - -[provider_sect] -fips = fips_sect -base = base_sect - -[base_sect] -activate = 1