Principle
Enforce permissions outside the model
A sentence in a prompt is guidance. An authorization check is a control.
Before you use it
- Use when
- A workflow relies on prompt instructions such as 'never access other users' data' or 'only admins may delete.'
Keep this limit in mind
- Deterministic authorization still needs correct policy, testing, auditability and secure identity handling.
An idea to explore.
Try this idea.
Inspect the example, try the idea in your situation, then check your next move.
Why it matters
Put access rules in deterministic downstream code or policy enforcement points that validate every protected request. The model can help choose an action, but it should not be the component that decides whether the caller is allowed to perform it.
An example
A delete API checks the user's role and record scope even when the agent confidently claims the deletion is allowed.
Check your result
Changing or bypassing the model prompt cannot bypass the downstream authorization rule.
Save and practise this idea
My learning
Read. Recall. Repeat.
Save this idea and return to it on any device.
Keep exploring
Connected ideas
You are readingEnforce permissions outside the model
Ideas that link here
These ideas link to this one. Check their conditions and limits before use.
Useful with this ideaRun agent actions in the user's authorization contextUseful with this idea
Put approval immediately before the high-impact actionUseful with this idea
Keep secrets out of the system promptUseful with this idea
Let the model propose; let deterministic code commit
Evidence and sources
OWASP recommends enforcing critical authorization and privilege-separation controls independently from the LLM in deterministic, auditable systems.
External controls still need correct policy design and testing; moving a decision out of the prompt does not make it correct automatically.
LLM07:2025 System Prompt Leakage · Ensure security controls are enforced independently from the LLM
All sources (1)
Edition and review
Version 0.1.0
No review details are supplied for this edition.