Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cloud Connector Binary FIPS compliant #88

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ rules/
.idea/*
.editorconfig
.markdownlint.json
.vale.ini
.vale.ini
dist/
cloud-connector
20 changes: 17 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
# Dockerfile
FROM alpine
COPY outsystemscc /app/
ENTRYPOINT ["/app/outsystemscc"]
ARG BASE_REG=edencore.azurecr.io/

# FIPS and non-FIPS build
FROM ${BASE_REG}cg_fips/go:1.22 as build
WORKDIR /app
COPY . .
RUN go mod download
RUN go build -o outsystemscc
# TODO: Import the FIPS module when it is required only
# - main.go: import _ "crypto/tls/fipsonly"
RUN go build -tags=requirefips -o outsystemscc-fips

# Package the final image
FROM ${BASE_REG}cg_fips/chainguard_base-fips:latest
COPY --from=build /app/outsystemscc /app/
COPY --from=build /app/outsystemscc-fips /app/
ENTRYPOINT ["/app/outsystemscc-fips"]
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
package main

// FIPS mode is enabled by importing the fipsonly package.
import (
_ "crypto/tls/fipsonly"
"flag"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net/http"
"os"
"runtime"
"strconv"
"strings"
"time"

"math/rand"

chclient "github.com/jpillora/chisel/client"
"github.com/jpillora/chisel/share/cos"
"github.com/jpillora/chisel/share/settings"
Expand Down
Loading