Documentation
¶
Overview ¶
Package worksign is the platform adapter that signs and verifies fleet work order payloads with an HMAC-SHA256 keyed MAC. It holds the key so the key material never reaches the domain or the use case, which depend only on the ports.WorkOrderSigner interface.
Index ¶
Constants ¶
const MinKeyLen = 32
MinKeyLen is the minimum HMAC key length. A short or empty key would make the MAC forgeable, so the constructor fails closed below it.
Variables ¶
var ErrWeakKey = errors.New("worksign: signing key too short")
ErrWeakKey is returned when the signing key is shorter than MinKeyLen.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer is an HMAC-SHA256 work order signer.
func New ¶
New returns a Signer keyed with key. It fails closed on a key shorter than MinKeyLen so a missing or misconfigured key cannot boot a forgeable signer. The caller supplies the key from the credential vault or configuration; it is never logged.