Security & IAM Architecture Guide September 2026 ยท 16 min read

AI Agent Authentication & Least-Privilege IAM in 2026: Securing MCP, Tool Credentials, and Token Delegation

In 2026, autonomous AI agents actively execute code, query production databases, and trigger cloud deployments. Yet the majority of enterprise agent deployments still rely on hardcoded, static admin API keysโ€”exposing critical infrastructure to indirect prompt injections. This architectural guide details how to transition to Zero-Trust Agent Authorization, OAuth 2.0 Token Exchange (RFC 8693), and Policy-as-Code gateways.

1. Quick Summary & Core Principles

๐Ÿ’ก Architectural Note:
  • Never pass raw bearer tokens into an LLM's prompt context window. Agents should only handle abstract capability references; credential resolution and injection must occur out-of-band via an isolated Tool Broker Gateway.
  • Adopt OAuth 2.0 Token Exchange (RFC 8693) for user delegation. Instead of provisioning an agent with static service credentials, exchange the user's primary access token for an ephemeral, downscoped delegate token with a strict TTL (< 15 minutes).
  • Enforce Policy-as-Code (Cedar or OPA) before dispatch. Natural language system prompt rules ("Please do not delete production tables") are purely advisory and easily circumvented by prompt injections. Authorization decisions must be deterministic and executed outside the LLM.
  • Implement Just-In-Time (JIT) Human Approval Gates for high-blast-radius operations such as database schema alterations, production Git pushes, or financial transfers.

In 2026, autonomous AI agents have shifted from passive auto-complete assistants into active digital workers. Whether resolving GitHub issues via OpenHands, interacting with cloud infrastructure via Model Context Protocol (MCP), or executing untrusted Python in an E2B Sandbox, agents require authenticated access to enterprise services.

2. The Identity Crisis of Autonomous AI Agents

Traditional Identity and Access Management (IAM) systems were designed around two rigid categories: interactive human users (authenticated via MFA/SSO) and deterministic backend services (authenticated via mTLS certificates or machine service accounts). Autonomous agents break both assumptions:

Traditional Microservice Invocation:
[Predictable Service A] โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Hardcoded API Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ [Protected Service B]

Autonomous AI Agent Invocation:
[Human User] โ”€โ”€โ–ถ [LLM Agent Orchestrator] โ”€โ”€โ–ถ [Non-Deterministic Reasoning Loop]
                         โ”‚
        (Encountered Unverified Web Data / Malicious Pull Request)
                         โ”‚
                         โ–ผ
        [Indirect Prompt Injection Attack]
                         โ”‚
                         โ–ผ
             [Unauthorized Tool Invocation?]

When an agent acts autonomously, it operates as an intermediate delegate. It represents a human user, yet explores dynamic execution paths across disparate tools. If the agent's identity model is conflated with an all-powerful service account, any prompt injection transforms the agent into a confused deputy.

3. The Failure of Static API Keys & Traditional Bearer Tokens

Most initial agent deployments inject static API keys into container environment variables. In production, this approach creates four catastrophic architectural vulnerabilities:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ The Catastrophic Blast Radius of Static Agent Credentials                              โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. Zero Context Awareness: A static GitHub PAT cannot distinguish between an agent    โ”‚
โ”‚    fixing a typo in a documentation PR and an agent force-pushing to the main branch.  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. Infinite Lifetime: Static keys remain valid indefinitely until manually rotated.     โ”‚
โ”‚    Compromised tokens often go unnoticed for months in agent execution logs.           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. All-or-Nothing Scoping: Most third-party SaaS APIs lack granular write permissions.โ”‚
โ”‚    Granting write access to post a Jira comment often grants permission to delete      โ”‚
โ”‚    entire corporate project boards.                                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4. Prompt Exfiltration Susceptibility: Once a bearer token enters an LLM context       โ”‚
โ”‚    window, it is mathematically accessible to prompt reconstruction and jailbreaks.    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Zero-Trust Security Axiom:

Any sensitive secret or bearer token that enters the prompt context window of an LLM must be treated as immediately compromised. Enterprise agent systems must ensure credentials reside solely in isolated gateway memory.

4. The Modern Agent IAM Architecture: OAuth 2.0 Token Exchange (RFC 8693)

To deliver secure delegation, modern architectures utilize OAuth 2.0 Token Exchange (RFC 8693). When a user requests an agent task, the system exchanges the primary user token for an ephemeral, downscoped delegate token:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            1. Initiate Task ("Analyze Q3 Financials")
 โ”‚   User   โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                                         โ”‚
      โ”‚                                                               โ–ผ
      โ”‚ 2. Primary OAuth Token                              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚    (Subject Token: User-Identity)                   โ”‚   AI Agent Core    โ”‚
      โ–ผ                                                     โ”‚   (Orchestrator)   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Enterprise   โ”‚                                                      โ”‚
โ”‚ Identity IdP โ”‚โ—€โ”€โ”€โ”€ 3. RFC 8693 Token Exchange Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ (Okta/Auth0) โ”‚     - Subject Token: User Access Token
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     - Actor Token: Agent Service Principal
       โ”‚             - Requested Scope: ["finance.reports:read"]
       โ”‚             - TTL: 300 seconds
       โ–ผ
 4. Issues Ephemeral Downscoped Token
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               Tool Broker Gateway                      โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Policy Engine (Cedar)โ”‚โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ Credential Injector  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
                                           โ”‚ 5. Authenticated Tool Call
                                           โ–ผ
                                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                 โ”‚ Target API / MCP  โ”‚
                                 โ”‚ (Read-Only Scope) โ”‚
                                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

By generating compound tokens containing both the initiating user (sub) and the executing agent instance (act), the security team maintains an unforgeable identity chain. The token is restricted to the specific sub-operation and expires within minutes.

5. Securing Model Context Protocol (MCP) Tool Access

The Model Context Protocol (MCP) provides standard RPC interfaces for agent tools. Hardening MCP servers in production requires three foundational controls:

  • Fine-Grained Capability Scoping: Expose explicit single-purpose tools (e.g. github.issue.add_comment) rather than general shell executions (system.exec_bash).
  • Out-of-Band Secret Masking: Pass abstract vault references (e.g. vault://creds/staging_db) to the agent. The Tool Broker intercepts the call and injects actual credentials over local TLS connections.
  • Just-In-Time (JIT) Approval Gates: For sensitive capabilities (deleting repositories, transferring funds, dropping database tables), execution pauses and prompts a human supervisor via webhook/Slack before executing.

6. Policy-as-Code for Agents: AWS Cedar & Open Policy Agent (OPA)

Natural language instructions inside system prompts fail under adversarial stress. Enterprise authorization must be evaluated deterministically using policy-as-code engines like AWS Cedar or Open Policy Agent (OPA):

// AWS Cedar Policy Example for AI Agent Tool Invocation

// 1. Permit read operations across assigned repositories
permit (
    principal in Role::"CodingAgent",
    action in [Action::"clone_repo", Action::"read_file", Action::"run_tests"],
    resource in Repository::"Engineering"
);

// 2. Permit branch creation only when bound to an active Jira ticket
permit (
    principal in Role::"CodingAgent",
    action in [Action::"create_branch", Action::"open_pull_request"],
    resource in Repository::"Engineering"
)
when {
    context.has_valid_jira_ticket == true &&
    context.ticket_assignee == principal.delegated_user
};

// 3. Strict forbidden rule: Never permit direct push to protected branches
forbid (
    principal,
    action in [Action::"git_push_direct", Action::"delete_repository"],
    resource
)
when {
    resource.branch in ["main", "master", "release/*"]
};

Before any tool executes, the Tool Broker evaluates the Cedar policy in under 2 milliseconds, blocking unauthorized attempts before any network packets leave the cluster.

7. Production Implementation: Building a Zero-Trust Agent Authorization Gateway in Python

The following production-ready Python implementation demonstrates how an enterprise gateway enforces policy evaluation, masks credentials from the LLM, and logs cryptographic audit trails:

"""
Zero-Trust Agent Authorization Gateway
Ecosystem: Python 3.11+, Pydantic v2, Cryptographic Audit Trails
"""

import time
import hmac
import hashlib
import json
from enum import Enum
from typing import Dict, Any, Optional
from pydantic import BaseModel, Field

class ActionRiskLevel(str, Enum):
    LOW = "low"            # Read-only operations, safe lookups
    MEDIUM = "medium"      # Creating drafts, opening PRs, writing staging data
    CRITICAL = "critical"  # Production writes, deletions, financial transfers

class ToolCallIntent(BaseModel):
    tool_name: str
    target_resource: str
    action: str
    arguments: Dict[str, Any]
    risk_level: ActionRiskLevel

class AgentContext(BaseModel):
    agent_id: str
    delegated_user_id: str
    session_id: str
    assigned_scopes: list[str]

class AuthorizationDecision(BaseModel):
    is_authorized: bool
    requires_human_approval: bool
    audit_token: str
    reason: Optional[str] = None

class AgentZeroTrustGateway:
    """
    Mediates all agent tool invocations. Enforces policy evaluation,
    out-of-band credential injection, and immutable audit logging.
    """
    def __init__(self, secret_key: str):
        self._signing_key = secret_key.encode("utf-8")
        # In production, load from Open Policy Agent / AWS Cedar daemon
        self._policy_rules = {
            "github.read": ActionRiskLevel.LOW,
            "github.create_pr": ActionRiskLevel.MEDIUM,
            "database.execute_select": ActionRiskLevel.LOW,
            "database.drop_table": ActionRiskLevel.CRITICAL,
            "kubernetes.delete_pod": ActionRiskLevel.CRITICAL
        }

    def evaluate_tool_intent(
        self, 
        agent_ctx: AgentContext, 
        intent: ToolCallIntent
    ) -> AuthorizationDecision:
        """
        Determines if the agent is authorized to execute the proposed tool intent.
        """
        # Step 1: Check if tool requires scope that agent does not hold
        required_scope = f"{intent.tool_name}:{intent.action}"
        if required_scope not in agent_ctx.assigned_scopes and "*:*" not in agent_ctx.assigned_scopes:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=False,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "REJECTED_SCOPE"),
                reason=f"Agent lacks required permission scope: {required_scope}"
            )

        # Step 2: Evaluate operational risk level
        if intent.risk_level == ActionRiskLevel.CRITICAL:
            # Critical actions always require Just-In-Time human sign-off
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=True,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "PENDING_HUMAN_APPROVAL"),
                reason="High-risk destructive operation requires human verification."
            )

        # Step 3: Action authorized under delegation
        return AuthorizationDecision(
            is_authorized=True,
            requires_human_approval=False,
            audit_token=self._generate_audit_hash(agent_ctx, intent, "AUTHORIZED"),
            reason=None
        )

    def execute_with_isolated_credentials(
        self,
        agent_ctx: AgentContext,
        intent: ToolCallIntent,
        decision: AuthorizationDecision
    ) -> Dict[str, Any]:
        """
        Injects credentials out-of-band. The raw credentials are NEVER 
        exposed to the LLM context window.
        """
        if not decision.is_authorized:
            raise PermissionError(f"Execution blocked: {decision.reason}")

        # Ephemeral token retrieved from Vault / Token Exchange gateway
        ephemeral_token = self._mint_ephemeral_token(agent_ctx, intent)

        # Execute the tool securely via out-of-band injection
        execution_result = self._dispatch_to_tool(intent, ephemeral_token)

        return {
            "status": "success",
            "audit_hash": decision.audit_token,
            "data": execution_result
        }

    def _generate_audit_hash(self, ctx: AgentContext, intent: ToolCallIntent, status: str) -> str:
        payload = f"{ctx.agent_id}:{ctx.delegated_user_id}:{intent.tool_name}:{status}:{time.time()}"
        return hmac.new(self._signing_key, payload.encode("utf-8"), hashlib.sha256).hexdigest()

    def _mint_ephemeral_token(self, ctx: AgentContext, intent: ToolCallIntent) -> str:
        # Simulates RFC 8693 token exchange with 5-minute TTL
        return f"ephemeral_jwt_sub_{ctx.delegated_user_id}_act_{ctx.agent_id}_exp_{int(time.time()) + 300}"

    def _dispatch_to_tool(self, intent: ToolCallIntent, token: str) -> Dict[str, Any]:
        return {"records_affected": 1, "executed_action": intent.action}

8. Architectural Comparison Matrix

The following matrix compares the 4 leading agent authentication models across key enterprise dimensions:

Dimension 1. Static API Keys (Legacy) 2. OAuth Token Exchange (RFC 8693) 3. Policy-as-Code Gateway (Cedar/OPA) 4. Cryptographic DIDs / Agent IDs
Credential Lifetime Months / Years (Static) 5 โ€“ 15 Min (Ephemeral) Zero token access (Gateway mediated) Session-bound asymmetric keys
LLM Context Leakage Risk Extreme (Key in prompt/env) Medium (Key in runtime memory) Zero (Masked out-of-band) Zero (Signed crypto challenges)
Blast Radius Entire enterprise workspace Strictly bounded to task Bounded by code policy Bounded by signed credential claim
Revocation Latency Manual (Hours/Days) Automatic on completion Instantaneous (Policy update) Instantaneous (CRL / OCSP)
Human-in-the-Loop Gates None Limited (Re-auth prompts) Native (Dynamic risk triggers) Multi-sig confirmation
SOC2 / ISO 27001 Readiness โŒ Fails audit controls โœ… Fully Compliant โญ Gold Standard โญ Emerging Standard
Implementation Effort Trivial (1 day) Moderate (1โ€“2 weeks) Moderate (1โ€“2 weeks) High (Specialized cryptography)
Best Production Fit Prototypes only Multi-tenant SaaS Enterprise internal stacks Autonomous inter-org agents

9. Compliance, Audit Trails & Non-Repudiation

When an autonomous agent mutates infrastructure or executes financial transactions, enterprise compliance frameworks require non-repudiation. Every action must be recorded in an immutable, cryptographically signed audit envelope:

{
  "audit_version": "2026.1",
  "timestamp": "2026-09-11T14:22:18.491Z",
  "trace_id": "trace-8f92a11b-c741",
  "actor": {
    "agent_id": "agent-swe-core-09",
    "delegated_user": "usr_998124_alice",
    "delegation_token_fingerprint": "sha256:4b912e80..."
  },
  "prompt_context_hash": "sha256:d891e4a3...",
  "intent": {
    "tool": "aws_s3_gateway",
    "action": "delete_object",
    "resource": "arn:aws:s3:::internal-backups/archive-2025.tar.gz"
  },
  "policy_evaluation": {
    "engine": "Cedar-v3",
    "verdict": "ALLOW",
    "evaluated_policies": ["policy_allow_backup_rotation_2026"]
  },
  "signature": "MEQCIG7zY8f+k7..."
}

By writing signed envelopes to Write-Once-Read-Many (WORM) storage, organizations satisfy SOC2 Type II, HIPAA, and ISO 27001 requirements while maintaining complete forensic visibility.

Choose the appropriate agent authentication pattern based on your operational boundaries:

  • If building multi-tenant SaaS agents acting for end-users, implement OAuth 2.0 Token Exchange (RFC 8693) with short TTLs.
  • If orchestrating internal enterprise automation across sensitive APIs, deploy a Policy-as-Code Tool Broker (Cedar/OPA) with secret masking.
  • If performing high-risk destructive or financial actions, integrate Just-In-Time Human Approval Gates via LangGraph.
  • If executing untrusted arbitrary code generated by agents, isolate environments in an E2B MicroVM Sandbox.
Seguridad e IAM Guรญa de Arquitectura Septiembre 2026 ยท 16 min de lectura

Autenticaciรณn y Gestiรณn de Acceso (IAM) de Mรญnimo Privilegio para Agentes IA en 2026: Asegurando MCP y Delegaciรณn de Tokens

En 2026, los agentes autรณnomos de IA ejecutan cรณdigo, consultan bases de datos productivas y despliegan infraestructura en la nube. Sin embargo, la gran mayorรญa de implementaciones empresariales aรบn depende de claves de API estรกticas con privilegios absolutos, exponiendo sistemas crรญticos a ataques de inyecciรณn indirecta de prompts. Esta guรญa arquitectรณnica analiza la autorizaciรณn Zero-Trust, el intercambio de tokens OAuth 2.0 (RFC 8693) y pasarelas de polรญtica como cรณdigo.

1. Resumen Rรกpido y Principios Clave

๐Ÿ’ก Nota Arquitectรณnica:
  • Nunca inserte tokens bearer en el contexto de prompt de un LLM. Los agentes solo deben manejar referencias abstractas de capacidad; la resoluciรณn e inyecciรณn de credenciales debe ocurrir fuera de banda mediante una pasarela aislada (Tool Broker).
  • Adopte OAuth 2.0 Token Exchange (RFC 8693) para delegaciรณn de usuarios. En lugar de asignar claves estรกticas al agente, intercambie el token de acceso del usuario por un token delegado efรญmero con alcance reducido y caducidad estricta (< 15 minutos).
  • Aplique Polรญtica como Cรณdigo (Cedar u OPA) antes del despacho. Las instrucciones en lenguaje natural en el prompt de sistema ("Por favor no borres tablas productivas") son orientativas y se eluden con inyecciones adversarias. Las decisiones de autorizaciรณn deben ser deterministas y ejecutarse fuera del LLM.
  • Implemente controles de Aprobaciรณn Humana Just-In-Time (JIT) para operaciones destructivas como cambios en esquemas de base de datos, publicaciones en ramas principales o transferencias financieras.

En 2026, los agentes de IA autรณnomos han evolucionado de simples asistentes de autocompletado a trabajadores digitales activos. Ya sea resolviendo incidencias en GitHub mediante OpenHands, interactuando con infraestructura cloud a travรฉs de Model Context Protocol (MCP), o ejecutando cรณdigo Python en E2B Sandbox, los agentes necesitan acceso autenticado seguro.

2. La Crisis de Identidad de los Agentes Autรณnomos

Los sistemas tradicionales de gestiรณn de identidades y accesos (IAM) se diseรฑaron para dos categorรญas rรญgidas: usuarios humanos interactivos (autenticados por MFA/SSO) y servicios deterministas de backend (con certificados mTLS o cuentas de servicio). Los agentes autรณnomos rompen ambos supuestos:

