How it works
A file can be private, shared with named people, or accessed through a scoped link. Store rules against stable IDs and define folder inheritance, link expiry, and whether viewers can download or reshare. Check current effective permission, the result of combining direct and inherited rules, before listing, reading metadata, issuing a download capability, or accepting writes. A capability is a token, such as a signed URL, that grants access to whoever holds it. A guessed object key must not bypass the API gate.
Revocation should block new capabilities immediately, but issued ones are harder. Suppose the API hands out a 15-minute signed URL at 10:00 and the owner removes the viewer at 10:05. The API refuses new URLs at once, yet the old one keeps working until 10:15, because storage checks the signature and expiry rather than current sharing rules. S3 presigned URLs behave this way. One-minute URLs shrink the window but mean more API calls and re-issuing during long downloads. Strict immediate revocation may require online authorization at the serving edge, which adds a lookup and a dependency to every read.
Cache keys and search results must respect effective access, or a removed collaborator can still find a file by name. Encrypt in transit and at rest, maintain keys, and audit sharing changes. For a public download link with low sensitivity, longer URLs and shared caching may be the right tradeoff.
An owner removes a collaborator, but their download URL was issued ten minutes ago. What determines continued access?
Token expiry and the serving path. Very short tokens or online checks are needed for rapid revocation; caches need matching controls.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Authorize every path exposing or changing protected data.
- Define how quickly issued links and cached copies stop working after revocation.