-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow to specify TLS cert for secure GRPC connection to Beacon Chain #34
Conversation
Sorry it took me so long to test, been a busy week or two. I'm seeing messages like this in the logs for eth2stats-client:
I'm generating my cert with this script:
Let me know if you need any other info. |
hey guys, would love to merge this, it would be ideal if there was some readme section telling you how to generate the certs as well cheers |
@mrosack I think if your cert is valid for |
I'm sorry, it's user error, in my configuration I was using 127.0.0.1 when configuring the validator to talk to the beacon node, and using localhost when configuring eth2stats to talk to the beacon node, so the two didn't like the same cert. With both using 127.0.0.1 everything seems great! |
And with that aha moment, I realized I don't need to overcomplicate my cert creation with the IP SANs and can obviously just use localhost as the name for everything:
Beacon: Validator: Eth2Stats: |
thanks @linki , much appreciated |
@tzapu I added a section about the I kept it brief and only explain how to configure it for eth2stats. All the details on how to create and use self-signed certificates are explained in Prysm's documentation. |
This allows to specify a custom TLS certificate for the GRPC connection to the beacon chain (only supported by prysm at the moment).
Implements #27
It's backwards compatible. If no
--beacon.tls-cert
is provided it uses the current behaviour. It prints a warning about the insecure connection, though.I didn't test a custom TLS cert for HTTPS connections, e.g. to lighthouse, and I don't know if it makes sense. Therefore, this case is guarded so no one accidentally configures it.
The implementation is highly inspired by prysm's source code, e.g. here.