Question 657 of 1,013
JWT Authorization: Enforcing Role Changes Without Token Expiration
Exhibit
Application log excerpt:
10:20 HR updated jsmith from finance_approver to finance_viewer
10:35 invoice-approve allowed for jsmith by token claim role=finance_approver
11:05 jsmith still able to submit approval actions
JWT sample:
{
"sub": "jsmith",
"roles": ["finance_approver"],
"exp": "2026-05-01T18:00:00Z"
}
Identity team note: tokens remain valid for 8 hours after sign-in.Based on the exhibit, what is the best fix so role changes take effect promptly without waiting for token expiration?
Quick Answer
The answer is to perform authorization checks against current directory data on each privileged request. This is correct because JWT tokens carry static claims that remain valid until expiration, meaning any role changes made in the directory—such as demoting a user from admin to viewer—will not be reflected until the old token expires or the user reauthenticates. By checking current directory data, such as via LDAP or a policy decision point, on every privileged request, you decouple authentication from authorization, allowing dynamic role changes to take effect immediately without waiting for token expiration. On the Security+ SY0-701 exam, this tests your understanding of access control models and the common trap of assuming token validity equals current authorization. A helpful memory tip is "authN vs authZ"—the token proves who you are (authentication), but the directory proves what you can do (authorization) right now.
⚠ Common exam trap
Candidates often assume storing a JWT in a cookie or increasing token lifetime will somehow make role changes take effect, when in fact neither alters the static nature of the token's claims without a reissue or runtime authorization check.
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
✓
Perform authorization checks against current directory data on each privileged request.
Performing authorization checks against current directory data (e.g., via LDAP or a policy decision point) on each privileged request ensures that role changes are enforced immediately, regardless of JWT token lifetime. This decouples authentication (token validity) from authorization (current role membership), allowing dynamic updates without waiting for token expiration or reauthentication.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the token lifetime so users reauthenticate less often during the workday.
Why it's wrong here
Longer-lived tokens would make stale access last even longer, which worsens the authorization delay shown in the exhibit rather than fixing it.
- ✓
Perform authorization checks against current directory data on each privileged request.
Why this is correct
This is the best fix because the problem is stale authorization, not failed authentication. The app is trusting a role claim that was correct at sign-in but became outdated after the HR change. Checking current directory data, or re-evaluating authorization on each sensitive action, ensures access follows the user's current status instead of an old token snapshot.
- ✗
Store the JWT in a browser cookie so it refreshes automatically when roles change.
Why it's wrong here
Moving the token into a cookie does not solve stale authorization. The application would still rely on the same outdated role information unless it revalidates the user's permissions against an authoritative source.
- ✗
Disable MFA and rely only on the role claim inside the token.
Why it's wrong here
Removing MFA weakens authentication and does nothing to correct the stale authorization decision. The issue is that the app trusts an old claim for too long, not that the user needs fewer login steps.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SY0-701
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Based on the exhibit, what is the best fix so role changes are reflected promptly in the application? Token and directory data: 09:10 Token issued for user jdoe groups=[Finance_Approver, Expense_Reviewer] auth_time=09:10 exp=17:10 09:15 HR updated directory: jdoe moved to Sales 11:00 The application still accepts the original token and allows expense approval 11:01 Identity provider logs show no token revocation event
hard- A.Increase the token lifetime so users reauthenticate less often.
- ✓ B.Shorten token and session lifetime and revoke active tokens when the directory role changes.
- C.Move the application to a different subnet to isolate it from HR systems.
- D.Disable group-based authorization and let any authenticated user approve expenses.
Why B: The token's long lifetime (issued at 09:10, expires at 17:10) allows the application to continue accepting the original token even after the user's directory role changes at 09:15. Shortening the token lifetime forces more frequent reauthentication, and revoking active tokens when the directory role changes ensures that the application immediately reflects the updated authorization. This aligns with the principle of dynamic access control and token lifecycle management.
Last reviewed: Jun 11, 2026
This SY0-701 practice question is part of Courseiva's free CompTIA 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 SY0-701 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.