Documentation
¶
Overview ¶
Package haproxyprobe is the probe the operator sends through HAProxy to tell whether a route runs the engine's SPOE filter (0002 §6.4): a GET with Header carrying a random nonce and a MAC of the nonce, the host and the path under the bundle's probe key. The path is one the route serves: PathSuffix under a Prefix path, so the probe reaches no real page of the app when the filter isn't there. The SPOE adapter checks the MAC and answers with another MAC under the key, which the route's HAProxy rules return with Status: only an engine that has the key, behind a route that runs the filter, can answer.
Index ¶
Constants ¶
const ( // PathSuffix is the probe's path under a Prefix path, before the // nonce: /.well-known/inkwall-probe/<nonce> for the prefix "/". PathSuffix = ".well-known/inkwall-probe/" // Header carries the request's nonce and MAC ("<nonce>.<mac>"), and the // answer's MAC. Header = "X-Inkwall-Probe" // Status is HAProxy's answer to a probe the engine answered. Status = 299 // KeySize is the size of a probe key. KeySize = 32 )
Variables ¶
This section is empty.
Functions ¶
func Check ¶
Check is the engine's side: for a request to uri (path and query) with the Host host and the given Header value, it returns the answer to send back, and whether the request is a probe made with key.
func PrefixPath ¶
PrefixPath is the probe's path under the Prefix path prefix.
Types ¶
This section is empty.