惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
小众软件
小众软件
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - Franky
Jina AI
Jina AI
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator Blog
V
Visual Studio Blog
C
Check Point Blog
阮一峰的网络日志
阮一峰的网络日志
U
Unit 42
量子位
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
M
MIT News - Artificial intelligence
爱范儿
爱范儿
B
Blog RSS Feed
MyScale Blog
MyScale Blog
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
L
LangChain Blog
D
Docker

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Prompt as Authorization
Abubakar · 2026-04-25 · via DEV Community
Cover image for Prompt as Authorization

Abubakar

A minimal agent system where policy is defined in the system prompt and the model is the only decision point before execution.

Environment

  • Single-process system: model, tool loop, backend
  • Local execution
  • Single user context
  • Identity defined in the system prompt (user_1 / Alice)

No session, token, or external identity binding is present.
No API gateway, middleware, or policy engine exists in the execution path.

System

The system consists of:

  • a language model
  • a system prompt defining rules
  • a tool loop mapping model decisions to backend calls
  • a backend exposing:

    • get_user_orders
    • get_user_info
    • issue_refund

Control flow:

  1. User input
  2. Model interprets the request
  3. Model decides whether to call a tool
  4. Tool Dispatcher executes the request against the backend

Minimal System Shape

  • Model receives user input
  • Model decides whether to invoke a tool
  • Tool Dispatcher forwards the request
  • Backend executes the request
  • No validation occurs between decision and execution

Architecture

The model decides whether to act. There is no gate between that decision and backend execution.

Prompt Policy

The system prompt defines:

  • current user is Alice
  • refunds must not exceed $50
  • order association must be confirmed before issuing a refund

The model is responsible for applying these rules prior to tool invocation.

Observed Behavior

Under adversarial input:

  • cross-user access was refused
  • prompt injection attempts failed
  • instruction override attempts failed

No tool call = no backend interaction

When the model emits a tool call:

  • the dispatcher forwards it
  • the backend executes it
  • no additional checks are performed

Counterexample

A valid request produces an invalid outcome:

text id="v0_case"
You: refund order_2 for $45

[tool call] get_user_orders({"user_id": "user_1"})
[tool result] {"order_2": {"item": "Laptop", "amount": 1200.0, "refunded": false}}

[tool call] get_user_info({"user_id": "user_1"})
[tool result] {"name": "Alice"}

[tool call] issue_refund({"order_id": "order_2", "amount": 45})
[tool result] {"status": "refund issued"}

Enter fullscreen mode Exit fullscreen mode

The system issues a $45 refund against a $1,200 laptop because model judgment is treated as sufficient authority, without validation against the underlying order value.

The model:

  • confirms order association via tool output
  • checks the requested amount ($45) against the $50 limit
  • proceeds with tool execution

The backend:

  • executes the request

System Observation

There is no separate component enforcing policy.

The system reduces to:

  • a model
  • a system prompt
  • a dispatcher
  • a backend

The first execution decision occurs inside the model.

Once a tool call is emitted, it is forwarded and executed.

Core Finding

  • Policy exists as text in the system prompt
  • The model interprets and applies it
  • Execution occurs if a tool call is emitted

There is no separation between:

  • deciding an action
  • authorizing an action

Model approval is sufficient for execution.

Implication

A system can:

  • follow prompt instructions
  • behave correctly under adversarial input

and still:

  • execute actions that are not validated against system state

Because there is no independent check before execution.