Signing applies only to REST requests, not WebSocket connections.
Request a signed response
Add thex-sign-request header to a request:
x-request-id header with any string value. It is included in the signed content and echoed back in the response, so you can tie a response to your request and guard against replay. If you omit it, DFlow generates one.
-D - prints the response headers and -o /dev/null discards the body, so you see signature, signature-input, and content-digest.
Response headers
A signed response includes:| Header | Description |
|---|---|
signature-input | The signed components and metadata: keyid, algorithm, and created timestamp |
signature | The signature, base64-encoded |
content-digest | SHA-256 digest of the response body |
x-request-id | Your x-request-id, or one DFlow generated |
access-control-expose-headers), so they are readable from the browser.
Example:
@status, content-type, content-digest, and your x-request-id.
Public key
DFlow’s base58-encoded public key, carried as thekeyid in signature-input:
Verify a response
Verify thesignature against the public key above using an RFC 9421 library, which handles rebuilding the signature base from the signed components and checking the content-digest.