Question 220
A Cognito token is revoked, but an application validates only its signature and unexpired exp claim locally. Why can the application still accept it?
- Revocation changes the token bytes in every client cache
- Offline signature and expiry validation alone do not check revocation state
- A revoked token must have an invalid cryptographic signature
- Any locally valid JWT automatically grants every AWS IAM permission
Explanation
Correct Answer
B:Revocation does not rewrite a previously issued signed JWT. The application needs an appropriate session or revocation enforcement design in addition to verifying the token's cryptographic validity.
Incorrect Answers
A:An already-issued bearer token remains the same local string; the service cannot rewrite every copy held by a caller.
C:Revocation is a lifecycle decision, not necessarily a change to the signature on a token issued earlier by the legitimate provider.
D:Application token acceptance and IAM AWS API authorization are separate systems, so local verification does not confer arbitrary infrastructure privileges.
Question 221
A web application receives a Cognito JWT. What must the backend validate before trusting its claims?
- Signature, issuer, audience or client context, expiry, and token use
- Only the caller's User-Agent header
- Only the token's text length
- Only whether the token contains readable JSON
Explanation
Correct Answer
A:A token must be authentic and intended for the expected application and purpose; merely decoding its JSON does not establish those properties.
Incorrect Answers
B:A client-controlled header does not verify the cryptographic authenticity or intended use of the received identity token.
C:Length cannot establish a valid signature, correct application audience, unexpired lifetime, or intended token type.
D:JWT contents are commonly decodable without verification, so readable claims do not prove integrity or the correct issuer.
Question 222
An API needs authorization scopes in a user's token. Which token type is normally relevant in a Cognito OAuth flow?
- An arbitrary password-reset code
- The refresh token sent to every API
- The unsigned browser session name
- The access token
Explanation
Correct Answer
D:Access tokens carry authorization context such as scopes for protected APIs, while identity tokens primarily assert information about the authenticated user.
Incorrect Answers
A:A recovery code belongs to a different authentication workflow and does not assert the OAuth scopes required by the protected API.
B:A refresh token is used to obtain new tokens and should not substitute for the access token presented to a resource server.
C:A locally chosen label has no cryptographic trust and cannot establish the user's granted OAuth authorization scopes.
Question 223
A public mobile client uses OAuth authorization code flow. Which mechanism protects intercepted codes without storing a client secret in the app?
- Use only a longer client identifier
- PKCE
- A hardcoded shared client secret
- An S3 bucket version ID
Explanation
Correct Answer
B:The verifier and challenge bind code redemption to the client instance that initiated the flow, avoiding reliance on a confidential secret embedded in public code.
Incorrect Answers
A:The public client ID is not a secret and does not bind authorization-code redemption to the instance that initiated the login flow.
C:A distributed mobile binary cannot reliably keep one universal secret confidential, so this does not provide the intended public-client protection.
D:Storage version identifiers are unrelated to preventing interception and unauthorized redemption of an OAuth authorization code.
Question 224
A client signs requests with STS credentials but receives authentication errors. Which TWO checks address the credential and signing format? Choose TWO.
- Increase only the HTTP retry count
- Grant s3:* to an unrelated role
- Ensure the matching session token accompanies the temporary access key and secret
- Verify the signing timestamp and client clock
- Disable the target resource's audit logs
Explanation
Correct Answers
C:An STS credential set is incomplete without its issued token; mixing components from different sessions also invalidates the authentication attempt.
D:A substantially incorrect time can cause signature rejection even when the credential values themselves are otherwise correct.
Incorrect Answers
A:Repeatedly sending an unchanged invalid credential set or bad timestamp does not correct the authentication defect.
B:Expanding authorization elsewhere does not repair malformed or time-invalid authentication for the client's current signed request.
E:Removing diagnostic evidence cannot make the service accept a request whose session token or signature time is invalid.
Question 225
Staff are leaving a project and should lose workforce account access. What lifecycle action is appropriate?
- Delete only their dashboard bookmarks
- Rename the project account
- Remove the relevant assignments and address active sessions as required
- Rotate only an unrelated application secret
Explanation
Correct Answer
C:Future role access and already-issued sessions are separate considerations; offboarding should cover both rather than assuming portal assignment removal instantly ends every session.
Incorrect Answers
A:Bookmarks are convenience links and do not revoke the identity's assignments, permissions, or existing credentials.
B:An account label change does not alter the user's authorization or invalidate sessions issued before offboarding.
D:Changing another workload's credential does not remove the person's workforce role assignment or established session permissions.
Question 226
Corporate SAML sign-in works, but the organization also wants automated creation, updating, and deactivation of workforce users and groups in IAM Identity Center. Which integration addresses that separate lifecycle requirement?
- Only adding more callback URLs to the sign-in application
- Only a longer SAML assertion lifetime
- SCIM provisioning from the approved identity provider
- Only a permission-set session-duration change
Explanation
Correct Answer
C:SCIM synchronizes supported identity lifecycle data. SAML sign-in establishes an authentication flow and should not be assumed to provision and update the complete user and group lifecycle automatically.
Incorrect Answers
A:Redirect destinations affect authentication response routing, not provisioning of the workforce identity objects.
B:Token duration changes authentication validity and does not create the required lifecycle synchronization for users and groups.
D:Role lifetime does not synchronize workforce directory objects or deactivate users when the source directory changes.
Question 227
A role session needs clear attribution to the originating human across chained activity. Which STS feature is relevant?
- Source identity where supported and required by trust policy
- A longer access key ID
- Only the source IP address
- A shared role-session name for all users
Explanation
Correct Answer
A:A recorded source identity can persist attribution context across sessions, complementing session names and audit logs rather than relying on shared credentials.
Incorrect Answers
B:Credential identifiers have service-defined formats; their length is not an operator-controlled attribution mechanism.
C:Shared proxies and changing addresses make IP alone a weaker attribution link than a controlled source identity recorded for the role session.
D:Reusing one label obscures individual attribution instead of distinguishing who initiated the session chain.
Question 228
An application must require users to reauthenticate for a sensitive action. What should the design examine?
- Authentication freshness and the action's required assurance
- Only whether the user can still load a cached account page
- Only the user's profile picture
- Only the application's ordinary inactivity timeout
Explanation
Correct Answer
A:A previously valid login may not satisfy a fresh authentication requirement; the application should verify the relevant session age and assurance signals.
Incorrect Answers
B:A cached page does not establish recent authentication or the stronger assurance needed to authorize the new sensitive transaction.
C:A profile attribute does not prove recent possession of credentials or satisfaction of the sensitive action's required authentication factors.
D:An active session can still be old; an inactivity limit is not necessarily the fresh authentication and assurance required for the sensitive action.
Question 229
A role's session duration is configured longer than the caller requests. How should the issued session lifetime be understood?
- It equals the user's password age
- It remains bounded by the requested and applicable service limits
- It always lasts forever after the first successful call
- It always equals the target role's maximum regardless of the request
Explanation
Correct Answer
B:A maximum setting is a ceiling, not a guarantee that every session receives that entire lifetime regardless of the request and credential flow.
Incorrect Answers
A:Password rotation policy and STS credential duration are separate controls with different evaluation points.
C:STS credentials remain temporary; a successful API operation does not remove their expiration.
D:A maximum is an upper bound, not a requirement to issue the longest possible session when the caller requests less.
Question 230
A role-chaining workflow requests a duration rejected by STS. What should be checked?
- The duration limit applicable to chained role sessions
- Only the target role's configured general maximum
- Only the ordinary duration accepted for a first non-chained role assumption
- Only the role's creation timestamp
Explanation
Correct Answer
A:Role chaining has its own supported lifetime constraint, so the target role's general maximum is not the only limit on the requested session.
Incorrect Answers
B:Chaining can impose a separate lower limit, so the role's ordinary maximum alone does not establish an accepted duration.
C:The chaining flow can impose a separate limit, so success in the initial credential flow does not establish the allowed duration of the next one.
D:The age of the IAM role does not exempt a chained session from its applicable service duration restriction.