Sign HTTP requests using RFC 9421 HTTP Message Signatures with PEM private keys
A Yaak authentication plugin that implements RFC 9421 HTTP Message Signatures, allowing you to sign HTTP requests with a PEM private key.
Signature-Input and Signature headers to requestsOnce configured, the plugin will automatically add Signature-Input and Signature headers to your requests when you send them.
For testing purposes, you can generate a private key using OpenSSL:
# Generate a 2048-bit RSA private key
openssl genrsa -out private_key.pem 2048
# Convert to PKCS#8 format (recommended)
openssl pkcs8 -topk8 -inform PEM \
-outform PEM -in private_key.pem \
-out private_key_pkcs8.pem -nocrypt
The content of private_key_pkcs8.pem can be used as the HTTPMessageSignature.privateKey variable.
The plugin currently signs a combination of the following request components:
@method: HTTP method@authority: Host header value@path: Request path@target-uri: The absolute URI of the resource@request-target: Depending on the request method; Absolute URI, Relative Path or *host: Host header valuedate: Date header valuecontent-digest: Content digest header (if present)content-type: Content type header (if present)MIT