Lesson 12 · Everyone

Scoping and grants: sites, actions, duration and revocation

about 8 minutes

Every time you let an AI agent use one of your accounts, you are making a grant: a decision about what it may do, where, and for how long. This lesson breaks a grant into its parts, explains how to make each part as narrow as the job allows, and explains why taking a grant back is less instant than it sounds. By the end you should be able to read any “this app wants access” screen and know what to ask.

Four words to start

A permission is a single thing an agent is allowed to do, such as “read invoices”. A scope is the set of permissions attached to a piece of access, such as “read and write invoices, read contacts”. A grant is a specific decision to give a specific agent a scope, for a period, under conditions: “the bookkeeping agent may read invoices in the Smith & Co account until Friday”. Revocation is taking a grant back before it would otherwise end.

The words come from security engineering, where the idea behind them is old. In 1975, Jerome Saltzer and Michael Schroeder set out the principle of least privilege: “Every program and every user of the system should operate using the least set of privileges necessary to complete the job”, mainly because it “limits the damage that can result from an accident or error” [1]. Half a century later, the OWASP security community lists “excessive agency” (an AI system with too many functions, permissions or too much autonomy) as one of the top risks for AI applications [2]. Grants are how least privilege is put into practice for agents.

The four dimensions of a grant

A useful way to read or design any grant is to ask four questions.

Dimension Question Narrow Broad
Who Which agent gets it? One named agent “Any app you connect”
Where On which sites, accounts, folders or records? One site, one folder, one client file Every site; the whole drive
What Which actions? Read only; use a login without seeing it Read, write, delete, share, reveal
How long For how long, or how many uses? Once; until this task ends; one hour Until someone remembers to remove it

Many grants have a fifth dimension: conditions, such as “only for payments under $200” or “only between 9 and 5”. A Google research team described credentials that carry exactly these kinds of restrictions (when, where, by whom and for what purpose a request should be allowed) back in 2014 [3]. The idea has become more relevant now that software, not people, is making the requests.

Who

Give each agent its own grant. If three agents share one connection, you cannot tell from the records which one did something, and you cannot switch one off without switching them all off. This is also how you avoid the confused deputy problem: a program tricked into misusing authority it legitimately holds on someone else’s behalf [4]. The less authority each agent holds, the less there is to misuse.

Where: sites and destinations

“Where” covers both what the agent can reach and where its access works. A login for your bank should only ever be usable on your bank’s real website, not on a lookalike page an attacker has sent the agent to. Security standards for online access call this binding access to its intended audience: a token issued for one service should be rejected by every other service [5][6]. For agents that browse the web, this matters a great deal, because they can be steered to pages you never meant them to visit.

A related principle comes from the U.S. government’s zero trust architecture: access to one resource “will not automatically grant access to a different resource” [7]. A grant for the tenancy portal should not quietly extend to the accounting system because both happen to use the same email login.

What: actions

Split actions into the smallest useful pieces. The most important splits are:

  • Read versus write. Reading a calendar is far less risky than changing it.
  • Draft versus send. A drafted email can be checked; a sent one cannot be unsent.
  • Use versus reveal. Some tools can let an agent use a password (for example, by filling it into the correct login page) without revealing the password itself to the agent. That limits what can be copied if the agent is manipulated. It is not a complete protection: once a password has been filled into a page, other software that can read that page may be able to read it, which some password tool vendors now state openly in their privacy documentation.
  • Do versus delegate. An agent should not be able to grant its own access to another agent or widen its own permissions.

How long: duration

There are roughly four kinds of duration, each with a trade-off between safety and convenience.

Duration Example Strength Cost
One use Approve this one login Smallest exposure You are asked every time
One task Until this reconciliation finishes Matches the job Needs a clear end point
Time-limited For the next 8 hours, or 30 days Expires on its own Can outlast the need
Standing Until removed No friction Accumulates and is forgotten

The right answer depends on how often the job happens and how much harm misuse could do. A daily, low-risk read can reasonably have a 30-day grant. A rare payment should be a one-use approval. What you want to avoid is standing access by default, because it builds up quietly. GitHub, for example, supports expiry dates on its fine-grained access tokens and recommends those over its older, broader tokens [8].

Be careful not to swing too far the other way. If people are asked to approve dozens of one-use grants a day, they stop reading them, and the safety benefit disappears. Lesson 10 covers this in more detail.

Revocation, and why it isn’t instant

Revoking a grant sounds like flicking a switch. In practice there are two complications.

First, where you revoke matters. Removing a connector from your AI app may simply stop the app using it, while the access you approved at the service (your email provider, your accounting system) remains valid. Revoke at the service that issued the access as well. The OAuth standard used by most “connect your account” buttons includes a way to tell the issuing service that access is no longer needed [9].

