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 |
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.
|
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 |
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.
|
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 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 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)