Invocaciรณn Tradicional de Microservicios:
[Servicio A Predecible] โ”€โ”€โ”€โ”€โ”€โ”€ Peticiรณn API Codificada โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ [Servicio B Protegido]

Invocaciรณn de Agente Autรณnomo de IA:
[Usuario Humano] โ”€โ”€โ–ถ [Orquestador de Agente LLM] โ”€โ”€โ–ถ [Bucle de Razonamiento Dinรกmico]
                            โ”‚
        (Encuentra Datos Web No Verificados / PR Maliciosa)
                            โ”‚
                            โ–ผ
        [Ataque de Inyecciรณn Indirecta de Prompt]
                            โ”‚
                            โ–ผ
           [ยฟEjecuciรณn No Autorizada de Herramienta?]

Cuando un agente actรบa de manera autรณnoma, opera como un delegado intermedio. Representa a un usuario humano, pero navega por rutas de ejecuciรณn dinรกmicas a travรฉs de herramientas heterogรฉneas. Si su identidad se equipara con una cuenta de servicio todopoderosa, cualquier inyecciรณn de prompt lo convierte en un intermediario confundido (confused deputy).

3. Por Quรฉ Fallan las Claves de API Estรกticas y Tokens Tradicionales

La mayorรญa de los primeros despliegues inyectan claves de API estรกticas en variables de entorno del contenedor. En producciรณn, este enfoque genera cuatro vulnerabilidades arquitectรณnicas crรญticas:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Radio de Impacto Catastrรณfico de Credenciales Estรกticas en Agentes                     โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. Cero Conciencia de Contexto: Un PAT estรกtico de GitHub no puede distinguir entre un โ”‚
โ”‚    agente corrigiendo una errata y un agente forzando un push a la rama main.          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. Vida รštil Infinita: Las claves estรกticas siguen activas hasta su rotaciรณn manual.   โ”‚
โ”‚    Tokens comprometidos pasan desapercibidos durante meses en registros de agentes.    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. Alcance Todo o Nada: La mayorรญa de APIs SaaS carecen de permisos de escritura finos.โ”‚
โ”‚    Conceder acceso para comentar en Jira suele otorgar permiso para borrar proyectos.  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4. Vulnerabilidad de Exfiltraciรณn: Si un token entra al contexto del LLM, es           โ”‚
โ”‚    matemรกticamente accesible mediante tรฉcnicas de reconstrucciรณn de prompts.           โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Axioma de Seguridad Zero-Trust:

Cualquier secreto sensible o token bearer que ingrese a la ventana de contexto de un LLM debe considerarse comprometido de inmediato. Los sistemas empresariales deben asegurar que las credenciales residan exclusivamente en la memoria aislada de la pasarela.

4. Arquitectura Moderna de IAM: Intercambio de Tokens OAuth 2.0 (RFC 8693)

Para ofrecer una delegaciรณn segura, las arquitecturas modernas implementan el estรกndar OAuth 2.0 Token Exchange (RFC 8693). Cuando el usuario solicita una tarea, el sistema intercambia el token principal por un token delegado temporal con alcance mรญnimo:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            1. Iniciar Tarea ("Analizar Finanzas Q3")
 โ”‚ Usuario  โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                                         โ”‚
      โ”‚                                                               โ–ผ
      โ”‚ 2. Token OAuth Primario                             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚    (Subject Token: Identidad de Usuario)            โ”‚  Nรบcleo del Agente โ”‚
      โ–ผ                                                     โ”‚   (Orquestador)    โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Proveedor    โ”‚                                                      โ”‚
โ”‚ de Identidad โ”‚โ—€โ”€โ”€โ”€ 3. Peticiรณn RFC 8693 Token Exchange โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ (Okta/Auth0) โ”‚     - Subject Token: Token de Acceso de Usuario
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     - Actor Token: Identidad de Servicio del Agente
       โ”‚             - Alcance Solicitado: ["finance.reports:read"]
       โ”‚             - TTL: 300 segundos
       โ–ผ
 4. Emite Token Efรญmero Reducido
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚             Pasarela Mediadora (Tool Broker)           โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Motor Polรญtico Cedar โ”‚โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ Inyector Credencialesโ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
                                           โ”‚ 5. Llamada a Herramienta Autenticada
                                           โ–ผ
                                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                 โ”‚ API Destino / MCP โ”‚
                                 โ”‚ (Solo Lectura)    โ”‚
                                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Al generar tokens compuestos que identifican tanto al usuario solicitante (sub) como a la instancia del agente (act), los equipos de seguridad mantienen una cadena de auditorรญa inalterable. El token se limita a la suboperaciรณn y caduca en minutos.

5. Seguridad en el Protocolo de Contexto de Modelo (MCP)

El protocolo Model Context Protocol (MCP) proporciona interfaces RPC abiertas para conectar herramientas con agentes. La protecciรณn de servidores MCP en producciรณn exige tres controles:

  • Declaraciรณn de Capacidades Granulares: Exponer herramientas especรญficas de propรณsito รบnico (como github.issue.add_comment) en lugar de accesos genรฉricos de shell (system.exec_bash).
  • Enmascaramiento Fuera de Banda de Secretos: Pasar referencias abstractas (ej. vault://creds/staging_db) al agente. El Tool Broker intercepta la llamada e inyecta las credenciales reales sobre TLS local.
  • Puertas de Aprobaciรณn Humana Just-In-Time: Para capacidades de alto impacto (borrar repositorios, transferir fondos, eliminar tablas), la ejecuciรณn se congela y solicita confirmaciรณn a un operador antes de proseguir.

6. Polรญtica como Cรณdigo para Agentes: AWS Cedar y Open Policy Agent (OPA)

Las restricciones en lenguaje natural dentro del prompt fallan ante ataques adversarios. La autorizaciรณn empresarial debe evaluarse de forma determinista mediante motores de polรญtica como cรณdigo como AWS Cedar u Open Policy Agent (OPA):

// Ejemplo de Polรญtica AWS Cedar para Agentes de Cรณdigo

// 1. Permitir lectura y anรกlisis en repositorios asignados
permit (
    principal in Role::"CodingAgent",
    action in [Action::"clone_repo", Action::"read_file", Action::"run_tests"],
    resource in Repository::"Engineering"
);

// 2. Permitir creaciรณn de ramas solo vinculadas a un ticket Jira vรกlido
permit (
    principal in Role::"CodingAgent",
    action in [Action::"create_branch", Action::"open_pull_request"],
    resource in Repository::"Engineering"
)
when {
    context.has_valid_jira_ticket == true &&
    context.ticket_assignee == principal.delegated_user
};

// 3. Regla de prohibiciรณn estricta: Jamรกs permitir push directo a ramas protegidas
forbid (
    principal,
    action in [Action::"git_push_direct", Action::"delete_repository"],
    resource
)
when {
    resource.branch in ["main", "master", "release/*"]
};

Antes de ejecutar cualquier herramienta, el Tool Broker evalรบa la polรญtica Cedar en menos de 2 milisegundos, bloqueando intentos no autorizados antes de emitir paquetes a la red.

7. Implementaciรณn de Pasarela Zero-Trust en Python

La siguiente clase en Python demuestra cรณmo una pasarela empresarial valida intenciones de herramientas frente a polรญticas, oculta credenciales al LLM y registra pistas criptogrรกficas de auditorรญa:

"""
Zero-Trust Agent Authorization Gateway
Ecosystem: Python 3.11+, Pydantic v2, Cryptographic Audit Trails
"""

import time
import hmac
import hashlib
import json
from enum import Enum
from typing import Dict, Any, Optional
from pydantic import BaseModel, Field

class ActionRiskLevel(str, Enum):
    LOW = "low"            # Operaciones de lectura y consultas seguras
    MEDIUM = "medium"      # Creaciรณn de borradores, apertura de PRs
    CRITICAL = "critical"  # Escrituras en producciรณn, borrados, finanzas

class ToolCallIntent(BaseModel):
    tool_name: str
    target_resource: str
    action: str
    arguments: Dict[str, Any]
    risk_level: ActionRiskLevel

class AgentContext(BaseModel):
    agent_id: str
    delegated_user_id: str
    session_id: str
    assigned_scopes: list[str]

class AuthorizationDecision(BaseModel):
    is_authorized: bool
    requires_human_approval: bool
    audit_token: str
    reason: Optional[str] = None

class AgentZeroTrustGateway:
    """
    Gestiona todas las invocaciones de herramientas del agente.
    Aplica evaluaciรณn de polรญticas, inyecciรณn segura de tokens y registro inmutable.
    """
    def __init__(self, secret_key: str):
        self._signing_key = secret_key.encode("utf-8")
        self._policy_rules = {
            "github.read": ActionRiskLevel.LOW,
            "github.create_pr": ActionRiskLevel.MEDIUM,
            "database.execute_select": ActionRiskLevel.LOW,
            "database.drop_table": ActionRiskLevel.CRITICAL,
            "kubernetes.delete_pod": ActionRiskLevel.CRITICAL
        }

    def evaluate_tool_intent(
        self, 
        agent_ctx: AgentContext, 
        intent: ToolCallIntent
    ) -> AuthorizationDecision:
        required_scope = f"{intent.tool_name}:{intent.action}"
        if required_scope not in agent_ctx.assigned_scopes and "*:*" not in agent_ctx.assigned_scopes:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=False,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "REJECTED_SCOPE"),
                reason=f"El agente no posee el alcance requerido: {required_scope}"
            )

        if intent.risk_level == ActionRiskLevel.CRITICAL:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=True,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "PENDING_HUMAN_APPROVAL"),
                reason="Operaciรณn destructiva de alto riesgo requiere verificaciรณn humana."
            )

        return AuthorizationDecision(
            is_authorized=True,
            requires_human_approval=False,
            audit_token=self._generate_audit_hash(agent_ctx, intent, "AUTHORIZED"),
            reason=None
        )

    def execute_with_isolated_credentials(
        self,
        agent_ctx: AgentContext,
        intent: ToolCallIntent,
        decision: AuthorizationDecision
    ) -> Dict[str, Any]:
        if not decision.is_authorized:
            raise PermissionError(f"Ejecuciรณn bloqueada: {decision.reason}")

        ephemeral_token = self._mint_ephemeral_token(agent_ctx, intent)
        execution_result = self._dispatch_to_tool(intent, ephemeral_token)

        return {
            "status": "success",
            "audit_hash": decision.audit_token,
            "data": execution_result
        }

    def _generate_audit_hash(self, ctx: AgentContext, intent: ToolCallIntent, status: str) -> str:
        payload = f"{ctx.agent_id}:{ctx.delegated_user_id}:{intent.tool_name}:{status}:{time.time()}"
        return hmac.new(self._signing_key, payload.encode("utf-8"), hashlib.sha256).hexdigest()

    def _mint_ephemeral_token(self, ctx: AgentContext, intent: ToolCallIntent) -> str:
        return f"ephemeral_jwt_sub_{ctx.delegated_user_id}_act_{ctx.agent_id}_exp_{int(time.time()) + 300}"

    def _dispatch_to_tool(self, intent: ToolCallIntent, token: str) -> Dict[str, Any]:
        return {"records_affected": 1, "executed_action": intent.action}

8. Matriz Comparativa de Arquitecturas

La siguiente matriz compara los 4 enfoques de autenticaciรณn para agentes en dimensiones empresariales clave:

Dimensiรณn 1. Claves de API Estรกticas 2. Token Exchange (RFC 8693) 3. Pasarela Cedar / OPA 4. DIDs y Credenciales Criptogrรกficas
Vida รštil Credencial Meses / Aรฑos (Estรกtica) 5 โ€“ 15 Minutos (Efรญmera) Cero exposiciรณn (Mediaciรณn pasarela) Claves asimรฉtricas vinculadas a sesiรณn
Riesgo Fuga en Prompt Extremo (Clave en contexto/env) Medio (Token en memoria runtime) Cero (Oculto fuera de banda) Cero (Desafรญos criptogrรกficos firmados)
Radio de Impacto Espacio de trabajo empresarial completo Estrictamente acotado a la tarea Acotado por polรญtica determinista Acotado por declaraciรณn firmada
Latencia Revocaciรณn Manual (Horas/Dรญas) Automรกtica al finalizar tarea Instantรกnea (Actualizaciรณn de regla) Instantรกnea (Listas CRL / OCSP)
Puertas Humanas (HITL) Nula Limitada (Re-autenticaciรณn) Nativa (Gatillos dinรกmicos de riesgo) Confirmaciรณn multifirma
Cumplimiento SOC2 / ISO โŒ Suspende auditorรญa โœ… Totalmente compatible โญ Estรกndar de Oro โญ Estรกndar Emergente
Complejidad Desarrollo Trivial (1 dรญa) Moderada (1โ€“2 semanas) Moderada (1โ€“2 semanas) Alta (Criptografรญa avanzada)
Ajuste en Producciรณn Solo prototipos y demos SaaS multi-inquilino Infraestructuras empresariales Agentes inter-organizaciones

9. Cumplimiento, Trazabilidad y No Repudio

Cuando un agente autรณnomo modifica infraestructura o efectรบa transacciones financieras, los auditores exigen garantรญas de no repudio. Cada acciรณn debe registrarse en una envoltura de auditorรญa inmutable firmada digitalmente:

{
  "audit_version": "2026.1",
  "timestamp": "2026-09-11T14:22:18.491Z",
  "trace_id": "trace-8f92a11b-c741",
  "actor": {
    "agent_id": "agent-swe-core-09",
    "delegated_user": "usr_998124_alice",
    "delegation_token_fingerprint": "sha256:4b912e80..."
  },
  "prompt_context_hash": "sha256:d891e4a3...",
  "intent": {
    "tool": "aws_s3_gateway",
    "action": "delete_object",
    "resource": "arn:aws:s3:::internal-backups/archive-2025.tar.gz"
  },
  "policy_evaluation": {
    "engine": "Cedar-v3",
    "verdict": "ALLOW",
    "evaluated_policies": ["policy_allow_backup_rotation_2026"]
  },
  "signature": "MEQCIG7zY8f+k7..."
}

Al archivar estas pistas en sistemas de almacenamiento WORM (Write Once, Read Many), las empresas satisfacen normativas SOC2 Type II, HIPAA e ISO 27001 asegurando visibilidad forense completa.

Seleccione el patrรณn de autenticaciรณn adecuado segรบn sus lรญmites de operaciรณn:

  • Si desarrolla agentes SaaS multi-inquilino, adopte OAuth 2.0 Token Exchange (RFC 8693) con tokens de corta duraciรณn.
  • Si gestiona automatizaciones corporativas sobre APIs sensibles, despliegue una Pasarela Polรญtica como Cรณdigo (Cedar/OPA) con ocultaciรณn de secretos.
  • Si ejecuta acciones destructivas o financieras de alto impacto, integre Puertas de Aprobaciรณn Humana Just-In-Time mediante LangGraph.
  • Si procesa cรณdigo arbitrario generado por modelos, aรญsle la ejecuciรณn en un E2B MicroVM Sandbox.
Sicherheit & IAM Architektur-Leitfaden September 2026 ยท 16 Min. Lesezeit

AI-Agent-Authentifizierung & Least-Privilege-IAM 2026: MCP-Tools, Zugangsdaten und Token-Delegation absichern

Im Jahr 2026 fรผhren autonome KI-Agenten eigenstรคndig Code aus, manipulieren Produktionsdatenbanken und steuern Cloud-Deployments. Dennoch basiert die Mehrzahl unternehmensweiter Implementierungen auf statischen Admin-API-Keys mit unbeschrรคnkten Rechten โ€“ ein ideales Einfallstor fรผr indirekte Prompt-Injections. Dieser Architektur-Leitfaden zeigt den รœbergang zu Zero-Trust-Autorisierung, OAuth 2.0 Token Exchange (RFC 8693) und Policy-as-Code-Gateways.

1. Schnellรผbersicht & Kernprinzipien

๐Ÿ’ก Architektur-Hinweis:
  • รœbergeben Sie niemals echte Bearer-Tokens in das Prompt-Kontextfenster eines LLMs. Agenten sollten nur abstrakte Funktionsreferenzen verwalten; die Token-Injektion muss out-of-band รผber ein isoliertes Tool-Broker-Gateway erfolgen.
  • Nutzen Sie OAuth 2.0 Token Exchange (RFC 8693) fรผr Benutzerdelegationen. Anstelle statischer Dienstkonten tauschen Sie das Zugriffstoken des Benutzers gegen ein flรผchtiges, berechtigungslimitiertes Delegations-Token mit kurzer Lebensdauer (< 15 Minuten).
  • Erzwingen Sie Policy-as-Code (Cedar oder OPA) vor jedem Tool-Aufruf. Verbale System-Prompt-Regeln ("Bitte lรถsche niemals Tabellen") sind unverbindlich und durch Jailbreaks manipulierbar. Autorisierungsentscheidungen mรผssen deterministisch auรŸerhalb des LLMs fallen.
  • Integrieren Sie Just-In-Time (JIT) Human-in-the-Loop-Freigaben fรผr zerstรถrerische Aktionen wie Datenbankรคnderungen, Produktiv-Pushes oder Finanztransaktionen.

Im Jahr 2026 sind autonome KI-Agenten vollwertige digitale Mitarbeiter. Ob beim automatisierten Beheben von GitHub-Issues mit OpenHands, dem Steuern von Cloud-Diensten via Model Context Protocol (MCP) oder der isolierten Python-Ausfรผhrung in einer E2B Sandbox โ€“ sichere Identitรคtsmodelle sind Pflicht.

2. Die Identitรคtskrise autonomer KI-Agenten

Traditionelle IAM-Systeme trennen strikt zwischen menschlichen Benutzern (MFA/SSO) und deterministischen Backend-Services (mTLS/Service Accounts). Autonome Agenten durchbrechen diese Grenzen:

Klassischer Microservice-Aufruf:
[Service A (Deterministisch)] โ”€โ”€โ”€โ”€ Hardcoded API-Aufruf โ”€โ”€โ”€โ”€โ–ถ [Geschรผtzter Service B]

