-
Notifications
You must be signed in to change notification settings - Fork 568
OPRUN-4411: Add APIServer TLS controller for OpenShift cluster-wide TLS configuration #3739
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
OPRUN-4411: Add APIServer TLS controller for OpenShift cluster-wide TLS configuration #3739
Conversation
|
/label qe-approved |
|
@tmshort we need to rebase |
| require.NoError(t, err) | ||
|
|
||
| // Verify secure defaults | ||
| assert.GreaterOrEqual(t, config.MinVersion, uint16(tls.VersionTLS12), "Should use at least TLS 1.2") |
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.
Have we not a bug in some specific version / CVE that made we downgrade the version?
See: https://github.com/kubernetes-sigs/kubebuilder/blob/master/testdata/project-v4/cmd/main.go#L96-L105
Isn't it still valid?
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.
HTTP version is different than TLS version.
What you're talking about is HTTP version, and the config is already done in server.go (lines not modified in this PR).
| case tls.VersionTLS13: | ||
| return "TLS 1.3" | ||
| default: | ||
| return "unknown" |
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 see we fail if not one of those right?
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.
Correct; they specified an unknown TLS version, so we wouldn't know what to do.
|
Hi @tmshort We need to rebase this one. /lgtm It would be nice for this one to get a second reviewer as well, maybe @perdasilva |
|
There was some duplicate code; since @anik120's review requested changes in that area, I consolidated it. |
98ad4dd to
4f0ce11
Compare
|
After the changes, many MD files generated by CLAUDE are here. Can we change that? |
pkg/lib/apiserver/querier.go
Outdated
| ) | ||
|
|
||
| // NoopQuerier returns an instance of noopQuerier. It's used for upstream where | ||
| // we don't have any cluster APIServer configuration. |
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.
nit:
| // we don't have any cluster APIServer configuration. | |
| // we don't have any apiserver.config.openshift.io/cluster resource. |
pkg/lib/apiserver/syncer.go
Outdated
| ) | ||
|
|
||
| const ( | ||
| // This is the cluster level global APIServer object name. |
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.
nit:
| // This is the cluster level global APIServer object name. | |
| // This is the cluster level global apiserver.config.openshift.io/cluster object name. |
pkg/lib/apiserver/syncer.go
Outdated
| defaultSyncInterval = 30 * time.Minute | ||
| ) | ||
|
|
||
| // NewSyncer returns informer and sync functions to enable watch of APIServer type. |
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.
| // NewSyncer returns informer and sync functions to enable watch of APIServer type. | |
| // NewSyncer returns informer and sync functions to enable watch of apiserver.config.openshift.io/cluster CRs. |
HTTPS_SERVERS.md
Outdated
| @@ -0,0 +1,387 @@ | |||
| # HTTPS Servers in OLM Codebase | |||
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.
These docs are definitely helpful, I like them.
But root is not the right place for them right? docs/design is a more suitable place for them no?
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.
They weren't supposed to be committed, they were for code investigation purposes.
…tion Implements a controller that watches the OpenShift APIServer resource and provides thread-safe access to TLS configuration for HTTPS servers/clients. The controller is modeled after the existing proxy controller. This is intended to be used by the OLM operator, Catalog operator and marketplace operator (but it will need to be copied). It will also be used by the downstream PSM component. Signed-off-by: Todd Short <todd.short@me.com> Assisted-By: Claude
Those files were not supposed to have been included in the PR. They were part of my code investigation. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anik120 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Looks like ci added both the labels as soon as I approved it. I'll hold it for @camilamacedo86 to cancel the hold since she was reviewing it too /hold |
6fc19e0
into
operator-framework:master
|
Weird how this merged with failing tests... :( |
|
woah did the CI bot just totally go rouge here? XD It added both the labels and didn't even care about the hold XD Fwiw I was okay with this merging. |
Implements a controller that watches the OpenShift APIServer resource and provides thread-safe access to TLS configuration for HTTPS servers/clients.
The controller is modeled after the existing proxy controller.
This is intended to be used by the OLM operator, Catalog operator and marketplace operator (but it will need to be copied). It will also be used by the downstream PSM component.
Assisted-By: Claude