Expand description
protected health-check header values and their keyed fingerprints Protected health-check header values and their keyed fingerprints.
A health-check header value is a credential more often than not
(Authorization). It lives in memory only, in a SecretValue that is
neither Clone, Serialize, Display nor value-revealing Debug, and
whose buffer is zeroed when it drops. Anything that has to show or compare
a value shows the header name plus a
HeaderFingerprint: a keyed HMAC-SHA256
under a FingerprintKey the process
generates for itself.
Zeroing on drop covers the buffer this module owns. It does not reach what the allocator, the kernel, a socket buffer or swap may already have copied.
Structs§
- Confirmed
Bootstrap - The confirmed clusters a fresh worker is given and the version it stages them under: names and a number, never a value.
- Fingerprint
Key - The process-local secret that keys
HeaderFingerprints, with the public epoch that names it. - Header
Fingerprint - A keyed fingerprint of a header value:
sozu-hc-hmac-sha256:v1:<epoch-32-hex>:<full-tag-64-hex>. The tag is the whole 256-bit HMAC, never truncated. The same name and value under one epoch give the same fingerprint, so equality is visible; without the key it reveals no plaintext. - Health
Check Header Value - Protected ingress/IPC carrier of one health-check header value: the clear
bytes travel in
SetProtectedHealthCheckfrom the operator to the main process and are moved out into aSecretValueat once. It is theHealthCheckHeaderValuemessage ofcommand.proto(name = 1,value = 2, both required) with a hand-writtenMessageimpl, mapped to the generated path bycommand/build.rs. - Protected
Header - One protected header: its public name, its public keyed fingerprint and a
shared handle on the value. Cloning clones the
Arc, never the bytes. - Protected
Header Journal - The in-memory protected headers of every cluster, and the unresolved proposals that may still replace them.
- Protected
Header Set - An immutable, ordered set of
ProtectedHeaders behind oneArc. Cloning clones that handle; the headers and their values are shared. - Protected
Header Version - Opaque identity of one proposal. It carries no header, so a task may persist it next to a cluster id; the set it names lives in memory only.
- Protected
Health Check - A validated protected health-check order: the cluster, its configuration with a trusted fingerprint on every header, and the held values.
- Protected
Transfer - The confirmed protected state of a main process, as a new main process takes it over: the optional fingerprint key, the number of versions issued, and the confirmed header set of every cluster, clusters sorted by id and headers in their configured order. Pending proposals never travel.
- Secret
Value - A health-check header value held in memory only.
- Version
Exhausted - Every
ProtectedHeaderVersionhas been issued. - Zeroizing
Zeroizingis a wrapper for anyZ: Zeroizetype which implements aDrophandler which zeroizes dropped values.
Enums§
- Fingerprint
Parse Error - Why a fingerprint string was refused. Static: it never echoes the input.
- Header
Value Read Error - Why a header value could not be read from its source. Static: neither the bytes read nor any length of them appears in a diagnostic.
- Protected
Header Change - A full replacement of the protected headers of one cluster.
- Protected
Health Check Error - Why a protected health-check order was refused. Static on purpose: neither a value, nor any length of one, appears in a diagnostic.
- Resolution
- What a resolution did.
- Secret
Value Error - Why an ingress value was refused. Static on purpose: neither the value nor anything derived from it, its length included, appears in a diagnostic.
- Transfer
Error - Why the confirmed protected state could not be handed to a new main process, or an encoded hand-over was refused. Static on purpose: neither a value, nor the key, nor any length of one appears in a diagnostic.
Constants§
- PROTECTED_
TRANSFER_ MAX_ BYTES - Largest encoded
ProtectedTransfera main upgrade may carry.
Traits§
- Zeroize
- Trait for securely erasing values from memory.
Functions§
- read_
header_ value - Read one health-check header value from
source(a file or stdin) into a protected ingress carrier. - refuse_
to_ deserialize deserialize_withof the generated ingress value: it is never read back from a serialized form.- refuse_
to_ serialize serialize_withof the generated ingress value: it is never serialized.