Skip to content

Steps to configure Mutual TLS in grpc-java? #4004

@nddipiazza

Description

@nddipiazza

I created a new HelloWorld with TLS enabled example here: #3992

So far I have only configured TLS. Not mutual TLS.

What would be the steps to enable Mutual Auth in this example?

The script added to https://github.com/grpc/grpc-java/pull/3992/files#diff-1c0f522a61adc59307209c8e0296db49R39 generates the cert files needed.

The grpc-java security.md says to do this:

Server server = NettyServerBuilder.forPort(8443)
    .sslContext(GrpcSslContexts.forServer(certChainFile, privateKeyFile)
        .trustManager(clientCertChainFile)
        .clientAuth(ClientAuth.OPTIONAL)
        .build());

OK no problem. But what does the client-side look like?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions