-
Notifications
You must be signed in to change notification settings - Fork 316
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 tests for ssl/tls #162
Comments
there is a example of TlsTest from grpc. Maybe we can get some idea for that. |
I use the example create a HTTPS client for JETCD,but it did not work very well: |
I'm trying to migrate from etcd v2 to v3 using the jetcd library but struggling without examples for When I attempt to connect using the SSL certificate (caCert in the code below) I hit the following error:
If I pass in FWIW this succeeds via etcdctl. Please see the code snippet below. Any guidance here would be much appreciated.
|
@yangliucheng @DamianCummins I am looking into this. |
@fanminshi Any updates? |
@fanminshi Some further investigation on the above and it appears there are two issues: I forked this repo and added the above ssl configuration to the FWIW I'm using the following:
If I run
At this stage I'll point out that I am using an instance of etcd managed by IBM Compose, however seeing as etcdctl connects successfully, this is not an issue with what Compose are providing. I worked around this by changing the hardcoded authority from "etcd" to my etcd hostname in the SmartNameResolver:
Links I looked at : https://github.com/grpc/grpc/blob/master/doc/naming.md , https://groups.google.com/forum/#!topic/grpc-io/xtwACYjZ2p8 So, at this point, if I re run However, if I then run the same tests in eclipse using the TestNG plugin, I get this error (same as the one reported in the previous comment):
So there is different behaviour between mvn command line and running in eclipse? Is this perhaps due to the OS specific netty library? Other notable environment settings: |
I guess the first thing we need to do is to add the authority as builder option, make sense ? |
@DamianCummins do you have by chance any time to send a PR ? |
Hi @fanminshi - do you have an eta on when this will make it into a dev snapshot / release? |
Any update on a dev snapshot / release? @fanminshi cc: @xiang90 - thanks |
@xiang90 @fanminshi Hey guys, this is a big one for us as well. Any information on when we can get this out would be super helpful! Appreciate it! |
@DamianCummins @DamianCummins Sorry for the delay. I'll try to get this into the dev snapshot this week. For the release, I'll think there are few tasks needs to be done for 0.02 release. I'll evaluate those and get you back later. |
Would you consider cutting a patch release for this specific issue and rolling the remaining issues in https://github.com/coreos/jetcd/milestone/2 into the next release Thoughts? |
I took a look at the newly added authority option in the client build, but I'm not sure how to use it in combination with the multiple endpoints. If we're using a single endpoint, I can just pass the host name as authority and everything is fine. But what if I have more than one endpoint? Should I issue a certificate with an additional SAN like "etcd"? That's probably close to impossible with "official" CAs. To be honest, I don't quiet get why it is needed at all. The authority is used for Server Name Indication - is that really necessary, as etcd only serves a single certificate? Why not just connect, get the certificate and validate it against the endpoint uri using the defaut trust manager? I looked at the grpc-example here https://grpc.io/docs/guides/auth.html and that's pretty much what google recommends. Or is the authority somewhat related to smart name resolving? |
For single endpoint, yes the issue is the SmartNameResolver so I will improve it but for multiple endpoint the issue is that the NameResolver can't provide a an authority per sub channel, see the following discussion: grpc/grpc-java#2662 I don't have much time to investigate the issue further but I'll do my best, any hel is very appreciated. |
No description provided.
The text was updated successfully, but these errors were encountered: