LESSON 06 · Sharing and privacy

Authorize every path

Access rules must protect listings, metadata, and the actual content bytes.

SYSTEM VIEW

The file path

Diagram view
Clock—
URL expires—
Open after revoke—

Watch a shared file’s bytes keep flowing after the viewer is removed, then choose how fast access should end.

  1. The Viewer asks the File API to list a shared folder. The File API first asks the Access check for the Viewer’s effective permission: direct and inherited rules combined. The same check comes before reading metadata, issuing a download URL or accepting a write.

    Permission
    direct + inherited
    Checked before
    list, read, URL, write

    What changed

    • List request
    • Access check: allowed
  2. The Viewer asks to download budget.xlsx. The check passes, and at 10:00 the File API returns a URL signed for 15 minutes: a capability, a token that grants access to whoever holds it. Object storage checks the signature and sends the bytes.

    Issued
    10:00
    Lasts
    15 minutes

    What changed

    • Signed URL until 10:15
    • Bytes from Object storage
  3. Object keys can be guessed, so a key alone must open nothing. A request for a guessed key carries no valid signature, and Object storage refuses it. The bytes are reachable only through a URL the File API signed after its check.

    What changed

    • Guessed key refused
  4. At 10:05 the owner removes the Viewer, and the Access check’s rules change at once. When the Viewer asks for a new URL, the File API checks, gets a no and refuses. Revocation blocks new capabilities immediately.

    Revoked
    10:05

    What changed

    • Viewer removed at 10:05
    • New URLs refused
  5. At 10:10 the Viewer reuses the URL issued at 10:00, and Object storage still sends the bytes. Storage checks the signature and expiry, not the current sharing rules, so access lasts until 10:15: ten minutes after revocation. S3 presigned URLs behave this way.

    Issued
    10:00
    Revoked
    10:05
    Expires
    10:15

    What changed

    • 10:00 URL still works
    • Open 10 min after revoke
  6. The File API sends the Viewer’s search for “budget” to the Search index, which returns budget.xlsx without asking the Access check. Search results and cache keys must respect effective access, or a removed collaborator can still find a file by name.

    What changed

    • Search index
    • Name found without the check
  7. Pick how fast access ends. With 15-minute URLs the old one works until 10:15. One-minute URLs cut that to a minute but mean more API calls and re-issuing during long downloads. An edge check ends access at once but adds a lookup and a dependency to every read.

    15-min URL
    open to 10:15
    1-min URL
    open ≤1 min
    Edge check
    closed at once

    What changed

    • How long the old URL lasts
    Revocation

Space plays · ← → step · Home resets

THE IDEA

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.

DECISION POINT

An owner removes a collaborator, but their download URL was issued ten minutes ago. What determines continued access?

Write a sentence or two to unlock the guidance. Committing first is what makes it stick.

Keep in mind

  • Authorize every path exposing or changing protected data.
  • Define how quickly issued links and cached copies stop working after revocation.
CHECK YOUR UNDERSTANDING

Put it into practice.

1 OF 2
DiagnoseQUESTION 01

A removed collaborator can no longer open a file, yet still sees its name in search results. What is the gap?

Choose an answer. You’ll see the explanation once you get it right.

Next lesson

0 of 2 checkpoints answered correctly to complete this lesson.