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

推荐订阅源

IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
P
Proofpoint News Feed
The Cloudflare 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
Pattern-Based ACL: Securing the Boundaries of Agentic Aut...
tercel · 2026-05-11 · via DEV Community

As we move toward a world of autonomous AI Agents, the "Access Control" problem undergoes a fundamental shift. In the traditional web, we worry about a human user accessing another user's data. In the Agentic era, we have a new nightmare: Agent Hallucinations.

Imagine an Agent that, while trying to solve a complex task, "hallucinates" a call to your executor.database.wipe module because it sounded like a good way to "clear the state." Without a robust security layer, the Agent might actually have the permission to do it.

At apcore, we believe that security must be part of the protocol, not a secondary prompt. In this fifteenth article, we explore the Pattern-Based ACL system that secures the boundaries of AI autonomy.


The Failure of Endpoint-Based Security

Traditional API security often relies on a flat list of allowed endpoints for a specific API key. This approach breaks down when you have hundreds of "Skills" (modules) that Agents need to discover and invoke dynamically. Managing a static list for every possible Agent role becomes an administrative nightmare.

apcore takes a different path: Pattern-Based Access Control.


High-Performance Pattern Matching

The apcore ACL (Access Control List) uses a first-match-wins evaluation logic based on caller and target patterns. This allows you to define broad, high-level security policies that scale automatically as you add new modules.

The Power of Namespaces

Because apcore uses Directory-as-ID, your modules are naturally organized into namespaces. You can write rules like:

  • allow callers=["api.*"] targets=["orchestrator.*"]: Front-facing APIs can only talk to the reasoning layer.
  • allow callers=["orchestrator.*"] targets=["executor.*"]: The brain can trigger execution.
  • deny callers=["*"] targets=["admin.sensitive.*"]: Nobody calls admin tools unless explicitly allowed.

Special Identifiers: @external and @system

To make security management easier, the apcore protocol defines two "Magic Callers":

  1. @external: Represents any call coming from outside the registry (e.g., a CLI tool, a Web request, or an MCP client).
  2. @system: Represents internal framework tasks, such as periodic health checks or background cleanup.

By separating these, you can implement a Zero-Trust AI Policy:

# Only allow external callers to see 'common' tools
- callers: ["@external"]
  targets: ["common.*"]
  effect: allow

# Only internal orchestrators can touch the 'executor' namespace
- callers: ["orchestrator.*"]
  targets: ["executor.*"]
  effect: allow

Enter fullscreen mode Exit fullscreen mode


Conditional Rules: Identity & Depth

Sometimes, a simple "Allow/Deny" based on the module ID isn't enough. apcore supports Conditional ACL Rules that look at the current Context:

  • Role-Based: Match based on the caller's identity.roles (e.g., "finance_admin").
  • Identity Type: Differentiate between a user, an agent, and a system caller.
  • Call Depth: Prevent recursive hallucination attacks by stopping any execution chain that exceeds a certain depth (e.g., max_call_depth: 5).

Audit Trails: Prove Your Autonomy

Security without auditability is useless in an enterprise. Every time the apcore ACL system makes a decision, it generates a structured AuditEntry.

This entry includes:

  • timestamp: Exactly when the check happened.
  • decision: Allow or Deny.
  • matched_rule: Which specific line in your YAML policy triggered the decision.
  • trace_id: Links the security decision to the specific AI "Thought Chain."

This ensures that if an Agent is denied access to a tool, your security team can see exactly why and who was calling.


Conclusion: A Secure Sandbox for Agents

Pattern-Based ACL turns apcore into more than just a library—it turns it into a Secure Runtime for AI. By enforcing boundaries at the protocol level, we allow Agents to be autonomous without being dangerous.

Next, we’ll look at the "Ultimate Safety Valve": Human-in-the-Loop and the runtime enforcement of requires_approval.


This is Article #15 of the **apcore: Building the AI-Perceivable World* series. Join us in building secure AI architectures.*

GitHub: aiperceivable/apcore