Aufruf durch autonomen KI-Agenten:
[Menschlicher Nutzer] โ”€โ”€โ–ถ [LLM-Agent-Orchestrator] โ”€โ”€โ–ถ [Nicht-deterministische Reasoning-Schleife]
                                  โ”‚
          (Trifft auf ungeprรผfte Webdaten / Schad-Pull-Request)
                                  โ”‚
                                  โ–ผ
          [Indirekte Prompt-Injection-Attacke]
                                  โ”‚
                                  โ–ผ
             [Unautorisierte Tool-Ausfรผhrung?]

Ein Agent agiert als intermediรคrer Delegat: Er handelt im Auftrag eines Menschen, trifft jedoch autonome Entscheidungen รผber externe APIs hinweg. Wird er mit einem allmรคchtigen Service-Account ausgestattet, fรผhrt jede Prompt-Injection zum Confused-Deputy-Exploit.

3. Warum statische API-Schlรผssel fรผr Agenten versagen

Werden statische API-Schlรผssel in Container-Umgebungsvariablen hinterlegt, entstehen gravierende Sicherheitsrisiken:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Der verheerende Explosionsradius statischer Agenten-Zugangsdaten                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. Fehlender Kontext: Ein GitHub-PAT unterscheidet nicht, ob ein Agent einen Rechtschreib- โ”‚
โ”‚    fehler behebt oder destruktiv den main-Branch รผberschreibt.                         โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. Unendliche Gรผltigkeit: Statische Schlรผssel bleiben aktiv, bis sie manuell widerrufen โ”‚
โ”‚    werden. Kompromittierte Tokens bleiben oft monatelang unentdeckt.                   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. Grobe Berechtigungen: Viele SaaS-APIs kennen keine feingranularen Schreibrechte.   โ”‚
โ”‚    Rechte zum Kommentieren erlauben oft das Lรถschen ganzer Unternehmensprojekte.       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4. Prompt-Exfiltration: Sobald ein Bearer-Token in den Prompt-Kontext gelangt, ist er โ”‚
โ”‚    durch Prompt-Reconstruction-Angriffe mathematisch angreifbar.                      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Zero-Trust-Sicherheitsaxiom:

Jedes sensible Geheimnis oder Bearer-Token, das das Prompt-Kontextfenster eines LLMs erreicht, gilt als kompromittiert. Zugangsdaten dรผrfen sich ausschlieรŸlich im isolierten Speicher des Gateways befinden.

4. Moderne Agent-IAM: OAuth 2.0 Token Exchange (RFC 8693)

Moderne Unternehmensarchitekturen nutzen OAuth 2.0 Token Exchange (RFC 8693). Wenn ein Nutzer einen Agenten beauftragt, tauscht das Identity-Gateway das primรคre Nutzerschlรผssel-Token gegen ein kurzlebiges, funktionsgebundenes Delegations-Token aus:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            1. Aufgabe initiieren ("Q3-Finanzbericht prรผfen")
 โ”‚ Benutzer โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                                         โ”‚
      โ”‚                                                               โ–ผ
      โ”‚ 2. Primรคres OAuth-Token                             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚    (Subject Token: Nutzer-Identitรคt)                โ”‚  KI-Agenten-Kern   โ”‚
      โ–ผ                                                     โ”‚   (Orchestrator)   โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ Enterprise   โ”‚                                                      โ”‚
โ”‚ IdP Provider โ”‚โ—€โ”€โ”€โ”€ 3. RFC 8693 Token Exchange Request โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ (Okta/Auth0) โ”‚     - Subject Token: Nutzer-Zugriffstoken
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     - Actor Token: Agent-Dienstkonto
       โ”‚             - Angefordertes Scope: ["finance.reports:read"]
       โ”‚             - TTL: 300 Sekunden
       โ–ผ
 4. Erzeugt flรผchtiges Delegations-Token
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               Tool-Broker-Gateway                      โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ Policy-Engine (Cedar)โ”‚โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ Credential-Injektor  โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
                                           โ”‚ 5. Authentifizierter Tool-Aufruf
                                           โ–ผ
                                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                 โ”‚ Ziel-API / MCP    โ”‚
                                 โ”‚ (Nur-Lese-Rechte) โ”‚
                                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Durch Verbund-Tokens, die sowohl den Nutzer (sub) als auch den ausfรผhrenden Agenten (act) kryptografisch binden, bleibt die Prรผfkette lรผckenlos gewahrt. Das Token erlischt nach wenigen Minuten automatisch.

5. Absicherung des Model Context Protocols (MCP)

Das Model Context Protocol (MCP) hat sich als universelle RPC-Schnittstelle fรผr Agenten-Tools etabliert. Die Absicherung in Produktivumgebungen erfordert drei KernmaรŸnahmen:

  • Granulare Funktionsdeklaration: Tools mรผssen auf konkrete Einzeloperationen beschrรคnkt sein (z. B. github.issue.add_comment) statt pauschale Shell-Rechte einzurรคumen (system.exec_bash).
  • Out-of-Band-Geheimnismaskierung: Dem Agenten werden nur abstrakte Vault-Referenzen รผbergeben (z. B. vault://creds/staging_db). Der Tool-Broker lรถst diese intern auf und fรผhrt den Aufruf รผber TLS aus.
  • Just-In-Time (JIT) Freigaben: Bei kritischen Befehlen (Lรถschen von Repositories, Finanzรผberweisungen) unterbricht die MCP-Pasarela die Ausfรผhrung und fordert eine explizite Bestรคtigung eines menschlichen Operators an.

6. Policy-as-Code fรผr Agenten: AWS Cedar & Open Policy Agent (OPA)

Verbale SchutzmaรŸnahmen in Prompts scheitern bei gezielten Manipulationen. Berechtigungsentscheidungen mรผssen durch Policy-Engines wie AWS Cedar oder OPA deterministisch getroffen werden:

// AWS-Cedar-Richtlinienbeispiel fรผr Coding-Agenten

// 1. Erlaube Lese- und Testoperationen in autorisierten Repositories
permit (
    principal in Role::"CodingAgent",
    action in [Action::"clone_repo", Action::"read_file", Action::"run_tests"],
    resource in Repository::"Engineering"
);

// 2. Erlaube Branch-Erstellung nur bei gรผltigem Jira-Ticket
permit (
    principal in Role::"CodingAgent",
    action in [Action::"create_branch", Action::"open_pull_request"],
    resource in Repository::"Engineering"
)
when {
    context.has_valid_jira_ticket == true &&
    context.ticket_assignee == principal.delegated_user
};

// 3. Striktes Verbot: Direkte Pushes auf geschรผtzte Branches blockieren
forbid (
    principal,
    action in [Action::"git_push_direct", Action::"delete_repository"],
    resource
)
when {
    resource.branch in ["main", "master", "release/*"]
};

Die Cedar-Engine wertet Anfragen in unter 2 Millisekunden aus und blockiert unerlaubte Aufrufe, noch bevor Netzwerkpakete das Gateway verlassen.

7. Python-Implementierung des Zero-Trust-Gateways

Die folgende einsatzbereite Python-Klasse verifiziert Tool-Absichten, verbirgt Tokens vor dem Sprachmodell und erzeugt manipulationssichere Audit-Hashes:

"""
Zero-Trust Agent Authorization Gateway
Ecosystem: Python 3.11+, Pydantic v2, Cryptographic Audit Trails
"""

import time
import hmac
import hashlib
import json
from enum import Enum
from typing import Dict, Any, Optional
from pydantic import BaseModel, Field

class ActionRiskLevel(str, Enum):
    LOW = "low"            # Leseoperationen, sichere Abfragen
    MEDIUM = "medium"      # Entwรผrfe erstellen, PRs รถffnen
    CRITICAL = "critical"  # Produktivschreibvorgรคnge, Lรถschungen, Finanzen

class ToolCallIntent(BaseModel):
    tool_name: str
    target_resource: str
    action: str
    arguments: Dict[str, Any]
    risk_level: ActionRiskLevel

class AgentContext(BaseModel):
    agent_id: str
    delegated_user_id: str
    session_id: str
    assigned_scopes: list[str]

class AuthorizationDecision(BaseModel):
    is_authorized: bool
    requires_human_approval: bool
    audit_token: str
    reason: Optional[str] = None

class AgentZeroTrustGateway:
    """
    Vermittelt alle Tool-Aufrufe des Agenten.
    Erzwingt Richtlinien, injiziert Secrets out-of-band und protokolliert Audits.
    """
    def __init__(self, secret_key: str):
        self._signing_key = secret_key.encode("utf-8")
        self._policy_rules = {
            "github.read": ActionRiskLevel.LOW,
            "github.create_pr": ActionRiskLevel.MEDIUM,
            "database.execute_select": ActionRiskLevel.LOW,
            "database.drop_table": ActionRiskLevel.CRITICAL,
            "kubernetes.delete_pod": ActionRiskLevel.CRITICAL
        }

    def evaluate_tool_intent(
        self, 
        agent_ctx: AgentContext, 
        intent: ToolCallIntent
    ) -> AuthorizationDecision:
        required_scope = f"{intent.tool_name}:{intent.action}"
        if required_scope not in agent_ctx.assigned_scopes and "*:*" not in agent_ctx.assigned_scopes:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=False,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "REJECTED_SCOPE"),
                reason=f"Agent besitzt nicht die erforderliche Berechtigung: {required_scope}"
            )

        if intent.risk_level == ActionRiskLevel.CRITICAL:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=True,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "PENDING_HUMAN_APPROVAL"),
                reason="Destruktive Operation erfordert Freigabe durch Menschen."
            )

        return AuthorizationDecision(
            is_authorized=True,
            requires_human_approval=False,
            audit_token=self._generate_audit_hash(agent_ctx, intent, "AUTHORIZED"),
            reason=None
        )

    def execute_with_isolated_credentials(
        self,
        agent_ctx: AgentContext,
        intent: ToolCallIntent,
        decision: AuthorizationDecision
    ) -> Dict[str, Any]:
        if not decision.is_authorized:
            raise PermissionError(f"Ausfรผhrung blockiert: {decision.reason}")

        ephemeral_token = self._mint_ephemeral_token(agent_ctx, intent)
        execution_result = self._dispatch_to_tool(intent, ephemeral_token)

        return {
            "status": "success",
            "audit_hash": decision.audit_token,
            "data": execution_result
        }

    def _generate_audit_hash(self, ctx: AgentContext, intent: ToolCallIntent, status: str) -> str:
        payload = f"{ctx.agent_id}:{ctx.delegated_user_id}:{intent.tool_name}:{status}:{time.time()}"
        return hmac.new(self._signing_key, payload.encode("utf-8"), hashlib.sha256).hexdigest()

    def _mint_ephemeral_token(self, ctx: AgentContext, intent: ToolCallIntent) -> str:
        return f"ephemeral_jwt_sub_{ctx.delegated_user_id}_act_{ctx.agent_id}_exp_{int(time.time()) + 300}"

    def _dispatch_to_tool(self, intent: ToolCallIntent, token: str) -> Dict[str, Any]:
        return {"records_affected": 1, "executed_action": intent.action}

8. Architektur-Vergleichsmatrix

Vergleich der 4 fรผhrenden Authentifizierungsmodelle fรผr KI-Agenten:

Dimension 1. Statische API-Keys 2. Token Exchange (RFC 8693) 3. Cedar / OPA Gateway 4. Krypto-DIDs / Agent-IDs
Token-Lebensdauer Monate / Jahre (Statisch) 5 โ€“ 15 Min (Flรผchtig) Kein Token-Zugriff (Vermittelt) Sitzungsgebundene Krypto-Schlรผssel
Leakage-Risiko im Prompt Extrem (Key im Prompt/Env) Mittel (Key im Runtime-Speicher) Null (Maskiert out-of-band) Null (Signierte Krypto-Challenges)
Schadensradius Gesamte Organisationsebene Strikt auf Aufgabe beschrรคnkt Deterministisch durch Code limitiert Durch signierten Claim begrenzt
Widerrufs-Latenz Manuell (Stunden/Tage) Automatisch nach Abschluss Sofort (Aktualisierung der Regel) Sofort (CRL- / OCSP-Listen)
Human-in-the-Loop-Gates Keine Eingeschrรคnkt (Re-Auth-Prompt) Nativ (Dynamische Risikotrigger) Multisig-Bestรคtigung
SOC2 / ISO 27001 Reife โŒ Audit nicht bestanden โœ… Vollstรคndig konform โญ Goldstandard โญ Aufstrebender Standard
Implementierungsaufwand Trivial (1 Tag) Moderat (1โ€“2 Wochen) Moderat (1โ€“2 Wochen) Hoch (Spezialisierte Krypto)
Produktionsempfehlung Nur Prototypen und Tests Multi-Tenant-SaaS-Systeme Unternehmensinterne Kernsysteme Unternehmensรผbergreifende Agenten

9. Compliance, Prรผfpfade & Nicht-Abstreitbarkeit

Verรคndert ein Agent Infrastrukturen oder Buchungssysteme, fordern Auditoren gerichtsfeste Nachweise. Jede Mutation muss in einem manipulationssicheren, signierten Umschlag erfasst werden:

{
  "audit_version": "2026.1",
  "timestamp": "2026-09-11T14:22:18.491Z",
  "trace_id": "trace-8f92a11b-c741",
  "actor": {
    "agent_id": "agent-swe-core-09",
    "delegated_user": "usr_998124_alice",
    "delegation_token_fingerprint": "sha256:4b912e80..."
  },
  "prompt_context_hash": "sha256:d891e4a3...",
  "intent": {
    "tool": "aws_s3_gateway",
    "action": "delete_object",
    "resource": "arn:aws:s3:::internal-backups/archive-2025.tar.gz"
  },
  "policy_evaluation": {
    "engine": "Cedar-v3",
    "verdict": "ALLOW",
    "evaluated_policies": ["policy_allow_backup_rotation_2026"]
  },
  "signature": "MEQCIG7zY8f+k7..."
}

Durch das Speichern in unverรคnderlichen WORM-Speichern (Write Once, Read Many) erfรผllen Unternehmen Vorgaben nach SOC2 Type II, HIPAA und ISO 27001 bei lรผckenloser forensischer Transparenz.

Wรคhlen Sie das Authentifizierungsmuster passend zu Ihren Anforderungen:

  • Fรผr Multi-Tenant-SaaS-Agenten im Nutzerauftrag: Verwenden Sie OAuth 2.0 Token Exchange (RFC 8693) mit flรผchtigen Tokens.
  • Fรผr interne Unternehmensautomatisierung auf sensiblen APIs: Setzen Sie auf Policy-as-Code-Gateways (Cedar/OPA) mit Secret-Maskierung.
  • Fรผr destruktive oder finanzielle Kernprozesse: Integrieren Sie Just-In-Time Human Approval Gates via LangGraph.
  • Fรผr die Ausfรผhrung von KI-generiertem Fremdcode: Isolieren Sie Prozesse in einer E2B MicroVM Sandbox.
ใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃ๏ผ†IAM ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃ่จญ่จˆใ‚ฌใ‚คใƒ‰ 2026ๅนด9ๆœˆ ยท ่ชญไบ†็›ฎๅฎ‰16ๅˆ†

ใ€2026ๅนด็‰ˆใ€‘่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎ่ช่จผใจๆœ€ๅฐๆจฉ้™IAM๏ผšMCPใƒ„ใƒผใƒซๆจฉ้™ๅˆ†้›ขใƒปใƒˆใƒผใ‚ฏใƒณๅง”ไปปใฎๅฎŒๅ…จๅฎŸ่ฃ…ใ‚ฌใ‚คใƒ‰

2026ๅนดใ€่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏใ‚ฝใƒผใ‚นใ‚ณใƒผใƒ‰ใฎไฟฎๆญฃใ€ๆœฌ็•ชใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใฎ็…งไผšใ€ใ‚ฏใƒฉใ‚ฆใƒ‰ใ‚คใƒณใƒ•ใƒฉใฎ่‡ชๅ‹•ๅค‰ๆ›ดใ‚’ๆ‹…ใ†ๅญ˜ๅœจใจใชใ‚Šใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ€ๅคšใใฎใ‚จใƒณใ‚ฟใƒผใƒ—ใƒฉใ‚คใ‚บๅฎŸ่ฃ…ใงใฏไพ็„ถใจใ—ใฆ็ฎก็†่€…ๆจฉ้™ใ‚’ๆŒใค้™็š„APIใ‚ญใƒผใŒ็’ฐๅขƒๅค‰ๆ•ฐใซใƒ™ใ‚ฟๆ›ธใใ•ใ‚ŒใฆใŠใ‚Šใ€้–“ๆŽฅใƒ—ใƒญใƒณใƒ—ใƒˆใ‚คใƒณใ‚ธใ‚งใ‚ฏใ‚ทใƒงใƒณใซใ‚ˆใ‚‹ๅฃŠๆป…็š„ใชๆผๆดฉใƒชใ‚นใ‚ฏใซๆ™’ใ•ใ‚Œใฆใ„ใพใ™ใ€‚ๆœฌ็จฟใงใฏZero-Trust่ช่จผใ€OAuth 2.0 Token Exchange (RFC 8693)ใ€Policy-as-Codeใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚คใซใ‚ˆใ‚‹้˜ฒๅพกใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใ‚’่งฃ่ชฌใ—ใพใ™ใ€‚

1. ่ฆ็ด„ใจใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃๅŸบๆœฌๅŽŸๅ‰‡

