The castle-and-moat problem was already old when zero trust acquired its familiar slogan. John Kindervag was presenting Forrester’s zero-trust model in 2010. Being inside the network did not establish that a request should be trusted. One stolen credential was enough to make the distinction expensive.
NIST SP 800-207 carries that distinction into an architecture focused on resources, rather than implicit trust from network location or asset ownership. Authentication and authorization remain separate functions. The badge opens one question. It does not answer the rest.
An agent stack rebuilds the castle when it lets a successful login become permission for whatever tool call follows. Leaving the content policy on the last wall is an architectural choice, not an unavoidable property of language models.
Authentication establishes evidence about control of an authenticator and its associated principal. In a token-based system, a signature check alone is not the whole validation procedure. Issuer, audience, expiry, revocation, and the application’s rules still matter. A stolen session can pass those checks without proving that the person using it is the rightful owner.
Authorization asks whether that principal may perform this operation on this resource under the current conditions. Neither function reads a mind. Authorization can still prevent an out-of-scope action, which is rather more useful than asking the model whether the visitor seems sincere.
The cleanest way through a wall can be to walk through the gate holding a real key. A phished or hijacked session may avoid the brute-force signals an invented password would produce. That does not make it invisible. Device and location changes, behavior, session revocation, rate limits, and step-up checks can still matter. Authentication success is evidence about the login, not an endorsement of the request.
The model’s content policy is one layer among those controls. A tool broker can deny an operation before the model gets to execute it. A resource service can enforce ownership and tenant boundaries. An output-control layer can restrict a destination. OWASP’s authorization guidance calls for least privilege, denial by default, and permission checks on every request. None requires a machine to infer the requester’s private intentions.
A long-lived session can still give an operator room to cultivate context. They seed a frame the model carries forward, make later requests look continuous with earlier ones, and lean on the permissions the conversation seems to have accumulated. That is a failure mode to test. A successful ordinary task must not become a new role, and a sentence about an audit must not add a write permission to a read-only account.
The reframe is to keep the credential’s answer narrow. A session may legitimately determine which resources a user can reach. It must not turn a prior authorization check into permanent authority for a different action. Check the object, operation, tenant, and current policy where the action happens.
Still logged in. Still denied.
I built a local action-boundary replay with two synthetic tenants, one issued fixture session, and a small resource broker. The initial session can read its own note. It cannot write the note or read the other tenant’s note. A professional story and a claimed admin role do not change either decision.
An authentication-only policy would wave all three requests through because it evaluates only the session. The broker evaluates the resource and operation as well:
| Request under the same valid session | Broker result |
|---|---|
| Read the permitted note | Allowed; fixture value returned |
| Write without a write grant | Denied; note unchanged |
| Read another tenant’s note | Denied, even if a permission entry exists |
| Write after a current write grant | Allowed; fixture value changes |
| Queue a write, then revoke its permission before execution | Denied; note unchanged |
The last case is the useful one. The session remains authenticated after its write permission disappears. The execution path checks again while holding the same in-process lock used for the mutation. A decision made when the work was queued does not get to outlive the policy change.
With Python 3 and curl installed:
auth_dir="$(mktemp -d)"
curl -fL 'https://ghostintheprompt.com/research/auth_action_boundary.py' -o "$auth_dir/auth_action_boundary.py"
python3 "$auth_dir/auth_action_boundary.py"
The recorded replay retains the valid-session result beside the denied actions. Fourteen tests cover the legitimate read and write, missing grants, tenant isolation, story/role claims, revocation, expiry, copied sessions, malformed or unknown resources, unsupported operations, invalid clocks, and oversized writes. A thread-coordinated test pauses after the queue check, revokes permission, then resumes execution and confirms that the mutation never happens.
Identity here is a fixture-issued Python object. This is not an OAuth implementation, identity-provider test, or distributed tenant-isolation benchmark. The lock protects this process’s synthetic state. Real systems need trusted session validation, policy storage, revocation propagation, and an authorization check inside the transaction or an equivalent enforceable boundary. A remote side effect needs its own strategy for the gap between checking permission and committing the action.
A request inside the principal’s actual rights can still be malicious. These checks limit which actions can happen; they do not certify motive. The model, monitoring, and review process still have work to do.
Assume breach is useful when it changes the machinery. Bind tools to the current principal and scope. Recheck authority at execution. Revoke it when the conditions change. Keep the result visible when the login remains perfectly valid. The content policy should have company on that wall.
The credential got them in. The write was still denied. The badge did not need to confess before the boundary could hold.
GhostInThePrompt.com // The credential got them in. The write was still denied.