public static class GrpcServerProperties.Security extends Object
Constructor and Description |
---|
Security() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getCertificateChainPath()
Path to SSL certificate chain.
|
List<String> |
getCiphers()
Specifies the cipher suite.
|
ClientAuth |
getClientAuth()
Whether the client has to authenticate himself via certificates.
|
String |
getPrivateKeyPath()
Path to private key.
|
String[] |
getProtocols()
Specifies the protocols accepted for secure connections.
|
String |
getTrustCertCollectionPath()
Path to the trusted certificate collection.
|
int |
hashCode() |
boolean |
isEnabled()
Flag that controls whether transport security is used.
|
void |
setCertificateChainPath(String certificateChainPath)
Path to SSL certificate chain.
|
void |
setCiphers(String ciphers) |
void |
setClientAuth(ClientAuth clientAuth)
Whether the client has to authenticate himself via certificates.
|
void |
setEnabled(boolean enabled)
Flag that controls whether transport security is used.
|
void |
setPrivateKeyPath(String privateKeyPath)
Path to private key.
|
void |
setProtocols(String protocols) |
void |
setTrustCertCollectionPath(String trustCertCollectionPath)
Path to the trusted certificate collection.
|
String |
toString() |
public void setCiphers(String ciphers)
public void setProtocols(String protocols)
public boolean isEnabled()
false
.public String getCertificateChainPath()
isEnabled()
is true.GrpcSslContexts.forServer(File, File)
public String getPrivateKeyPath()
enabled
is true.GrpcSslContexts.forServer(File, File)
public ClientAuth getClientAuth()
NONE
, OPTIONAL
or REQUIRE
. Defaults to
ClientAuth.NONE
.SslContextBuilder#clientAuth(ClientAuth)
public String getTrustCertCollectionPath()
null
or empty it will use the system's default
collection (Default). This collection will be used to verify client certificates.SslContextBuilder.trustManager(File)
public List<String> getCiphers()
null
or empty it will use the system's default cipher suite.public String[] getProtocols()
null
or empty it will use the system's
default (all supported) protocols.public void setEnabled(boolean enabled)
false
.enabled
- Whether transport security should be enabled.public void setCertificateChainPath(String certificateChainPath)
isEnabled()
is true.certificateChainPath
- The path to the certificate chain.GrpcSslContexts.forServer(File, File)
public void setPrivateKeyPath(String privateKeyPath)
enabled
is true.privateKeyPath
- The path to the private key.GrpcSslContexts.forServer(File, File)
public void setClientAuth(ClientAuth clientAuth)
NONE
, OPTIONAL
or REQUIRE
. Defaults to
ClientAuth.NONE
.clientAuth
- Whether the client has to authenticate himself via certificates.SslContextBuilder#clientAuth(ClientAuth)
public void setTrustCertCollectionPath(String trustCertCollectionPath)
null
or empty it will use the system's default
collection (Default). This collection will be used to verify client certificates.trustCertCollectionPath
- The path to the trusted certificate collection.SslContextBuilder.trustManager(File)
protected boolean canEqual(Object other)