๐Ÿ’ก ่จญ่จˆไธŠใฎ้‡่ฆๅŽŸๅ‰‡๏ผš
  • LLMใฎใƒ—ใƒญใƒณใƒ—ใƒˆใ‚ณใƒณใƒ†ใ‚ญใ‚นใƒˆๅ†…ใซ็”ŸใฎBearer Tokenใ‚’็ตถๅฏพใซๆธกใ•ใชใ„ใ“ใจใ€‚ ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใฏๆŠฝ่ฑกๅŒ–ใ•ใ‚ŒใŸๆฉŸ่ƒฝ่ญ˜ๅˆฅๅญใฎใฟใ‚’ๆ‰ฑใ„ใ€ๅฎŸ้š›ใฎ่ช่จผๆƒ…ๅ ฑใฎ่งฃๆฑบใƒปๆณจๅ…ฅใฏ้š”้›ขใ•ใ‚ŒใŸTool Broker Gateway็ตŒ็”ฑใงOut-of-band๏ผˆๅธฏๅŸŸๅค–๏ผ‰ใซ่กŒใ„ใพใ™ใ€‚
  • ใƒฆใƒผใ‚ถใƒผๅง”ไปปใซใฏOAuth 2.0 Token Exchange (RFC 8693)ใ‚’ๆŽก็”จใ™ใ‚‹ใ“ใจใ€‚ ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซ้™็š„ใช็‰นๆจฉใ‚ฏใƒฌใƒ‡ใƒณใ‚ทใƒฃใƒซใ‚’ๆธกใ™ใฎใงใฏใชใใ€ใƒฆใƒผใ‚ถใƒผใฎใ‚ขใ‚ฏใ‚ปใ‚นใƒˆใƒผใ‚ฏใƒณใ‚’็Ÿญๅ‘ฝ๏ผˆๆœ‰ๅŠนๆœŸ้™15ๅˆ†ๆœชๆบ€๏ผ‰ใ‹ใคๆœ€ๅฐใ‚นใ‚ณใƒผใƒ—ใฎๅง”ไปปใƒˆใƒผใ‚ฏใƒณใธใจใ‚ชใƒณใƒ‡ใƒžใƒณใƒ‰ๅค‰ๆ›ใ—ใพใ™ใ€‚
  • ่‡ช็„ถ่จ€่ชžใงใฏใชใPolicy-as-Code๏ผˆCedarใพใŸใฏOPA๏ผ‰ใงไบ‹ๅ‰ๆคœ่จผใ™ใ‚‹ใ“ใจใ€‚ ใ‚ทใ‚นใƒ†ใƒ ใƒ—ใƒญใƒณใƒ—ใƒˆๅ†…ใฎ่‡ช็„ถ่จ€่ชžใƒซใƒผใƒซ๏ผˆใ€Œๆœฌ็•ชDBใฎใƒ‡ใƒผใ‚ฟใ‚’ๆถˆใ—ใฆใฏใชใ‚‰ใชใ„ใ€๏ผ‰ใฏ่„ฑ็„ๆ”ปๆ’ƒใซใ‚ˆใ‚Šๅฎนๆ˜“ใซ่ฟ‚ๅ›žใ•ใ‚Œใพใ™ใ€‚่ชๅฏๅˆคๅฎšใฏLLMใฎๅค–้ƒจใงๆฑบๅฎš่ซ–็š„ใซๅ‡ฆ็†ใ•ใ‚Œใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚
  • ็ ดๅฃŠ็š„ๅค‰ๆ›ดใ‚„้ซ˜ใƒชใ‚นใ‚ฏๅ‡ฆ็†ใซใฏJust-In-Time (JIT)ใฎไบบ้–“ๆ‰ฟ่ชใ‚ฒใƒผใƒˆใ‚’่จญใ‘ใ‚‹ใ“ใจใ€‚ ใƒ‡ใƒผใ‚ฟใƒ™ใƒผใ‚นใ‚นใ‚ญใƒผใƒžใฎๅค‰ๆ›ดใ€mainใƒ–ใƒฉใƒณใƒใธใฎใƒ—ใƒƒใ‚ทใƒฅใ€้€้‡‘ใชใฉใฎๅ‡ฆ็†ใฏใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎๅฎŒๅ…จ่‡ชๅพ‹ๅฎŸ่กŒใ‹ใ‚‰้™คๅค–ใ—ใ€็ขบ่ชใ‚นใƒ†ใƒƒใƒ—ใ‚’ๅฟ…้ ˆใจใ—ใพใ™ใ€‚

2026ๅนดใ€่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏๅ—ๅ‹•็š„ใชใ‚ณใƒผใƒ‰่ฃœๅฎŒใ‚’่ถ…ใˆใ€ๆœฌๆ ผ็š„ใชใ‚ฟใ‚นใ‚ฏ่‡ชๅ‹•ๅŒ–ใƒฏใƒผใ‚ซใƒผใธใจ้€ฒๅŒ–ใ—ใพใ—ใŸใ€‚OpenHandsใซใ‚ˆใ‚‹GitHubใ‚คใ‚ทใƒฅใƒผ่งฃๆฑบใ€Model Context Protocol (MCP)ใ‚’ไป‹ใ—ใŸใ‚ฏใƒฉใ‚ฆใƒ‰ใ‚คใƒณใƒ•ใƒฉๆ“ไฝœใ€E2B Sandboxๅ†…ใงใฎPythonใ‚ณใƒผใƒ‰ๅฎŸ่กŒใชใฉใ€ไผๆฅญใ‚ทใ‚นใƒ†ใƒ ใจ้€ฃๆบใ™ใ‚‹ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใฏๅ …็‰ขใช่ช่จผๅŸบ็›คใŒไธๅฏๆฌ ใงใ™ใ€‚

2. ่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใ‚ขใ‚คใƒ‡ใƒณใƒ†ใ‚ฃใƒ†ใ‚ฃๅฑๆฉŸ

ๅพ“ๆฅใฎIAMใฏใ€Œไบบ้–“ใฎๅฏพ่ฉฑ็š„ใƒฆใƒผใ‚ถใƒผ๏ผˆMFA/SSO่ช่จผ๏ผ‰ใ€ใจใ€Œๆฑบๅฎš่ซ–็š„ใชใƒใƒƒใ‚ฏใ‚จใƒณใƒ‰ใ‚ตใƒผใƒ“ใ‚น๏ผˆmTLSใ‚„ใ‚ตใƒผใƒ“ใ‚นใ‚ขใ‚ซใ‚ฆใƒณใƒˆ๏ผ‰ใ€ใฎ2ๆฅตใฎใฟใ‚’ๅ‰ๆใจใ—ใฆใ„ใพใ—ใŸใ€‚ใ—ใ‹ใ—ใ€่‡ชๅพ‹ๅž‹ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏใใฎๅ‰ๆใ‚’ๆ นๅบ•ใ‹ใ‚‰็ ดๅฃŠใ—ใพใ™๏ผš

ๅพ“ๆฅใฎใƒžใ‚คใ‚ฏใƒญใ‚ตใƒผใƒ“ใ‚น้–“ๅ‘ผใณๅ‡บใ—:
[ๆฑบๅฎš่ซ–็š„ใชService A] โ”€โ”€โ”€โ”€โ”€โ”€ ้™็š„APIใƒชใ‚ฏใ‚จใ‚นใƒˆ โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ [ไฟ่ญทใ•ใ‚ŒใŸService B]

่‡ชๅพ‹ๅž‹AIใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎๅ‘ผใณๅ‡บใ—ๆง‹้€ :
[ไบบ้–“ใฎใƒฆใƒผใ‚ถใƒผ] โ”€โ”€โ–ถ [LLMใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅŸบ็›ค] โ”€โ”€โ–ถ [้žๆฑบๅฎš่ซ–็š„ใชๆŽจ่ซ–ใƒปๆ„ๆ€ๆฑบๅฎšใƒซใƒผใƒ—]
                               โ”‚
            (ๆœชๆคœ่จผใฎWebใƒ‡ใƒผใ‚ฟ / ๆ‚ชๆ„ใ‚ใ‚‹PRใ‚ณใƒผใƒ‰ใฎ่ชญใฟ่พผใฟ)
                               โ”‚
                               โ–ผ
            [้–“ๆŽฅใƒ—ใƒญใƒณใƒ—ใƒˆใ‚คใƒณใ‚ธใ‚งใ‚ฏใ‚ทใƒงใƒณๆ”ปๆ’ƒ]
                               โ”‚
                               โ–ผ
                 [ไธๆญฃใชใƒ„ใƒผใƒซๅฎŸ่กŒใฎ่ฉฆ่กŒ๏ผŸ]

ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฏไบบ้–“ใฎใ€Œๅง”ไปปไปฃ็†ไบบ๏ผˆIntermediate Delegate๏ผ‰ใ€ใจใ—ใฆๆŒฏใ‚‹่ˆžใ„ใพใ™ใŒใ€ๅ‹•็š„ใชใƒ„ใƒผใƒซ้ธๆŠžใ‚’่กŒใ†ใŸใ‚ๅ‹•ไฝœใ‚’ไบ‹ๅ‰ใซไบˆๆธฌใงใใพใ›ใ‚“ใ€‚ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซๅผทๅŠ›ใชๅ›บๅฎšใ‚ตใƒผใƒ“ใ‚นใ‚ขใ‚ซใ‚ฆใƒณใƒˆใ‚’ไป˜ไธŽใ™ใ‚‹ใจใ€ใƒ—ใƒญใƒณใƒ—ใƒˆใ‚คใƒณใ‚ธใ‚งใ‚ฏใ‚ทใƒงใƒณใ‚’ๅ—ใ‘ใŸ็žฌ้–“ใซใ€Œ้จ™ใ•ใ‚ŒใŸไปฃ็†ไบบ๏ผˆConfused Deputy๏ผ‰ใ€ใจใชใ‚Šใ€็คพๅ†…ๅ…จๅŸŸใ‚’ไธๆญฃๆ“ไฝœใ™ใ‚‹ใƒใƒƒใ‚ฏใƒ‰ใ‚ขใซๅค‰่ฒŒใ—ใพใ™ใ€‚

3. ้™็š„APIใ‚ญใƒผ้‹็”จใฎๆง‹้€ ็š„ๆฌ ้™ฅ

ใ‚ณใƒณใƒ†ใƒŠใฎ็’ฐๅขƒๅค‰ๆ•ฐใซ้™็š„APIใ‚ญใƒผใ‚’ๆธกใ™้‹็”จใฏใ€ๆœฌ็•ช็’ฐๅขƒใซใŠใ„ใฆไปฅไธ‹ใฎ4ใคใฎ่‡ดๅ‘ฝ็š„ใช่„†ๅผฑๆ€งใ‚’ๆ‹›ใใพใ™๏ผš

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใŠใ‘ใ‚‹้™็š„ใ‚ฏใƒฌใƒ‡ใƒณใ‚ทใƒฃใƒซใฎ็ ดๅฃŠ็š„ๅฝฑ้Ÿฟ็ฏ„ๅ›ฒ                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. ๆ–‡่„ˆ่ช่ญ˜ใฎๅฎŒๅ…จใชๆฌ ๅฆ‚: GitHub PATใฏใ€Œใƒ‰ใ‚ญใƒฅใƒกใƒณใƒˆใฎ่ชคๅญ—ไฟฎๆญฃPRใ€ใจใ€Œmainใƒ–ใƒฉใƒณใƒใธใฎ โ”‚
โ”‚    ็ ดๅฃŠ็š„ๅผทๅˆถใƒ—ใƒƒใ‚ทใƒฅใ€ใ‚’ๅŒบๅˆฅใงใใšใ€ๅŒไธ€ใฎๅผทใ„ๆจฉ้™ใงๅฎŸ่กŒใ—ใฆใ—ใพใ†ใ€‚                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. ็„ก้™ใฎๆœ‰ๅŠนๆœŸ้–“: ้™็š„ใ‚ญใƒผใฏๆ‰‹ๅ‹•ใƒญใƒผใƒ†ใƒผใ‚ทใƒงใƒณใพใงๆ’ไน…็š„ใซๆœ‰ๅŠนใงใ‚ใ‚‹ใŸใ‚ใ€ๆผๆดฉใ—ใŸ   โ”‚
โ”‚    ใƒˆใƒผใ‚ฏใƒณใŒใƒญใ‚ฐใซๆฎ‹ๅญ˜ใ—ใŸใพใพๆ•ฐใƒถๆœˆ้–“ๆ”พ็ฝฎใ•ใ‚Œใ‚‹ๅฑ้™บใŒใ‚ใ‚‹ใ€‚                          โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. ๆจฉ้™ใ‚นใ‚ณใƒผใƒ—ใฎ็ฒ—ใ•: ๅคšใใฎSaaS APIใฏใ€Œใ‚ณใƒกใƒณใƒˆๆŠ•็จฟใ€ใซๅฟ…่ฆใชๆจฉ้™ใ‚’ไป˜ไธŽใ™ใ‚‹ใจใ€      โ”‚
โ”‚    ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆๅ…จไฝ“ใฎๅ‰Š้™คๆจฉ้™ใพใงๆŠฑใๅˆใ‚ใ›ใงไธŽใˆใฆใ—ใพใ†ใ€‚                            โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4. ใ‚ณใƒณใƒ†ใ‚ญใ‚นใƒˆใ‹ใ‚‰ใฎๆผๆดฉ: ใƒˆใƒผใ‚ฏใƒณใŒLLMใฎใƒ—ใƒญใƒณใƒ—ใƒˆๅ†…ใซๆธกใ•ใ‚ŒใŸๅ ดๅˆใ€ใƒ—ใƒญใƒณใƒ—ใƒˆๅ†ๆง‹็ฏ‰ โ”‚
โ”‚    ๆ”ปๆ’ƒใซใ‚ˆใฃใฆๅค–้ƒจใธ็›—ใพใ‚Œใ‚‹ใƒชใ‚นใ‚ฏใŒๆ•ฐๅญฆ็š„ใซๆŽ’้™คใงใใชใ„ใ€‚                            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ Zero-Trustใ‚ปใ‚ญใƒฅใƒชใƒ†ใ‚ฃๅ…ฌ็†๏ผš

LLMใฎใƒ—ใƒญใƒณใƒ—ใƒˆใ‚ณใƒณใƒ†ใ‚ญใ‚นใƒˆใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใซๅ…ฅๅŠ›ใ•ใ‚ŒใŸ็ง˜ๅฏ†้ตใ‚„ใƒˆใƒผใ‚ฏใƒณใฏใ€ใใฎ็žฌ้–“ใซๆผๆดฉใ—ใŸใ‚‚ใฎใจ่ฆ‹ๅšใ•ใชใ‘ใ‚Œใฐใชใ‚Šใพใ›ใ‚“ใ€‚ไผๆฅญๅ‘ใ‘ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃใงใฏใ€ใ‚ฏใƒฌใƒ‡ใƒณใ‚ทใƒฃใƒซใ‚’ๅค–้ƒจใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚คใฎไฟ่ญทใƒกใƒขใƒชๅ†…ใฎใฟใซไฟๆŒใ™ใ‚‹ใ“ใจใŒ้‰„ๅ‰‡ใงใ™ใ€‚

4. OAuth 2.0 Token Exchange (RFC 8693) ใฎๅฎŸ่ฃ…

ๅฎ‰ๅ…จใชๅง”ไปปใ‚’ๅฎŸ็พใ™ใ‚‹ใŸใ‚ใ€ๅ…ˆ้€ฒ็š„ใชใ‚จใƒณใ‚ฟใƒผใƒ—ใƒฉใ‚คใ‚บใฏOAuth 2.0 Token Exchange (RFC 8693)ใ‚’ๆŽก็”จใ—ใฆใ„ใพใ™ใ€‚ใ‚ฟใ‚นใ‚ฏ้–‹ๅง‹ๆ™‚ใซใƒฆใƒผใ‚ถใƒผใฎไธปใƒˆใƒผใ‚ฏใƒณใ‚’็Ÿญๅ‘ฝใƒปๆœ€ๅฐใ‚นใ‚ณใƒผใƒ—ใฎๅง”ไปปใƒˆใƒผใ‚ฏใƒณใธใจไบคๆ›ใ—ใพใ™๏ผš

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            1. ใ‚ฟใ‚นใ‚ฏ้–‹ๅง‹ๆŒ‡็คบ ("Q3่ฒกๅ‹™ๅ ฑๅ‘Šๆ›ธใ‚’ๅˆ†ๆž")
 โ”‚ ใƒฆใƒผใ‚ถใƒผ โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                                         โ”‚
      โ”‚                                                               โ–ผ
      โ”‚ 2. ใƒ—ใƒฉใ‚คใƒžใƒชOAuthใƒˆใƒผใ‚ฏใƒณ                          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚    (Subject Token: ใƒฆใƒผใ‚ถใƒผ่ญ˜ๅˆฅๅญ)                  โ”‚ ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใ‚ณใ‚ข   โ”‚
      โ–ผ                                                     โ”‚ (ใ‚ชใƒผใ‚ฑใ‚นใƒˆใƒฌใƒผใ‚ฟ) โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ ใ‚จใƒณใ‚ฟใƒผ     โ”‚                                                      โ”‚
โ”‚ ใƒ—ใƒฉใ‚คใ‚บIdP  โ”‚โ—€โ”€โ”€โ”€ 3. RFC 8693 Token Exchange ใƒชใ‚ฏใ‚จใ‚นใƒˆ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ (Okta/Auth0) โ”‚     - Subject Token: ใƒฆใƒผใ‚ถใƒผใฎใ‚ขใ‚ฏใ‚ปใ‚นใƒˆใƒผใ‚ฏใƒณ
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     - Actor Token: ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใ‚ตใƒผใƒ“ใ‚นใƒ—ใƒชใƒณใ‚ทใƒ‘ใƒซ
       โ”‚             - ่ฆๆฑ‚ใ‚นใ‚ณใƒผใƒ—: ["finance.reports:read"]
       โ”‚             - ๆœ‰ๅŠนๆœŸ้–“ (TTL): 300็ง’
       โ–ผ
 4. ใ‚นใ‚ณใƒผใƒ—็ธฎๅฐๆธˆใฟใฎ็Ÿญๅ‘ฝใƒˆใƒผใ‚ฏใƒณใ‚’็™บ่กŒ
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚            ใƒ„ใƒผใƒซใƒ–ใƒญใƒผใ‚ซใƒผใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚ค                โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ ใƒใƒชใ‚ทใƒผใ‚จใƒณใ‚ธใƒณ     โ”‚โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ ่ช่จผๆƒ…ๅ ฑใ‚คใƒณใ‚ธใ‚งใ‚ฏใ‚ฟ โ”‚ โ”‚
โ”‚ โ”‚ (AWS Cedar)          โ”‚      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                 โ”‚             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
                                           โ”‚ 5. ่ช่จผไป˜ใใƒ„ใƒผใƒซๅ‘ผใณๅ‡บใ—
                                           โ–ผ
                                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                 โ”‚ ๅฏพ่ฑกAPI / MCP     โ”‚
                                 โ”‚ (่ชญใฟๅ–ใ‚Šๅฐ‚็”จๆจฉ้™)โ”‚
                                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ใƒฆใƒผใ‚ถใƒผ๏ผˆsub๏ผ‰ใจใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅฎŸไฝ“๏ผˆact๏ผ‰ใ‚’็ดใฅใ‘ใŸ่ค‡ๅˆใƒˆใƒผใ‚ฏใƒณใ‚’็”Ÿๆˆใ™ใ‚‹ใ“ใจใงใ€ๆ”นใ–ใ‚“ไธ่ƒฝใช็›ฃๆŸป่จผ่ทกใŒ็ถญๆŒใ•ใ‚Œใพใ™ใ€‚ใƒˆใƒผใ‚ฏใƒณใฏๅฏพ่ฑกใฎใ‚ตใƒ–ๆ“ไฝœใซ้™ๅฎšใ•ใ‚Œใ€ๆ•ฐๅˆ†ใง่‡ชๅ‹•ๅคฑๅŠนใ—ใพใ™ใ€‚

