-
Notifications
You must be signed in to change notification settings - Fork 4
Add support for fips e2e #324
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
base: main
Are you sure you want to change the base?
Conversation
Reviewer's GuideAdds FIPS-enabled end-to-end integration test scenarios for multiple OCP versions and updates the operator e2e pipeline and supporting stepactions to handle FIPS mode and a configurable Keycloak distribution (rhsso vs rhbk) with correct OIDC issuer URLs. Sequence diagram for FIPS-enabled operator e2e pipeline trigger and executionsequenceDiagram
actor Developer
participant AppStudio
participant IntegrationService
participant IntegrationTestScenario_v4_19_e2e_fips
participant GitResolver
participant RhtasOperatorE2EPipeline
participant StepActionInstallKeycloak
participant StepActionInstallTAS
participant OCPCluster
participant Keycloak
Developer->>AppStudio: Push change to component_rhtas_operator_v4_19
AppStudio->>IntegrationService: Create Snapshot for component update
IntegrationService->>IntegrationTestScenario_v4_19_e2e_fips: Match context component_rhtas_operator_v4_19
IntegrationTestScenario_v4_19_e2e_fips-->>IntegrationService: Params OCP_VERSION=4.19 FIPS_ENABLED=true KEYCLOAK_DISTRIBUTION=rhbk
IntegrationService->>GitResolver: Resolve pipelines rhtas-operator-e2e.yaml
GitResolver-->>IntegrationService: Tekton Pipeline definition
IntegrationService->>RhtasOperatorE2EPipeline: Create PipelineRun with params including FIPS_ENABLED and KEYCLOAK_DISTRIBUTION
RhtasOperatorE2EPipeline->>StepActionInstallKeycloak: Execute install-keycloak with FIPS_ENABLED KEYCLOAK_DISTRIBUTION
StepActionInstallKeycloak->>Keycloak: Deploy Keycloak in requested distribution
StepActionInstallKeycloak->>Keycloak: Configure OIDC issuer URL based on distribution
StepActionInstallKeycloak->>Keycloak: Apply FIPS mode settings when FIPS_ENABLED=true
Keycloak-->>StepActionInstallKeycloak: Ready with correct issuer and FIPS configuration
RhtasOperatorE2EPipeline->>StepActionInstallTAS: Execute install-tas with FIPS_ENABLED
StepActionInstallTAS->>OCPCluster: Deploy TAS components with FIPS configuration
OCPCluster-->>StepActionInstallTAS: TAS ready
RhtasOperatorE2EPipeline->>OCPCluster: Run end_to_end_tests
OCPCluster-->>RhtasOperatorE2EPipeline: Test results
RhtasOperatorE2EPipeline-->>IntegrationService: Report PipelineRun status
IntegrationService-->>AppStudio: Integration test result for Snapshot
AppStudio-->>Developer: Surface FIPS e2e test outcome
Flow diagram for Keycloak distribution and FIPS configuration in e2e pipelineflowchart TD
Start[Start PipelineRun with params\nFIPS_ENABLED and KEYCLOAK_DISTRIBUTION]
Start --> CheckDistribution
CheckDistribution{KEYCLOAK_DISTRIBUTION value}
CheckDistribution -->|rhbk| UseRHBK
CheckDistribution -->|rhsso| UseRHSSO
CheckDistribution -->|other| FailInvalidDistribution
UseRHBK[Install rhbk Keycloak\nSet OIDC issuer URL for rhbk]
UseRHSSO[Install rhsso Keycloak\nSet OIDC issuer URL for rhsso]
FailInvalidDistribution[Fail pipeline\nUnsupported Keycloak distribution]
UseRHBK --> CheckFIPS
UseRHSSO --> CheckFIPS
CheckFIPS{FIPS_ENABLED}
CheckFIPS -->|true| EnableFIPS
CheckFIPS -->|false| SkipFIPS
EnableFIPS[Configure Keycloak and TAS components\nwith FIPS compatible settings]
SkipFIPS[Proceed without FIPS specific configuration]
EnableFIPS --> ContinueTests
SkipFIPS --> ContinueTests
ContinueTests[Run end to end tests against OCP cluster]
ContinueTests --> End[Report e2e result back to IntegrationService]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- The new FIPS
IntegrationTestScenarioresources for each OCP version (4.16–4.20 and overlay) are almost identical; consider refactoring them into a shared template/patch (e.g., using kustomize overlays or templating) to reduce duplication and ease future maintenance. - You are modeling
FIPS_ENABLEDas a string parameter throughout and then comparing it textually in bash ([[ "$FIPS_ENABLED" == "true" ]]); if possible, switching this to a boolean Tekton param (and/or normalizing the accepted values in the script) would make the behavior less error-prone.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new FIPS `IntegrationTestScenario` resources for each OCP version (4.16–4.20 and overlay) are almost identical; consider refactoring them into a shared template/patch (e.g., using kustomize overlays or templating) to reduce duplication and ease future maintenance.
- You are modeling `FIPS_ENABLED` as a string parameter throughout and then comparing it textually in bash (`[[ "$FIPS_ENABLED" == "true" ]]`); if possible, switching this to a boolean Tekton param (and/or normalizing the accepted values in the script) would make the behavior less error-prone.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Configuration Diff2 document(s) impacted: + 0 added
- 0 removed
! 2 modifiedDiff@@ spec.resources @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStreamTemplate/rhtas-tenant/operator-template
! + one list entry added:
+ - apiVersion: appstudio.redhat.com/v1beta2
+ kind: IntegrationTestScenario
+ metadata:
+ name: rhtas-operator-e2e-test{{.nameSuffix}}-fips
+ labels:
+ test.appstudio.openshift.io/optional: "true"
+ spec:
+ application: {{.application}}{{.nameSuffix}}
+ contexts:
+ - name: group
+ description: "runs the integration test for a group Snapshot"
+ params:
+ - name: FIPS_ENABLED
+ value: "true"
+ - name: KEYCLOAK_DISTRIBUTION
+ value: rhbk
+ resolverRef:
+ params:
+ - name: url
+ value: "https://github.com/securesign/pipelines.git"
+ - name: revision
+ value: main
+ - name: pathInRepo
+ value: pipelines/integration-test/rhtas-operator-e2e.yaml
+ resolver: git
+ resourceKind: pipelinerun
@@ spec.resources @@
# projctl.konflux.dev/v1beta1/ProjectDevelopmentStreamTemplate/rhtas-tenant/rhtas-fbc-template
! + five list entries added:
+ - apiVersion: appstudio.redhat.com/v1beta2
+ kind: IntegrationTestScenario
+ metadata:
+ name: {{.application}}{{.nameSuffix}}-v4-16-e2e-fips
+ labels:
+ test.appstudio.openshift.io/optional: "true"
+ spec:
+ application: {{.application}}{{.nameSuffix}}
+ contexts:
+ - name: component_{{.application}}{{.nameSuffix}}-v4-16
+ description: "execute the integration test when component {{.application}}{{.nameSuffix}}-v4-16 updates"
+ params:
+ - name: OCP_VERSION
+ value: 4.16
+ - name: FIPS_ENABLED
+ value: "true"
+ - name: KEYCLOAK_DISTRIBUTION
+ value: rhbk
+ resolverRef:
+ params:
+ - name: url
+ value: "https://github.com/securesign/pipelines.git"
+ - name: revision
+ value: main
+ - name: pathInRepo
+ value: pipelines/rhtas-operator-e2e.yaml
+ resolver: git
+ resourceKind: pipeline
+ - apiVersion: appstudio.redhat.com/v1beta2
+ kind: IntegrationTestScenario
+ metadata:
+ name: {{.application}}{{.nameSuffix}}-v4-17-e2e-fips
+ labels:
+ test.appstudio.openshift.io/optional: "true"
+ spec:
+ application: {{.application}}{{.nameSuffix}}
+ contexts:
+ - name: component_{{.application}}{{.nameSuffix}}-v4-17
+ description: "execute the integration test when component {{.application}}{{.nameSuffix}}-v4-17 updates"
+ params:
+ - name: OCP_VERSION
+ value: 4.17
+ - name: FIPS_ENABLED
+ value: "true"
+ - name: KEYCLOAK_DISTRIBUTION
+ value: rhbk
+ resolverRef:
+ params:
+ - name: url
+ value: "https://github.com/securesign/pipelines.git"
+ - name: revision
+ value: main
+ - name: pathInRepo
+ value: pipelines/rhtas-operator-e2e.yaml
+ resolver: git
+ resourceKind: pipeline
+ - apiVersion: appstudio.redhat.com/v1beta2
+ kind: IntegrationTestScenario
+ metadata:
+ name: {{.application}}{{.nameSuffix}}-v4-18-e2e-fips
+ labels:
+ test.appstudio.openshift.io/optional: "true"
+ spec:
+ application: {{.application}}{{.nameSuffix}}
+ contexts:
+ - name: component_{{.application}}{{.nameSuffix}}-v4-18
+ description: "execute the integration test when component {{.application}}{{.nameSuffix}}-v4-18 updates"
+ params:
+ - name: OCP_VERSION
+ value: 4.18
+ - name: FIPS_ENABLED
+ value: "true"
+ - name: KEYCLOAK_DISTRIBUTION
+ value: rhbk
+ resolverRef:
+ params:
+ - name: url
+ value: "https://github.com/securesign/pipelines.git"
+ - name: revision
+ value: main
+ - name: pathInRepo
+ value: pipelines/rhtas-operator-e2e.yaml
+ resolver: git
+ resourceKind: pipeline
+ - apiVersion: appstudio.redhat.com/v1beta2
+ kind: IntegrationTestScenario
+ metadata:
+ name: {{.application}}{{.nameSuffix}}-v4-19-e2e-fips
+ labels:
+ test.appstudio.openshift.io/optional: "true"
+ spec:
+ application: {{.application}}{{.nameSuffix}}
+ contexts:
+ - name: component_{{.application}}{{.nameSuffix}}-v4-19
+ description: "execute the integration test when component {{.application}}{{.nameSuffix}}-v4-19 updates"
+ params:
+ - name: OCP_VERSION
+ value: 4.19
+ - name: FIPS_ENABLED
+ value: "true"
+ - name: KEYCLOAK_DISTRIBUTION
+ value: rhbk
+ resolverRef:
+ params:
+ - name: url
+ value: "https://github.com/securesign/pipelines.git"
+ - name: revision
+ value: main
+ - name: pathInRepo
+ value: pipelines/rhtas-operator-e2e.yaml
+ resolver: git
+ resourceKind: pipeline
+ - apiVersion: appstudio.redhat.com/v1beta2
+ kind: IntegrationTestScenario
+ metadata:
+ name: {{.application}}{{.nameSuffix}}-v4-20-e2e-fips
+ labels:
+ test.appstudio.openshift.io/optional: "true"
+ spec:
+ application: {{.application}}{{.nameSuffix}}
+ contexts:
+ - name: component_{{.application}}{{.nameSuffix}}-v4-20
+ description: "execute the integration test when component {{.application}}{{.nameSuffix}}-v4-20 updates"
+ params:
+ - name: OCP_VERSION
+ value: 4.20
+ - name: FIPS_ENABLED
+ value: "true"
+ - name: KEYCLOAK_DISTRIBUTION
+ value: rhbk
+ resolverRef:
+ params:
+ - name: url
+ value: "https://github.com/securesign/pipelines.git"
+ - name: revision
+ value: main
+ - name: pathInRepo
+ value: pipelines/rhtas-operator-e2e.yaml
+ resolver: git
+ resourceKind: pipeline📦 Artifacts: base-output.yaml, head-output.yaml, dyff-output.txt |
Summary by Sourcery
Add optional FIPS-enabled end-to-end integration test scenarios across supported OCP versions and extend the operator e2e pipeline to parameterize FIPS mode and Keycloak distribution while wiring through issuer URL handling.
New Features:
Enhancements: