incomprehensible() method. Unless overridden by a Feature, server verification should
use customary default root certificates.
| Modifier and Type | Class and Description |
|---|---|
| public static class | TlsChannelCredentials.Builder
Builder for |
| public static enum | TlsChannelCredentials.Feature
Features to understand TLS configuration. |
| Modifier and Type | Field and Description |
|---|---|
| private final byte[] | |
| private final boolean | |
| private final List | |
| private final byte[] | |
| private final String | |
| private final byte[] | |
| private final List |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public static ChannelCredentials | |
| public byte[] | |
| public List | |
| public byte[] | |
| public String | |
| public byte[] | getRootCertificates()
Root trust certificates for verifying the server's identity that override the system's defaults. |
| public List | |
| public Set | Returns: empty set if the caller can adequately understand the configurationthe features understood by the caller understoodFeaturesReturns an empty set if this credential can be adequately understood via the features listed, otherwise returns a hint of features that are lacking to understand the configuration to be used for manual debugging. |
| public static TlsChannelCredentials. | |
| private static void | requiredFeature(Set<TlsChannelCredentials.
|
| public ChannelCredentials | withoutBearerTokens()
Implements abstract io. |
| certificateChain | back to summary |
|---|---|
| private final byte[] certificateChain | |
| fakeFeature | back to summary |
|---|---|
| private final boolean fakeFeature | |
| keyManagers | back to summary |
|---|---|
| private final List<KeyManager> keyManagers | |
| privateKey | back to summary |
|---|---|
| private final byte[] privateKey | |
| privateKeyPassword | back to summary |
|---|---|
| private final String privateKeyPassword | |
| rootCertificates | back to summary |
|---|---|
| private final byte[] rootCertificates | |
| trustManagers | back to summary |
|---|---|
| private final List<TrustManager> trustManagers | |
| TlsChannelCredentials | back to summary |
|---|---|
| pack-priv TlsChannelCredentials(TlsChannelCredentials. | |
| create | back to summary |
|---|---|
| public static ChannelCredentials create() Use TLS with its defaults. | |
| getCertificateChain | back to summary |
|---|---|
| public byte[] getCertificateChain() The certificate chain for the client's identity, as a new byte array. Generally should be
PEM-encoded. If | |
| getKeyManagers | back to summary |
|---|---|
| public List Returns the key manager list which provides the client's identity. Entries are scanned checking
for specific types, like | |
| getPrivateKey | back to summary |
|---|---|
| public byte[] getPrivateKey() The private key for the client's identity, as a new byte array. Generally should be in PKCS#8
format. If encrypted, | |
| getPrivateKeyPassword | back to summary |
|---|---|
| public String getPrivateKeyPassword() Returns the password to decrypt the private key, or | |
| getRootCertificates | back to summary |
|---|---|
| public byte[] getRootCertificates() Root trust certificates for verifying the server's identity that override the system's defaults. Generally PEM-encoded with multiple certificates concatenated. | |
| getTrustManagers | back to summary |
|---|---|
| public List Returns the trust manager list which verifies the server's identity. Entries are scanned
checking for specific types, like | |
| incomprehensible | back to summary |
|---|---|
| public Set Returns an empty set if this credential can be adequately understood via the features listed, otherwise returns a hint of features that are lacking to understand the configuration to be used for manual debugging. An "understood" feature does not imply the caller is able to fully handle the feature. It simply means the caller understands the feature enough to use the appropriate APIs to read the configuration. The caller may support just a subset of a feature, in which case the caller would need to look at the configuration to determine if only the supported subset is used. This method may not be as simple as a set difference. There may be multiple features that can independently satisfy a piece of configuration. If the configuration is incomprehensible, all such features would be returned, even though only one may be necessary. An empty set does not imply that the credentials are fully understood. There may be optional configuration that can be ignored if not understood. Since
| |
| newBuilder | back to summary |
|---|---|
| public static TlsChannelCredentials. Creates a builder for changing default configuration. | |
| requiredFeature | back to summary |
|---|---|
| private static void requiredFeature(Set<TlsChannelCredentials. | |
| withoutBearerTokens | back to summary |
|---|---|
| public ChannelCredentials withoutBearerTokens() Implements abstract io. Doc from io. Returns the ChannelCredentials stripped of its CallCredentials. In the future, this may strip only some of the CallCredentials, preserving call credentials that are safe from replay attacks (e.g., if the token is bound to the channel's certificate).
| |
TlsChannelCredentials.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private boolean | |
| private List | |
| private byte[] | |
| private String | |
| private byte[] | |
| private List |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ChannelCredentials | |
| private void | |
| private void | |
| public TlsChannelCredentials. | keyManager(File certChain, File privateKey)
Use the provided certificate chain and private key as the client's identity. |
| public TlsChannelCredentials. | keyManager(File certChain, File privateKey, String privateKeyPassword)
Use the provided certificate chain and possibly-encrypted private key as the client's identity. |
| public TlsChannelCredentials. | keyManager(InputStream certChain, InputStream privateKey)
Use the provided certificate chain and private key as the client's identity. |
| public TlsChannelCredentials. | keyManager(InputStream certChain, InputStream privateKey, String privateKeyPassword)
Use the provided certificate chain and possibly-encrypted private key as the client's identity. |
| public TlsChannelCredentials. | |
| public TlsChannelCredentials. | |
| public TlsChannelCredentials. | trustManager(File rootCerts)
Use the provided root certificates to verify the server's identity instead of the system's default. |
| public TlsChannelCredentials. | trustManager(InputStream rootCerts)
Use the provided root certificates to verify the server's identity instead of the system's default. |
| public TlsChannelCredentials. | trustManager(TrustManager... trustManagers)
Have the provided trust manager verify the server's identity instead of the system's default. |
| certificateChain | back to summary |
|---|---|
| private byte[] certificateChain | |
| fakeFeature | back to summary |
|---|---|
| private boolean fakeFeature | |
| keyManagers | back to summary |
|---|---|
| private List<KeyManager> keyManagers | |
| privateKey | back to summary |
|---|---|
| private byte[] privateKey | |
| privateKeyPassword | back to summary |
|---|---|
| private String privateKeyPassword | |
| rootCertificates | back to summary |
|---|---|
| private byte[] rootCertificates | |
| trustManagers | back to summary |
|---|---|
| private List<TrustManager> trustManagers | |
| Builder | back to summary |
|---|---|
| private Builder() | |
| build | back to summary |
|---|---|
| public ChannelCredentials build() Construct the credentials. | |
| clearKeyManagers | back to summary |
|---|---|
| private void clearKeyManagers() | |
| clearTrustManagers | back to summary |
|---|---|
| private void clearTrustManagers() | |
| keyManager | back to summary |
|---|---|
| public TlsChannelCredentials. Use the provided certificate chain and private key as the client's identity. Generally they should be PEM-encoded and the key is an unencrypted PKCS#8 key (file headers have "BEGIN CERTIFICATE" and "BEGIN PRIVATE KEY"). | |
| keyManager | back to summary |
|---|---|
| public TlsChannelCredentials. Use the provided certificate chain and possibly-encrypted private key as the client's
identity. Generally they should be PEM-encoded and the key is a PKCS#8 key. If the private
key is unencrypted, then password must be | |
| keyManager | back to summary |
|---|---|
| public TlsChannelCredentials. Use the provided certificate chain and private key as the client's identity. Generally they should be PEM-encoded and the key is an unencrypted PKCS#8 key (file headers have "BEGIN CERTIFICATE" and "BEGIN PRIVATE KEY"). | |
| keyManager | back to summary |
|---|---|
| public TlsChannelCredentials. Use the provided certificate chain and possibly-encrypted private key as the client's
identity. Generally they should be PEM-encoded and the key is a PKCS#8 key. If the private
key is unencrypted, then password must be | |
| keyManager | back to summary |
|---|---|
| public TlsChannelCredentials. Have the provided key manager select the client's identity. Although multiple are allowed,
only the first instance implementing a particular interface is used. So generally there will
just be a single entry and it implements | |
| requireFakeFeature | back to summary |
|---|---|
| public TlsChannelCredentials. Requires | |
| trustManager | back to summary |
|---|---|
| public TlsChannelCredentials. Use the provided root certificates to verify the server's identity instead of the system's default. Generally they should be PEM-encoded with all the certificates concatenated together (file header has "BEGIN CERTIFICATE", and would occur once per certificate). | |
| trustManager | back to summary |
|---|---|
| public TlsChannelCredentials. Use the provided root certificates to verify the server's identity instead of the system's default. Generally they should be PEM-encoded with all the certificates concatenated together (file header has "BEGIN CERTIFICATE", and would occur once per certificate). | |
| trustManager | back to summary |
|---|---|
| public TlsChannelCredentials. Have the provided trust manager verify the server's identity instead of the system's default.
Although multiple are allowed, only the first instance implementing a particular interface is
used. So generally there will just be a single entry and it implements | |
| Modifier and Type | Field and Description |
|---|---|
| public static final TlsChannelCredentials. | CUSTOM_MANAGERS
Key managers and trust managers may be specified as |
| public static final TlsChannelCredentials. | FAKE
A feature that no consumer should understand. |
| public static final TlsChannelCredentials. | MTLS
Client identity may be provided and server verification can be tuned. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static TlsChannelCredentials. | |
| public static TlsChannelCredentials. |
| CUSTOM_MANAGERS | back to summary |
|---|---|
| public static final TlsChannelCredentials. Key managers and trust managers may be specified as If other manager sources are available (e.g., | |
| FAKE | back to summary |
|---|---|
| public static final TlsChannelCredentials. A feature that no consumer should understand. It should be used for unit testing to confirm
a call to | |
| MTLS | back to summary |
|---|---|
| public static final TlsChannelCredentials. Client identity may be provided and server verification can be tuned. This feature requires
observing | |
| Feature | back to summary |
|---|---|
| private Feature() | |
| valueOf | back to summary |
|---|---|
| public static TlsChannelCredentials. | |
| values | back to summary |
|---|---|
| public static TlsChannelCredentials. | |