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) |
Resource |
getCertificateChain()
The resource containing the SSL certificate chain.
|
List<String> |
getCiphers()
Specifies the cipher suite.
|
ClientAuth |
getClientAuth()
Whether the client has to authenticate himself via certificates.
|
Resource |
getPrivateKey()
The resource containing the private key.
|
String |
getPrivateKeyPassword()
Password for the private key.
|
String[] |
getProtocols()
Specifies the protocols accepted for secure connections.
|
Resource |
getTrustCertCollection()
The resource containing the trusted certificate collection.
|
int |
hashCode() |
boolean |
isEnabled()
Flag that controls whether transport security is used.
|
void |
setCertificateChain(Resource certificateChain)
The resource containing the SSL certificate chain.
|
void |
setCertificateChainPath(String certificateChainPath)
Deprecated.
Use
setCertificateChain(Resource) instead! |
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 |
setPrivateKey(Resource privateKey)
The resource containing the private key.
|
void |
setPrivateKeyPassword(String privateKeyPassword)
Password for the private key.
|
void |
setPrivateKeyPath(String privateKeyPath)
Deprecated.
Use
setPrivateKey(Resource) instead! |
void |
setProtocols(String protocols) |
void |
setTrustCertCollection(Resource trustCertCollection)
The resource containing the trusted certificate collection.
|
void |
setTrustCertCollectionPath(String trustCertCollectionPath)
Deprecated.
Use
setTrustCertCollection(Resource) instead! |
String |
toString() |
@Deprecated public void setCertificateChainPath(String certificateChainPath)
setCertificateChain(Resource)
instead!isEnabled()
is true.certificateChainPath
- The path to the certificate chain.GrpcSslContexts.forServer(InputStream, InputStream, String)
@Deprecated public void setPrivateKeyPath(String privateKeyPath)
setPrivateKey(Resource)
instead!enabled
is true.privateKeyPath
- The path to the private key.GrpcSslContexts.forServer(InputStream, InputStream, String)
@Deprecated public void setTrustCertCollectionPath(String trustCertCollectionPath)
setTrustCertCollection(Resource)
instead!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(InputStream)
public void setCiphers(String ciphers)
public void setProtocols(String protocols)
public boolean isEnabled()
false
.public Resource getCertificateChain()
isEnabled()
is true.GrpcSslContexts.forServer(InputStream, InputStream, String)
public Resource getPrivateKey()
enabled
is true.GrpcSslContexts.forServer(InputStream, InputStream, String)
public String getPrivateKeyPassword()
GrpcSslContexts.forServer(File, File, String)
public ClientAuth getClientAuth()
NONE
, OPTIONAL
or REQUIRE
. Defaults to
ClientAuth.NONE
.SslContextBuilder#clientAuth(ClientAuth)
public Resource getTrustCertCollection()
null
or empty it will use the system's
default collection (Default). This collection will be used to verify client certificates.SslContextBuilder.trustManager(InputStream)
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 setCertificateChain(Resource certificateChain)
isEnabled()
is true.certificateChain
- The certificate chain resource.GrpcSslContexts.forServer(InputStream, InputStream, String)
public void setPrivateKey(Resource privateKey)
enabled
is true.privateKey
- The private key resource.GrpcSslContexts.forServer(InputStream, InputStream, String)
public void setPrivateKeyPassword(String privateKeyPassword)
privateKeyPassword
- The password for the private key.GrpcSslContexts.forServer(File, File, String)
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 setTrustCertCollection(Resource trustCertCollection)
null
or empty it will use the system's
default collection (Default). This collection will be used to verify client certificates.trustCertCollection
- The trusted certificate collection resource.SslContextBuilder.trustManager(InputStream)
protected boolean canEqual(Object other)