Chef::Auth
Signs HTTP request headers for the Chef Infra API using v1.3 signed-header authentication (the mixlib-authentication wire format).
The canonical request string is RSA-SHA256 signed and the signature is
split into 60-character chunks across numbered X-Ops-Authorization-N
headers, because Chef limits individual header line length.
Constants
API_VERSION = "1"
SIGN_ALGORITHM = "sha256"
SIGN_VERSION = "1.3"
Constructors
Class methods
canonical_path(p)
The server normalizes the path before verifying the signature, so the signed path must match: collapse repeated slashes and strip a trailing slash (unless the path is just "/").
Instance methods
canonical_request(method, path, content_hash, timestamp) : String
The string that is covered by the RSA signature.
Signs headers in place for a request of method to the canonical path with body as the request body. Returns the same headers.