Skip to content
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 talking to NATS over mTLS #283

Merged
merged 1 commit into from
Jul 13, 2021
Merged

Add support for talking to NATS over mTLS #283

merged 1 commit into from
Jul 13, 2021

Conversation

46bit
Copy link
Contributor

@46bit 46bit commented May 19, 2021

  • A short explanation of the proposed change: this PR makes Gorouter able to talk to NATS via Mutual TLS. This can remove one of the remaining non-TLS uses within Cloud Foundry.

  • An explanation of the use cases your change solves: many organisations using Cloud Foundry want it to use TLS everywhere. This ensures no sensitive data can be snooped on the network, and helps with compliance.

  • Instructions to functionally test the behavior change using operator interfaces (BOSH manifest, logs, curl, and metrics): followup PRs are coming shortly to cf-deployment and routing-release that can be deployed.

  • Expected result after the change: Gorouter will connect to NATS over Mutual TLS. Also, nothing will be left connecting to NATS over plaintext.

  • Links to any other associated PRs: Support Gorouter talking to NATS over mTLS routing-release#204 and Configure Gorouter to talk to NATS over mTLS cf-deployment#925

  • I have viewed signed and have submitted the Contributor License Agreement: this is actively in-progress

  • I have made this pull request to the main branch

  • I have run all the unit tests using scripts/run-unit-tests-in-docker from routing-release.

  • (Optional) I have run Routing Acceptance Tests and Routing Smoke Tests on bosh lite

  • (Optional) I have run CF Acceptance Tests on bosh lite

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented May 19, 2021

CLA Signed

The committers are authorized under a signed CLA.

@WillsonHG
Copy link

/easycla

@46bit
Copy link
Contributor Author

46bit commented Jun 9, 2021

@ameowlia EasyCLA is signed off, so this can get moving again 🎉

Copy link
Member

@ameowlia ameowlia left a comment

Choose a reason for hiding this comment

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

Did acceptance on the 2 PRs...

  1. ✅ GIVEN this is code is deployed, WHEN the opsfile is not applied THEN gorouter continued to use the non-tls nats endpoint.
  2. ✅ GIVEN this is code is deployed, WHEN the opsfile is applied THEN gorouter used the tls nats endpoint.

If you can edit this one fixme comment, then I will merge!

🙏 Thank you so much for your hard work on this!

Until now Gorouter has been unable to encrypt its connection to NATS.
Mutual TLS has been added for other components that talk to NATS, but
not to Gorouter.

This commit adds support for configuring the NATS connection with
Mutual TLS. This code is based heavily on the implementation in
route-emitter [1].

The config YAML's structure gets some changes: the username and password
is no longer provided separately for every NATS machine. This isn't a
limitation in real-world Cloud Foundry deployments. Port is repeated for
each NATS machine so that the integration tests can still run multiple
NATS on multiple ports.

[1] https://github.com/cloudfoundry/route-emitter/tree/master/diegonats
@46bit
Copy link
Contributor Author

46bit commented Jul 12, 2021

Removed an extra commit that had snuck in here 🤦🏻 fixed @ameowlia

@ameowlia ameowlia merged commit c69a1e1 into cloudfoundry:main Jul 13, 2021
@ameowlia
Copy link
Member

🎉 🐱 Thank you so much @46bit!

@46bit 46bit deleted the talk-to-nats-over-tls branch July 13, 2021 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants