AWS Certified Developer Associate DVA-C02 Practice Question
A development team is building an application that uses bearer tokens for authenticating and authorizing user access to a protected API. To ensure the application is secure, the team needs to implement a robust strategy for handling these tokens. Which of the following approaches provides the highest level of security for the application?
Store the token in a secure, HttpOnly cookie but allow transmission over HTTP for non-sensitive, read-only operations to improve performance.
Validate the bearer token only once when the user's session is initiated, and then trust all subsequent requests from that session without re-validation.
Use long-lived bearer tokens that rarely expire to reduce the frequency of user logins and improve the user experience.
Enforce HTTPS for all token transmissions and validate the token's integrity and revocation status on the server with each request.
The most secure strategy for handling bearer tokens is to enforce HTTPS for all transmissions and to validate the token's integrity and revocation status on the server with each request. Using HTTPS encrypts the token in transit, protecting it from man-in-the-middle attacks. Server-side validation, which includes checking the signature, expiration, and any revocation lists, ensures that the token is authentic, has not been tampered with, and is still valid for use. Using long-lived tokens increases the risk of compromise, and validating a token only once at the beginning of a session leaves the application vulnerable to attacks using stolen tokens.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is HTTPS important for bearer token security?
Open an interactive chat with Bash
What does it mean to validate a token's integrity and revocation status?
Open an interactive chat with Bash
What are the risks of using long-lived bearer tokens?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Security
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .