A GET /account API at a CloudFront custom origin authenticates Authorization and returns user-specific data. Direct-origin responses are correct, but CloudFront serves another user's response. Authorization is forwarded to origin but excluded from the cache key; Minimum TTL is 60 seconds.
This API must not use shared response caching and requires origin authentication and revocation checks for each successful response. There is no cookie or query authentication. Error caching TTLs are already 0 and error responses do not extend caching. Approved configuration changes and removal of old cached responses are available.
Which response meets these requirements?
Combine CachingDisabled and credential forwarding for this non-cacheable authenticated API, then verify old-response removal and actual origin authentication.
Detailed explanation
Forwarding does not partition the key. A cache hit can bypass origin authentication and reuse another user's response. Forwarding alone does not fix the cause.
Client-supplied user_id is not authentication evidence. Cache hits also do not perform per-request origin authorization, and shared caching violates this scenario's requirement.
Do not store successful responses in shared cache; send requests to the authenticating origin. Disabling caching does not itself configure credential forwarding, so verify forwarding and old-response removal too.
A positive cache-policy Minimum TTL can retain content despite no-store. This scenario requires disabling successful-response caching.
Check official documentation
Compare the following points with the official documentation.
Inspect matching behavior, TTLs, Authorization forwarding, and error caching on an approved test API. After deployment and scoped invalidation complete, issue GETs to the same URL with test users A/B, expired credentials, and no credentials. Compare responses with origin authentication logs without recording raw tokens.
Official references
- Official documentation 1
- Official documentation 2
- Official documentation 3
- Official documentation 4
- Official documentation 5
What to confirm
A/B responses do not mix; expired and missing credentials are rejected at origin. Successful responses are not reused from shared cache, and origin authentication is observed for each request. Distinguish old-response removal from new-configuration deployment.
Key points
- CachingDisabled
- Origin request policy
- Invalidation
Notes
- Environment: Official CloudFront documentation and an approved custom-origin API with synthetic test users
- Reviewed against the linked AWS documentation on 2026-10-16.
Foundation review
Separate forwarding, identity, and partitioning
Forwarding Authorization does not run origin authorization for every shared-cache hit. A client-chosen user_id is also not an authentication mechanism, even if it creates different keys.
Disable caching for this API requirement
This scenario requires origin authorization on successful responses and no shared response cache, so use CachingDisabled. Zero TTLs do not configure required Authorization forwarding; retain it separately. Do not rely on no-store with a positive Minimum TTL or generalize the requirement to all authenticated delivery.
Verify old responses, deployment, and error settings
Check the matching behavior and deployment, and remove old scoped responses through approved invalidation. Error TTLs are separate and already set to zero here. After completion, compare synthetic users A/B and invalid authentication at the same URL with real origin authentication logs.