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?
Enforce HTTPS for all token transmissions and validate the token's integrity and revocation status on the server with each request.
Store the token in a secure, HttpOnly cookie but allow transmission over HTTP for non-sensitive, read-only operations to improve performance.
Use long-lived bearer tokens that rarely expire to reduce the frequency of user logins and improve the user experience.
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.
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.
What is a bearer token, and how does it work?
Open an interactive chat with Bash
What does enforcing HTTPS involve, and why is it important?
Open an interactive chat with Bash
What does token validation on the server entail?
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...
IT & Cybersecurity Package Join Premium for Full Access