{"canonical_url":"https://engineer.company/glossary/access-control/","content_markdown":"# Access control\n\n## What it is\n\nAccess control is the part of a system that answers one question many times a second: may this\ncaller do this thing to this resource, right now? The caller can be a person, a service or a\nscheduled job. The resource can be a file, a database row, an API endpoint, a git repository or a\ndoor. The individual mechanisms that do the answering are called access controls, and NIST's\nglossary lists authorization as a synonym for the whole idea. Its definitions cover both halves of\nthe job: “the decision to permit or deny a subject access to system objects”, and “the process of\ngranting or denying specific requests” to obtain and use information and related processing\nservices, or to enter specific physical facilities.\n\nIt is easy to blur with authentication, and the two are separate steps. NIST SP 800-162 says so in\nplain words: “Authentication is not the same as access control”. Authentication establishes who is\nasking. Access control takes that identity, along with whatever else is known about the request, and\ndecides what the caller may do with it. A system can verify a person perfectly and still let them\nread records that belong to someone else, because the second step was never asked.\n\nThe same guide splits the work in two. A policy decision point computes the answer, and a policy\nenforcement point sits in the path of the request and carries it out. Both can live in one process,\nbut the split is worth keeping in mind, because a decision that nothing enforces protects nothing.\nNIST SP 800-53 writes it into two controls: AC-24 asks that decisions be applied to each access\nrequest before enforcement, and AC-3 asks that approved authorizations be enforced.\n\nThe rules can take several shapes: a list of permitted identities on each object, roles as in RBAC,\nor attributes of the caller, the object, the action and the environment, which is the subject of SP\n800-162. Whatever the shape, something still has to ask the question on every request.\n\n## Why it matters\n\nOnce someone is signed in, nearly everything they can reach is decided by access control. Strong\nauthentication in front of weak access control only records which account took the data. For a\nbusiness that holds other people's information, this is where a promise about who sees what holds or\nbreaks.\n\nNIST describes the ideal enforcement mechanism as a reference monitor. Control AC-25 in SP 800-53\nasks for one that is tamperproof, always invoked, and small enough to be analysed and tested. Those\nthree properties work as a practical test for any check in a real product. If the caller can alter\nthe inputs the check relies on, it fails the first. If some route reaches the data without passing\nthrough the check, it fails the second. If the logic is scattered across hundreds of handlers so\nthat nobody can read it end to end, it fails the third.\n\nThe OWASP Application Security Verification Standard turns this into requirements a team can test\nagainst. Its authorization chapter asks that access to functions be limited to callers with explicit\npermission, that access to specific data items be limited in the same way, and that the rules be\nenforced at a trusted service layer rather than relying on anything an untrusted client could\nmanipulate, such as JavaScript running in the browser. It also asks that a change to the values a\ndecision depends on take effect immediately, and where it cannot, that a mitigating control raise an\nalert when someone acts after losing the right to.\n\nThe trade-off is cost on the request path. Every decision needs facts, and every fact needs a\nlookup. Skipping the lookup tends to move the check to wherever it is cheapest, which is often the\nplace the caller controls.\n\n## What it looks like in practice\n\nOn a maritime platform where one person can act on behalf of several organizations, the question\nof who decides was settled by where the decision is made:\n[the active organization is kept on the client and none of it is trusted for access decisions](/portfolio/built-organization-context-switching-for-users/).\nAn OrganizationContext stores the current choice in localStorage, so switching is instant, and a\nserver-side cookie mirrors it so server-rendered pages resolve the same context. Authorization is\nre-checked on the server on every request. The page draws the line in one sentence: the server is\nthe only authority on what you are allowed to do, and someone tampering with localStorage changes\nwhat their own interface shows them and nothing more, because the server still says no.\n\nOn the same kind of platform,\n[taking money and granting permission were built as two systems](/portfolio/built-stripe-and-in-app-purchase-entitlements/).\nCards through Stripe and in-app purchases from Apple and Google converge on a payments schema of 9\ntables and 34 functions. A separate access schema of 11 tables and 34 functions answers “may this\naccount do this?” without knowing which storefront paid. That answer gates the company directory,\nsearch and data export, and it is re-checked on the server on every request, because a hidden button\nis a courtesy and not a control. Adding a storefront now touches only the payments side, and a\nsupport question about someone's access has one table to look at instead of three. The page names\nthe cost: two schemas, and an entitlement lookup on requests that would otherwise be free.\n\nWhen the company moved its source code onto its own hardware,\n[the git forge was set up to refuse by default](/portfolio/your-code-on-your-own-hardware/).\nThe page lists access control among the things running a forge means running. The forge was chosen\nfor having no administrative web interface, on the reasoning that the less interface there is, the\nless there is to defend. The policy starts from refusal: a caller with no identity gets nothing, a\ncaller with no key gets nothing, and every declared repository carries the private flag, so secrecy\nrests on the policy rather than on obscurity. Reachability is part of the same policy. Port 23231\nanswers on loopback only, which makes a jump host the single way in from outside, and the\nmultiplexer that could expose git on the public port sits in the code with its switch off: a\nlistener nobody uses is surface.\n\n## Where it goes wrong\n\n**The check lives in the interface.** A button is hidden or greyed out, and the endpoint behind it\nanswers anyone who calls it directly. The server has to make the decision again on every request,\nfrom facts the caller cannot edit.\n\n**The function is checked and the record is not.** A request names an invoice, a document or an\naccount by its identifier, the server confirms that the caller may view invoices, and returns the\none asked for without checking whose it is. ASVS names this gap insecure direct object reference\n(IDOR), or broken object level authorization (BOLA). A defender recognises it by an identifier in a\nrequest that the server uses as given. The fix is to resolve every object through the caller's own\nscope, and in a product with several tenants, to take the tenant from the server-side session and\nnever from the request.\n\n**Anything new is open until someone closes it.** A new route, a new table or a new repository\nstarts life with whatever the default is, and if the default is allow, the gap exists until someone\nnotices. SP 800-53 states the network form of the opposite rule as deny by default, allow by\nexception, and the same rule fits every layer: what was never granted is refused.\n\n**Grants only ever grow.** SP 800-162 notes that when access is not removed or revoked as time goes\non, users accumulate privileges. People change teams, projects end and contractors leave, and each\nof those is a moment when something should be taken away. A revocation that only takes effect when a\nsession expires hours later is a softer version of the same gap.\n\n**Nobody can say why a request was allowed.** When decisions are made in many places and logged in\nnone, an investigation has nothing to read. Record grants and refusals with the rule that produced\nthem, and protect that log: SP 800-162 warns that the pattern of decisions can reveal attributes of\nthe people behind the requests.\n\n## Further reading\n\n- [Access control, in the NIST CSRC glossary](https://csrc.nist.gov/glossary/term/access_control)\n  — definitions from FIPS 201-3 and CNSSI 4009, with authorization listed as a synonym.\n- [NIST SP 800-53 Rev. 5](https://csrc.nist.gov/pubs/sp/800/53/r5/upd1/final)\n  — the access control family, including AC-3 enforcement, AC-24 decisions and AC-25.\n- [NIST SP 800-162](https://csrc.nist.gov/pubs/sp/800/162/final)\n  — attribute-based access control, with policy decision and enforcement points.\n- [OWASP Application Security Verification Standard](https://owasp.org/www-project-application-security-verification-standard/)\n  — testable authorization requirements at function, data and field level.\n\n\u003chttps://engineer.company/glossary/access-control/\u003e\n","date_modified":"2026-10-20T21:59:50Z","description":"How access decisions are made and enforced, why the server has to own them on every request, and the ways access controls quietly let the wrong caller through.","formats":{"gemtext":"https://engineer.company/glossary/access-control/index.gmi","gopher":"https://engineer.company/glossary/access-control/gophermap","html":"https://engineer.company/glossary/access-control/","json":"https://engineer.company/glossary/access-control/index.json","markdown":"https://engineer.company/glossary/access-control/index.md","pdf":"https://engineer.company/glossary/access-control/index.pdf"},"kind":"page","language":"en","title":"What is access control?","url":"https://engineer.company/glossary/access-control/","version":1}