Second, some access keeps working for a while. Many services issue short-lived passes that are checked locally and remain valid until they expire, even after the underlying grant is cancelled. This is why security guidance recommends keeping such passes short-lived and limited to the minimum privileges required [6]. The shorter they are, the faster revocation takes effect in practice.

If an agent ever saw a password or key directly, revoking its grant is not enough. Change the password or key, because you cannot prove it wasn’t copied.

A worked example

Northside Property is a small property management agency. Ana, the office manager, wants an agent to download monthly rent statements from a tenancy portal and file them in each landlord’s folder.

Her first draft of the grant is “agent can use the office’s portal login”. Working through the four dimensions makes it much narrower:

Dimension First draft Final grant
Who Any assistant in the office’s AI app The “statements” agent only
Where The portal login, anywhere Only on the portal’s exact web address; files only into the Landlords folder
What Log in and do anything Use the login (not reveal it); download statements; no messaging tenants, no changing bank details
How long Indefinitely Approved for the first business day of each month, 8 hours

She also writes down where to revoke: in the AI app’s connector settings and in the portal’s “active sessions” page. Three months later, when the agency changes portals, she revokes the old grant at both places and changes the old portal password.

A checklist for any access request

Key takeaways

A grant has four dimensions (who, where, what and how long), and making each one as narrow as the job allows is how the old principle of least privilege applies to agents. Bind access to the exact sites and accounts it is for, split actions into read, write, send and reveal, and give each agent its own grant so its actions can be traced and stopped independently. Prefer grants that expire or end with the task, but avoid so many one-off approvals that people stop reading them. Revoke at the service that issued the access, not only in the app, and remember that short-lived access is what makes revocation take effect quickly. If an agent ever saw a secret directly, change the secret.

How primitive approaches this. pass’s Chrome Web Store listing describes per-agent Allowed, Ask or Never choices with access that can be limited and revoked [10], and its privacy policy states that it records “approval and expiry times” for each agent and that “You can revoke an agent’s access at any time” [11]. For the “where” dimension, its optional Rebirth Lock “checks whether a website’s domain appears to have changed hands before it fills a saved login” [11]. The questions above are worth asking of any tool that makes similar claims.

Sources and further reading

  1. Saltzer, J. H., & Schroeder, M. D. (1975). The protection of information in computer systems. Proceedings of the IEEE, 63(9), 1278–1308. https://doi.org/10.1109/PROC.1975.9939 (open copy: https://www.cs.virginia.edu/~evans/cs551/saltzer/)
  2. OWASP Gen AI Security Project. (2025). LLM06:2025 Excessive Agency (OWASP Top 10 for LLM Applications 2025). OWASP Foundation. https://genai.owasp.org/llmrisk/llm062025-excessive-agency/
  3. Birgisson, A., Politz, J. G., Erlingsson, Ú., Taly, A., Vrable, M., & Lentczner, M. (2014). Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud. Network and Distributed System Security Symposium (NDSS). Internet Society. https://research.google/pubs/macaroons-cookies-with-contextual-caveats-for-decentralized-authorization-in-the-cloud/
  4. Hardy, N. (1988). The Confused Deputy (or why capabilities might have been invented). ACM SIGOPS Operating Systems Review, 22(4), 36–38. https://doi.org/10.1145/54289.871709 (archived open copy: https://web.archive.org/web/2023/http://cap-lore.com/CapTheory/ConfusedDeputy.html)
  5. Campbell, B., Bradley, J., & Tschofenig, H. (2020). Resource Indicators for OAuth 2.0 (RFC 8707). IETF. https://www.rfc-editor.org/rfc/rfc8707
  6. Lodderstedt, T., Bradley, J., Labunets, A., & Fett, D. (2025). Best Current Practice for OAuth 2.0 Security (RFC 9700). IETF. https://www.rfc-editor.org/rfc/rfc9700
  7. Rose, S., Borchert, O., Mitchell, S., & Connelly, S. (2020). Zero Trust Architecture (NIST SP 800-207). National Institute of Standards and Technology. https://csrc.nist.gov/pubs/sp/800/207/final
  8. GitHub. (2026). Managing your personal access tokens. GitHub Docs. https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
  9. Lodderstedt, T. (Ed.), Dronia, S., & Scurtescu, M. (2013). OAuth 2.0 Token Revocation (RFC 7009). IETF. https://www.rfc-editor.org/rfc/rfc7009
  10. Primitive AI. (n.d.). primitive pass, Chrome Web Store listing. https://chromewebstore.google.com/detail/primitive-pass/kfbmepahbbjlhkgcapldmdmdbaodmgfl
  11. Primitive AI (PRIMITIVE AI LABS PTY LIMITED). (2026, 25 October). Primitive Pass Privacy Policy, section 03 (“Rebirth Lock” and “AI agent access”). https://pass.primitiveai.com.au/privacy.html (primitive’s own statements; effective 25 October 2026)