-
Notifications
You must be signed in to change notification settings - Fork 246
[release-ocm-2.12] MGMT-20207: avoid adding system CA bundle to AdditionalTrustBundle #7520
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
[release-ocm-2.12] MGMT-20207: avoid adding system CA bundle to AdditionalTrustBundle #7520
Conversation
When generating the install config, it should not include the entire system CA bundle. I.e. when setting the AdditionalTrustBundle[1]. However, when using a mirror regsitry (e.g. with MirrorRegistryRef[2] in ASC), the installConfigBuilder is adding the content of tls-ca-bundle.pem[3]. This pem file is created[4] by ASC controller, and includes the full system CA bundle since the bundle[5] is injected into 'cluster-trusted-ca-bundle'. Therefore, the suggestion solution is to create a separate pem file just for the certificates specified in MirrorRegistryRef. I.e. generate a new 'user-registry-ca-bundle.pem' file, that will be included as part of AdditionalTrustBundle. These certificates will propagate into the 'user-ca-bundle' CM during cluster installation. This will ensure that 'user-ca-bundle' CM indeed includes only custom certificates mandatory for the user, instead of the system CA bundle. Note: as backwards compatibility, for flows as ABI, we keep a fallback to the current behaviour (i.e. include 'tls-ca-bundle.pem' only when 'user-registry-ca-bundle.pem' doesn't exist). [1] https://github.com/openshift/assisted-service/blob/40ab10db5e872e519ab0a97e82fc318423feeaba/internal/installcfg/builder/builder.go#L275 [2] https://github.com/openshift/assisted-service/blob/cb169a2d2c97bb3dccd06ad4b75f2937e01f78f4/vendor/github.com/openshift/assisted-service/api/v1beta1/agentserviceconfig_types.go#L82 [3] https://github.com/openshift/assisted-service/blob/a1c3229afee1f0f774b286283fb0d0098b9eac03/internal/common/common.go#L35 [4] https://github.com/openshift/assisted-service/blob/341f9860c455cccc42741f350024d05aa72755f8/internal/controller/controllers/agentserviceconfig_controller.go#L1848 [5] https://github.com/openshift/assisted-service/blob/341f9860c455cccc42741f350024d05aa72755f8/internal/controller/controllers/agentserviceconfig_controller.go#L1059
|
@danielerez: This pull request references MGMT-20207 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/cc @carbonin |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielerez, gamli75 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 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-ocm-2.12 #7520 +/- ##
====================================================
+ Coverage 68.34% 68.36% +0.01%
====================================================
Files 257 257
Lines 37668 37690 +22
====================================================
+ Hits 25743 25765 +22
- Misses 9638 9639 +1
+ Partials 2287 2286 -1
🚀 New features to boost your workflow:
|
|
@danielerez: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
a7a1ec4
into
openshift:release-ocm-2.12
This is a cherry-pick of #7448