DVA-C02 Security Practice Question
An application receives webhooks from a partner. The developer must verify that each request was signed by the partner and not modified in transit. What should the application validate?
⚠ Common exam trap
Candidates often confuse request metadata (like source port or request ID) with cryptographic verification mechanisms, assuming any unique identifier can prove authenticity, when only HMAC or digital signatures provide integrity and sender verification.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The HMAC or digital signature over the payload using the shared/public key material
Webhook verification relies on validating a cryptographic signature (HMAC or digital signature) computed over the request payload using a pre-shared secret or public key. This ensures the payload was signed by the partner and has not been tampered with during transit, as any modification would invalidate the signature. The application must recompute the HMAC or verify the digital signature using the partner's public key and compare it to the signature provided in the request header.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The source port number
Why it's wrong here
The source port number is a network-layer detail that identifies the client-side port from which a connection originates. This value is easily spoofed by malicious actors and provides no cryptographic assurance of the sender's identity or the integrity of the message payload. Relying on the source port alone would leave the webhook vulnerable to unauthorized requests and data tampering, failing to meet robust authentication requirements.
- ✗
The CloudWatch log stream name
Why it's wrong here
The CloudWatch log stream name is an internal identifier generated by AWS CloudWatch for a sequence of log events. This identifier is created *after* a request has been processed and logged by an AWS service, such as API Gateway or Lambda. It has no inherent connection to the authenticity or integrity of the *incoming* webhook request from the partner, making it entirely unsuitable for verifying the sender's identity or the payload's content.
- ✓
The HMAC or digital signature over the payload using the shared/public key material
Why this is correct
An HMAC (Hash-based Message Authentication Code) or a digital signature provides cryptographic proof of both the sender's identity (authentication) and the message's integrity (non-tampering). The sender computes this value over the webhook payload using either a shared secret key (for HMAC) or their private key (for a digital signature). The receiver then independently computes the expected value using the same shared secret or the sender's public key, verifying that the request originated from the legitimate partner and that the data has not been altered in transit.
- ✗
The API Gateway request ID only
Why it's wrong here
The API Gateway request ID is a unique identifier assigned by API Gateway to each incoming request it receives. While crucial for tracing and debugging requests within AWS infrastructure, this ID is generated *by* API Gateway itself, not by the external partner sending the webhook. Consequently, it cannot serve as a mechanism to authenticate the partner's identity or validate the integrity of the payload they submitted, as it is an internal tracking mechanism.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 724 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.