Application security / Practical guide

Check private document access on every download

By OfRoot Technology · · Sources checked

A focused review of who can retrieve private files, how sharing works and what happens when permission changes.

The short version

Choose one private-document workflow and map every way its files can be retrieved. Use synthetic documents and test accounts to check the owner, another user and another tenant. Review direct storage links and sharing lifetimes separately from application sessions, then record both allowed and denied results.

Start with the file’s intended audience

Colorado’s document-access update prompts a broader question about private uploads. The method here is OfRoot’s engineering analysis, not an explanation of that incident’s cause.

Choose a document type and define who should read it: its owner, a named collaborator, an approved support role or nobody outside one organization. Write down sharing, expiry and revocation expectations before choosing the storage mechanism. Public assets require a different policy from private uploads.

[1] Colorado: myColorado incident update and FAQ ↗

Map all the ways the document can leave storage

Include the main download, inline preview, thumbnail, mobile endpoint, export, background job and any direct object-storage URL. Record where each path checks permission and which identity reads the underlying file.

OWASP’s upload guidance addresses controlled storage and retrieval. A check on the upload form does not settle access through a second endpoint, a preview service or a bucket URL. Follow the same private-document policy through those paths.

[3] OWASP File Upload Cheat Sheet ↗

Compare access with synthetic users and documents

In an authorized test environment, create synthetic files for two users and, where relevant, two tenants. Confirm each intended reader can retrieve the correct file. Then use the test accounts to check that requests for the other user’s or tenant’s file are denied.

Check file content and metadata as well as response codes. A denied download should not still reveal a preview, filename or sensitive description outside the intended policy. OWASP emphasizes object-level permission checks even when identifiers are long or difficult to guess.

[2] OWASP Insecure Direct Object Reference Prevention Cheat Sheet ↗

Treat a storage link as its own access decision

For S3, AWS describes presigned URLs as bearer tokens: possession can grant the specified access, and a URL can be used repeatedly before its applicable expiration. Its lifetime is also limited by the signing credentials and relevant storage policies.

Check who can create a link, which object and operation it allows, where it is exposed and how long it remains usable. Revoking an application session does not by itself establish that an already issued storage URL is invalid. If the product requires immediate withdrawal of access, choose and test a mechanism that enforces that requirement.

[4] AWS: Download and upload objects with presigned URLs ↗

Retest after permissions or ownership change

Change the synthetic user’s role, remove a collaborator or move the test document between permitted scopes. Recheck application endpoints and previously issued links against the documented policy, including any allowed delay before access ends.

Keep customer documents, live credentials and production storage out of the experiment. Record unresolved paths with an owner and next action rather than treating a hidden download button as evidence that access has been revoked.

Keep evidence that another engineer can assess

Record the environment, document type, test identities, relevant role or tenant, expected access and actual result. Include link-expiry behavior without copying usable signed URLs or secret values into a report.

Retest authorized workflows after a fix and keep a rollback plan that preserves the private-file policy. This review addresses one part of application security; it does not certify an application or establish that any particular incident has been fully resolved.

Sources and further reading

  1. Colorado: myColorado incident update and FAQ ↗
  2. OWASP Insecure Direct Object Reference Prevention Cheat Sheet ↗
  3. OWASP File Upload Cheat Sheet ↗
  4. AWS: Download and upload objects with presigned URLs ↗

Follow the security developments behind the work.

myColorado notices now expected to begin November 30 →

Need a review, a penetration test or help fixing findings?

Explore application security →