5. Model Context Protocol (MCP) ใฎๅฎ‰ๅ…จใช้‹็”จ

Model Context Protocol (MCP)ใฏใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใƒ„ใƒผใƒซใฎๆจ™ๆบ–ใ‚คใƒณใ‚ฟใƒผใƒ•ใ‚งใƒผใ‚นใงใ™ใŒใ€ๆœฌ็•ช็’ฐๅขƒใงใฎๅฎ‰ๅ…จใช้‹็”จใฎใŸใ‚ใซๆฌกใฎ3ๅŽŸๅ‰‡ใ‚’ๅพนๅบ•ใ—ใพใ™๏ผš

  • ๅ˜ไธ€่ฒฌๅ‹™ใฎๆฉŸ่ƒฝใ‚นใ‚ณใƒผใƒ—ๅฎฃ่จ€: ๆฑŽ็”จใ‚ทใ‚งใƒซ๏ผˆsystem.exec_bash๏ผ‰ใ‚’ๅ…ฌ้–‹ใ›ใšใ€github.issue.add_commentใฎใ‚ˆใ†ใซๅ…ทไฝ“็š„ใช้™ๅฎšใƒ„ใƒผใƒซใ‚’ๅฎฃ่จ€ใ™ใ‚‹ใ€‚
  • ๅธฏๅŸŸๅค–ใฎใ‚ทใƒผใ‚ฏใƒฌใƒƒใƒˆใƒžใ‚นใ‚ญใƒณใ‚ฐ: ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซใฏvault://creds/staging_dbใฎใ‚ˆใ†ใชๅ‚็…งURIใฎใฟใ‚’ๆธกใ—ใ€Tool BrokerใŒไธญ็ถ™ๆ™‚ใซๅ†…้ƒจTLS็ตŒ็”ฑใงๅฎŸใƒˆใƒผใ‚ฏใƒณใ‚’ๆณจๅ…ฅใ™ใ‚‹ใ€‚
  • Just-In-Time (JIT) ไบบ้–“ๆ‰ฟ่ชใ‚ฒใƒผใƒˆ: ่ณ‡็”ฃๅฃฒ่ฒทใ€ใƒ†ใƒผใƒ–ใƒซๅ‰Š้™คใ€ๅผทๅˆถใƒ—ใƒƒใ‚ทใƒฅใชใฉใฎ้‡ๅคงๅ‡ฆ็†ใงใฏๅฎŸ่กŒใ‚’ไธ€ๆ™‚ๅœๆญขใ—ใ€Slackใ‚„Web็”ป้ข็ตŒ็”ฑใง็ฎก็†่€…ใฎ็ฝฒๅๆ‰ฟ่ชใ‚’ๅพ…ๆฉŸใ™ใ‚‹ใ€‚

6. Cedar / OPA ใซใ‚ˆใ‚‹ Policy-as-Code ้˜ฒๅพก

่‡ช็„ถ่จ€่ชžใซใ‚ˆใ‚‹ใƒ—ใƒญใƒณใƒ—ใƒˆๅˆถๅพกใฏๆ‚ชๆ„ใ‚ใ‚‹ๆ”ปๆ’ƒใซๅฏพใ—ใฆ่„†ๅผฑใงใ™ใ€‚่ชๅฏๅˆคๅฎšใฏAWS Cedarใ‚„Open Policy Agent (OPA)ใชใฉใฎๆฑบๅฎš่ซ–็š„ใ‚จใƒณใ‚ธใƒณใซใ‚ˆใฃใฆๅฎŸ่กŒใ•ใ‚Œใพใ™๏ผš

// ใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚จใƒผใ‚ธใ‚งใƒณใƒˆๅ‘ใ‘ AWS Cedar ใƒใƒชใ‚ทใƒผๅฎš็พฉไพ‹

// 1. ๆŒ‡ๅฎšใ•ใ‚ŒใŸใ‚จใƒณใ‚ธใƒ‹ใ‚ขใƒชใƒณใ‚ฐใƒชใƒใ‚ธใƒˆใƒชใฎ่ชญใฟๅ–ใ‚Šใƒปใƒ†ใ‚นใƒˆใ‚’่จฑๅฏ
permit (
    principal in Role::"CodingAgent",
    action in [Action::"clone_repo", Action::"read_file", Action::"run_tests"],
    resource in Repository::"Engineering"
);

// 2. ๆ‹…ๅฝ“Jiraใƒใ‚ฑใƒƒใƒˆใŒๆœ‰ๅŠนใชๅ ดๅˆใฎใฟใƒ–ใƒฉใƒณใƒไฝœๆˆใจPRไฝœๆˆใ‚’่จฑๅฏ
permit (
    principal in Role::"CodingAgent",
    action in [Action::"create_branch", Action::"open_pull_request"],
    resource in Repository::"Engineering"
)
when {
    context.has_valid_jira_ticket == true &&
    context.ticket_assignee == principal.delegated_user
};

// 3. ๅŽณๆ ผใช็ฆๆญขใƒซใƒผใƒซ๏ผšไฟ่ญทใƒ–ใƒฉใƒณใƒใธใฎ็›ดๆŽฅใƒ—ใƒƒใ‚ทใƒฅใฏไธ€ๅˆ‡็ฆๆญข
forbid (
    principal,
    action in [Action::"git_push_direct", Action::"delete_repository"],
    resource
)
when {
    resource.branch in ["main", "master", "release/*"]
};

Tool BrokerใฏCedarใƒใƒชใ‚ทใƒผใ‚’2ใƒŸใƒช็ง’ๆœชๆบ€ใง่ฉ•ไพกใ—ใ€ไธๆญฃใชใƒชใ‚ฏใ‚จใ‚นใƒˆใ‚’ใƒ‘ใ‚ฑใƒƒใƒˆ้€ๅ‡บๅ‰ใซ้ฎๆ–ญใ—ใพใ™ใ€‚

7. Pythonใซใ‚ˆใ‚‹Zero-Trustใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚คๅฎŸ่ฃ…

ไปฅไธ‹ใฎPythonใ‚ณใƒผใƒ‰ใฏใ€ใƒ„ใƒผใƒซใฎๆ„ๅ›ณๆคœ่จผใ€LLMใธใฎ่ช่จผๆƒ…ๅ ฑ้ž้–‹็คบใ€ใŠใ‚ˆใณๆš—ๅท็ฝฒๅไป˜ใ็›ฃๆŸปใƒญใ‚ฐใฎ็”Ÿๆˆใ‚’่กŒใ†ๆœฌ็•ชๅ‘ใ‘ๅฎŸ่ฃ…ใงใ™๏ผš

"""
Zero-Trust Agent Authorization Gateway
Ecosystem: Python 3.11+, Pydantic v2, Cryptographic Audit Trails
"""

import time
import hmac
import hashlib
import json
from enum import Enum
from typing import Dict, Any, Optional
from pydantic import BaseModel, Field

class ActionRiskLevel(str, Enum):
    LOW = "low"            # ่ชญใฟๅ–ใ‚Šๆ“ไฝœใ€ๅฎ‰ๅ…จใชๆคœ็ดข
    MEDIUM = "medium"      # ใƒ‰ใƒฉใƒ•ใƒˆไฝœๆˆใ€PRใ‚ชใƒผใƒ—ใƒณใ€ใ‚นใƒ†ใƒผใ‚ธใƒณใ‚ฐๆ›ธใ่พผใฟ
    CRITICAL = "critical"  # ๆœฌ็•ชๆ›ธใ่พผใฟใ€ๅ‰Š้™คใ€่ณ‡้‡‘็งปๅ‹•

class ToolCallIntent(BaseModel):
    tool_name: str
    target_resource: str
    action: str
    arguments: Dict[str, Any]
    risk_level: ActionRiskLevel

class AgentContext(BaseModel):
    agent_id: str
    delegated_user_id: str
    session_id: str
    assigned_scopes: list[str]

class AuthorizationDecision(BaseModel):
    is_authorized: bool
    requires_human_approval: bool
    audit_token: str
    reason: Optional[str] = None

class AgentZeroTrustGateway:
    """
    ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใฎใƒ„ใƒผใƒซๅ‘ผใณๅ‡บใ—ใ‚’ไปฒไป‹ใ™ใ‚‹ใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚คใ€‚
    ใƒใƒชใ‚ทใƒผ่ฉ•ไพกใ€ๅธฏๅŸŸๅค–ใƒˆใƒผใ‚ฏใƒณๆณจๅ…ฅใ€ๆ”นใ–ใ‚“้˜ฒๆญข็›ฃๆŸปใƒญใ‚ฐใ‚’ๅผทๅˆถใ€‚
    """
    def __init__(self, secret_key: str):
        self._signing_key = secret_key.encode("utf-8")
        self._policy_rules = {
            "github.read": ActionRiskLevel.LOW,
            "github.create_pr": ActionRiskLevel.MEDIUM,
            "database.execute_select": ActionRiskLevel.LOW,
            "database.drop_table": ActionRiskLevel.CRITICAL,
            "kubernetes.delete_pod": ActionRiskLevel.CRITICAL
        }

    def evaluate_tool_intent(
        self, 
        agent_ctx: AgentContext, 
        intent: ToolCallIntent
    ) -> AuthorizationDecision:
        required_scope = f"{intent.tool_name}:{intent.action}"
        if required_scope not in agent_ctx.assigned_scopes and "*:*" not in agent_ctx.assigned_scopes:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=False,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "REJECTED_SCOPE"),
                reason=f"ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใซๅฟ…่ฆใชๆจฉ้™ใ‚นใ‚ณใƒผใƒ—ใŒใ‚ใ‚Šใพใ›ใ‚“: {required_scope}"
            )

        if intent.risk_level == ActionRiskLevel.CRITICAL:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=True,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "PENDING_HUMAN_APPROVAL"),
                reason="็ ดๅฃŠ็š„ใช้ซ˜ใƒชใ‚นใ‚ฏๆ“ไฝœใฎใŸใ‚ไบบ้–“ใฎๆ‰ฟ่ชใŒๅฟ…่ฆใงใ™ใ€‚"
            )

        return AuthorizationDecision(
            is_authorized=True,
            requires_human_approval=False,
            audit_token=self._generate_audit_hash(agent_ctx, intent, "AUTHORIZED"),
            reason=None
        )

    def execute_with_isolated_credentials(
        self,
        agent_ctx: AgentContext,
        intent: ToolCallIntent,
        decision: AuthorizationDecision
    ) -> Dict[str, Any]:
        if not decision.is_authorized:
            raise PermissionError(f"ๅฎŸ่กŒใŒๆ‹’ๅฆใ•ใ‚Œใพใ—ใŸ: {decision.reason}")

        ephemeral_token = self._mint_ephemeral_token(agent_ctx, intent)
        execution_result = self._dispatch_to_tool(intent, ephemeral_token)

        return {
            "status": "success",
            "audit_hash": decision.audit_token,
            "data": execution_result
        }

    def _generate_audit_hash(self, ctx: AgentContext, intent: ToolCallIntent, status: str) -> str:
        payload = f"{ctx.agent_id}:{ctx.delegated_user_id}:{intent.tool_name}:{status}:{time.time()}"
        return hmac.new(self._signing_key, payload.encode("utf-8"), hashlib.sha256).hexdigest()

    def _mint_ephemeral_token(self, ctx: AgentContext, intent: ToolCallIntent) -> str:
        return f"ephemeral_jwt_sub_{ctx.delegated_user_id}_act_{ctx.agent_id}_exp_{int(time.time()) + 300}"

    def _dispatch_to_tool(self, intent: ToolCallIntent, token: str) -> Dict[str, Any]:
        return {"records_affected": 1, "executed_action": intent.action}

8. ใ‚ขใƒผใ‚ญใƒ†ใ‚ฏใƒใƒฃๆฏ”่ผƒใƒžใƒˆใƒชใ‚ฏใ‚น

ไธป่ฆใช4ใคใฎใ‚จใƒผใ‚ธใ‚งใƒณใƒˆ่ช่จผใ‚ขใƒ—ใƒญใƒผใƒใฎๆฏ”่ผƒ๏ผš

ๆฏ”่ผƒ่ปธ 1. ้™็š„APIใ‚ญใƒผ๏ผˆๆ—งๆฅๆ–นๅผ๏ผ‰ 2. OAuth Token Exchange 3. Cedar / OPA ใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚ค 4. ๆš—ๅทDIDs / ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆID
ใ‚ฏใƒฌใƒ‡ใƒณใ‚ทใƒฃใƒซๆœ‰ๅŠนๆœŸ้–“ ๆ•ฐใƒถๆœˆใ€œๆ•ฐๅนด๏ผˆ้™็š„๏ผ‰ 5ใ€œ15ๅˆ†๏ผˆ็Ÿญๅ‘ฝ๏ผ‰ ใ‚ผใƒญ้œฒๅ‡บ๏ผˆใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚คไปฒไป‹๏ผ‰ ใ‚ปใƒƒใ‚ทใƒงใƒณ้€ฃๅ‹•ใฎ้žๅฏพ็งฐๆš—ๅท้ต
ใƒ—ใƒญใƒณใƒ—ใƒˆๆผๆดฉใƒชใ‚นใ‚ฏ ๆฅตๅคง๏ผˆใƒ—ใƒญใƒณใƒ—ใƒˆใƒป็’ฐๅขƒๅค‰ๆ•ฐๅ†…๏ผ‰ ไธญ็จ‹ๅบฆ๏ผˆใƒฉใƒณใ‚ฟใ‚คใƒ ใƒกใƒขใƒชๅ†…๏ผ‰ ใ‚ผใƒญ๏ผˆๅธฏๅŸŸๅค–ใƒžใ‚นใ‚ญใƒณใ‚ฐ๏ผ‰ ใ‚ผใƒญ๏ผˆๆš—ๅท็ฝฒๅใƒใƒฃใƒฌใƒณใ‚ธ๏ผ‰
ไบ‹ๆ•…ๆ™‚ใฎ่ขซๅฎณ็ฏ„ๅ›ฒ ใƒฏใƒผใ‚ฏใ‚นใƒšใƒผใ‚นๅ…จไฝ“ใซๆณขๅŠ ๅง”ไปปใ•ใ‚ŒใŸ็‰นๅฎšใ‚ฟใ‚นใ‚ฏใฎใฟ ๆฑบๅฎš่ซ–็š„ใƒใƒชใ‚ทใƒผใงๅŽณๆ ผๅˆถ้™ ๆคœ่จผๅฏ่ƒฝใ‚ฏใƒฌใƒ‡ใƒณใ‚ทใƒฃใƒซใซ้™ๅฎš
ๅคฑๅŠนใƒฌใ‚คใƒ†ใƒณใ‚ท ๆ‰‹ๅ‹•๏ผˆๆ•ฐๆ™‚้–“ใ€œๆ•ฐๆ—ฅ๏ผ‰ ใ‚ฟใ‚นใ‚ฏๅฎŒไบ†ๆ™‚ใซ่‡ชๅ‹•ๅคฑๅŠน ๅณๆ™‚๏ผˆใƒใƒชใ‚ทใƒผๆ›ดๆ–ฐใงๅๆ˜ ๏ผ‰ ๅณๆ™‚๏ผˆCRL / OCSPใƒชใ‚นใƒˆ๏ผ‰
ไบบ้–“ๆ‰ฟ่ชใ‚ฒใƒผใƒˆ ใชใ— ้™ๅฎš็š„๏ผˆๅ†่ช่จผใƒ—ใƒญใƒณใƒ—ใƒˆ๏ผ‰ ใƒใ‚คใƒ†ใ‚ฃใƒ–๏ผˆใƒชใ‚นใ‚ฏ้€ฃๅ‹•ๅž‹๏ผ‰ ใƒžใƒซใƒใ‚ทใ‚ฐ็ฝฒๅๆคœ่จผ
SOC2 / ISO 27001 ้ฉๅˆๆ€ง โŒ ็›ฃๆŸปไธ้ฉๅˆ โœ… ๅฎŒๅ…จ้ฉๅˆ โญ ใ‚ดใƒผใƒซใƒ‰ใ‚นใ‚ฟใƒณใƒ€ใƒผใƒ‰ โญ ๆฌกไธ–ไปฃๆจ™ๆบ–
ๅฎŸ่ฃ…้›ฃๆ˜“ๅบฆ ๆฅตๅฐ๏ผˆ1ๆ—ฅ๏ผ‰ ไธญ็จ‹ๅบฆ๏ผˆ1ใ€œ2้€ฑ้–“๏ผ‰ ไธญ็จ‹ๅบฆ๏ผˆ1ใ€œ2้€ฑ้–“๏ผ‰ ้ซ˜๏ผˆๅฐ‚้–€็š„ใชๆš—ๅท่จญ่จˆ๏ผ‰
ๆŽจๅฅจๆœฌ็•ชใƒฆใƒผใ‚นใ‚ฑใƒผใ‚น ใƒ—ใƒญใƒˆใ‚ฟใ‚คใƒ—ใƒปๆคœ่จผใฎใฟ ใƒžใƒซใƒใƒ†ใƒŠใƒณใƒˆSaaS้€ฃๆบ ไผๆฅญๅ†…ๅŸบๅนนใ‚ทใ‚นใƒ†ใƒ ่‡ชๅ‹•ๅŒ– ไผๆฅญ้–“ใ‚’่ทจใ่‡ชๅพ‹ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆ

