-
Notifications
You must be signed in to change notification settings - Fork 991
fix(nodebuilder): TLS key/cert name variables #4203
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4203 +/- ##
==========================================
- Coverage 44.83% 44.75% -0.09%
==========================================
Files 265 312 +47
Lines 14620 22959 +8339
==========================================
+ Hits 6555 10275 +3720
- Misses 7313 11563 +4250
- Partials 752 1121 +369 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Please run |
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.
SGTM
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.
Generally LGMT. But it makes me think that we don't need TLS_PATH anymore and we can have TLS_KEY_PATH
and TLS_CERT_PATH
instead. It also covers a case when key and certs can be set in different folders.
UPD: we can do much more with the tls stuff in future, so maybe we can have a separate structure in the node's config for it?
Thoughts @renaynay @Wondertan @walldiss @cristaloleg
The thought behind keeping I've also noticed there's no docs for this (or any requirement for having TLS at all). Is that something worth exploring? |
do you mean these docs https://docs.celestia.org/how-to-guides/light-node#optional-start-light-node-with-core-endpoint-with-authentication ? |
this TLS config is for libp2p's websocket, not for core |
Hey @koenmtb1, aside from this PR, you may wanna take a look at https://blog.libp2p.io/autotls/. We haven't integrated it yet, but it's targeting this particular struggle of managing TLS certs. This is gonna be super helpful for bootstrapper infra by automating cert issuing. We would appreciate if you can take a look into it and help us and other bootstrappers with integration of this tool. |
This is interesting, would be open to adding support for this. Probably a separate PR and keep support for self serving certificates? |
Yes
We can start with the default one for simplicity |
Depending on how one generates the TLS certificates it might use different names for the key files.
These are currently hard-coded to
cert.pem
andkey.pem
, but for example letsencrypt by default useskeychain.pem
which does load correctly into Go TLS.To prevent having to manually create a symlink using an env variable will resolve that.
One outstanding question that I still have is that if TLS certs are renewed, does the node pick it up automatically? As far as I can tell it currently doesn't, happy to work on that too but a pointer of would be helpful.