Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions pkg/crypto/tls_adherence.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package crypto

import (
configv1 "github.com/openshift/api/config/v1"
)

// ShouldAllComponentsAdhere returns true if all components should adhere to
// the cluster-wide TLS security profile settings. When this returns false,
// only external-facing API server components are required to adhere.
//
// This function encapsulates the default semantic for the "no opinion" case,
// allowing a future coordinated change to the default behavior across all
// component implementations.
func ShouldAllComponentsAdhere(tlsAdherence configv1.TLSAdherencePolicy) bool {
if tlsAdherence == configv1.TLSAdherencePolicyNoOpinion || tlsAdherence == configv1.TLSAdherencePolicyLegacyExternalAPIServerComponentsOnly {
return false
}
return true
}