Provider TLS

  • Compare application-owned and proxy-owned provider connections, credentials and trust.
Diagram phase
100%
Approach A · application owns TLSDirect / IL JVMCurrent · application-owned provider TLSAPI / businessProvider TLSThe JVM owns server verification and, in Proposed, the provider client certificate/private key. Existing provider TLS does not imply mutual authentication in Current.CMC-OBRHapplicationCertificate verification must use the actual expected DNS/IP SAN identity and provider-approved client trust.ProviderTLS endpointProvider TLS

Select a component to trace its direct connections. Drag to pan · Ctrl + wheel or pinch to zoom.

  • On a provider call, the OBRH JVM opens TLS and checks that the server certificate belongs to the expected provider. The application owns the connection pool and trust configuration.
  • An Envoy sidecar forwarding these encrypted bytes cannot read the HTTP operation inside them. HTTP-level retries require a component that can see the request.
Provider TLS ownership

Provider TLS ownership

  • Provider calls originate from CMC-OBRH product/runtime functionality and use its owned pool and TLS resources.
  • There is no separate provider-client actor; Current sidecar presence does not establish partner TLS origination or HA egress.
Java 17 provider mTLS clientjava
import java.io.IOException;
import java.io.InputStream;
import java.net.http.HttpClient;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.GeneralSecurityException;
import java.security.KeyStore;
import java.time.Duration;
import java.util.Collections;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLParameters;
import javax.net.ssl.TrustManagerFactory;

public final class PpMtlsClient {
    private PpMtlsClient() {}

    public static HttpClient create(
            Path identityPath, char[] storePassword, char[] keyPassword,
            Path trustPath, char[] trustPassword, Duration connectTimeout)
            throws IOException, GeneralSecurityException {
        KeyStore identity = load(identityPath, storePassword);
        int identities = 0;
        for (String alias : Collections.list(identity.aliases())) {
            if (identity.entryInstanceOf(alias, KeyStore.PrivateKeyEntry.class)) {
                identities++;
            }
        }
        if (identities != 1) {
            throw new GeneralSecurityException(
                    "Expected exactly one client PrivateKeyEntry");
        }
        KeyManagerFactory kmf = KeyManagerFactory.getInstance(
                KeyManagerFactory.getDefaultAlgorithm());
        kmf.init(identity, keyPassword);
        TrustManagerFactory tmf = TrustManagerFactory.getInstance(
                TrustManagerFactory.getDefaultAlgorithm());
        tmf.init(load(trustPath, trustPassword));
        SSLContext context = SSLContext.getInstance("TLS");
        context.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
        SSLParameters parameters = new SSLParameters();
        parameters.setProtocols(new String[] {"TLSv1.3", "TLSv1.2"});
        parameters.setEndpointIdentificationAlgorithm("HTTPS");
        return HttpClient.newBuilder().sslContext(context)
                .sslParameters(parameters).connectTimeout(connectTimeout)
                .followRedirects(HttpClient.Redirect.NEVER).build();
    }

    private static KeyStore load(Path path, char[] password)
            throws IOException, GeneralSecurityException {
        KeyStore store = KeyStore.getInstance("PKCS12");
        try (InputStream input = Files.newInputStream(path)) {
            store.load(input, password);
        }
        return store;
    }
}
IP-based sidecar mTLSyaml
# Provider approach B: local sidecar origination; no egress gateway.
# IP-only examples; replace addresses/ports with the actual processor endpoints.
# Apply the Pod capture/exclusion and credential mounts shown in the page.
# HTTP is carried as opaque TCP here; no HTTP Host routing or HTTP retries.
# ServiceEntry IP:port matching supplies the direct route; no VirtualService needed.
apiVersion: v1
kind: Secret
metadata:
  name: pp-client
  namespace: obrh-example
type: Opaque
stringData:
  tls.crt: |
    <DOMAIN_CLIENT_CERTIFICATE_AND_CHAIN_PEM>
  tls.key: |
    <DOMAIN_CLIENT_PRIVATE_KEY_PEM>
  ca.crt: |
    <PRODUCT_PROCESSOR_SERVER_CA_BUNDLE_PEM>
---
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: pp-a
  namespace: obrh-example
spec:
  exportTo: ["."]
  # Registry identifier only. No DNS lookup is required.
  hosts: ["pp-a.external.invalid"]
  addresses: ["192.0.2.10"]
  location: MESH_EXTERNAL
  resolution: STATIC
  ports:
    - number: 8443
      name: tcp-pp-a
      protocol: TCP
  endpoints:
    - address: 192.0.2.10
      ports:
        tcp-pp-a: 8443
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: pp-a-mtls
  namespace: obrh-example
spec:
  exportTo: ["."]
  host: pp-a.external.invalid
  workloadSelector:
    matchLabels:
      mtls-path: sidecar
  trafficPolicy:
    portLevelSettings:
      - port:
          number: 8443
        tls:
          mode: MUTUAL
          clientCertificate: /etc/obrh/pp-client/tls.crt
          privateKey: /etc/obrh/pp-client/tls.key
          caCertificates: /etc/obrh/pp-client/ca.crt
          subjectAltNames: ["192.0.2.10"]
          # Provider certificate requires this IP SAN.
          # No external SNI: processor must accept TLS without DNS SNI.
---
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: pp-b
  namespace: obrh-example
spec:
  exportTo: ["."]
  # Registry identifier only. No DNS lookup is required.
  hosts: ["pp-b.external.invalid"]
  addresses: ["192.0.2.20"]
  location: MESH_EXTERNAL
  resolution: STATIC
  ports:
    - number: 9443
      name: tcp-pp-b
      protocol: TCP
  endpoints:
    - address: 192.0.2.20
      ports:
        tcp-pp-b: 9443
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: pp-b-mtls
  namespace: obrh-example
spec:
  exportTo: ["."]
  host: pp-b.external.invalid
  workloadSelector:
    matchLabels:
      mtls-path: sidecar
  trafficPolicy:
    portLevelSettings:
      - port:
          number: 9443
        tls:
          mode: MUTUAL
          clientCertificate: /etc/obrh/pp-client/tls.crt
          privateKey: /etc/obrh/pp-client/tls.key
          caCertificates: /etc/obrh/pp-client/ca.crt
          subjectAltNames: ["192.0.2.20"]
          # Provider certificate requires this IP SAN.
          # No external SNI: processor must accept TLS without DNS SNI.

HTTP-visible intercepted provider controlsyaml
# ALTERNATIVE provider-owner example; only if sidecar sees plaintext HTTP before TLS.
# Not effective for excluded outbound capture or opaque JVM-originated HTTPS.
# No egress gateway. Names/domains and every numeric value are illustrative.
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  name: example-provider
  namespace: obrh-example
spec:
  hosts: [provider.example.com]
  location: MESH_EXTERNAL
  resolution: DNS
  ports:
  - number: 80
    name: http-provider
    protocol: HTTP
    targetPort: 443 # Sidecar originates server-authenticated TLS to this port.
---
apiVersion: networking.istio.io/v1beta1
kind: DestinationRule
metadata:
  name: example-provider-capacity
  namespace: obrh-example
spec:
  host: provider.example.com
  workloadSelector:
    matchLabels:
      app: obrh-direct-example
  trafficPolicy:
    connectionPool:
      tcp:
        maxConnections: 20
        connectTimeout: 500ms
      http:
        http2MaxRequests: 20
        http1MaxPendingRequests: 5
        maxRetries: 2 # Simultaneously outstanding retries; not retry attempts/request.
    outlierDetection:
      consecutive5xxErrors: 5
      interval: 5s
      baseEjectionTime: 30s
      maxEjectionPercent: 50
      minHealthPercent: 0 # Keep detection active even with few healthy endpoints.
    tls:
      mode: SIMPLE # Not partner mTLS; credential custody requires separate design.
      sni: provider.example.com
      subjectAltNames: [provider.example.com]
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: example-provider-read-only-retry
  namespace: obrh-example
spec:
  hosts: [provider.example.com]
  gateways: [mesh]
  http:
  - name: read-only-example
    match:
    - method:
        exact: GET
      uri:
        prefix: /reference-data/
    timeout: 3s # Includes original attempt and retries.
    retries:
      attempts: 1 # One retry after the original attempt: at most two attempts.
      perTryTimeout: 1s
      retryOn: connect-failure,reset # Even reset can be an ambiguous execution result.
    route:
    - destination:
        host: provider.example.com
        port:
          number: 80
  - name: all-other-operations-no-retry
    timeout: 3s
    retries:
      attempts: 0 # Explicitly suppress inherited/default retry behavior.
    route:
    - destination:
        host: provider.example.com
        port:
          number: 80