Tls Mtls Listener Request

The proxy requests a client certificate but does not require one

Category: Setup-dependent integration
Task: The proxy requests a client certificate but does not require one

Prerequisites: The external service, credentials, or certificates referenced by this configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

Companion resources from the same snapshot:

# Listener mTLS (Optional Client Certificate)
#
# The proxy requests a client certificate but does not
# require one. Clients that present a valid cert are
# authenticated; clients without a cert are still
# allowed through.
#
# Compare with `tls-mtls-listener.yaml` which uses
# `client_cert_mode: require` and rejects connections
# that lack a client certificate entirely.
#
#   Client (cert optional) -> TLS -> Praxis :8443 -> HTTP -> Backend :3000
#
# Usage:
#   cargo run -p praxis-proxy -- -c examples/configs/protocols/tls-mtls-listener-request.yaml
#   curl --cacert ca.pem https://localhost:8443/                        # no cert, allowed
#   curl --cert client.pem --key client-key.pem --cacert ca.pem \
#        https://localhost:8443/                                        # with cert, also allowed

listeners:
  - name: secure
    address: "127.0.0.1:8443"
    filter_chains:
      - main
    tls:
      certificates:
        - cert_path: /etc/ssl/certs/server.pem
          key_path: /etc/ssl/private/server-key.pem
      client_ca:
        ca_path: /etc/ssl/certs/client-ca.pem
      client_cert_mode: request

filter_chains:
  - name: main
    filters:
      - filter: router
        routes:
          - path_prefix: "/"
            cluster: backend

      - filter: load_balancer
        clusters:
          - name: backend
            endpoints:
              - "127.0.0.1:3000"

insecure_options:
  allow_private_endpoints: true # example proxies to local backends