AWS / Intermediate: application service contracts / Lesson 14
Bounded S3 presigned URL access
Analyze bearer access, expiration and safe verification for an S3 presigned object request.
On this page
Lesson goals
- Explain the scope and bearer nature of a presigned URL.
- Compare configured expiration with signer credential lifetime.
- Design a bounded investigation without exposing the URL.
- Compare requested expiry, signer credentials, policy conditions and request timing for a presigned request.
- Diagnose scoped request mismatches without exposing bearer material.
Model a bearer request
A presigned URL lets its holder make a specific signed S3 request within applicable limits. Treat the whole URL as sensitive because a recipient may share it. Authorize the requester first, select the intended object and operation, and choose an appropriate lifetime. These records are fictional.
Compare expiration boundaries
The requested expiration is not necessarily the effective end of access. A URL signed with temporary credentials stops working when those credentials expire, and policies can impose further restrictions. Here five minutes remain on the signer credential, so a ten-minute URL cannot guarantee ten minutes.
action: s3:GetObject
object: synthetic-reports/monthly.csv
requested_lifetime_minutes: 10
signer_credential_remaining_minutes: 5
The record compares requested lifetime and remaining credential lifetime; it is not a signed request.
Distinguish a request from a retry
S3 checks expiration when the HTTP request starts. A download begun before expiry can continue afterward, but reconnecting after expiry is a new request that can fail. Recheck authorization before issuing a fresh URL; never embed durable credentials in the client.
request_started_before_expiry: yes
connection_interrupted_after_expiry: yes
retry_after_expiry: requires-new-authorization
The record describes request timing; no transfer or signed URL was generated.
Investigate a denied request
Record the operation, object, approximate signing and request times, credential lifetime and sanitized error or request ID. Never paste the complete URL into a ticket. Compare the method and signed details with the client request, then investigate applicable permissions and conditions.
Verify a narrow correction
In an approved isolated lab, generate a fresh link for a synthetic object after confirming authorization. Test the intended operation and an approved denial outside its scope. Record results without retaining the URL. One success does not establish permission for other objects or later sessions.
Define the bearer capability before signing
A presigned S3 URL represents a particular signed HTTP request using the signer’s credentials and applicable permissions. Whoever possesses the URL can attempt that request, so authorization of the requester must occur before issuing it and the complete URL must be protected like a bearer secret. Record the intended bucket, key, operation, recipient, purpose and expiry policy without storing the signed query string. A URL for one object or operation is not a general grant to list the bucket or access a different key.
The signing service should choose the object from an authorized server-side decision rather than blindly signing a client-supplied key. Decide whether repeated use during the valid interval is acceptable: expiration alone does not make the URL single-use. If one-time business redemption is required, add an application-controlled authorization or state mechanism with its own race and recovery design. These synthetic records contain no signed URL, credential or actual S3 request.
Calculate the effective time boundary
The requested URL lifetime is only one bound. A URL signed with temporary credentials expires when those credentials expire, and revocation or deactivation can invalidate the signing credentials earlier. Applicable policies can deny the request before the requested expiry. For example, a 20-minute requested lifetime with ten minutes remaining on the temporary credential cannot promise 20 minutes; if a valid applicable policy denies signatures older than five minutes, a request at minute six is denied even while both other clocks remain valid.
The signature-age condition uses a signed timestamp and is expressed in milliseconds in the documented policy context. Treat clock assumptions and request timing explicitly; do not use the condition as a way to extend a URL. Current permission and policy context also matter at request time. A timeline establishes only the stated upper bound, not a guarantee that every request before it succeeds.
Keep the signed request and actual request aligned
A signature applies to specific request details. Changing the HTTP method, object key, signed headers or query parameters can cause signature validation to fail. A signed upload request may require the client to send the headers used during signing; a download URL does not automatically authorize a PUT. Endpoint and Region configuration, clock and client transformations also deserve review when diagnosing a mismatch. Capture safe method, object reference, times and error class, not the URL or credentials.
S3 checks URL expiration when the HTTP request begins. A download that starts before expiration can continue after that time, but a dropped connection followed by a new request after expiration can fail. A fresh URL should be issued only after the application rechecks the requester’s authorization and intended object. A retry is a new request with its own time and policy evaluation, not proof that the original transfer completed or that renewed access is appropriate.
Separate signer permissions and network conditions
The signer must have the relevant permission, and applicable identity, bucket, access-point, organization and other controls can affect the request. A successful signing operation is not proof that the eventual request will be allowed under current policies. An explicit deny or a changed permission can block use. Encryption may add a key authorization dependency for the selected object and operation. Diagnose the exact request and current policy context with the owner instead of widening access or making a bucket public.
Network-path restrictions also apply to the presigned request where configured. A policy using a public endpoint source IP condition and one using a VPC endpoint condition describe different contexts. A URL delivered to a user on an unapproved network can fail even if its signature and clock are otherwise valid. Verify the documented condition keys and service interactions before adopting a guardrail; a fictional policy decision is not an account-wide security assessment.
Test boundaries without exposing bearer material
A bounded test plan uses a synthetic object and approved isolated account, names the expected method and key, and includes a positive request plus appropriate negative cases: wrong method or key, expiry, denied network context and a requester whose application authorization has been revoked. Specify expected outcomes before the test and record actual sanitized results, timestamps and request identifiers only if available. Do not paste a URL into a ticket, log, browser screenshot or chat; its query string can carry the authorization capability.
If a URL is exposed, follow the organization’s incident and credential-response process, assess the signer and scope, and use authorized mitigation appropriate to the actual credential and policy. Do not claim that deleting a log copy alone revokes a shared link. Recheck application authorization before reissuing access and verify the user outcome separately. The examples below are offline scenarios: no URL is generated, no credential is inspected, and no S3 object is accessed.
20 worked examples
1. Temporary credential expires first
Problem: In the temporary credential expires first scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The signing credential ends ten minutes before the requested URL lifetime.
- Do not promise use beyond minute 10; other restrictions may end it sooner.
requested URL lifetime=20 min
signer credential remaining=10 min
other restrictions=not evaluated
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Do not promise use beyond minute 10; other restrictions may end it sooner.
Why this result follows: The URL cannot outlive its temporary signing credentials. The conclusion is limited to the stated request and policy assumptions.
2. Signature-age restriction
Problem: In the signature-age restriction scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The request age exceeds the stated policy limit while the other clocks remain open.
- The applicable policy denies this request in the fixture.
requested lifetime=20 min
credential remaining=30 min
policy denies signature age >5 min
request age=6 min
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The applicable policy denies this request in the fixture.
Why this result follows: A signature-age guardrail can shorten but not extend access. The conclusion is limited to the stated request and policy assumptions.
3. Credential revoked
Problem: In the credential revoked scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The credential is revoked before the new request begins.
- Do not expect the URL to remain valid until 10:30.
URL requested expiry=10:30
signer credential revoked=10:10
new request=10:15
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Do not expect the URL to remain valid until 10:30.
Why this result follows: The validity of the signing credential bounds the signed request. The conclusion is limited to the stated request and policy assumptions.
4. Download crosses expiry
Problem: In the download crosses expiry scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The HTTP request starts before the expiration boundary.
- The ongoing download can continue after 10:05 under the documented behavior.
request begins=10:04
URL expires=10:05
connection remains open until=10:08
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The ongoing download can continue after 10:05 under the documented behavior.
Why this result follows: S3 checks expiration when the request starts, not by terminating an already ongoing transfer. The conclusion is limited to the stated request and policy assumptions.
5. Reconnect after expiry
Problem: In the reconnect after expiry scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The reconnect is a new HTTP request after the expiration time.
- The expired request can fail; reauthorize before issuing a fresh link.
download begins=10:04
URL expires=10:05
connection drops=10:06
new request=10:07
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The expired request can fail; reauthorize before issuing a fresh link.
Why this result follows: A retry has its own request-start time and access evaluation. The conclusion is limited to the stated request and policy assumptions.
6. Wrong method
Problem: In the wrong method scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The client method differs from the signed request.
- The GET URL does not authorize this PUT request.
signed operation=GET reports/a.csv
client request=PUT reports/a.csv
other URL=none
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The GET URL does not authorize this PUT request.
Why this result follows: The signed capability is scoped to its intended operation and request details. The conclusion is limited to the stated request and policy assumptions.
7. Wrong key
Problem: In the wrong key scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The requested key differs from the signed and approved object.
- Do not treat the URL as permission to access b.csv.
signed key=reports/a.csv
client attempts key=reports/b.csv
application authorization=only a.csv
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Do not treat the URL as permission to access b.csv.
Why this result follows: Object identity is part of the bounded request and application authorization. The conclusion is limited to the stated request and policy assumptions.
8. Signed header mismatch
Problem: In the signed header mismatch scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The actual signed-header value differs from the value used for signing.
- Investigate the mismatch; this request can fail signature validation.
signed PUT Content-Type=text/csv
client sends Content-Type=application/json
request signature=requires signed header
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Investigate the mismatch; this request can fail signature validation.
Why this result follows: The signature binds the request details included in its calculation. The conclusion is limited to the stated request and policy assumptions.
9. Query string altered
Problem: In the query string altered scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The client changed a parameter included in the signed request.
- The transformed request can fail signature validation.
signed query parameters=original
client transformation=removes a signed parameter
request=otherwise unchanged
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The transformed request can fail signature validation.
Why this result follows: A signed query is part of the request integrity contract. The conclusion is limited to the stated request and policy assumptions.
10. Signer lacks action
Problem: In the signer lacks action scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The claimed generated URL does not supply a permission absent from the signer.
- The eventual read is not established and is denied under the stated policy.
signer permission=s3:GetObject denied
requested operation=GetObject reports/a.csv
URL generation=claimed successful
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The eventual read is not established and is denied under the stated policy.
Why this result follows: Presigning delegates a bounded request using the signer’s applicable authority. The conclusion is limited to the stated request and policy assumptions.
11. Explicit bucket deny
Problem: In the explicit bucket deny scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- Both the allow and the explicit deny apply to the same request.
- The request is denied despite the unexpired URL.
signer allow=GetObject reports/a.csv
bucket policy=explicit deny for that request
request time=within URL lifetime
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The request is denied despite the unexpired URL.
Why this result follows: An applicable explicit deny overrides an allow. The conclusion is limited to the stated request and policy assumptions.
12. Permission changed after signing
Problem: In the permission changed after signing scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The request is evaluated under the current permission context, which has changed.
- Do not infer successful access from the earlier signing state.
signing time=10:00; signer allowed=yes
request time=10:03; applicable permission removed
URL expiry=10:10
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Do not infer successful access from the earlier signing state.
Why this result follows: An unexpired signature does not freeze all later authorization decisions. The conclusion is limited to the stated request and policy assumptions.
13. Network condition
Problem: In the network condition scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The stated request does not satisfy the applicable network condition.
- The request is denied under the fixture’s policy.
URL method=GET; object=reports/a.csv
policy permits source network=office CIDR
request source=outside office CIDR
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The request is denied under the fixture’s policy.
Why this result follows: A bearer URL remains subject to applicable network-path restrictions. The conclusion is limited to the stated request and policy assumptions.
14. Key authorization
Problem: In the key authorization scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The object permission and key permission are separate checks.
- The described encrypted read cannot complete under the stated conditions.
S3 GetObject=allowed
object encryption=SSE-KMS
required key authorization=denied
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The described encrypted read cannot complete under the stated conditions.
Why this result follows: An S3 grant does not automatically provide required key access. The conclusion is limited to the stated request and policy assumptions.
15. Bearer sharing
Problem: In the bearer sharing scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- B possesses the same bearer request capability as A during its valid scope.
- The design cannot assume the link is usable only by A.
authorized recipient=A
A shares complete URL with B
application reauthorization at S3 request=not present
This fictional record contains no URL or credential and makes no S3 request.
Expected result: The design cannot assume the link is usable only by A.
Why this result follows: Possession can permit an attempted request without a new application login. The conclusion is limited to the stated request and policy assumptions.
16. Repeated use
Problem: In the repeated use scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The fixture includes no application mechanism that consumes the capability once.
- Do not infer that the second use is automatically blocked.
URL scope=GET reports/a.csv
first use=success
second use before expiry=attempted
single-use control=none
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Do not infer that the second use is automatically blocked.
Why this result follows: Expiration and request scope do not themselves provide single-use business semantics. The conclusion is limited to the stated request and policy assumptions.
17. Client-controlled object
Problem: In the client-controlled object scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The signer accepts a client-selected object without the required authorization decision.
- Block issuance until the requester’s access to payroll.csv is verified.
client input key=payroll.csv
signing service authorization check=missing
service signs requested key=yes
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Block issuance until the requester’s access to payroll.csv is verified.
Why this result follows: A narrow signed request can still expose the wrong object if selection is unauthorized. The conclusion is limited to the stated request and policy assumptions.
18. Safe diagnostic record
Problem: In the safe diagnostic record scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The record preserves useful scope and error context without the bearer query.
- Use the sanitized information to investigate policy and timing.
operation=GET
object reference=lab-report
error=AccessDenied
request time=10:03
full URL=excluded
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Use the sanitized information to investigate policy and timing.
Why this result follows: The complete URL is unnecessary for an ordinary bounded incident note. The conclusion is limited to the stated request and policy assumptions.
19. URL exposed in ticket
Problem: In the url exposed in ticket scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The ticket may have disclosed a usable bearer capability beyond its intended audience.
- Follow the approved exposure response and assess mitigation; remove the exposed copy.
complete presigned URL=posted in shared ticket
recipient scope=unknown
credential response=not performed
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Follow the approved exposure response and assess mitigation; remove the exposed copy.
Why this result follows: Deleting a ticket copy alone does not prove other copies or the credential are invalid. The conclusion is limited to the stated request and policy assumptions.
20. Reissue after authorization change
Problem: In the reissue after authorization change scenario, assess the concrete signed-request and authorization facts and determine the scoped outcome.
- The retry is a new issuance after the user’s entitlement changed.
- Do not issue a new link without a fresh authorization decision.
original URL=expired
user entitlement=revoked
user requests fresh URL=yes
This fictional record contains no URL or credential and makes no S3 request.
Expected result: Do not issue a new link without a fresh authorization decision.
Why this result follows: Expiration recovery must not bypass current application authorization. The conclusion is limited to the stated request and policy assumptions.
Common errors and fixes
A link is pasted into a shared ticket
- Why it happens
- The bearer URL was treated as ordinary diagnostic text.
- How to fix it
- Remove it through the organization’s incident procedure and assess exposure.
- Prevent it next time
- Log sanitized identifiers instead of signed query strings.
The configured lifetime is assumed guaranteed
- Why it happens
- Temporary signing credentials can expire earlier.
- How to fix it
- Compare both lifetimes and issue a new link after authorization.
- Prevent it next time
- Include credential lifetime in the design and tests.
An expired download retry is treated as the original request
- Why it happens
- A reconnect creates another HTTP request.
- How to fix it
- Reauthorize and obtain a fresh link for the retry.
- Prevent it next time
- Test interrupted transfers near expiration.
20 practice exercises
1. A link requests ten minutes but its temporary signing credential expires after five. What can be promised?
Show hint
Use the earlier of the requested lifetime and temporary credential expiration as an upper bound.
Show worked solution
Do not promise ten minutes. Credential expiry can invalidate the link earlier, and other policy restrictions may shorten access further.
The ten-minute requested duration cannot outlive the credential with five minutes remaining. Policies or revocation can shorten access further, and matching clocks do not guarantee that the request is otherwise authorized.
Check your solution
- Identify the five-minute credential boundary.
- Avoid promising the full ten minutes.
2. A download starts before expiry, disconnects and retries afterward. What should the application do?
Show hint
A reconnect is a new HTTP request with a new start time.
Show worked solution
Treat the retry as a new request, recheck the user’s authorization and issue a fresh bounded URL if appropriate.
The first transfer began before expiry, but the retry begins afterward and can fail. Recheck the user’s current authorization and object scope before issuing a fresh bounded URL; never place the old URL in diagnostic evidence.
Check your solution
- Identify the retry as a new request.
- Require current authorization before reissue.
3. A URL requests 15 minutes, but its temporary signer credential has four minutes remaining. What can the service promise?
Show hint
Compare both time boundaries.
Show worked solution
It cannot promise the requested fifteen minutes: the temporary credential expires after four. Other policies or revocation may shorten access further, so even four minutes is an upper bound rather than a guaranteed successful request. Reauthorize before issuing another link.
Check your solution
- Identify the four-minute credential bound.
- Do not promise the requested fifteen minutes.
4. A URL requests 30 minutes, credentials last an hour and an applicable policy denies signature age above 10 minutes. Evaluate a request at minute 12.
Show hint
Compare request age with the policy limit.
Show worked solution
The request exceeds the stated signature-age limit and is denied under the fixture even though the requested lifetime and credentials have not expired. Verify the actual signed timestamp and policy scope in a real authorized investigation.
Check your solution
- Identify the ten-minute policy limit.
- Deny the minute-12 request in the model.
5. A signing credential is revoked at 09:05 although the URL requests expiry at 09:30. Can a new request at 09:10 rely on the URL?
Show hint
The signer credential must remain valid.
Show worked solution
No. The credential was revoked before the new request, so the later requested URL expiry does not guarantee access. Follow the approved credential-response process and make a fresh authorization decision before issuing any replacement capability.
Check your solution
- Identify the earlier revocation.
- Reject reliance on the 09:30 requested expiry.
6. A download starts at 11:04, expires at 11:05 and stays connected until 11:09. Must S3 terminate it at 11:05?
Show hint
Distinguish request start from transfer completion.
Show worked solution
No. S3 checks expiration when the HTTP request begins, so a download started before expiry can continue after it while the connection remains open. This is not a guarantee that every transfer succeeds or that a later reconnect will work.
Check your solution
- Identify the pre-expiry request start.
- Distinguish an ongoing transfer from a reconnect.
7. A download starts before expiry, disconnects afterward and retries at 11:10 after the URL expired at 11:05. What should the application do?
Show hint
The retry is a new HTTP request.
Show worked solution
Treat the retry as a new request that can fail because it begins after expiration. Recheck the user’s current authorization and intended object, then issue a fresh bounded URL only if appropriate. Do not reuse the expired link as proof of entitlement.
Check your solution
- Identify the post-expiry new request.
- Require reauthorization before reissue.
8. A URL is signed for GET of reports/a.csv, but the client sends PUT to the same key. Is the upload authorized by that URL?
Show hint
Compare HTTP methods.
Show worked solution
No. The signed request is for GET, while the attempted operation is PUT. Review the intended upload authorization and create a separately scoped request only after approval; do not infer broader object permissions from a download capability.
Check your solution
- Identify GET versus PUT.
- Reject the upload under the GET URL.
9. A service authorized reports/a.csv but a client asks it to sign payroll.csv without another access check. What is the design flaw?
Show hint
The signer must authorize the selected object.
Show worked solution
The client controls a different key without a demonstrated entitlement check. The service should resolve the intended object from an authorized server-side decision and refuse issuance until access to payroll.csv is verified. A narrow URL for the wrong object is still an exposure.
Check your solution
- Identify the unapproved key.
- Require server-side object authorization.
10. A signed PUT includes Content-Type text/csv but the client sends application/json. What should be investigated?
Show hint
Compare the signed and actual header values.
Show worked solution
The client changed a header included in the signature, so signature validation can fail. Compare the safe method, object reference and signed-header contract without logging the URL, then correct the client or issue a newly authorized request with the intended details.
Check your solution
- Identify the Content-Type mismatch.
- Avoid exposing the signed URL in diagnostics.
11. A client removes a signed query parameter from a presigned request. Can the original signature be assumed valid?
Show hint
The signed query is part of the request.
Show worked solution
No. Altering a signed parameter can invalidate the signature even if the method and key appear unchanged. Preserve only sanitized diagnostics and compare the client transformation with the signing contract; do not paste the bearer URL into a ticket.
Check your solution
- Identify the altered signed parameter.
- Treat signature validity as unverified.
12. The signer is allowed to read an object, but an applicable bucket policy explicitly denies the request. Does an unexpired URL override the deny?
Show hint
Evaluate the explicit deny.
Show worked solution
No. The matching explicit deny overrides the allow, so the request is denied under the stated policy even before the URL’s requested expiry. Review the policy’s intended scope with its owner rather than broadening unrelated permissions.
Check your solution
- Identify the applicable deny.
- Reject the unexpired URL as an override.
13. A signer had permission at 10:00, but it was removed before a request at 10:04. Does the earlier signature freeze permission?
Show hint
Current policy context still matters.
Show worked solution
No. A URL does not freeze all authorization decisions at signing time. Review the current signer and resource policies for the exact request, including explicit denies, and do not infer access merely because the requested URL lifetime has not elapsed.
Check your solution
- Identify the changed permission.
- Do not treat signing-time permission as permanent.
14. A policy allows presigned requests only from an office network, but the recipient uses an outside network. What happens in the stated model?
Show hint
Compare request origin with the condition.
Show worked solution
The request fails the stated network condition and is denied in the model, even if its signature is otherwise unexpired. Review the intended client path and correct condition-key context through the authorized process; do not expose the URL while troubleshooting.
Check your solution
- Identify the source-network mismatch.
- Keep network policy separate from URL expiry.
15. An SSE-KMS object has S3 read permission but the required key authorization is denied. Is a presigned GET necessarily successful?
Show hint
Object and key access are separate dependencies.
Show worked solution
No. The S3 read grant does not automatically provide the required key authorization. Under the stated denial the encrypted read cannot complete. Review the signer, key and applicable policies through the approved process without weakening encryption.
Check your solution
- Identify denied key authorization.
- Reject S3 permission as sufficient alone.
16. An authorized user forwards a complete unexpired URL to another person. Can the application assume only the first user can use it?
Show hint
The URL is a bearer capability.
Show worked solution
No. A person possessing the URL can attempt its signed request within applicable limits, even if the application originally issued it to someone else. Protect the link, limit its scope and lifetime, and add a separate application control if the business needs stronger redemption rules.
Check your solution
- Identify possession as the risk.
- Do not claim recipient binding without another control.
17. A URL has already succeeded once and remains unexpired; no single-use control exists. Is another attempt automatically blocked?
Show hint
Expiry and one-time redemption are different properties.
Show worked solution
No. The stated record contains no mechanism consuming the capability after its first use. If one-time redemption is required, design an application-controlled state and authorization flow with atomic race handling and recovery, then test it separately.
Check your solution
- Identify the missing single-use mechanism.
- Do not infer single use from expiry.
18. A support ticket includes the full presigned URL and an AccessDenied error. What should the team preserve and remove?
Show hint
The signed query is sensitive bearer material.
Show worked solution
Follow the approved exposure process and remove or contain the URL. Preserve only necessary sanitized operation, object reference, approximate times, error class and request ID. Assess the signer and exposure scope; deleting one ticket copy does not prove every copy is invalid.
Check your solution
- Remove the complete URL.
- Retain safe diagnostic fields and assess exposure.
19. An expired link is requested again after the user’s entitlement was revoked. Should the application issue a fresh URL?
Show hint
Reissuance is a new authorization decision.
Show worked solution
No. The user’s current entitlement is revoked in this fixture, so expiry recovery must not bypass that decision. Deny reissuance under the application contract and record a safe audit outcome without storing the old or new URL.
Check your solution
- Identify the revoked entitlement.
- Do not issue a fresh capability.
20. A team wants a test for a URL scoped to GET reports/a.csv. Specify one positive and one negative case without exposing the link.
Show hint
Test the intended request and a boundary.
Show worked solution
In an authorized isolated lab, test GET for the synthetic a.csv object while the capability is valid, then test an approved wrong-key or wrong-method case expecting denial. Record actual sanitized outcomes and time, not the signed URL; a static plan is not an executed test.
Check your solution
- Define the intended GET.
- Define a distinct denied boundary and sanitized evidence.
Key takeaways
- Presigned URLs are sensitive bearer capabilities.
- Credential expiry and policy can shorten the effective lifetime.
- Sanitize evidence and test both intended access and its boundary.
- A presigned URL is a sensitive bearer capability for a particular request.
- Credential expiry, revocation and applicable policy may shorten requested validity.
- A retry after expiry is a new request and reissue requires current authorization.