API Request Signing

Design HTTP request signing for APIs: HMAC, SigV4-style, RFC 9421 signatures, Content-Digest, and replay defenses. Use when securing webhooks, payments, or high-assurance service calls.

deangrant 48b774f 4 files · 1.8 KB Updated

File contents

Request Signing

Use this skill when Bearer tokens alone are insufficient — payments, webhooks, or high-assurance S2S.


1. Approaches

Approach Notes
HMAC over canonical string Common for webhooks
Cloud SigV4-style Scoped credentials, signed headers
RFC 9421 HTTP Message Signatures Standardized header signatures
Content-Digest Integrity of body (RFC 9530)

2. Replay defense

Include timestamp and/or nonce; reject skew outside window; constant-time compare; sign method+path+body digest+timestamp.


3. Quick checklist

  • Canonicalization documented and tested.
  • Timestamp/nonce replay window.
  • Constant-time signature compare.
  • Key rotation supported.
  • Body digest covered when body matters.

See reference.md and examples.md.

deangrant/agents/tree/main/.agents/skills/api-request-signing commit 48b774f5a5

Frequently asked questions

npx skillmds@latest add deangrant/api-request-signing