Uploaded image for project: 'OpenShift Kueue'
  1. OpenShift Kueue
  2. OCPKUEUE-469

Add TLS curve preferences support when openshift/api#2583 merges

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None

      Summary

      Update the TLS security profile implementation to support curve preferences once openshift/api#2583 is merged.

      {warning}Blocked: This story is blocked until openshift/api#2583 is merged and the vendored openshift/api is updated to include curve preferences in TLSSecurityProfile.{warning}

      Background

      OpenShift TLS profiles currently specify:

      • TLS protocol versions (e.g., TLS 1.2, TLS 1.3)
      • Cipher suites (e.g., ECDHE-RSA-AES128-GCM-SHA256)

      Once openshift/api#2583 merges, TLS profiles will also include:

      • Curve preferences (e.g., X25519, P-256, P-384)

      This is important for PQC (Post-Quantum Cryptography) readiness, as PQC-resilient key exchange algorithms will use specific curves.

      {info}Note: The upstream Kueue KEP (OCPKUEUE-450) includes curve preferences in its design. This story is only for the operator to read curves from the OpenShift APIServer and pass them to the operand.{info}

      Implementation Steps

      Once openshift/api#2583 is merged:

      1. Update go.mod to pull latest openshift/api with curve support
      2. Update pkg/tls/config.go to extract curve preferences from profile
      3. Update ConfigMap generation to include curvePreferences
      4. Add unit tests for curve preferences handling
      5. Add E2E tests to verify curve preferences are applied

      Files to Modify

      • go.mod - Update openshift/api version
      • pkg/tls/config.go - Add curve handling to GetTLSConfig
      • pkg/tls/config_test.go - Add curve tests
      • pkg/operator/target_config_reconciler.go - Include curves in ConfigMap

      Code Changes

      // In pkg/tls/config.go
      type TLSConfig struct {
          MinTLSVersion    uint16
          CipherSuites     []uint16
          CurvePreferences []tls.CurveID  // Add this
      }
      
      func GetTLSConfig(profile *configv1.TLSSecurityProfile) *TLSConfig {
          // ... existing code ...
          
          // Add once openshift/api#2583 merges:
          // curvePreferences := crypto.CurvesToIDs(spec.Curves)
          
          return &TLSConfig{
              MinTLSVersion:    minVersion,
              CipherSuites:     cipherSuites,
              CurvePreferences: curvePreferences,
          }
      }
      

      Acceptance Criteria

      • [ ] openshift/api#2583 is merged (blocker)
      • [ ] go.mod updated with new openshift/api version
      • [ ] TLS helper extracts curve preferences from profile
      • [ ] ConfigMap includes curvePreferences for operand
      • [ ] Default curves used when profile has no curve preferences
      • [ ] Unit tests for curve preferences
      • [ ] E2E tests verify curve configuration

      References

              harpatil@redhat.com Harshal Patil
              harpatil@redhat.com Harshal Patil
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: