Class GrpcSslConfiguration
java.lang.Object
io.micronaut.grpc.server.GrpcSslConfiguration
Configuration for the SSL properties of GRPC.
- Since:
- 1.0
- Author:
- graemerocher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.netty.handler.ssl.ClientAuthWhether clients must present a certificate.The location of the PEM-encoded CA certificates used to verify client certificates.voidsetCertChain(@Nullable String certChain) voidsetClientAuth(@Nullable io.netty.handler.ssl.ClientAuth clientAuth) Sets whether clients must present a certificate:none(the default),optionalorrequire.voidsetPrivateKey(@Nullable String privateKey) voidsetTrustCertificates(@Nullable String trustCertificates) Sets the location of the PEM-encoded CA certificates used to verify client certificates, for exampleclasspath:ca.crtorfile:/etc/grpc/ca.crt.
-
Constructor Details
-
GrpcSslConfiguration
public GrpcSslConfiguration()
-
-
Method Details
-
getCertChain
-
setCertChain
- Parameters:
certChain- Sets the cert chain
-
getPrivateKey
-
setPrivateKey
- Parameters:
privateKey- Sets the private key
-
getTrustCertificates
-
setTrustCertificates
Sets the location of the PEM-encoded CA certificates used to verify client certificates, for exampleclasspath:ca.crtorfile:/etc/grpc/ca.crt. Without it, the JVM's default trust store is used.- Parameters:
trustCertificates- The trust certificates location- Since:
- 5.3.0
-
getClientAuth
public io.netty.handler.ssl.ClientAuth getClientAuth()Whether clients must present a certificate.- Returns:
- The client authentication mode,
ClientAuth.NONEby default - Since:
- 5.3.0
-
setClientAuth
public void setClientAuth(@Nullable io.netty.handler.ssl.ClientAuth clientAuth) Sets whether clients must present a certificate:none(the default),optionalorrequire. Userequirefor mutual TLS.- Parameters:
clientAuth- The client authentication mode- Since:
- 5.3.0
-