Skip to content

Commit 3b386ab

Browse files
authored
FIPS mode changes and docs (#761)
1 parent 212794a commit 3b386ab

File tree

12 files changed

+92
-5
lines changed

12 files changed

+92
-5
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ jobs:
147147
make uninstall-crds
148148
make e2e-helm-test
149149
150+
- name: FIPS Tests
151+
shell: bash
152+
run: |
153+
make undeploy
154+
make uninstall-crds
155+
make fips-test
156+
150157
- name: Upload Manifests
151158
uses: actions/upload-artifact@v4
152159
if: success()

.github/workflows/trivy.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
- name: Image Scan
8282
shell: bash
8383
run: |
84+
make build-operator
8485
sh ./hack/golang/govulncheck.sh
8586
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
8687
export TRIVY_CACHE=$GITHUB_WORKSPACE/.cache/trivy

.go-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.24.3
1+
1.24.4

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,16 @@ else
18881888
$(KUSTOMIZE) build $(BUILD_DEPLOY)/overlays/ci | $(KUBECTL_CMD) apply -f -
18891889
endif
18901890

1891+
.PHONY: just-deploy-fips
1892+
just-deploy-fips: ensure-pull-secret ## Deploy the Coherence Operator in FIPS mode without rebuilding anything
1893+
$(call prepare_deploy,$(OPERATOR_IMAGE),$(OPERATOR_NAMESPACE))
1894+
$(KUSTOMIZE) build $(BUILD_DEPLOY)/overlays/fips | $(KUBECTL_CMD) apply -f -
1895+
1896+
.PHONY: fips-test
1897+
fips-test: just-deploy-fips wait-for-deploy
1898+
chmod +x $(SCRIPTS_DIR)/fips/fips-test.sh
1899+
$(SCRIPTS_DIR)/fips/fips-test.sh
1900+
18911901

18921902
.PHONY: ensure-pull-secret
18931903
ensure-pull-secret:
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# This patch will configure the Operator to run in FIPS mode.
3+
#
4+
- op: add
5+
path: /spec/template/spec/containers/0/env/-
6+
value:
7+
name: GODEBUG
8+
value: "fips140=on"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: kustomize.config.k8s.io/v1alpha1
2+
kind: Component
3+
4+
patches:
5+
- path: fips-env.yaml
6+
target:
7+
kind: Deployment
8+
name: controller-manager
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
4+
resources:
5+
- ../../default
6+
7+
components:
8+
- ../../components/fips

docs/installation/100_fips.adoc

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ How the `GODEBUG` environment variable is set depends on how the operator is ins
2424
[NOTE]
2525
====
2626
Although the Coherence Operator image can easily be installed in a FIPS compliant mode, none of the default
27-
Oracle Coherence images used by the operator are FIPS complaint.
27+
Oracle Coherence images used by the operator are FIPS compliant.
28+
2829
The Oracle Coherence team does not currently publish FIPS compliant Coherence images.
29-
Coherence is FIPS compatible and correctly configured applications running in an image that has a FIPS
30-
compliant JDK and FIPS compliant base O/S will be FIPS complaint.
3130
Customers must build their own FIPS complaint Java and Coherence images, which the operator will then manage.
31+
32+
Coherence is FIPS _compatible_ so a correctly configured application running in an image that has a FIPS
33+
compliant JDK and FIPS compliant base O/S will be FIPS complaint. To be fully FIPS compliant these images must then
34+
be run in a container runtime on a FIPS compliant host.
3235
====
3336
3437
=== Install Using Yaml Manifests
@@ -61,6 +64,21 @@ then add the required `GODEBUG` value, for example
6164
value: fips140=on
6265
----
6366
67+
68+
=== Install Using Kustomize
69+
70+
If <<docs/installation/013_install_kustomize.adoc,installing the operator using Kustomize>> (or using `kubectl -k`)
71+
the Coherence manifest yaml files contain a FIPS overlay that adds the `GODEBUG` environment variable
72+
to the Operator container.
73+
74+
The following command will generate a yaml manifest that installs the operator with FIPS enabled:
75+
76+
[source,bash]
77+
----
78+
kustomize build manifests/overlays/fips
79+
----
80+
81+
6482
=== Install Using Helm
6583
6684
If <<docs/installation/012_install_helm.adoc,installing the operator using Helm>>

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module github.com/oracle/coherence-operator
88
// See ./.go-version for the go compiler version used when building binaries
99
//
1010
// https://go.dev/doc/modules/gomod-ref#go
11-
go 1.24.3
11+
go 1.24.4
1212

1313
require (
1414
github.com/distribution/reference v0.6.0

hack/fips/fips-test.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (c) 2020, 2025, Oracle and/or its affiliates.
4+
# Licensed under the Universal Permissive License v 1.0 as shown at
5+
# http://oss.oracle.com/licenses/upl.
6+
#
7+
set -o errexit
8+
9+
PODS=$(kubectl -n operator-test get pod -l control-plane=coherence -o name)
10+
11+
for POD in ${PODS}
12+
do
13+
echo "Checking Operator Pod ${POD} is running in FIPS mode"
14+
kubectl -n operator-test logs ${POD} | grep "Operator is running with FIPS 140 Enabled"
15+
if [[ $? == 1 ]]
16+
then
17+
echo "Failed - did not find FIPS log message for Pod ${POD}"
18+
exit 1
19+
fi
20+
done
21+

0 commit comments

Comments
 (0)