-
Notifications
You must be signed in to change notification settings - Fork 227
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
Conversation
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. |
|
/easycla |
@ameowlia EasyCLA is signed off, so this can get moving again 🎉 |
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.
Did acceptance on the 2 PRs...
- ✅ GIVEN this is code is deployed, WHEN the opsfile is not applied THEN gorouter continued to use the non-tls nats endpoint.
- ✅ 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
Removed an extra commit that had snuck in here 🤦🏻 fixed @ameowlia |
🎉 🐱 Thank you so much @46bit! |
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
branchI 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