Skip to content

Add TLS support between Ironic and BMO #631

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

Merged
merged 3 commits into from
Oct 6, 2020

Conversation

maelk
Copy link
Member

@maelk maelk commented Sep 10, 2020

This PR introduces support for TLS using a custom CA certificate in BMO and modifies the deployment file to be able to deploy Ironic, inspector and BMO with TLS enabled.

This requires metal3-io/ironic-image#198 and metal3-io/ironic-inspector-image#62

@metal3-io-bot metal3-io-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 10, 2020
@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maelk

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@metal3-io-bot metal3-io-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 10, 2020
@maelk
Copy link
Member Author

maelk commented Sep 10, 2020

/test-integration

Copy link
Member

@dtantsur dtantsur left a comment

Choose a reason for hiding this comment

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

I think there is a confusion around CA cert vs cert. Unless you want to establish a proper chain OR use client certificates, you don't need 3 files. You only need a private key (passed to ironic as a secret) and a certificate (used everywhere else). I suggest we limit at least the initial proposal to this simplest case to avoid confusion. I'd also prefer we generate certificates rather than make an operator do it.

Copy link
Member Author

@maelk maelk left a comment

Choose a reason for hiding this comment

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

Let me clarify a bit our scenario. We do not want to do client authentication, that is out of the picture, so as @dtantsur pointed out, we do not need the CA in Ironic, just the certs. However, we want to deploy ironic using cert-manager to generate and rotate the certificates used, based on a CA given by the user (or automatically generated). In that case, BMO should accept any certificate signed by that CA, and not only the current certificate, keeping in mind that there isn't any tight link between ironic and BMO anymore, they could even be deployed in different clusters. Hence, not taking the specific certificate, but the CA, allows for not having to re-deploy BMO when cert-manager rotates the ironic certificate.

@maelk
Copy link
Member Author

maelk commented Sep 12, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Sep 12, 2020

I have now modified the ironic images. we are providing the certificate and the key for ironic and inspector, and in addition the CA to validate the certificate to both of them so that they can validate each other's certificate . we provide that certificate to BMO to validate the TLS connection with ironic and inspector. @dtantsur and @dhellmann please take a look

@dtantsur
Copy link
Member

Hence, not taking the specific certificate, but the CA, allows for not having to re-deploy BMO when cert-manager rotates the ironic certificate.

Got it, thank you for explanation.

@maelk
Copy link
Member Author

maelk commented Sep 14, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Sep 15, 2020

/test-integration

@maelk maelk changed the title WIP: Add TLS support between Ironic and BMO Add TLS support between Ironic and BMO Sep 15, 2020
@metal3-io-bot metal3-io-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 15, 2020
@maelk
Copy link
Member Author

maelk commented Sep 15, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Sep 16, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Sep 16, 2020

/test-integration

@kashifest
Copy link
Member

lgtm

@furkatgofurov7
Copy link
Member

lgtm

@maelk maelk force-pushed the tls-mael branch 2 times, most recently from 42e9eba to 3c83cc1 Compare September 16, 2020 17:15
@maelk
Copy link
Member Author

maelk commented Sep 18, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Sep 18, 2020

/test-integration

@maelk maelk force-pushed the tls-mael branch 3 times, most recently from 81af46b to 6e59ff4 Compare September 22, 2020 08:56
@maelk
Copy link
Member Author

maelk commented Sep 22, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Sep 24, 2020

/test-integration

1 similar comment
@maelk
Copy link
Member Author

maelk commented Sep 24, 2020

/test-integration

@dhellmann
Copy link
Member

I would like to freeze go code changes for a few days to try to land #650 without having to rebase it, because rebasing will mean redoing the work from scratch.

/hold

@metal3-io-bot metal3-io-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 24, 2020
@dhellmann
Copy link
Member

#655 has merged

/hold cancel

@metal3-io-bot metal3-io-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2020
@maelk
Copy link
Member Author

maelk commented Oct 2, 2020

/test-integration

@maelk
Copy link
Member Author

maelk commented Oct 2, 2020

We will address the change to the config folder, when we work on the metal3-dev-env adaptation. We currently do not have ways to test it in the CI otherwise.

maelk added 3 commits October 5, 2020 15:38
If IRONIC_CACERT_FILE is set as environment variable, BMO will
use that file as CA certificate when connecting to Ironic.
This commit adds the possibility to deploy Ironic and BMO with
TLS enabled
@maelk
Copy link
Member Author

maelk commented Oct 6, 2020

/test-integration

@metal3-io-bot metal3-io-bot merged commit d26539a into metal3-io:master Oct 6, 2020
@fmuyassarov fmuyassarov deleted the tls-mael branch December 11, 2020 07:30
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants