Skip to content

Commit 309b82e

Browse files
kaovilaiclaudehappy-otter
committed
feat: Add FIPS 140-3 support using Microsoft Go and Azure Linux
Switch to Microsoft Go and Azure Linux for FIPS 140-3 compliance in OpenShift OADP 1.5 HyperShift deployments. Changes: - Replace builder with mcr.microsoft.com/oss/go/microsoft/golang:1.25-azurelinux3.0 - Replace runtime with mcr.microsoft.com/azurelinux/distroless/base:3.0 - Add GOFIPS140=latest and CGO_ENABLED=1 for Microsoft's FIPS implementation - Add documentation explaining Azure Linux FIPS configuration - Switch from strictfipsruntime approach to Microsoft's FIPS module Why Microsoft Go + Azure Linux distroless: - Microsoft's Go fork provides integrated FIPS support for Azure environments - Azure Linux 3.0 distroless base is FIPS 140-3 compliant with SCOSSL/SymCrypt - Minimal attack surface with distroless - Consistency with Velero and Azure plugin implementations - Follows ARO-HCP reference architecture Plugin processes inherit GODEBUG=fips140=on from the parent Velero process, so no runtime environment variable configuration needed. Reference implementation: https://github.com/Azure/ARO-HCP/blob/main/frontend/Dockerfile Companion to: openshift/velero#492 Companion to: openshift/velero-plugin-for-microsoft-azure#125 Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering> Signed-off-by: Tiger Kaovilai <passawit.kaovilai@gmail.com>
1 parent ff1e47f commit 309b82e

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

Dockerfile.oadp

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,28 @@
1+
# FIPS 140-3 Compliance Configuration using Microsoft Go and Azure Linux:
2+
# - Builder: mcr.microsoft.com/oss/go/microsoft/golang:1.25-azurelinux3.0
3+
# Microsoft's Go fork with integrated FIPS support via platform crypto libraries
4+
# - Runtime: mcr.microsoft.com/azurelinux/distroless/base:3.0
5+
# Azure Linux 3.0 distroless image with FIPS 140-3 compliance
6+
# - GOFIPS140=latest: Enables FIPS mode in Microsoft's Go fork
7+
# - CGO_ENABLED=1: Required for platform-dependent crypto (OpenSSL on Linux)
8+
# - Plugin processes inherit GODEBUG=fips140=on from parent Velero process
9+
# - Required for OpenShift HyperShift deployments in regulated environments
10+
# - Reference: https://github.com/Azure/ARO-HCP/blob/main/frontend/Dockerfile
11+
112
#@follow_tag(registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25)
2-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 AS builder
13+
# FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_golang_1.25 AS builder
14+
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.25-azurelinux3.0 as builder
315

416
COPY . /workspace
517
WORKDIR /workspace/
6-
ENV GOEXPERIMENT strictfipsruntime
7-
RUN CGO_ENABLED=1 GOOS=linux go build -v -mod=vendor -tags strictfipsruntime -o /workspace/bin/hypershift-oadp-plugin .
18+
# ENV GOEXPERIMENT strictfipsruntime
19+
# RUN CGO_ENABLED=1 GOOS=linux go build -v -mod=vendor -tags strictfipsruntime -o /workspace/bin/hypershift-oadp-plugin .
20+
21+
ENV CGO_ENABLED=1 GOFIPS140=latest
22+
RUN GOOS=linux go build -v -mod=vendor -o /workspace/bin/hypershift-oadp-plugin .
823

924
#@follow_tag(registry.redhat.io/ubi9/ubi-minimal:latest)
10-
FROM registry.redhat.io/ubi9/ubi-minimal:latest
11-
RUN microdnf -y install openssl && microdnf -y reinstall tzdata && microdnf clean all
12-
RUN mkdir /plugins
25+
FROM mcr.microsoft.com/azurelinux/distroless/base:3.0
1326
COPY --from=builder /workspace/bin/hypershift-oadp-plugin /plugins/
1427
COPY LICENSE /licenses/
1528
USER 65534:65534

0 commit comments

Comments
 (0)