grpc / grpc/grpc-java

Support SslMasterKeyHandler in NettyServerBuilder

Open
#7,199 15 comments 1 reaction 0 assignees View on GitHub
enhancement good first issue
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

I have a problem with adding SslMasterKeyHandler#newWireSharkSslMasterKeyHandler on the server side. I tried to do this with channelFactory:
```
builder.channelFactory(() -> {
final ServerChannel ch = GrpcUtil.getDefaultServerChannelFactory().newChannel();
final ChannelPipeline pipeline = ch.pipeline();
pipeline.addLast(SslMasterKeyHandler.newWireSharkSslMasterKeyHandler());
return ch;
})
```
and later with ProtocolNegotiator:
```
final SslContext sslContext = GrpcSslContexts.configure(sslClientContextBuilder).build();
final io.grpc.netty.ProtocolNegotiator negotiator = ProtocolNegotiators.serverTls(sslContext);
builder.protocolNegotiator(tlsNegotiator(negotiator);
```

In the first case, the setting had no effect. In the second case, the server worked incorrectly (it stopped accepting connections, even without a handler, just with a negotiator wrapper).

What should be the proper implementation?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.