public static class GrpcChannelProperties.Security extends Object
| Constructor and Description |
|---|
Security() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
void |
copyDefaultsFrom(GrpcChannelProperties.Security config)
Copies the defaults from the given configuration.
|
boolean |
equals(Object o) |
String |
getAuthorityOverride()
Gets the authority to check for during server certificate verification.
|
Resource |
getCertificateChain()
Gets the resource containing the SSL certificate chain.
|
List<String> |
getCiphers()
Gets the cipher suite accepted for secure connections (in the order of preference).
|
Resource |
getKeyStore()
The resource containing the key store.
|
String |
getKeyStoreFormat()
The format of the
keyStore. |
String |
getKeyStorePassword()
Password for the key store.
|
Resource |
getPrivateKey()
Gets resource containing the private key.
|
String |
getPrivateKeyPassword()
Gets the password for the private key.
|
String[] |
getProtocols()
Gets the TLS protocols accepted for secure connections
|
Resource |
getTrustCertCollection()
Gets the resource containing the the trusted certificate collection.
|
Resource |
getTrustStore()
The resource containing the trust store.
|
String |
getTrustStoreFormat()
The format of the
trustStore. |
String |
getTrustStorePassword()
Password for the trust store.
|
int |
hashCode() |
boolean |
isClientAuthEnabled()
Gets whether client can authenticate using certificates.
|
void |
setAuthorityOverride(String authorityOverride)
Sets the authority to check for during server certificate verification.
|
void |
setCertificateChain(Resource certificateChain)
Sets the resource containing the SSL certificate chain.
|
void |
setCiphers(String ciphers)
Sets the cipher suite accepted for secure connections (in the order of preference).
|
void |
setClientAuthEnabled(Boolean clientAuthEnabled)
Set whether client can authenticate using certificates.
|
void |
setKeyStore(Resource keyStore)
The resource containing the key store.
|
void |
setKeyStoreFormat(String keyStoreFormat)
The format of the
keyStore. |
void |
setKeyStorePassword(String keyStorePassword)
Password for the key store.
|
void |
setPrivateKey(Resource privateKey)
Sets the resource containing the private key.
|
void |
setPrivateKeyPassword(String privateKeyPassword)
Sets the password for the private key.
|
void |
setProtocols(String protocols)
Sets the TLS protocols accepted for secure connections.
|
void |
setTrustCertCollection(Resource trustCertCollection)
Sets the resource containing the trusted certificate collection.
|
void |
setTrustStore(Resource trustStore)
The resource containing the trust store.
|
void |
setTrustStoreFormat(String trustStoreFormat)
The format of the
trustStore. |
void |
setTrustStorePassword(String trustStorePassword)
Password for the trust store.
|
String |
toString() |
public boolean isClientAuthEnabled()
setClientAuthEnabled(Boolean)public void setClientAuthEnabled(Boolean clientAuthEnabled)
false.clientAuthEnabled - Whether the client can authenticate itself using certificates.public Resource getCertificateChain()
setCertificateChain(Resource)public void setCertificateChain(Resource certificateChain)
isClientAuthEnabled() is true.
The linked certificate will be used to authenticate the client.certificateChain - The certificate chain.SslContextBuilder.keyManager(InputStream, InputStream, String)public Resource getPrivateKey()
setPrivateKey(Resource)public void setPrivateKey(Resource privateKey)
isClientAuthEnabled() is true.privateKey - The private key resource.SslContextBuilder.keyManager(InputStream, InputStream, String)public String getPrivateKeyPassword()
setPrivateKeyPassword(String)public void setPrivateKeyPassword(String privateKeyPassword)
privateKeyPassword - The password for the private key.SslContextBuilder.keyManager(File, File, String)public String getKeyStoreFormat()
keyStore.
Possible values includes:
AUTODETECT (default)JKS (.jks)PKCS12 (.p12)KeyStore formatKeyStore#getDefaultType()public void setKeyStoreFormat(String keyStoreFormat)
keyStore.
Possible values includes:
AUTODETECT (default)JKS (.jks)PKCS12 (.p12)KeyStore formatKeyStore#getDefaultType()keyStoreFormat - The key store format to usepublic Resource getKeyStore()
privateKey.public void setKeyStore(Resource keyStore)
privateKey.keyStore - The key store resource.public String getKeyStorePassword()
keyStore.public void setKeyStorePassword(String keyStorePassword)
keyStore.keyStorePassword - The password for the key store.public Resource getTrustCertCollection()
null or empty the use the
system's default collection should be used.setTrustCertCollection(Resource)public void setTrustCertCollection(Resource trustCertCollection)
null) it will use the
system's default collection (Default). This collection will be used to verify server certificates.trustCertCollection - The path to the trusted certificate collection.SslContextBuilder.trustManager(InputStream)public String getTrustStoreFormat()
trustStore.
Possible values includes:
AUTODETECT (default)JKS (.jks)PKCS12 (.p12)KeyStore formatKeyStore#getDefaultType()public void setTrustStoreFormat(String trustStoreFormat)
trustStore.
Possible values includes:
AUTODETECT (default)JKS (.jks)PKCS12 (.p12)KeyStore formatKeyStore#getDefaultType()trustStoreFormat - The trust store format to use.public Resource getTrustStore()
trustCertCollection. If
neither this nor trustCertCollection is set then the system's trust store will be used.public void setTrustStore(Resource trustStore)
trustCertCollection. If
neither this nor trustCertCollection is set then the system's trust store will be used.trustStore - The trust store resource.public String getTrustStorePassword()
trustStore.public void setTrustStorePassword(String trustStorePassword)
trustStore.trustStorePassword - The password for the trust store.public String getAuthorityOverride()
setAuthorityOverride(String)public void setAuthorityOverride(String authorityOverride)
authorityOverride - The authority to check for in the certificate, or null to use the default checks.AbstractManagedChannelImplBuilder.overrideAuthority(String)public List<String> getCiphers()
public void setCiphers(String ciphers)
ciphers - Cipher suite consisting of one or more cipher strings separated by colons, commas or spacesSslContextBuilder.ciphers(Iterable)public String[] getProtocols()
public void setProtocols(String protocols)
protocols - Protocol list consisting of one or more protocols separated by colons, commas or spaces.SslContextBuilder.protocols(String...)public void copyDefaultsFrom(GrpcChannelProperties.Security config)
config - The config to copy the defaults from.protected boolean canEqual(Object other)