HMAC Signature - CI/CD用語集の定義
HMAC Signature: HMAC signatureとは、共有secretで計算されたメッセージのキー付きハッシュで、受信側でそれを再計算することで、メッセージが改ざんされておらず、secretを知る者から来たことを証明します。
HMAC signatureとは、共有secretで計算されたメッセージのキー付きハッシュで、受信側でそれを再計算することで、メッセージが改ざんされておらず、secretを知る者から来たことを証明します。
HMAC(hash-based message authentication code)は、SHA-256のようなハッシュ関数を秘密鍵と組み合わせます。1つの値で完全性と真正性の両方を検証します。
CIにおいて
webhookのreceiverはHMAC-SHA256(secret, rawBody)を計算し、それをヘッダーの値と定数時間で比較します。再シリアライズしたJSONではなく生のリクエストバイトを使ってください。さもないと署名が一致しません。
関連ガイド
Webhook Secret - CI/CD Glossary DefinitionWebhook Secret: A webhook secret is a shared token configured on both the sender and receiver, used to sign e…
TLS Handshake - CI/CD Glossary DefinitionTLS Handshake: A TLS handshake is the negotiation at the start of an HTTPS connection where client and server…
Idempotency Key - CI/CD Glossary DefinitionIdempotency Key: An idempotency key is a unique client-supplied identifier attached to a request so the serve…