Skip to content

[release-5.0] test/networking: Add TLS Profile Compliance tests for networking components - #31613

Open
weliang1 wants to merge 3 commits into
openshift:release-5.0from
weliang1:backport-tls-5.0
Open

[release-5.0] test/networking: Add TLS Profile Compliance tests for networking components#31613
weliang1 wants to merge 3 commits into
openshift:release-5.0from
weliang1:backport-tls-5.0

Conversation

@weliang1

@weliang1 weliang1 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Backport of PR #31500 from main branch to release-5.0.

This PR adds TLS Profile Compliance tests for networking components to the release-5.0 branch.

Changes

  • test/extended/networking/tls.go (new file): TLS Profile Compliance test suite covering:

    • Profile type detection (Modern, Intermediate, Old)
    • TLS version enforcement
    • Cipher suite validation
    • Component configuration validation
    • Profile change propagation and reconciliation
  • test/extended/util/tls.go (enhancements):

    • Added portForwardTargetOnReadyNode() for degraded cluster support
    • Added helper utilities for TLS connection verification
    • Improved port-forwarding logic to handle degraded clusters
    • Added certificate info retrieval utilities

Testing

The TLS tests validate that all OpenShift networking components (ingress router, API servers, etcd, etc.) correctly reconcile TLS profile changes and enforce the expected configuration.

Tests are marked as informing and won't block CI.

Co-Authored-By: Claude Haiku 4.5 noreply@anthropic.com

weliang1 and others added 3 commits September 4, 2026 16:33
…onents

Add comprehensive e2e tests to verify TLS profile compliance across
OpenShift networking components (Multus, OVN-Kubernetes, CNO, and
Networking Console Plugin) when configured with different TLS profiles
and adherence policies.

The test runs three scenarios sequentially in a single g.It() block:
1. Modern TLS Profile with LegacyAdheringComponentsOnly adherence
2. Modern TLS Profile with StrictAllComponents adherence
3. Intermediate TLS Profile with StrictAllComponents adherence

Key features:
- Enables TLSAdherence feature gate via CustomNoUpgrade
- Configures APIServer TLSSecurityProfile and TLSAdherence
- Waits for MCP rollout, node stability, and operator settlement
- Verifies TLS 1.2/1.3 handshakes via port-forward to component pods
- Implements retry logic for transient API server timeout errors
- Validates component behavior matches expected adherence policies

Test components verified:
- Multus admission controller (ports 6443, 8443) - adhering component
- OVN-Kubernetes nodes (ports 9103, 9105) - non-adhering
- Cluster Network Operator (ports 9104, 9103, 9105) - non-adhering
- Networking Console Plugin (port 9443) - non-adhering

Implementation notes:
- Uses single g.It() block instead of g.Ordered to ensure sequential
  execution, as openshift-tests runs each g.It() as separate process
- Uses g.By() steps for test granularity and logging visibility
- Skips g.BeforeAll() (requires g.Ordered) and checks cluster type
  directly in test body
- Scenario 2 uses simple operator settle check (no timestamp validation)
  to avoid race condition with operators already settled from Scenario 1

Test execution paths by scenario:
- Scenario 1 (Modern + LegacyAdheringComponentsOnly): MCP rollout +
  node stability + operator settle
- Scenario 2 (Modern + StrictAllComponents): TLS operators stable +
  operator settle (no MCP, no node check, no timestamp validation)
- Scenario 3 (Intermediate + StrictAllComponents): MCP rollout +
  node stability + operator settle

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add ote.Informing() decorator to TLS compliance test to mark it as
informational, preventing CI failures while the test is stabilized.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix compilation error by importing the ote package needed for
ote.Informing() decorator used in the TLS compliance test.

Import: github.com/openshift-eng/openshift-tests-extension/pkg/ginkgo

Fixes:
- ci/prow/unit: test/extended/networking/tls.go:58:113: undefined: ote
- ci/prow/verify: same compilation error
- ci/prow/okd-scos-images: same compilation error

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: automatic mode

@coderabbitai

coderabbitai Bot commented Sep 4, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 5a69e1ff-fbcb-42c5-ac6d-457f979179a4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: weliang1
Once this PR has been reviewed and has the lgtm label, please assign stbenjam for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@weliang1

weliang1 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

/test unit
/test verify-deps
/test go-verify-deps
/test images

@openshift-ci

openshift-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

@weliang1: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/go-verify-deps 49d3d49 link true /test go-verify-deps
ci/prow/unit 49d3d49 link true /test unit
ci/prow/verify-deps 49d3d49 link true /test verify-deps
ci/prow/images 49d3d49 link true /test images
ci/prow/okd-scos-images 49d3d49 link true /test okd-scos-images
ci/prow/verify 49d3d49 link true /test verify

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant