-
Notifications
You must be signed in to change notification settings - Fork 66
✨ Add support for TLS profiles #2246
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
✨ Add support for TLS profiles #2246
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2246 +/- ##
==========================================
+ Coverage 72.46% 72.69% +0.23%
==========================================
Files 86 89 +3
Lines 8592 8747 +155
==========================================
+ Hits 6226 6359 +133
- Misses 1954 1970 +16
- Partials 412 418 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ca6bb26
to
8692861
Compare
- --v=${LOG_VERBOSITY} | ||
- --global-pull-secret=openshift-config/pull-secret | ||
{{- end }} | ||
{{- if not .Values.options.openshift.enabled }} |
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.
Don't love a distro-specific flag here. Can we do this in a generic way?
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.
This was really meant to be an e2e flag.
Is this PR solving an issue or adding a new feature? |
{{- if not .Values.options.openshift.enabled }} | ||
- --tls-profile=modern | ||
{{- end }} |
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.
For OCP, I think the expectation is that the TLS settings will always be dynamically configured based on the contents of apiservers.config.openshift.io.Spec.TLSSecurityProfile
and the logic in https://github.com/openshift/library-go/blob/f838eb5c601908101db3c84f925c0093b5304611/pkg/operator/configobserver/apiserver/observe_tlssecurityprofile.go#L85-L109
RH probably needs to export that function (or at least use/implement some other helper that calls it) so that they can use OCP's opinions of what the default should be and what the different profiles actually are when they run OLM in OpenShift.
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.
I overlooked the not
part of this, and realized that this templating is setting a default for upstream, so all good! But hopefully the info in my previous comment is helpful for the OCP integration bits of this that would come later.
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.
At this point, cluster-olm-operator will watch that API on behalf of op-con and catd, and update the manifests.
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.
Yeah, I'm mainly just saying now that downstream will likely want to follow whatever OCP's opinions are on:
- what the default profile is
- what the definition of each profile is.
|
||
func AddFlags(fs *pflag.FlagSet) { | ||
fs.Var(&configuredProfile, "tls-profile", "The TLS profile to use. One of "+fmt.Sprintf("%v", slices.Sorted(maps.Keys(profiles)))) | ||
fs.Var(&customTLSProfile.ciphers, "tls-custom-cipher", "List of ciphers to be used with the custom TLS profile") |
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.
fs.Var(&customTLSProfile.ciphers, "tls-custom-cipher", "List of ciphers to be used with the custom TLS profile") | |
fs.Var(&customTLSProfile.ciphers, "tls-custom-ciphers", "List of ciphers to be used with the custom TLS profile") |
|
||
func (p *tlsProfileName) Set(value string) error { | ||
newValue := tlsProfileName(value) | ||
_, err := findTlsProfile(newValue) |
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.
_, err := findTlsProfile(newValue) | |
_, err := findTLSProfile(newValue) |
- --tls-profile=custom | ||
- --tls-custom-version=TLSv1.3 | ||
- --tls-custom-cipher=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384 |
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.
To match operator controller's upstream default?
- --tls-profile=custom | |
- --tls-custom-version=TLSv1.3 | |
- --tls-custom-cipher=TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384 | |
- --tls-profile=modern |
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.
The custom is basically modern missing one cipher. I really meant for it to be e2e.
@grokspawn there's a downstream bug to support TLS profiles, this is adding the functionality upstream without having to be "too" openshift aware. |
Given that this is considered a GA component, I would expect to see something like:
|
|
|
That is to include the options for the upstream-e2e only, and not on the downstream-e2e; it's for test purposes during the upstream-e2e, and to avoid erroneously adding it to OpenShift. Nothing precludes adding those values during |
IMHO, the upstream should not have to care about any distro. Responsibility for using it properly in a distro lies with that distro. |
We already have Openshift as an option in the helm charts for downstream even before this PR. I can remove the check from this PR, but it won't remove the fact that there's an Openshift option in the chart.
Again, this is possible via |
Use Mozilla's profiles to define TLS profiles for operator-controller and catalogd. These are configured via command-line options, and can be customized. The idea is that downstream, cluster-olm-operator will be able to glean the appropriate configuration, and provide that to the components. There is a semi-automatic method to update the profiles, if that ever happens (`make update-tls-profiles`). This adds `gojq` via bingo, which is a golang implementation of jq for the update-tls-profiles target. Signed-off-by: Todd Short <tshort@redhat.com>
Removed the |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: grokspawn, joelanford The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
029484d
into
operator-framework:main
Use Mozilla's profiles to define TLS profiles for operator-controller and catalogd. These are configured via command-line options, and can be customized.
The idea is that downstream, cluster-olm-operator will be able to glean the appropriate configuration, and provide that to the components.
There is a semi-automatic method to update the profiles, if that ever happens (
make update-tls-profiles
).This adds
gojq
via bingo, which is a golang implementation of jq for the update-tls-profiles target.Description
Reviewer Checklist