Skip to content

Commit 320cf55

Browse files
committed
tls: Allow using insecure ciphers
Blocking insecure cipher usage may break upgrade path on clusters that still use old TLS settings (e.g.: Openshift cluster using TLSSecurityProfile type Old). Drop insecure ciphers validation. Signed-off-by: Or Mergi <ormergi@redhat.com>
1 parent 556a72f commit 320cf55

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

pkg/config/tls.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ func ParseTLSOptions(
6868
}
6969

7070
cipherSuiteNames := parseStringSlice(tlsCipherSuitesRaw)
71-
if err := validateSafeCipherSuite(cipherSuiteNames); err != nil {
72-
return nil, err
73-
}
7471
if err := validateTLSVersionConfigurableCiphers(tlsMinVersion, cipherSuiteNames); err != nil {
7572
return nil, err
7673
}
@@ -110,15 +107,6 @@ func toTLSVersion(tlsVersionName string) (uint16, error) {
110107
return tlsVersion, nil
111108
}
112109

113-
func validateSafeCipherSuite(cipherSuiteNames []string) error {
114-
for _, cipherSuiteName := range cipherSuiteNames {
115-
if _, exist := indexedInsecureCipherSuiteNames[cipherSuiteName]; exist {
116-
return fmt.Errorf("using insecure cipher suite %q is not allowed", cipherSuiteName)
117-
}
118-
}
119-
return nil
120-
}
121-
122110
func validateTLSVersionConfigurableCiphers(versionID uint16, cipherSuiteNames []string) error {
123111
if versionID == tls.VersionTLS13 && len(cipherSuiteNames) > 0 {
124112
return fmt.Errorf("configuring cipher suites for TLS 1.3 is not allowed")

pkg/config/tls_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,6 @@ var _ = Describe("ParseTLSOptions", func() {
7171
ciphers: "TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384",
7272
},
7373
),
74-
Entry("insecure cipher suite is specified",
75-
flags{
76-
minVersion: "VersionTLS12",
77-
// TLS_RSA_WITH_AES_128_CBC_SHA256 is insecure cipher suite for TLS 1.2
78-
ciphers: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256",
79-
},
80-
),
8174
)
8275

8376
DescribeTable("should succeed, given",

0 commit comments

Comments
 (0)