Documentation
¶
Overview ¶
Package proxy puts the sensor in the request path.
Reverse sits in front of a workload's port and runs the HTTP engines over each request; Egress is a forward proxy for the workload's outbound calls and checks each destination against the indicator set. Both ask the verdict engine what to do and report what they did.
Both fail open. A panic in inspection, a rule set that has not loaded, or a request too large to buffer passes through untouched: the sensor protecting a workload must never be the reason it is down.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Egress ¶
type Egress struct {
Rules *Rules
Verdicts *decide.Engine
Report Reporter
// Observe, when set, receives every connection the proxy refuses or
// carries, matched or not (the --forward siem copy). A refusal is
// observed at once; a carried connection when it ends, with its bytes.
// It must not block.
Observe func(siem.EgressDecision)
Dial func(network, addr string) (net.Conn, error)
Now func() time.Time
// Transport forwards plain-HTTP requests. Default http.DefaultTransport.
Transport http.RoundTripper
}
Egress is a forward proxy for a workload's outbound calls: HTTP CONNECT for TLS, and absolute-URI requests for plain HTTP. It never decrypts; it sees the host a client asks for, which is what an indicator names.
A workload reaches it through HTTPS_PROXY and HTTP_PROXY, which most SDKs honour. One that ignores them is not covered here, and the DNS check is the layer that catches it.
type Reverse ¶
type Reverse struct {
Upstream *url.URL
Rules *Rules
Verdicts *decide.Engine
Report Reporter
// HealthPaths are paths a load balancer probes. A match on one is
// reported and never held.
HealthPaths []string
// BodyLimit is how much of a body is inspected. Default 1 MiB.
BodyLimit int64
Now func() time.Time
// contains filtered or unexported fields
}
Reverse is the inbound proxy.