armeria icon indicating copy to clipboard operation
armeria copied to clipboard

Provide a way to enable GRPC reflection service and make it enabled by default.

Open natsumehu opened this issue 3 years ago • 2 comments

We wanna provide a way to enable Armeria GRPC reflection service. And since some organization rely heavily on grpcurl tool to debug and write scripts which is based on reflection api, would it be necessary to enable it by default?

natsumehu avatar May 06 '22 02:05 natsumehu

If it is repeatedly used, we may provide an option to automatically enable it such as GrpcService.enableReflectionService(boolean). I am not 100% sure that it makes sense to enable it by default. Because it is able to expose unexpected implementations to the public networks.

ikhoon avatar May 06 '22 04:05 ikhoon

It's also not too terribly difficult to enable right now:

import com.linecorp.armeria.server.grpc.GrpcServiceBuilder
import io.grpc.protobuf.services.ProtoReflectionService

val builder: GrpcServiceBuilder = GrpcService.builder()
// enable reflection
builder.addService(ProtoReflectionService.newInstance())

Replacing that one line with builder.enableReflectionService(true): I'm not sure if theres a ton of benefit to do that. I guess it shows up in code completion and someone may stumble upon it? I agree it should not be on by default.

AngerM-DD avatar Jul 19 '22 21:07 AngerM-DD