PLAIN/TEXT — ISSUE 245/456 COMPUTER SCIENCE · FOUNDATION / LIMITING AUTHORITY · ~4 MIN READING DATE: 2027-06-03 ARCHIVE: https://plaintext.click/newsletter/ SUBJECT: Why should a photo tool get only one file? Why should a photo tool get only one file? ========================================== / START HERE A photo-resizing program needs to read a picture and save a smaller copy. The principle of least privilege is the security rule of granting only the permissions needed for a particular job. The program does not need permission to read every document merely because it runs on the same computer. / WHY NOW A bug can make a helpful tool behave incorrectly, and a hostile file can sometimes trigger that bug. Limiting the tool’s authority reduces what the resulting mistake or takeover can reach. / THE IDEA A permission describes an allowed action on a resource, such as reading one file. Traditional applications may inherit broad authority from the account that launched them. That authority exists even when most of it is irrelevant to the current task. A capability is a protected reference to a resource together with specific rights to use it. In an operating-system capability design, a program might receive a read-only handle for one picture instead of general permission to search the document folder. The system enforces the restriction rather than trusting the program to remember it. A sandbox is an enforced restricted environment. Combined with capabilities, it can deny general access to other files while allowing the one handle needed for resizing. The design question changes from whether the program is trusted to what this operation actually requires. / THE FORMAL IDEA permitted effects = actions allowed by the granted authority - This is an authority rule, not a numerical equation. - A handle is an operating-system-managed reference to an opened resource. Read-only excludes writing through that handle; it does not automatically block unrelated routes the program also possesses. / RUN THE TINY EXAMPLE Change one thing. Predict what happens. Grant: read photo A; write output B; no general folder access. Tool asks to read photo A → allowed. Change requested target to private document C → denied. Change the grant to the whole folder → the same request may now succeed. Only the authority changed in the last step. The code could contain exactly the same bug, yet the reachable consequences become much wider. The restriction does useful work even when it does not prevent the initial failure. / SO WHAT? This is why permissions deserve attention during ordinary design, not only after an incident. A background thumbnail worker can often do its job with less authority than the main application. Separating those jobs creates a boundary that remains useful if one worker is compromised. / ONE CAVEAT A capability is not a universal cure. Excessive grants, unsafe delegation and alternative access routes can defeat the intended restriction, while confidential data already supplied remains visible to the worker. / KEEP THIS When authority is limited to the current task, a failure has fewer unrelated resources it can affect. / SOURCE TRAIL [1] OWASP — Enforce least privileges https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html [2] University of Cambridge — Capsicum capabilities https://www.cl.cam.ac.uk/research/security/capsicum/ NEXT: How can an electron have a wavelength? --- HARD IDEAS. PLAIN TEXT. You are receiving this because you asked for one clear computer-science or physics idea each day. Unsubscribe: https://plaintext.click/unsubscribe View in browser: https://plaintext.click/newsletter/2027/06/2027-06-03-least-privilege-capabilities.html From: Plain/Text / Brickston Consulting · 30 N Gould St Ste N, Sheridan, WY 82801 US · knowledge@plaintext.click