Skip to content

Conversation

@jcpowermac
Copy link
Contributor

To support MITM (ssl) proxy and registries add an optional
AdditionalTrustBundle string to InstallConfig.

Modified InstallConfig to include AdditionalTrustBundle
Add validation of certificate that is provided via InstallConfig
Modify BootstrapTemplateData to include AdditionalTrustBundle
Add a template for ca.crt in /etc/pki/ca-trust/source/anchors
Add update-trust.sh script to update-ca-trust if ca.crt file exists in /etc/pki/ca-trust/source/anchors
Add systemd unit to run update-trust.sh script

@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 19, 2019
@patrickdillon
Copy link
Contributor

Is there a case where user might have one cert for proxy and a different one for registry, so they need 2 bundles?

@jcpowermac
Copy link
Contributor Author

Is there a case where user might have one cert for proxy and a different one for registry, so they need 2 bundles?

should be able to combine the certificate files together and use that string in the install-config.yaml.

Copy link
Contributor

@patrickdillon patrickdillon Jul 19, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this systemd service is not needed if coreos/fedora-coreos-config#120 merges?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickdillon nope you're right I don't think we would need it. Maybe it will be a timing issue when it makes it into RHCOS?

@DanyC97
Copy link
Contributor

DanyC97 commented Jul 21, 2019

@jcpowermac curious, MITM stands for ?

@danehans
Copy link
Contributor

@DanyC97 MITM = Man in the Middle.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 23, 2019
@jcpowermac jcpowermac changed the title [WIP] Add AdditionalTrustBundle to InstallConfig Add AdditionalTrustBundle to InstallConfig Jul 24, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 24, 2019
@jcpowermac
Copy link
Contributor Author

@abhinavdahiya when you have a chance can you PTAL, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can add newline.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these needs to be ca-bundle.crt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should rename to something like user-ca-bundle

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name is somethings like user-ca-bundle

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhinavdahiya that was the name based on the google doc.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so looking at
https://github.com/openshift/api/blob/d75a161a0f4ded1815ec24321fc1f8609c255cdb/config/v1/types_proxy.go#L46-L49

namespace is required to be openshift-config-managed
the key should be ca-bundle.crt

so restriction on name, and since we use this for more than proxy, user-ca-bundle like is more appropriate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably be CABundle as that's what's is validating ie that the string is ca bundle.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this error is most appropriate in pkg/types/validate where we are validating the field..
invalid block should be enough here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danehans do we want all the certificates in the ConfigMap or just the CA certificates?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: extra line.

To support MITM (ssl) proxy and registries add an optional
AdditionalTrustBundle string to InstallConfig.

Modified InstallConfig to include AdditionalTrustBundle
Add validation of certificate that is provided via InstallConfig
Modify BootstrapTemplateData to include AdditionalTrustBundle
Add a template for ca.crt in /etc/pki/ca-trust/source/anchors
Add update-trust.sh script to update-ca-trust if ca.crt file exists in /etc/pki/ca-trust/source/anchors
Add machineconfig ForAdditionalTrustBundle function
Modified master and worker asset machines for AdditionalTrustBundle
Add Tests for validate AdditionalTrustBundle
Add additionaltrustbundleconfig that creates a ConfigMap
that contains the Proxy CA files.
@abhinavdahiya
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 25, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, jcpowermac

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 25, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit df92892 into openshift:master Jul 25, 2019
@openshift-ci-robot
Copy link
Contributor

@jcpowermac: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 fdc518a link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

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 kubernetes/test-infra repository. I understand the commands that are listed here.

Kind: "ConfigMap",
},
ObjectMeta: metav1.ObjectMeta{
Namespace: "openshift-config-managed",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abhinavdahiya @jcpowermac according to the proxy workflow doc and after talking with @bparees, it appears the installer is creating the configmap in the wrong namespace. The namespace should be openshift-config instead of openshift-config-managed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants