Skip to content

ROX-26908: set operator fips-compliant:true#13219

Merged
davdhacs merged 4 commits intomasterfrom
tag-operator-as-fips-compliant
Nov 14, 2024
Merged

ROX-26908: set operator fips-compliant:true#13219
davdhacs merged 4 commits intomasterfrom
tag-operator-as-fips-compliant

Conversation

@davdhacs
Copy link
Copy Markdown
Contributor

@davdhacs davdhacs commented Nov 4, 2024

Description

Setting fips-compliant operator feature to true.

This is not technically true for upstream. But we do not publish the upstream operator, and it is true for the published operator (downstream (CPaaS and Konflux)).

User-facing documentation

  • CHANGELOG is updated OR update is not needed
  • documentation PR is created and is linked above OR is not needed

Testing and quality

  • the change is production ready: the change is GA or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

change me!

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Nov 4, 2024

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@davdhacs
Copy link
Copy Markdown
Contributor Author

davdhacs commented Nov 4, 2024

/test ?

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Nov 4, 2024

@davdhacs: The following commands are available to trigger required jobs:

  • /test gke-nongroovy-e2e-tests
  • /test shell-unit-tests

The following commands are available to trigger optional jobs:

  • /test aks-qa-e2e-tests
  • /test aro-qa-e2e-tests
  • /test eks-qa-e2e-tests
  • /test gke-nongroovy-compatibility-tests
  • /test gke-operator-e2e-tests
  • /test gke-perf-scale-tests
  • /test gke-qa-e2e-tests
  • /test gke-race-condition-qa-e2e-tests
  • /test gke-scale-tests
  • /test gke-scanner-v4-tests
  • /test gke-sensor-integration-tests
  • /test gke-ui-e2e-tests
  • /test gke-upgrade-tests
  • /test gke-version-compatibility-tests
  • /test ibmcloudz-4-14-qa-e2e-tests
  • /test ibmcloudz-4-15-qa-e2e-tests
  • /test ibmcloudz-4-16-qa-e2e-tests
  • /test ocp-4-12-compliance-e2e-tests
  • /test ocp-4-12-ebpf-qa-e2e-tests
  • /test ocp-4-12-nongroovy-e2e-tests
  • /test ocp-4-12-operator-e2e-tests
  • /test ocp-4-12-qa-e2e-tests
  • /test ocp-4-12-scanner-v4-tests
  • /test ocp-4-12-sensor-integration-tests
  • /test ocp-4-12-ui-e2e-tests
  • /test ocp-4-17-compliance-e2e-tests
  • /test ocp-4-17-crun-qa-e2e-tests
  • /test ocp-4-17-ebpf-qa-e2e-tests
  • /test ocp-4-17-fips-qa-e2e-tests
  • /test ocp-4-17-nongroovy-e2e-tests
  • /test ocp-4-17-operator-e2e-tests
  • /test ocp-4-17-qa-e2e-tests
  • /test ocp-4-17-scanner-v4-tests
  • /test ocp-4-17-sensor-integration-tests
  • /test ocp-4-17-ui-e2e-tests
  • /test ocp-dev-preview-compliance-e2e-tests
  • /test ocp-dev-preview-ebpf-qa-e2e-tests
  • /test ocp-dev-preview-fips-qa-e2e-tests
  • /test ocp-dev-preview-nongroovy-e2e-tests
  • /test ocp-dev-preview-operator-e2e-tests
  • /test ocp-dev-preview-qa-e2e-tests
  • /test ocp-dev-preview-scanner-v4-tests
  • /test ocp-dev-preview-sensor-integration-tests
  • /test ocp-dev-preview-ui-e2e-tests
  • /test ocp-next-candidate-compliance-e2e-tests
  • /test ocp-next-candidate-ebpf-qa-e2e-tests
  • /test ocp-next-candidate-fips-qa-e2e-tests
  • /test ocp-next-candidate-nongroovy-e2e-tests
  • /test ocp-next-candidate-operator-e2e-tests
  • /test ocp-next-candidate-qa-e2e-tests
  • /test ocp-next-candidate-scanner-v4-tests
  • /test ocp-next-candidate-sensor-integration-tests
  • /test ocp-next-candidate-ui-e2e-tests
  • /test ocp-stable-scanner-v4-compliance-e2e-tests
  • /test ocp-stable-scanner-v4-ebpf-qa-e2e-tests
  • /test ocp-stable-scanner-v4-nongroovy-e2e-tests
  • /test ocp-stable-scanner-v4-operator-e2e-tests
  • /test ocp-stable-scanner-v4-perf-scale-tests
  • /test ocp-stable-scanner-v4-qa-e2e-tests
  • /test ocp-stable-scanner-v4-scanner-v4-tests
  • /test ocp-stable-scanner-v4-sensor-integration-tests
  • /test ocp-stable-scanner-v4-ui-e2e-tests
  • /test osd-aws-qa-e2e-tests
  • /test osd-gcp-qa-e2e-tests
  • /test powervs-4-14-qa-corebpf-e2e-tests
  • /test powervs-4-15-qa-corebpf-e2e-tests
  • /test powervs-4-16-qa-corebpf-e2e-tests
  • /test powervs-4-17-qa-corebpf-e2e-tests
  • /test rosa-hcp-qa-e2e-tests
  • /test rosa-qa-e2e-tests
  • /test ui-component-tests

