Skip to main content

Module validation

Module validation 

Source
Expand description

Checks on what tenants send, before any of it is stored.

Everything a tenant names – a domain, a backend address, a header – ends up somewhere it is trusted: a unique index, a certificate, a connection the proxy opens on the tenant’s behalf. The rules live here, in one place, so that every path a value can enter by applies the same ones. Two spellings of one rule is how VICTIM.test came to be registrable alongside victim.test.

Structs§

ReservedDomains
Names that are never a tenant’s to claim.

Functions§

is_forbidden_address
Whether the proxy must refuse to connect to this address on a tenant’s behalf.
normalize_domain
The canonical form of a domain name, or why it cannot be one.
validate_add_headers
Check headers a route adds: valid names and values, none of them protected.
validate_backend_address
Check a tenant backend’s host:port, returning it in canonical form.
validate_health_check_path
Check an upstream’s health-check path: absolute, and nothing that could break out of the request line.
validate_remove_headers
Check header names a route removes.
validate_resource_name
Check a name a tenant gives a resource: present, and fits its column.
validate_route_match
Check a route’s path pattern and methods.
validate_scheme
Check a backend’s scheme. Only http and https mean anything.