9. ็›ฃๆŸปใƒญใ‚ฐใƒปๅฆ่ช้˜ฒๆญขใƒปSOC2/ISO้ฉๅˆๆ€ง

ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆใŒใ‚คใƒณใƒ•ใƒฉใ‚’ๅค‰ๆ›ดใ—ใŸ้š›ใ€็›ฃๆŸปไบบใฏใ€Œ่ชฐใŒ่จฑๅฏใ—ใŸใฎใ‹ใ€ใ€Œใƒฆใƒผใ‚ถใƒผใฎๆ„ๅ›ณ้€šใ‚Šใ‹ใ€ใ‚’ๆคœ่จผใ—ใพใ™ใ€‚ๅ„ใ‚ขใ‚ฏใ‚ทใƒงใƒณใฏๆš—ๅท็ฝฒๅไป˜ใใฎไธๅค‰็›ฃๆŸปใ‚จใƒณใƒ™ใƒญใƒผใƒ—ใจใ—ใฆ่จ˜้Œฒใ•ใ‚Œใพใ™๏ผš

{
  "audit_version": "2026.1",
  "timestamp": "2026-09-11T14:22:18.491Z",
  "trace_id": "trace-8f92a11b-c741",
  "actor": {
    "agent_id": "agent-swe-core-09",
    "delegated_user": "usr_998124_alice",
    "delegation_token_fingerprint": "sha256:4b912e80..."
  },
  "prompt_context_hash": "sha256:d891e4a3...",
  "intent": {
    "tool": "aws_s3_gateway",
    "action": "delete_object",
    "resource": "arn:aws:s3:::internal-backups/archive-2025.tar.gz"
  },
  "policy_evaluation": {
    "engine": "Cedar-v3",
    "verdict": "ALLOW",
    "evaluated_policies": ["policy_allow_backup_rotation_2026"]
  },
  "signature": "MEQCIG7zY8f+k7..."
}

็ฝฒๅใ•ใ‚ŒใŸใ‚จใƒณใƒ™ใƒญใƒผใƒ—ใ‚’ๆ”นใ–ใ‚“้˜ฒๆญข๏ผˆWORM: Write Once, Read Many๏ผ‰ใ‚นใƒˆใƒฌใƒผใ‚ธใซๆ›ธใ่พผใ‚€ใ“ใจใงใ€SOC2 Type IIใ€HIPAAใ€ISO 27001ๅŸบๆบ–ใ‚’ๆบ€ใŸใ—ใชใŒใ‚‰ๅฎŒๅ…จใชใƒ•ใ‚ฉใƒฌใƒณใ‚ธใƒƒใ‚ฏ่ฟฝ่ทกใŒๅฏ่ƒฝใซใชใ‚Šใพใ™ใ€‚

ใ‚ทใ‚นใƒ†ใƒ ใฎ้‹็”จๅขƒ็•Œใซๅฟœใ˜ใฆ้ฉๅˆ‡ใช่ช่จผใƒ‘ใ‚ฟใƒผใƒณใ‚’้ธๆŠžใ—ใฆใใ ใ•ใ„๏ผš

  • ใ‚จใƒณใƒ‰ใƒฆใƒผใ‚ถใƒผใฎไปฃ็†ใงๅ‹•ใใƒžใƒซใƒใƒ†ใƒŠใƒณใƒˆSaaSใ‚จใƒผใ‚ธใ‚งใƒณใƒˆ๏ผš็Ÿญๅ‘ฝใƒˆใƒผใ‚ฏใƒณใซใ‚ˆใ‚‹OAuth 2.0 Token Exchange (RFC 8693)ใ‚’ๅฐŽๅ…ฅใ€‚
  • ๆฉŸๅฏ†APIใซใ‚ขใ‚ฏใ‚ปใ‚นใ™ใ‚‹ไผๆฅญๅ†…่‡ชๅ‹•ๅŒ–ใ‚จใƒผใ‚ธใ‚งใƒณใƒˆ๏ผšใ‚ทใƒผใ‚ฏใƒฌใƒƒใƒˆใƒžใ‚นใ‚ญใƒณใ‚ฐใ‚’ๅ‚™ใˆใŸPolicy-as-Codeใ‚ฒใƒผใƒˆใ‚ฆใ‚งใ‚ค๏ผˆCedar/OPA๏ผ‰ใ‚’้…ๅ‚™ใ€‚
  • ้ซ˜ใƒชใ‚นใ‚ฏใช็ ดๅฃŠ็š„ๆ“ไฝœใ‚„้‡‘่žๅ–ๅผ•๏ผšLangGraphใ‚’ๆดป็”จใ—ใŸJust-In-Timeไบบ้–“ๆ‰ฟ่ชใ‚ฒใƒผใƒˆใ‚’่จญ็ฝฎใ€‚
  • ็”Ÿๆˆใ‚ณใƒผใƒ‰ใ‚’ๅฎŸ่กŒใ™ใ‚‹ใ‚ณใƒผใƒ‡ใ‚ฃใƒณใ‚ฐใ‚จใƒผใ‚ธใ‚งใƒณใƒˆ๏ผšE2B MicroVM Sandboxๅ†…ใงๅฎ‰ๅ…จใซ้š”้›ขๅฎŸ่กŒใ€‚
ุงู„ุฃู…ุงู† ูˆุงู„ุชุญูƒู… ุจุงู„ุตู„ุงุญูŠุงุช (IAM) ุฏู„ูŠู„ ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุชู‚ู†ูŠุฉ ุณุจุชู…ุจุฑ 2026 ยท 16 ุฏู‚ูŠู‚ุฉ ู‚ุฑุงุกุฉ

ุงู„ู…ุตุงุฏู‚ุฉ ูˆุฅุฏุงุฑุฉ ุงู„ุตู„ุงุญูŠุงุช ุงู„ุฏู†ูŠุง (Least-Privilege IAM) ู„ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ููŠ 2026: ุชุฃู…ูŠู† ุจุฑูˆุชูˆูƒูˆู„ MCP ูˆุจูŠุงู†ุงุช ุงุนุชู…ุงุฏ ุงู„ุฃุฏูˆุงุช ูˆุชููˆูŠุถ ุงู„ุฑู…ูˆุฒ

ููŠ ุนุงู… 2026ุŒ ุจุงุช ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ูŠู†ูุฐูˆู† ุงู„ุฃูƒูˆุงุฏ ุงู„ุจุฑู…ุฌูŠุฉ ูˆูŠุณุชุนู„ู…ูˆู† ู‚ูˆุงุนุฏ ุงู„ุจูŠุงู†ุงุช ุงู„ุฅู†ุชุงุฌูŠุฉ ูˆูŠุทู„ู‚ูˆู† ุนู…ู„ูŠุงุช ุงู„ู†ุดุฑ ุงู„ุณุญุงุจูŠ ุฐุงุชูŠุงู‹. ูˆู…ุน ุฐู„ูƒุŒ ู„ุง ุชุฒุงู„ ู…ุนุธู… ุงู„ุจู†ู‰ ุงู„ู…ุคุณุณูŠุฉ ุชุนุชู…ุฏ ุนู„ู‰ ู…ูุงุชูŠุญ API ุซุงุจุชุฉ ุฐุงุช ุตู„ุงุญูŠุงุช ูƒุงู…ู„ุฉุŒ ู…ู…ุง ูŠุนุฑุถ ุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ู„ู‡ุฌู…ุงุช ุญู‚ู† ุงู„ุชุนู„ูŠู…ุงุช ุบูŠุฑ ุงู„ู…ุจุงุดุฑุฉ (Indirect Prompt Injection). ูŠุณุชุนุฑุถ ู‡ุฐุง ุงู„ุฏู„ูŠู„ ุงู„ู…ุนู…ุงุฑูŠ ุฃุณุณ ุชููˆูŠุถ Zero-Trust ูˆุชุจุงุฏู„ ุฑู…ูˆุฒ OAuth 2.0 (RFC 8693) ูˆุจูˆุงุจุงุช ุงู„ุณูŠุงุณุฉ ุงู„ุจุฑู…ุฌูŠุฉ (Policy-as-Code).

ูู‡ุฑุณ ุงู„ู…ุญุชูˆูŠุงุช

1. ู…ู„ุฎุต ุณุฑูŠุน ูˆุงู„ู…ุจุงุฏุฆ ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุฃุณุงุณูŠุฉ

๐Ÿ’ก ู…ู„ุงุญุธุฉ ู…ุนู…ุงุฑูŠุฉ:
  • ู„ุง ุชู…ุฑุฑ ุฃุจุฏุงู‹ ุฑู…ูˆุฒ Bearer ุงู„ุตุฑูŠุญุฉ ุฅู„ู‰ ู†ุงูุฐุฉ ุณูŠุงู‚ ุงู„ุชูˆุฌูŠู‡ (Prompt) ู„ู†ู…ูˆุฐุฌ LLM. ูŠุฌุจ ุฃู† ูŠุชุนุงู…ู„ ุงู„ูˆูƒูŠู„ ูู‚ุท ู…ุน ู…ุฑุงุฌุน ุชุฌุฑูŠุฏูŠุฉ ู„ู„ู‚ุฏุฑุงุชุ› ูˆูŠุฌุจ ุฃู† ุชุชู… ุงู„ู…ุตุงุฏู‚ุฉ ูˆุญู‚ู† ุจูŠุงู†ุงุช ุงู„ุงุนุชู…ุงุฏ ููŠ ู†ุทุงู‚ ู…ุนุฒูˆู„ ุฎุงุฑุฌ ุจูŠุฆุฉ ุงู„ู†ู…ูˆุฐุฌ ุนุจุฑ ุจูˆุงุจุฉ ูˆุณูŠุทุฉ (Tool Broker Gateway).
  • ุงุนุชู…ุฏ ู…ุนูŠุงุฑ ุชุจุงุฏู„ ุฑู…ูˆุฒ OAuth 2.0 (RFC 8693) ู„ู„ุชููˆูŠุถ. ุจุฏู„ุงู‹ ู…ู† ุชุฒูˆูŠุฏ ุงู„ูˆูƒูŠู„ ุจู…ูุงุชูŠุญ ูˆุตูˆู„ ุซุงุจุชุฉุŒ ู‚ู… ุจุชุจุงุฏู„ ุฑู…ุฒ ูˆุตูˆู„ ุงู„ู…ุณุชุฎุฏู… ุจุฑู…ุฒ ุชููˆูŠุถ ู…ุคู‚ุช ุนุงุจุฑ ุฐูŠ ู†ุทุงู‚ ุตู„ุงุญูŠุงุช ู…ู‚ู„ุต ูˆุตู„ุงุญูŠุฉ ุฒู…ู†ูŠุฉ ุตุงุฑู…ุฉ (ุฃู‚ู„ ู…ู† 15 ุฏู‚ูŠู‚ุฉ).
  • ุงูุฑุถ ุงู„ุณูŠุงุณุฉ ูƒูƒูˆุฏ (Cedar ุฃูˆ OPA) ู‚ุจู„ ุงู„ุชู†ููŠุฐ. ุงู„ุชุนู„ูŠู…ุงุช ุงู„ู†ุตูŠุฉ ุจุงู„ู„ุบุฉ ุงู„ุทุจูŠุนูŠุฉ ("ูŠุฑุฌู‰ ุนุฏู… ุญุฐู ุงู„ุฌุฏุงูˆู„ ุงู„ุฅู†ุชุงุฌูŠุฉ") ู‡ูŠ ุฅุฑุดุงุฏุงุช ู‚ุงุจู„ุฉ ู„ู„ูƒุณุฑ ุนุจุฑ ู‡ุฌู…ุงุช ุงู„ุญู‚ู†. ูŠุฌุจ ุฃู† ุชูƒูˆู† ู‚ุฑุงุฑุงุช ุงู„ู…ู†ุญ ู‚ุทุนูŠุฉ ูˆุญุชู…ูŠุฉ ุฎุงุฑุฌ ุงู„ู†ู…ูˆุฐุฌ ุชู…ุงู…ุงู‹.
  • ูุนู‘ู„ ุจูˆุงุจุงุช ุงู„ู…ูˆุงูู‚ุฉ ุงู„ุจุดุฑูŠุฉ ุงู„ููˆุฑูŠุฉ (Just-In-Time Approval Gates) ู„ู„ุนู…ู„ูŠุงุช ุนุงู„ูŠุฉ ุงู„ู…ุฎุงุทุฑ ู…ุซู„ ุชุนุฏูŠู„ ู‡ูŠุงูƒู„ ู‚ูˆุงุนุฏ ุงู„ุจูŠุงู†ุงุชุŒ ุฃูˆ ุงู„ุฅุฑุณุงู„ ุงู„ู…ุจุงุดุฑ ู„ู„ูุฑูˆุน ุงู„ุฑุฆูŠุณูŠุฉ (Main)ุŒ ุฃูˆ ุงู„ู…ุนุงู…ู„ุงุช ุงู„ู…ุงู„ูŠุฉ.

ููŠ ุนุงู… 2026ุŒ ุชุญูˆู„ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ู…ู† ุฃุฏูˆุงุช ุฅูƒู…ุงู„ ุชู„ู‚ุงุฆูŠ ุจุณูŠุทุฉ ุฅู„ู‰ ุนู…ุงู„ ุฑู‚ู…ูŠูŠู† ู…ุณุชู‚ู„ูŠู†. ูˆุณูˆุงุก ูƒุงู† ุฐู„ูƒ ู„ุญู„ ุงู„ู…ุดูƒู„ุงุช ุงู„ุจุฑู…ุฌูŠุฉ ุนุจุฑ OpenHandsุŒ ุฃูˆ ุงู„ุชูุงุนู„ ู…ุน ุงู„ุณุญุงุจุฉ ุนุจุฑ Model Context Protocol (MCP)ุŒ ุฃูˆ ุชู†ููŠุฐ ู†ุตูˆุต ุจุฑู…ุฌูŠุฉ ููŠ ุจูŠุฆุฉ E2B SandboxุŒ ุชุชุทู„ุจ ู‡ุฐู‡ ุงู„ุฃู†ุธู…ุฉ ูˆุตูˆู„ุงู‹ ู…ูˆุซู‚ุงู‹ ูˆู…ุญูƒู…ุงู‹ ู„ู„ุจูŠุงู†ุงุช ุงู„ู…ุคุณุณูŠุฉ.

2. ุฃุฒู…ุฉ ู‡ูˆูŠุฉ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ุงู„ู…ุณุชู‚ู„ูŠู†

ุชู… ุชุตู…ูŠู… ุฃู†ุธู…ุฉ ุฅุฏุงุฑุฉ ุงู„ู‡ูˆูŠุฉ ูˆุงู„ูˆุตูˆู„ (IAM) ุงู„ุชู‚ู„ูŠุฏูŠุฉ ุญูˆู„ ุตู†ููŠู† ูู‚ุท: ุงู„ู…ุณุชุฎุฏู…ูŠู† ุงู„ุจุดุฑูŠูŠู† (ุงู„ู…ูˆุซู‚ูŠู† ุนุจุฑ MFA/SSO) ูˆุงู„ุฎุฏู…ุงุช ุงู„ุฎู„ููŠุฉ ุงู„ุญุชู…ูŠุฉ (ุงู„ู…ูˆุซู‚ุฉ ุนุจุฑ ุดู‡ุงุฏุงุช mTLS ุฃูˆ ุญุณุงุจุงุช ุงู„ุฎุฏู…ุฉ). ูˆูŠูƒุณุฑ ุงู„ูˆูƒูŠู„ ุงู„ุฐูƒูŠ ูƒู„ุง ุงู„ุตู†ููŠู† ุชู…ุงู…ุงู‹:

ุงุณุชุฏุนุงุก ุงู„ุฎุฏู…ุงุช ุงู„ุชู‚ู„ูŠุฏูŠ:
[ุฎุฏู…ุฉ ุฃ ุญุชู…ูŠุฉ] โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ ุทู„ุจ API ู…ุญุฏุฏ ู…ุณุจู‚ุงู‹ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ [ุฎุฏู…ุฉ ุจ ู…ุญู…ูŠุฉ]

ุงุณุชุฏุนุงุก ุงู„ูˆูƒู„ุงุก ุงู„ุฃุฐูƒูŠุงุก ุงู„ู…ุณุชู‚ู„ูŠู†:
[ู…ุณุชุฎุฏู… ุจุดุฑูŠ] โ”€โ”€โ–ถ [ู…ู†ุณู‚ ูˆูƒูŠู„ LLM] โ”€โ”€โ–ถ [ุญู„ู‚ุฉ ุชููƒูŠุฑ ูˆุงุณุชุฏู„ุงู„ ุบูŠุฑ ุญุชู…ูŠุฉ]
                          โ”‚
          (ู‚ุฑุงุกุฉ ุจูŠุงู†ุงุช ูˆูŠุจ ุบูŠุฑ ู…ูˆุซูˆู‚ุฉ / ูƒูˆุฏ ุทู„ุจ ุณุญุจ ุฎุจูŠุซ)
                          โ”‚
                          โ–ผ
          [ู‡ุฌูˆู… ุญู‚ู† ุงู„ุชุนู„ูŠู…ุงุช ุบูŠุฑ ุงู„ู…ุจุงุดุฑ]
                          โ”‚
                          โ–ผ
            [ู…ุญุงูˆู„ุฉ ุชู†ููŠุฐ ุฃุฏูˆุงุช ุบูŠุฑ ู…ุตุฑุญ ุจู‡ุงุŸ]

ุนู†ุฏู…ุง ูŠุนู…ู„ ุงู„ูˆูƒูŠู„ ุฐุงุชูŠุงู‹ุŒ ูุฅู†ู‡ ูŠุชุตุฑู ูƒู€ ู…ููˆุถ ูˆุณูŠุท (Intermediate Delegate)ุ› ูู‡ูˆ ูŠู…ุซู„ ุงู„ู…ุณุชุฎุฏู… ู„ูƒู†ู‡ ูŠุณุชูƒุดู ู…ุณุงุฑุงุช ู‚ุฑุงุฑ ุบูŠุฑ ู…ุชูˆู‚ุนุฉ ุนุจุฑ ุฃุฏูˆุงุช ู…ุชุนุฏุฏุฉ. ูˆุฅุฐุง ุงุฑุชุจุทุช ู‡ูˆูŠุชู‡ ุจุญุณุงุจ ุฎุฏู…ุฉ ูŠุชู…ุชุน ุจุตู„ุงุญูŠุงุช ูƒุงู…ู„ุฉุŒ ูุฅู† ุฃูŠ ุญู‚ู† ุชุนู„ูŠู…ุงุช ูŠุญูˆู„ู‡ ุฅู„ู‰ ู†ุงุฆุจ ู…ุฎุฏูˆุน (Confused Deputy) ูŠุนุจุซ ุจุงู„ุฃู†ุธู…ุฉ ุงู„ุญูŠูˆูŠุฉ.