Use /test all to run the following jobs that were automatically triggered:

  • pull-ci-stackrox-stackrox-master-gke-nongroovy-e2e-tests
  • pull-ci-stackrox-stackrox-master-gke-operator-e2e-tests
  • pull-ci-stackrox-stackrox-master-gke-qa-e2e-tests
  • pull-ci-stackrox-stackrox-master-gke-sensor-integration-tests
  • pull-ci-stackrox-stackrox-master-gke-upgrade-tests
  • pull-ci-stackrox-stackrox-master-ocp-4-12-nongroovy-e2e-tests
  • pull-ci-stackrox-stackrox-master-ocp-4-12-operator-e2e-tests
  • pull-ci-stackrox-stackrox-master-ocp-4-12-qa-e2e-tests
  • pull-ci-stackrox-stackrox-master-ocp-4-17-nongroovy-e2e-tests
  • pull-ci-stackrox-stackrox-master-ocp-4-17-operator-e2e-tests
  • pull-ci-stackrox-stackrox-master-ocp-4-17-qa-e2e-tests
Details

In response to this:

/test ?

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@davdhacs
Copy link
Copy Markdown
Contributor Author

davdhacs commented Nov 4, 2024

/test ocp-next-candidate-fips-qa-e2e-tests ocp-4-17-fips-qa-e2e-tests gke-operator-e2e-tests ocp-4-12-operator-e2e-tests

@rhacs-bot
Copy link
Copy Markdown
Contributor

rhacs-bot commented Nov 4, 2024

Images are ready for the commit at c39457c.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.7.x-95-gc39457c527.

@davdhacs davdhacs changed the title ci: set fips true operator feature ci: set fips operator feature =true Nov 4, 2024
@davdhacs davdhacs marked this pull request as ready for review November 6, 2024 17:11
@davdhacs davdhacs requested a review from a team as a code owner November 6, 2024 17:11
@davdhacs davdhacs requested review from mclasmeier and removed request for a team November 6, 2024 17:11
@davdhacs davdhacs changed the title ci: set fips operator feature =true ci: set operator fips-compliant=true Nov 6, 2024
@davdhacs davdhacs requested review from a team and msugakov November 6, 2024 17:11
Copy link
Copy Markdown
Contributor

@msugakov msugakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please: reference JIRA ticket (so that we can recover context later) and get approval from one of the Install team colleagues.

@davdhacs davdhacs changed the title ci: set operator fips-compliant=true ROX-24283: set operator fips-compliant:true Nov 6, 2024
@davdhacs davdhacs added the backport release-4.6 Create a PR to backport this PR to release-4.6 label Nov 6, 2024
@davdhacs davdhacs changed the title ROX-24283: set operator fips-compliant:true ROX-26908: set operator fips-compliant:true Nov 7, 2024
Copy link
Copy Markdown
Contributor

@vladbologa vladbologa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not very familiar with the topic, but I think that for fips compliance we need to:

  • use a fips compliant base image
  • compile with CGO_ENABLED=1 so that the binaries use the OpenSSL libs from the base image

I think that downstream and Konflux already do that, but quickly going through our code, the upstream might not, e.g. see https://github.com/stackrox/stackrox/blob/master/operator/Dockerfile#L52

Is that a problem? cc @msugakov @porridge @mclasmeier

@msugakov
Copy link
Copy Markdown
Contributor

msugakov commented Nov 8, 2024

Declaring FIPS upstream but not supporting it is fine, in my opinion.

  • We don't distribute upstream-built operator to community; there are no community builds of the operator. I mean quay.io/stackrox-io/
  • Even if we did, free product users wouldn't care about FIPS.
  • Internally (I mean quay.io/rhacs-eng/), we don't have tests that deeply check FIPS conformance which would break because of that.

use a fips compliant base image

FWIW, UBI8 has fips-certified openssl (we use only that). CentOS Stream most certainly doesn't. It would be impossible to be fully FIPS upstream but nobody cares, I believe. FIPS is important for the commercial product.

@vladbologa
Copy link
Copy Markdown
Contributor

Declaring FIPS upstream but not supporting it is fine, in my opinion.

  • We don't distribute upstream-built operator to community; there are no community builds of the operator. I mean quay.io/stackrox-io/
  • Even if we did, free product users wouldn't care about FIPS.
  • Internally (I mean quay.io/rhacs-eng/), we don't have tests that deeply check FIPS conformance which would break because of that.

use a fips compliant base image

FWIW, UBI8 has fips-certified openssl (we use only that). CentOS Stream most certainly doesn't. It would be impossible to be fully FIPS upstream but nobody cares, I believe. FIPS is important for the commercial product.

I agree with you, I just wonder if we should actually mention anywhere that the upstream build is marked as fips compliant when it's actually not.

Copy link
Copy Markdown
Contributor

@vladbologa vladbologa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I was a bit concerned that we're also marking the upstream build as fips compliant when it's not (see my other comments and Misha's reply). We could at least mention this somewhere (even the description of this PR would be ok for me).

@davdhacs
Copy link
Copy Markdown
Contributor Author

davdhacs commented Nov 8, 2024

LGTM.

I was a bit concerned that we're also marking the upstream build as fips compliant when it's not (see my other comments and Misha's reply). We could at least mention this somewhere (even the description of this PR would be ok for me).

I understand. I neglected to add the context of https://gitlab.cee.redhat.com/stackrox/rhacs-midstream/-/merge_requests/3608?diff_id=7164818 where I argued for setting this only on the builds where it is true. But the same conclusion was reached there and I understand the simplicity of making it true everywhere because it does not matter in the non-fips build (operator not published).

I'll add a comment in the template file and update this PR description. Is there somewhere else it could be useful to have a note about this?

@davdhacs
Copy link
Copy Markdown
Contributor Author

davdhacs commented Nov 8, 2024

I'm not very familiar with the topic, but I think that for fips compliance we need to:

  • use a fips compliant base image
  • compile with CGO_ENABLED=1 so that the binaries use the OpenSSL libs from the base image

I think that downstream and Konflux already do that, but quickly going through our code, the upstream might not, e.g. see https://github.com/stackrox/stackrox/blob/master/operator/Dockerfile#L52

Is that a problem? cc @msugakov @porridge @mclasmeier

@vladbologa I'm sorry to not give more context about this also. We have confirmed the downstream images are fips-compliant on 4.5.x (base image has fips-compliant openssl, and our golang and c binaries are using it, and the non-openssl crypto functions used in our golang are not prohibited ones (https://docs.google.com/document/d/1uEV5rhmuwwVgrRfgXIEf9dNQLSiK78t1P8-h8aKpjhU/edit?tab=t.0#heading=h.61lj3tho6qxr)). More details are recorded in https://docs.google.com/document/d/1KcjlevcMF4DLi-KROru7tuUUIb4wSk5e6bnXpU8HZxA/edit?tab=t.0 and the parent ticket for this change: https://issues.redhat.com/browse/ROX-24283.

@davdhacs davdhacs requested a review from vladbologa November 8, 2024 17:54
@davdhacs davdhacs removed the backport release-4.6 Create a PR to backport this PR to release-4.6 label Nov 8, 2024
@codecov
Copy link
Copy Markdown

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.55%. Comparing base (a1042ce) to head (c39457c).
Report is 386 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13219      +/-   ##
==========================================
- Coverage   48.55%   48.55%   -0.01%     
==========================================
  Files        2467     2467              
  Lines      177781   177781              
==========================================
- Hits        86317    86314       -3     
- Misses      84537    84538       +1     
- Partials     6927     6929       +2     
Flag Coverage Δ
go-unit-tests 48.55% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davdhacs
Copy link
Copy Markdown
Contributor Author

davdhacs commented Nov 9, 2024

/retest

@davdhacs
Copy link
Copy Markdown
Contributor Author

Confirmed in https://issues.redhat.com/browse/ROX-26908 that "No additional checks required from Install team's perspective."
Planning to merge and then back-port to 4.6.1

@davdhacs davdhacs merged commit d0c43be into master Nov 14, 2024
@davdhacs davdhacs deleted the tag-operator-as-fips-compliant branch November 14, 2024 18:35
@davdhacs davdhacs added the backport release-4.6 Create a PR to backport this PR to release-4.6 label Jan 17, 2025
rhacs-bot pushed a commit that referenced this pull request Jan 17, 2025
@rhacs-bot
Copy link
Copy Markdown
Contributor

The backport to release-4.5 failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release-4.5 release-4.5
# Navigate to the new working tree
cd .worktrees/backport-release-4.5
# Create a new branch
git switch --create backport-13219-to-release-4.5
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d0c43be2b60411325886e897cdc7ffb8829ceed9
# Push it to GitHub
git push --set-upstream origin backport-13219-to-release-4.5
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release-4.5

Then, create a pull request where the base branch is release-4.5 and the compare/head branch is backport-13219-to-release-4.5.

davdhacs added a commit that referenced this pull request Jan 20, 2025
davdhacs added a commit that referenced this pull request Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/operator backport release-4.5 backport release-4.6 Create a PR to backport this PR to release-4.6

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants