-
Notifications
You must be signed in to change notification settings - Fork 34
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
Change DAPR_GRPC_ENDPOINT
to infer TLS based on query parameter
#40
Conversation
Signed-off-by: joshvanl <[email protected]>
Isn’t this a breaking change that will break existing apps that are running unless they update the SDK? |
@ItalyPaleAle I worked on adding these env variables for Python and JS. The JS PR hasn't been merged yet, it's currently in review. The Python one was merged, but we haven't had a new release since. So, regarding these two SDKs - now is a good time to update them. |
In case of "https", there should be no way to connect to an HTTPS endpoint without TLS. If all we need is to enable TLS to other schemes that can operate with or without TLS, then it would not be a breaking change. It would simply allow other schemes to work with TLS when the default is to work without. My suggestion is to make |
Similarly to above, there is no name resolver which would require TLS in the transport. |
+1 binding |
+1 on this proposal. gRPC is non trivial and unclear at the moment and adding the |
+1 binding |
various DAPR_GRPC_ENDPOINT environment variable values Signed-off-by: joshvanl <[email protected]>
+1 binding |
I can vote on the condition we keep the backwards compatibility following the deprecation timeline of 2 releases for unsupported patterns in gRPC. |
+1 from me (for Python SDK) also based on this condition. As mentioned in another comment, Python SDK is already released. Backwards compatibility should be maintained if possible. |
port 443 by default. Signed-off-by: joshvanl <[email protected]>
Here's a matrix of different possible endpoints and how they would be parsed based on this proposal. If it looks good, I can add it to the PR so it serves as a reference, and possibly as test cases for implementations.
|
@elena-kolevska Can this table be PR-ed separately? I merged to make progress on this. |
Required reading: https://github.com/grpc/grpc/blob/master/doc/naming.md
In the current proposal, SDKs are meant to enable TLS on gRPC endpoints based on the scheme being
https
. This is wrong- gRPC uses the scheme to determine which resolver to use. Not only is wrong w.r.t to the gRPC protocol, it also means users will not be able to use other resolvers (e.g.unix://
) in conjunction withTLS
.This PR updates the proposal so that the
DAPR_GRPC_ENDPOINT
URL now includes an optional?tls=<bool>
parameter. This parameter signals to the SDK whether to enableTLS
on this endpoint or not. The SDK will continue to infer whether to useTLS
or not based on the endpoint port when this parameter is not present.DAPR_GRPC_ENDPOINT
defaults to port443
if not present.Using
?
query parameters is a natural choice here as they are 1. generally well understood by users and developers, 2. parsable by URL language libraries, and 3. used elsewhere in other systems likepostgres
to solve this problem.