mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-16 21:49:45 +02:00
Introduce reusable `inbound_mtls_profiles` in root config and support `entrypoint.inbound_mtls_profile` to require client certificates for all HTTPS traffic on an entrypoint. Profiles can trust the system CA store, custom PEM CA files, or both, and are compiled into TLS client-auth pools during entrypoint initialization. Also add route-scoped `inbound_mtls_profile` support for HTTP-based routes when no global entrypoint profile is configured. Route-level mTLS selection is driven by TLS SNI, preserves existing behavior for open and unmatched hosts, and returns the intended 421 response when secure requests omit SNI or when Host and SNI resolve to different routes. Add validation for missing profile references and unsupported non-HTTP route usage, update config and route documentation/examples, expand inbound mTLS handshake and routing regression coverage, and bump `goutils` for HTTPS listener test support.
9 lines
207 B
Go
9 lines
207 B
Go
package entrypoint
|
|
|
|
import "errors"
|
|
|
|
var (
|
|
errSecureRouteRequiresSNI = errors.New("secure route requires matching TLS SNI")
|
|
errSecureRouteMisdirected = errors.New("secure route host must match TLS SNI")
|
|
)
|