thangchung / GrpcJsonTranscoder

A filter which allows a RESTful JSON API client to send requests to .NET web server over HTTP and get proxied to a gRPC service
MIT License
121 stars 25 forks source link

Usage of https protocol #11

Open saitejaprattipati opened 4 years ago

saitejaprattipati commented 4 years ago

Really appreciate for your efforts but i have few clarification to confirm they are as below.

1) While communicating from ocelot gateway to grpc service (microservice) the protocol should be used is https (grpc is designed to use for https) but the protocol that you have mentioned is http in configuration file of ocelot gateway. However we can use http with grpc but the features like encryption, compression will not work. 2) The client side auto generated code for the grpc which is based on proto file is the one which does the communication by using the features of grpc how are you handling all those features.

If possible can you please put a video of the code functionality in detail so that it will be used for everyone.

sonuame commented 4 years ago

Would love to know the answers for the same. Plus how the re-direction will be handled? if base microservice returns "Redirect(string url)"

currently it works with ocelot. But how grpc client code will handle it here?

thangchung commented 4 years ago

@saitejaprattipati In this case, you need to pass the credential to

https://github.com/thangchung/GrpcJsonTranscoder/blob/master/src/GrpcJsonTranscoder/DownStreamContextExtensions.cs#L24

SslCredentials secureCredentials = null

We use http protocol for the example because we do SSL termination, and then use service mesh such as istio or linkerd to configure the mTLS inside the cluster