Separate naming from authority
A capability associates a reference to an object with authority to perform particular operations on that object. Knowing or inventing an object name must not, by itself, confer that same authority. A document identifier D is therefore different from a protected reference permitting D to be read. Consider a helper that counts characters in one document. Instead of giving it a storage root and administrator credentials for every document, provide a read-only reference for the one object it needs. The call now expresses the intended target and operation. Naming a Python variable cap does not create a security boundary, however. The implementation must enforce how such references are created, transferred and used. Keep that enforcement question beside the conceptual design so that an application-level example is not mistaken for a proof about hostile code running with broader process privileges.
Identify authority obtained from the surroundings
A helper accepting a filename may open that name using the process’s own permissions. What a caller can cause it to access then depends on ambient authority, not merely on the string format. A routine intended to process one document might reach unrelated objects if it opens arbitrary paths under a broad account. Passing an already opened read handle moves name resolution toward the caller and makes the intended object more explicit. That is a useful design step, not complete process isolation. If the helper can open another path through another API, that route remains. The companion experiment distinguishes restricting an application interface from an operating system enforcing restrictions on alternative access paths. Always identify the component that actually rejects an unauthorized operation.
Restrict objects and operations independently
Restricting access to one document and restricting operations to reading are separate choices. A reference to D that also permits modification carries different authority from a read-only reference to D. Conversely, a reference that reads every document remains broad in its object scope even if it cannot write. Record target objects, operations, duration and delegation conditions separately. Finer restrictions also create more policy to manage, so begin from the helper’s actual responsibilities. Character counting needs reading; changing a document’s sharing policy does not belong in that task. An explicit permission table makes this difference visible. A single attribute such as owner is often too coarse to describe what the current operation genuinely requires.
Keep delegation within existing authority
Suppose A may read D and delegates part of that work to a counting helper. The delegated reference must not exceed A’s authority. If A can issue a reference that reads every document despite having access only to D, delegation becomes an escalation path. Creating a restricted reference therefore needs a check that the new object set, operation set and other conditions stay within the original grant. Narrowing the object set while adding write permission is not simply a reduction. Token length or a shorter label says nothing about the size of the authority conveyed. Also specify whether further delegation is permitted. Collaboration may require it, while exposure control may restrict it; those are explicit policy choices with different enforcement and testing needs.
Design revocation as an additional contract
The word capability does not imply that every previously transferred reference disappears automatically when sharing is revoked. Expiration, an intermediary checking current policy, or generation-based validation provide different revocation properties. An opened file handle also need not behave like a fresh name lookup after access settings for the name change. Draw the moments of issue, use and revocation, then specify which later operations must be denied. This is separate from recovering copies of content already read. Immediate revocation and operation without contacting an authority each time can create design tradeoffs. Discuss availability and latency alongside the permission property, and state precisely what the selected mechanism does and does not invalidate.
Separate possession from identity
In a design where presenting a reference establishes authority, consider what happens if the reference is transferred or exposed. Identifying the logged-in person and deciding which operations a presented reference permits are not the same action. Some designs rely on possession alone; others add actor, device or time conditions. An unguessable shared URL still needs exposure, expiration and revocation analysis. This lesson does not recommend calling every identifier string a capability. Specify who may issue a reference, how presentation is verified and which exact actions follow from it. Logging a usable authority-bearing reference can transfer power to someone reading the log, so observability needs its own information policy rather than indiscriminately retaining complete request values.
Limit the claim made by a teaching model
A teaching model can pass an object reference allowing read and verify that a requested write is rejected. That tests the interface’s correspondence between requested authority and performed operations. It does not establish that arbitrary Python code in the same broadly privileged process cannot open another file. Operating-system experiments also need to consider already opened handles, inherited references and unrelated network privileges. One rejected read is not proof of a complete sandbox. Record which API path was exercised, which component enforced the decision and under what conditions. A small model is useful evidence about a conceptual contract only when its enforcement limits accompany the result; otherwise the experiment encourages a stronger conclusion than it actually supports.
List delegated operations and ambient authority separately
A read-only reference authorizes reading that object, not automatically discovering other objects. Passing a file descriptor does not by itself pass directory-opening authority. However, if the recipient can already open arbitrary paths through its environment, that ambient authority remains. A narrow delegated reference therefore does not prove that the entire process has been confined. Record received references and environmental authority in separate columns. This distinction explains why the file-descriptor experiment tests both the restricted descriptor and an ordinary path operation that still succeeds.
Exercise: build delegation and revocation tables
A holds read and write on D, while the counting helper needs only read. The worked delegation table retains D as the target but reduces the operation set to read; the helper’s write attempt is rejected and its read succeeds. Next consider A holding only read on D but requesting a delegated read on E. That must be rejected because the target set expands beyond the original grant. Finally add revocation and state exactly when previously issued references stop working. Saying capabilities revoke is not an answer: choose a rule such as expiration or an intermediary check. Keep the limitation that already read copies are not recovered. Explaining target, operation, time and enforcing component together makes the concept useful for API design and verification.