3. ูุดู„ ู…ูุงุชูŠุญ API ุงู„ุซุงุจุชุฉ ูˆุงู„ุฑู…ูˆุฒ ุงู„ุชู‚ู„ูŠุฏูŠุฉ

ูŠุคุฏูŠ ุงู„ุงุนุชู…ุงุฏ ุนู„ู‰ ุญู‚ู† ู…ูุงุชูŠุญ API ุงู„ุซุงุจุชุฉ ุฏุงุฎู„ ู…ุชุบูŠุฑุงุช ุจูŠุฆุฉ ุงู„ุญุงูˆูŠุงุช ุฅู„ู‰ ุฃุฑุจุน ุซุบุฑุงุช ู…ุนู…ุงุฑูŠุฉ ู‚ุงุชู„ุฉ ููŠ ุจูŠุฆุงุช ุงู„ุฅู†ุชุงุฌ:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ู†ุทุงู‚ ุงู„ุฎุทุฑ ุงู„ูƒุงุฑุซูŠ ู„ู„ุจูŠุงู†ุงุช ุงู„ุซุงุจุชุฉ ุงู„ู…ู…ู†ูˆุญุฉ ู„ู„ูˆูƒู„ุงุก                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 1. ุงู†ุนุฏุงู… ุงู„ูˆุนูŠ ุจุงู„ุณูŠุงู‚: ู„ุง ูŠู…ูŠุฒ ู…ูุชุงุญ GitHub PAT ุงู„ุซุงุจุช ุจูŠู† ุฅุตู„ุงุญ ุฎุทุฃ ู…ุทุจุนูŠ ููŠ ูˆุซูŠู‚ุฉ   โ”‚
โ”‚    ูˆุจูŠู† ุฅุฑุณุงู„ ุฏูุน ุฅุฌุจุงุฑูŠ ู…ุฏู…ุฑ ู„ูุฑุน main ุงู„ุฑุฆูŠุณูŠ.                                       โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 2. ุงู„ุตู„ุงุญูŠุฉ ุงู„ู„ุงู†ู‡ุงุฆูŠุฉ: ุชุธู„ ุงู„ู…ูุงุชูŠุญ ุณุงุฑูŠุฉ ุญุชู‰ ุชุฏูˆูŠุฑู‡ุง ูŠุฏูˆูŠุงู‹ุŒ ูˆุชุธู„ ุงู„ุฑู…ูˆุฒ ุงู„ู…ุณุฑุจุฉ     โ”‚
โ”‚    ู…ุฌู‡ูˆู„ุฉ ู„ุดู‡ูˆุฑ ุฏุงุฎู„ ุณุฌู„ุงุช ุงู„ูˆูƒู„ุงุก.                                                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 3. ู†ุทุงู‚ ุงู„ุตู„ุงุญูŠุงุช ุงู„ุดุงู…ู„ (All-or-Nothing): ุชูุชู‚ุฑ ุฃุบู„ุจ ูˆุงุฌู‡ุงุช SaaS ู„ุตู„ุงุญูŠุงุช ุชุฏู‚ูŠู‚ ุฏู‚ูŠู‚ุฉุŒโ”‚
โ”‚    ูู…ู†ุญ ุงู„ูˆูƒูŠู„ ุญู‚ ุงู„ุชุนู„ูŠู‚ ููŠ Jira ู‚ุฏ ูŠู…ู†ุญู‡ ุถู…ู†ุงู‹ ุตู„ุงุญูŠุฉ ุญุฐู ู…ุดุงุฑูŠุน ุงู„ู…ุคุณุณุฉ ุจุฃูƒู…ู„ู‡ุง.   โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ 4. ู‚ุงุจู„ูŠุฉ ุงู„ุชุณุฑูŠุจ ู…ู† ุงู„ุณูŠุงู‚: ุจู…ุฌุฑุฏ ุฏุฎูˆู„ ุงู„ุฑู…ุฒ ุฅู„ู‰ ุณูŠุงู‚ ุงู„ู†ู…ูˆุฐุฌุŒ ูŠุตุจุญ ู‚ุงุจู„ุงู‹ ู„ู„ุงุณุชุฎุฑุงุฌ โ”‚
โ”‚    ุนุจุฑ ุชู‚ู†ูŠุงุช ุฅุนุงุฏุฉ ุจู†ุงุก ุงู„ุชูˆุฌูŠู‡ ูˆุงู„ูƒุณุฑ ุงู„ุฃู…ู†ูŠ.                                        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โš ๏ธ ู…ุจุฏุฃ ุฃู…ุงู† Zero-Trust ุงู„ุฌูˆู‡ุฑูŠ:

ุฃูŠ ุณุฑ ุญุณุงุณ ุฃูˆ ุฑู…ุฒ Bearer ูŠุฏุฎู„ ุฅู„ู‰ ู†ุงูุฐุฉ ุณูŠุงู‚ ู†ู…ูˆุฐุฌ ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ูŠุฌุจ ุงุนุชุจุงุฑู‡ ู…ุฎุชุฑู‚ุงู‹ ููŠ ุงู„ุญุงู„. ูŠุฌุจ ุฃู† ุชุจู‚ู‰ ุจูŠุงู†ุงุช ุงู„ุงุนุชู…ุงุฏ ุญุตุฑูŠุงู‹ ุฏุงุฎู„ ุงู„ุฐุงูƒุฑุฉ ุงู„ุขู…ู†ุฉ ู„ุจูˆุงุจุงุช ุงู„ุนุฒู„ ุงู„ุฎุงุฑุฌูŠุฉ.

4. ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุญุฏูŠุซุฉ: ุชุจุงุฏู„ ุงู„ุฑู…ูˆุฒ ุนุจุฑ OAuth 2.0 (RFC 8693)

ู„ุชุญู‚ูŠู‚ ุงู„ุชููˆูŠุถ ุงู„ุขู…ู†ุŒ ุชุณุชุฎุฏู… ุงู„ุฃู†ุธู…ุฉ ุงู„ุญุฏูŠุซุฉ ู…ุนูŠุงุฑ OAuth 2.0 Token Exchange (RFC 8693). ุนู†ุฏ ุชูƒู„ูŠู ุงู„ูˆูƒูŠู„ ุจู…ู‡ู…ุฉุŒ ูŠุชู… ุชุจุงุฏู„ ุฑู…ุฒ ุงู„ู…ุณุชุฎุฏู… ุจุฑู…ุฒ ุชููˆูŠุถ ู…ุคู‚ุช ุฐูŠ ุตู„ุงุญูŠุงุช ู…ุญุฏูˆุฏุฉ ุจุฏู‚ุฉ:

 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”            1. ุจุฏุก ุงู„ู…ู‡ู…ุฉ ("ุชุญู„ูŠู„ ุชู‚ุฑูŠุฑ ุฃุฑุจุงุญ ุงู„ุฑุจุน ุงู„ุซุงู„ุซ")
 โ”‚ ุงู„ู…ุณุชุฎุฏู… โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                                         โ”‚
      โ”‚                                                               โ–ผ
      โ”‚ 2. ุฑู…ุฒ OAuth ุงู„ุฃุณุงุณูŠ                                โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
      โ”‚    (Subject Token: ู‡ูˆูŠุฉ ุงู„ู…ุณุชุฎุฏู…)                   โ”‚   ู†ูˆุงุฉ ุงู„ูˆูƒูŠู„      โ”‚
      โ–ผ                                                     โ”‚    (ุงู„ู…ู†ุณู‚)        โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                            โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ ู…ุฒูˆุฏ ุงู„ู‡ูˆูŠุฉ  โ”‚                                                      โ”‚
โ”‚ ุงู„ู…ุคุณุณูŠ      โ”‚โ—€โ”€โ”€โ”€ 3. ุทู„ุจ ุชุจุงุฏู„ ุงู„ุฑู…ูˆุฒ RFC 8693 โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”‚ (Okta/Auth0) โ”‚     - Subject Token: ุฑู…ุฒ ูˆุตูˆู„ ุงู„ู…ุณุชุฎุฏู…
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     - Actor Token: ู‡ูˆูŠุฉ ุฎุฏู…ุฉ ุงู„ูˆูƒูŠู„
       โ”‚             - ุงู„ู†ุทุงู‚ ุงู„ู…ุทู„ูˆุจ: ["finance.reports:read"]
       โ”‚             - ุงู„ุตู„ุงุญูŠุฉ ุงู„ุฒู…ู†ูŠุฉ: 300 ุซุงู†ูŠุฉ
       โ–ผ
 4. ุฅุตุฏุงุฑ ุฑู…ุฒ ู…ุคู‚ุช ู…ู‚ู„ุต ุงู„ุตู„ุงุญูŠุงุช
       โ”‚
       โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚               ุจูˆุงุจุฉ ูˆุณูŠุท ุงู„ุฃุฏูˆุงุช (Tool Broker)         โ”‚
โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚ โ”‚ ู…ุญุฑูƒ ุงู„ุณูŠุงุณุงุช Cedar  โ”‚โ”€โ”€โ”€โ”€โ”€โ–ถโ”‚ ุญุงู‚ู† ุจูŠุงู†ุงุช ุงู„ุงุนุชู…ุงุฏ โ”‚ โ”‚
โ”‚ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                           โ”‚
                                           โ”‚ 5. ุงุณุชุฏุนุงุก ุงู„ุฃุฏุงุฉ ุงู„ู…ูˆุซู‚
                                           โ–ผ
                                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                 โ”‚ ูˆุงุฌู‡ุฉ API / MCP   โ”‚
                                 โ”‚ (ุตู„ุงุญูŠุฉ ู‚ุฑุงุกุฉ ูู‚ุท)โ”‚
                                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

ู…ู† ุฎู„ุงู„ ุชูˆู„ูŠุฏ ุฑู…ูˆุฒ ู…ุฑูƒุจุฉ ุชุฑุจุท ู‡ูˆูŠุฉ ุงู„ู…ุณุชุฎุฏู… ุงู„ู…ุณุชุฏุนูŠ (sub) ุจู‡ูˆูŠุฉ ุงู„ูˆูƒูŠู„ ุงู„ู…ู†ูุฐ (act)ุŒ ุชุญุงูุธ ูุฑู‚ ุงู„ุฃู…ุงู† ุนู„ู‰ ุณู„ุณู„ุฉ ุชุฏู‚ูŠู‚ ุบูŠุฑ ู‚ุงุจู„ุฉ ู„ู„ุชุฒูˆูŠุฑ ุชู†ุชู‡ูŠ ุตู„ุงุญูŠุชู‡ุง ุขู„ูŠุงู‹ ุจุนุฏ ุฏู‚ุงุฆู‚ ู…ุนุฏูˆุฏุฉ.

5. ุชุฃู…ูŠู† ุจุฑูˆุชูˆูƒูˆู„ ุณูŠุงู‚ ุงู„ู†ู…ูˆุฐุฌ (Model Context Protocol)

ูŠู…ุซู„ ุจุฑูˆุชูˆูƒูˆู„ MCP ุงู„ู…ุนูŠุงุฑ ุงู„ู…ูุชูˆุญ ู„ุงุณุชุฏุนุงุก ุงู„ุฃุฏูˆุงุช ุจูˆุงุณุทุฉ ุงู„ูˆูƒู„ุงุกุŒ ุฅู„ุง ุฃู† ุญู…ุงูŠุชู‡ ููŠ ุงู„ุฅู†ุชุงุฌ ุชุชุทู„ุจ ุซู„ุงุซุฉ ุถูˆุงุจุท ุฑุฆูŠุณูŠุฉ:

  • ุชุตุฑูŠุญ ุงู„ู‚ุฏุฑุงุช ุฏู‚ูŠู‚ ุงู„ุชุฎุตูŠุต: ุชูˆููŠุฑ ุฃุฏูˆุงุช ู…ุญุฏุฏุฉ ุงู„ูˆุธูŠูุฉ ุจุฏู‚ุฉ (ู…ุซู„ github.issue.add_comment) ุจุฏู„ุงู‹ ู…ู† ุชูˆููŠุฑ ู…ูˆุฌู‡ุงุช ุฃูˆุงู…ุฑ ุนุงู…ุฉ (system.exec_bash).
  • ุญุฌุจ ุงู„ุฃุณุฑุงุฑ ุฎุงุฑุฌ ุงู„ู†ุทุงู‚: ุชู…ุฑูŠุฑ ู…ุฑุงุฌุน ุชุฌุฑูŠุฏูŠุฉ (ู…ุซู„ vault://creds/staging_db) ู„ู„ูˆูƒูŠู„ุŒ ูˆูŠุชูˆู„ู‰ ูˆุณูŠุท ุงู„ุฃุฏูˆุงุช ุญู‚ู† ุจูŠุงู†ุงุช ุงู„ุงุนุชู…ุงุฏ ุงู„ุญู‚ูŠู‚ูŠุฉ ุนุจุฑ ุงุชุตุงู„ TLS ุฏุงุฎู„ูŠ ู…ุดูุฑ.
  • ุจูˆุงุจุงุช ุงู„ุชุญู‚ู‚ ุงู„ุจุดุฑูŠ ุงู„ู„ุญุธูŠุฉ: ุชุนู„ูŠู‚ ุงู„ุชู†ููŠุฐ ูˆุทู„ุจ ู…ูˆุงูู‚ุฉ ู…ุดุฑูุฉ ููˆุฑูŠุฉ ู‚ุจู„ ุชู†ููŠุฐ ุงู„ุนู…ู„ูŠุงุช ุงู„ุญุณุงุณุฉ (ุญุฐู ู‚ูˆุงุนุฏ ุงู„ุจูŠุงู†ุงุชุŒ ุชุญูˆูŠู„ ุงู„ุฃู…ูˆุงู„ุŒ ุฃูˆ ุงู„ู†ุดุฑ ู„ู„ุฅู†ุชุงุฌ).

6. ุงู„ุณูŠุงุณุฉ ูƒูƒูˆุฏ ุจุฑู…ุฌูŠ ู„ู„ูˆูƒู„ุงุก: AWS Cedar ูˆ Open Policy Agent

ุชูุดู„ ุงู„ุชูˆุฌูŠู‡ุงุช ุงู„ู„ูุธูŠุฉ ููŠ ุญู…ุงูŠุฉ ุงู„ูˆูƒู„ุงุก ุฃู…ุงู… ู‡ุฌู…ุงุช ุงู„ุชุฌุงูˆุฒ. ูŠุฌุจ ุชู‚ูŠูŠู… ู‚ุฑุงุฑุงุช ุงู„ู…ู†ุญ ุญุชู…ูŠุงู‹ ุจูˆุงุณุทุฉ ู…ุญุฑูƒุงุช ุณูŠุงุณุงุช ู…ุซู„ AWS Cedar ุฃูˆ OPA:

// ู…ุซุงู„ ุณูŠุงุณุฉ AWS Cedar ู„ูˆูƒูŠู„ ุจุฑู…ุฌุฉ ุฐุงุชูŠ

// 1. ุงู„ุณู…ุงุญ ุจุงู„ู‚ุฑุงุกุฉ ูˆุงู„ุงุฎุชุจุงุฑ ููŠ ุงู„ู…ุณุชูˆุฏุนุงุช ุงู„ู…ุฎุตุตุฉ
permit (
    principal in Role::"CodingAgent",
    action in [Action::"clone_repo", Action::"read_file", Action::"run_tests"],
    resource in Repository::"Engineering"
);

// 2. ุงู„ุณู…ุงุญ ุจุฅู†ุดุงุก ุงู„ูุฑูˆุน ูˆุทู„ุจุงุช ุงู„ุณุญุจ ูู‚ุท ุนู†ุฏ ูˆุฌูˆุฏ ุชุฐูƒุฑุฉ Jira ุตุงู„ุญุฉ
permit (
    principal in Role::"CodingAgent",
    action in [Action::"create_branch", Action::"open_pull_request"],
    resource in Repository::"Engineering"
)
when {
    context.has_valid_jira_ticket == true &&
    context.ticket_assignee == principal.delegated_user
};

// 3. ุญุธุฑ ู…ุทู„ู‚: ู…ู†ุน ุงู„ุฏูุน ุงู„ู…ุจุงุดุฑ ู„ู„ูุฑูˆุน ุงู„ู…ุญู…ูŠุฉ ู…ู†ุนุงู‹ ุจุงุชุงู‹
forbid (
    principal,
    action in [Action::"git_push_direct", Action::"delete_repository"],
    resource
)
when {
    resource.branch in ["main", "master", "release/*"]
};

ูŠู‚ูŠู… ูˆุณูŠุท ุงู„ุฃุฏูˆุงุช ุณูŠุงุณุงุช Cedar ููŠ ุฃู‚ู„ ู…ู† 2 ู…ู„ู„ูŠ ุซุงู†ูŠุฉุŒ ู…ู…ุง ูŠู…ู†ุน ุงู„ุทู„ุจุงุช ุบูŠุฑ ุงู„ู…ุตุฑุญ ุจู‡ุง ู‚ุจู„ ุฅุฑุณุงู„ ุฃูŠ ุญุฒู…ุฉ ุจูŠุงู†ุงุช ุนุจุฑ ุงู„ุดุจูƒุฉ.

7. ุจู†ุงุก ุจูˆุงุจุฉ Zero-Trust ุจู„ุบุฉ ุจุงูŠุซูˆู†

ูŠูˆุถุญ ุงู„ูƒูˆุฏ ุงู„ุชุงู„ูŠ ุจู„ุบุฉ ุจุงูŠุซูˆู† ูƒูŠููŠุฉ ุจู†ุงุก ุจูˆุงุจุฉ ู„ู„ุชุญู‚ู‚ ู…ู† ู†ูŠุฉ ุงุณุชุฏุนุงุก ุงู„ุฃุฏุงุฉุŒ ูˆุญุฌุจ ุงู„ุฃุณุฑุงุฑ ุนู† ุงู„ู†ู…ูˆุฐุฌุŒ ูˆุชูˆู„ูŠุฏ ุจุตู…ุฉ ุชุฏู‚ูŠู‚ ุบูŠุฑ ู‚ุงุจู„ุฉ ู„ู„ุชุฒูˆูŠุฑ:

"""
Zero-Trust Agent Authorization Gateway
Ecosystem: Python 3.11+, Pydantic v2, Cryptographic Audit Trails
"""

import time
import hmac
import hashlib
import json
from enum import Enum
from typing import Dict, Any, Optional
from pydantic import BaseModel, Field

class ActionRiskLevel(str, Enum):
    LOW = "low"            # ุนู…ู„ูŠุงุช ู‚ุฑุงุกุฉ ูˆุจุญุซ ุขู…ู†ุฉ
    MEDIUM = "medium"      # ุฅู†ุดุงุก ู…ุณูˆุฏุงุชุŒ ูุชุญ ุทู„ุจุงุช ุณุญุจ
    CRITICAL = "critical"  # ูƒุชุงุจุฉ ุจุงู„ุฅู†ุชุงุฌุŒ ุญุฐู ุจูŠุงู†ุงุชุŒ ู…ุนุงู…ู„ุงุช ู…ุงู„ูŠุฉ

class ToolCallIntent(BaseModel):
    tool_name: str
    target_resource: str
    action: str
    arguments: Dict[str, Any]
    risk_level: ActionRiskLevel

class AgentContext(BaseModel):
    agent_id: str
    delegated_user_id: str
    session_id: str
    assigned_scopes: list[str]

class AuthorizationDecision(BaseModel):
    is_authorized: bool
    requires_human_approval: bool
    audit_token: str
    reason: Optional[str] = None

class AgentZeroTrustGateway:
    """
    ุจูˆุงุจุฉ ูˆุณูŠุทุฉ ู„ุฌู…ูŠุน ุงุณุชุฏุนุงุกุงุช ุงู„ุฃุฏูˆุงุช.
    ุชูุฑุถ ุชู‚ูŠูŠู… ุงู„ุณูŠุงุณุงุชุŒ ูˆุญู‚ู† ุงู„ุจูŠุงู†ุงุช ุฎุงุฑุฌ ุงู„ู†ุทุงู‚ุŒ ูˆุณุฌู„ุงุช ุชุฏู‚ูŠู‚ ุบูŠุฑ ู‚ุงุจู„ุฉ ู„ู„ุชุบูŠูŠุฑ.
    """
    def __init__(self, secret_key: str):
        self._signing_key = secret_key.encode("utf-8")
        self._policy_rules = {
            "github.read": ActionRiskLevel.LOW,
            "github.create_pr": ActionRiskLevel.MEDIUM,
            "database.execute_select": ActionRiskLevel.LOW,
            "database.drop_table": ActionRiskLevel.CRITICAL,
            "kubernetes.delete_pod": ActionRiskLevel.CRITICAL
        }

    def evaluate_tool_intent(
        self, 
        agent_ctx: AgentContext, 
        intent: ToolCallIntent
    ) -> AuthorizationDecision:
        required_scope = f"{intent.tool_name}:{intent.action}"
        if required_scope not in agent_ctx.assigned_scopes and "*:*" not in agent_ctx.assigned_scopes:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=False,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "REJECTED_SCOPE"),
                reason=f"ุงู„ูˆูƒูŠู„ ูŠูุชู‚ุฑ ุฅู„ู‰ ู†ุทุงู‚ ุงู„ุตู„ุงุญูŠุฉ ุงู„ู…ุทู„ูˆุจ: {required_scope}"
            )

        if intent.risk_level == ActionRiskLevel.CRITICAL:
            return AuthorizationDecision(
                is_authorized=False,
                requires_human_approval=True,
                audit_token=self._generate_audit_hash(agent_ctx, intent, "PENDING_HUMAN_APPROVAL"),
                reason="ุนู…ู„ูŠุฉ ุญุฑุฌุฉ ุชุชุทู„ุจ ุชุฃูƒูŠุฏุงู‹ ูˆู…ูˆุงูู‚ุฉ ุจุดุฑูŠุฉ ู…ุณุจู‚ุฉ."
            )

        return AuthorizationDecision(
            is_authorized=True,
            requires_human_approval=False,
            audit_token=self._generate_audit_hash(agent_ctx, intent, "AUTHORIZED"),
            reason=None
        )

    def execute_with_isolated_credentials(
        self,
        agent_ctx: AgentContext,
        intent: ToolCallIntent,
        decision: AuthorizationDecision
    ) -> Dict[str, Any]:
        if not decision.is_authorized:
            raise PermissionError(f"ุชู… ุญุธุฑ ุงู„ุชู†ููŠุฐ: {decision.reason}")

        ephemeral_token = self._mint_ephemeral_token(agent_ctx, intent)
        execution_result = self._dispatch_to_tool(intent, ephemeral_token)

        return {
            "status": "success",
            "audit_hash": decision.audit_token,
            "data": execution_result
        }

    def _generate_audit_hash(self, ctx: AgentContext, intent: ToolCallIntent, status: str) -> str:
        payload = f"{ctx.agent_id}:{ctx.delegated_user_id}:{intent.tool_name}:{status}:{time.time()}"
        return hmac.new(self._signing_key, payload.encode("utf-8"), hashlib.sha256).hexdigest()

    def _mint_ephemeral_token(self, ctx: AgentContext, intent: ToolCallIntent) -> str:
        return f"ephemeral_jwt_sub_{ctx.delegated_user_id}_act_{ctx.agent_id}_exp_{int(time.time()) + 300}"

    def _dispatch_to_tool(self, intent: ToolCallIntent, token: str) -> Dict[str, Any]:
        return {"records_affected": 1, "executed_action": intent.action}

