Package biopb.tensor

Class TlsTrust

java.lang.Object
biopb.tensor.TlsTrust

public final class TlsTrust extends Object
Everything a FlightClient needs to trust one TLS endpoint -- plain data, resolved once per endpoint by TlsTrusts.

The Java twin of Python's TlsTrust: a PEM trust anchor, an optional hostname override, and a key id. It maps onto Arrow's FlightClient.Builder as trustedCertificates(rootCerts) and overrideHostname(overrideHostname); with neither, the JDK's default trust store and the dialed name decide, as they do for any grpc+tls:// location.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TlsTrust
    A plaintext location, or the system trust store: no anchor, no override, no key.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object other)
     
    int
     
    Which trust decision this is: endpoint | anchor digest | fingerprint.
    The name to match against the certificate's SANs instead of the dialed one, or null to verify the dialed name as usual.
    byte[]
    The PEM trust anchor, or null to use the system trust store.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NONE

      public static final TlsTrust NONE
      A plaintext location, or the system trust store: no anchor, no override, no key.
  • Method Details

    • rootCerts

      public byte[] rootCerts()
      The PEM trust anchor, or null to use the system trust store.
    • overrideHostname

      public String overrideHostname()
      The name to match against the certificate's SANs instead of the dialed one, or null to verify the dialed name as usual. Set only when the anchor is the certificate the server presents; see TlsTrusts.
    • keyId

      public String keyId()
      Which trust decision this is: endpoint | anchor digest | fingerprint. The connection cache keys on it, so two upstreams that name the same host:port under different anchors are never handed each other's connection (biopb/biopb#604 item 4). Null for NONE.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object