]> go.fuhry.dev Git - runtime.git/commit
[http] mtls, authzn overhaul
authorDan Fuhry <dan@fuhry.com>
Tue, 13 Oct 2026 13:19:28 +0000 (09:19 -0400)
committerDan Fuhry <dan@fuhry.com>
Mon, 19 Oct 2026 21:28:12 +0000 (17:28 -0400)
commit5f299313d15e89704a0e261c6c19c6b53f4ebf60
treea84262087993c5289cae9b02ac4da7f886a80c39
parentcaa516d4b9a1056903c393631ce3b6acf819d16b
[http] mtls, authzn overhaul

- authorizer route actions are replaced with a separate interface
- add support for mTLS server identities and client cert validation
- add client cert authorizer with fine grained control over SPIFFE domains, users & services
- fully support hot reload for TLS using hotSwappableTLSConfig
- add HTTPError struct type (implements error) to wrap http errors
- support tls config at both listener- and vhost-level

supporting changes:

- mtls: open up interface to allow checking subjects separately from cert validity
- mtls: add `VerifyYamlConfig` type for reusable partials
- mtls: add certObject primitive (public interface: `SwappableCert`) for concurrency-safe, guaranteed consistent access to cert object types that can briefly be inconsistent in underlying storage (e.g. filesystem)
- mtls/certutil: add SplitChain, SplitChainRoot, and IsSelfSigned functions
- mtls: cleanup deprecated IdentityDriver types
- mtls: add `CertificateNotifyOnReload` interface for cert types that can perform watch-/monitor-based reloads

known limitations:

- MTLSPeerVerifier really does not

incompatible config change: `auth` route property changes from string to []string

**🚫🤖 No AI**
15 files changed:
http/BUILD.bazel
http/authorizer_client_cert.go [new file with mode: 0644]
http/authorizer_saml.go [moved from http/route_action_saml.go with 71% similarity]
http/http.go
http/route_action_s3.go
http/server.go
http/sni_listener.go
mtls/certutil/certutil.go
mtls/identity.go
mtls/provider_file.go
mtls/provider_interface.go
mtls/provider_keychain_macos.go
mtls/provider_shared.go
mtls/provider_tpm2_pkcs11.go
mtls/verify_names.go