8. ู…ุตููˆูุฉ ุงู„ู…ู‚ุงุฑู†ุฉ ุงู„ู…ุนู…ุงุฑูŠุฉ ุงู„ุดุงู…ู„ุฉ

ู…ู‚ุงุฑู†ุฉ ุจูŠู† 4 ู†ู…ุงุฐุฌ ู„ู…ุตุงุฏู‚ุฉ ูˆุชููˆูŠุถ ูˆูƒู„ุงุก ุงู„ุฐูƒุงุก ุงู„ุงุตุทู†ุงุนูŠ ููŠ ุจูŠุฆุงุช ุงู„ู…ุคุณุณุงุช:

ุงู„ุจุนุฏ ุงู„ู…ุนู…ุงุฑูŠ 1. ุงู„ู…ูุงุชูŠุญ ุงู„ุซุงุจุชุฉ (ุงู„ุชู‚ู„ูŠุฏูŠุฉ) 2. ุชุจุงุฏู„ ุงู„ุฑู…ูˆุฒ (RFC 8693) 3. ุจูˆุงุจุฉ Cedar / OPA 4. ุงู„ู‡ูˆูŠุงุช ุงู„ู…ุดูุฑุฉ (DIDs)
ุตู„ุงุญูŠุฉ ุจูŠุงู†ุงุช ุงู„ุงุนุชู…ุงุฏ ุดู‡ูˆุฑ / ุณู†ูˆุงุช (ุซุงุจุชุฉ) 5 โ€“ 15 ุฏู‚ูŠู‚ุฉ (ู…ุคู‚ุชุฉ) ุตูุฑ ูˆุตูˆู„ ู…ุจุงุดุฑ (ุนุจุฑ ุงู„ุจูˆุงุจุฉ) ู…ูุงุชูŠุญ ุชุดููŠุฑ ู…ุฑุชุจุทุฉ ุจุงู„ุฌู„ุณุฉ
ู…ุฎุงุทุฑ ุงู„ุชุณุฑูŠุจ ููŠ ุงู„ุชูˆุฌูŠู‡ ู‚ุตูˆู‰ (ุงู„ู…ูุชุงุญ ุจุงู„ุณูŠุงู‚/ุงู„ุจูŠุฆุฉ) ู…ุชูˆุณุทุฉ (ุงู„ุฑู…ุฒ ุจุฐุงูƒุฑุฉ ุงู„ุชุดุบูŠู„) ู…ู†ุนุฏู…ุฉ (ู…ุญุฌูˆุจ ุฎุงุฑุฌ ุงู„ู†ุทุงู‚) ู…ู†ุนุฏู…ุฉ (ุชุญุฏูŠุงุช ุชุดููŠุฑ ู…ูˆู‚ุนุฉ)
ู†ุทุงู‚ ุงู„ุฎุทุฑ ุนู†ุฏ ุงู„ุงุฎุชุฑุงู‚ ู…ุณุงุญุฉ ุนู…ู„ ุงู„ู…ุคุณุณุฉ ูƒุงู…ู„ุฉ ู…ู‚ูŠุฏ ุจุงู„ู…ู‡ู…ุฉ ุงู„ู…ููˆุถุฉ ูู‚ุท ู…ู‚ูŠุฏ ุจุงู„ุณูŠุงุณุฉ ุงู„ุจุฑู…ุฌูŠุฉ ู…ู‚ูŠุฏ ุจุงู„ุดู‡ุงุฏุฉ ุงู„ุฑู‚ู…ูŠุฉ ุงู„ู…ูˆู‚ุนุฉ
ุฒู…ู† ุงุณุชุฌุงุจุฉ ุงู„ุฅู„ุบุงุก ูŠุฏูˆูŠ (ุณุงุนุงุช/ุฃูŠุงู…) ุชู„ู‚ุงุฆูŠ ููˆุฑ ุงู†ุชู‡ุงุก ุงู„ู…ู‡ู…ุฉ ู„ุญุธูŠ (ุจู…ุฌุฑุฏ ุชุญุฏูŠุซ ุงู„ู‚ุงุนุฏุฉ) ู„ุญุธูŠ (ู‚ูˆุงุฆู… CRL / OCSP)
ุจูˆุงุจุงุช ุงู„ุชุญู‚ู‚ ุงู„ุจุดุฑูŠ ุบูŠุฑ ู…ุชูˆูุฑุฉ ู…ุญุฏูˆุฏุฉ (ุฅุนุงุฏุฉ ู…ุตุงุฏู‚ุฉ) ุฃุตู„ูŠุฉ (ุญุณุจ ุฏุฑุฌุฉ ุงู„ู…ุฎุงุทุฑุฉ) ุชูˆู‚ูŠุน ู…ุชุนุฏุฏ ุงู„ุฃุทุฑุงู
ุฌุงู‡ุฒูŠุฉ SOC2 / ISO 27001 โŒ ุฑุณูˆุจ ุจุงู„ุชุฏู‚ูŠู‚ โœ… ุงู…ุชุซุงู„ ูƒุงู…ู„ โญ ุงู„ู…ุนูŠุงุฑ ุงู„ุฐู‡ุจูŠ โญ ู…ุนูŠุงุฑ ู…ุณุชู‚ุจู„ูŠ ูˆุงุนุฏ
ุฌู‡ุฏ ุงู„ุชุทูˆูŠุฑ ูˆุงู„ุชู†ููŠุฐ ุจุณูŠุท ุฌุฏุงู‹ (ูŠูˆู… ูˆุงุญุฏ) ู…ุชูˆุณุท (ุฃุณุจูˆุน ุฅู„ู‰ ุฃุณุจูˆุนูŠู†) ู…ุชูˆุณุท (ุฃุณุจูˆุน ุฅู„ู‰ ุฃุณุจูˆุนูŠู†) ู…ุฑุชูุน (ุชุดููŠุฑ ู…ุชุฎุตุต)
ุฃูุถู„ ู…ู„ุงุกู…ุฉ ู„ู„ุฅู†ุชุงุฌ ุงู„ู†ู…ุงุฐุฌ ุงู„ุชุฌุฑูŠุจูŠุฉ ูู‚ุท ุชุทุจูŠู‚ุงุช SaaS ู…ุชุนุฏุฏุฉ ุงู„ุนู…ู„ุงุก ุงู„ุฃู†ุธู…ุฉ ุงู„ุฏุงุฎู„ูŠุฉ ู„ู„ู…ุคุณุณุงุช ุงู„ูˆูƒู„ุงุก ุงู„ุนุงุจุฑูˆู† ู„ู„ู…ุคุณุณุงุช

9. ุงู„ุงู…ุชุซุงู„ ูˆุณุฌู„ุงุช ุงู„ุชุฏู‚ูŠู‚ ูˆุนุฏู… ุงู„ุฅู†ูƒุงุฑ

ุนู†ุฏ ู‚ูŠุงู… ูˆูƒูŠู„ ุจุชุนุฏูŠู„ ุจู†ูŠุฉ ุชุญุชูŠุฉ ุฃูˆ ุฅุฌุฑุงุก ู…ุนุงู…ู„ุงุช ู…ุงู„ูŠุฉุŒ ุชุชุทู„ุจ ุงู„ู…ุนุงูŠูŠุฑ ุฏู„ูŠู„ุงู‹ ู‚ุงุทุนุงู‹ ุนู„ู‰ ุนุฏู… ุงู„ุฅู†ูƒุงุฑ. ูŠุชู… ุชุณุฌูŠู„ ูƒู„ ุฎุทูˆุฉ ููŠ ุบู„ุงู ุชุฏู‚ูŠู‚ ู…ุดูุฑ ุบูŠุฑ ู‚ุงุจู„ ู„ู„ุชุนุฏูŠู„:

{
  "audit_version": "2026.1",
  "timestamp": "2026-09-11T14:22:18.491Z",
  "trace_id": "trace-8f92a11b-c741",
  "actor": {
    "agent_id": "agent-swe-core-09",
    "delegated_user": "usr_998124_alice",
    "delegation_token_fingerprint": "sha256:4b912e80..."
  },
  "prompt_context_hash": "sha256:d891e4a3...",
  "intent": {
    "tool": "aws_s3_gateway",
    "action": "delete_object",
    "resource": "arn:aws:s3:::internal-backups/archive-2025.tar.gz"
  },
  "policy_evaluation": {
    "engine": "Cedar-v3",
    "verdict": "ALLOW",
    "evaluated_policies": ["policy_allow_backup_rotation_2026"]
  },
  "signature": "MEQCIG7zY8f+k7..."
}

ุนุจุฑ ูƒุชุงุจุฉ ู‡ุฐู‡ ุงู„ุณุฌู„ุงุช ุงู„ู…ูˆู‚ุนุฉ ุนู„ู‰ ูˆุณุงุฆุท ุชุฎุฒูŠู† WORM (ุงู„ูƒุชุงุจุฉ ู…ุฑุฉ ูˆุงู„ู‚ุฑุงุกุฉ ุนุฏุฉ ู…ุฑุงุช)ุŒ ุชุณุชูˆููŠ ุงู„ู…ุคุณุณุงุช ู…ุนุงูŠูŠุฑ SOC2 Type II ูˆ HIPAA ูˆ ISO 27001 ู…ุน ุงู„ุญูุงุธ ุนู„ู‰ ุดูุงููŠุฉ ุฑู‚ู…ูŠุฉ ูƒุงู…ู„ุฉ.

ุงุฎุชุฑ ู†ู…ูˆุฐุฌ ุงู„ู…ุตุงุฏู‚ุฉ ุงู„ู…ู„ุงุฆู… ุจุญุณุจ ู…ุชุทู„ุจุงุช ูˆุฃุจุนุงุฏ ุงู„ุชุดุบูŠู„ ุงู„ุฎุงุตุฉ ุจูƒ:

  • ุฅุฐุง ูƒู†ุช ุชุจู†ูŠ ูˆูƒู„ุงุก SaaS ู…ุชุนุฏุฏูŠ ุงู„ู…ุณุชุฃุฌุฑูŠู† ู†ูŠุงุจุฉ ุนู† ุงู„ู…ุณุชุฎุฏู…ูŠู†: ุทุจู‚ OAuth 2.0 Token Exchange (RFC 8693) ู…ุน ุฑู…ูˆุฒ ู‚ุตูŠุฑุฉ ุงู„ุฃุฌู„.
  • ุฅุฐุง ูƒู†ุช ุชุฏูŠุฑ ุฃุชู…ุชุฉ ุฏุงุฎู„ูŠุฉ ู„ู„ู…ุคุณุณุฉ ุนู„ู‰ ูˆุงุฌู‡ุงุช ุญุณุงุณุฉ: ุงู†ุดุฑ ุจูˆุงุจุฉ ุงู„ุณูŠุงุณุฉ ูƒูƒูˆุฏ (Cedar/OPA) ู…ุน ุญุฌุจ ุงู„ุฃุณุฑุงุฑ ุฎุงุฑุฌ ุงู„ู†ุทุงู‚.
  • ุฅุฐุง ูƒุงู†ุช ุงู„ุนู…ู„ูŠุงุช ุชุชุถู…ู† ู…ุฎุงุทุฑ ู…ุงู„ูŠุฉ ุฃูˆ ุชุฏู…ูŠุฑูŠุฉ ุนุงู„ูŠุฉ: ุงุฏู…ุฌ ุจูˆุงุจุงุช ุงู„ุชุญู‚ู‚ ุงู„ุจุดุฑูŠ ุงู„ููˆุฑูŠุฉ ุนุจุฑ LangGraph.
  • ุฅุฐุง ูƒุงู† ุงู„ูˆูƒูŠู„ ูŠู†ูุฐ ุฃูƒูˆุงุฏุงู‹ ุจุฑู…ุฌูŠุฉ ุนุดูˆุงุฆูŠุฉ ู…ูˆู„ุฏุฉ: ุงุนุฒู„ู‡ ุชู…ุงู…ุงู‹ ุฏุงุฎู„ E2B MicroVM Sandbox.

ุงุณุชูƒุดู ุฃุฏูˆุงุช ุงู„ุฃู…ุงู† ูˆุงู„ุจู†ูŠุฉ ุงู„ุชุญุชูŠุฉ ุฐุงุช ุงู„ุตู„ุฉ ุนู„ู‰ AgDex.ai