<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Bhanuj Kashyap</title>
    <description>The latest articles on DEV Community by Bhanuj Kashyap (@bhanuj).</description>
    <link>https://dev.to/bhanuj</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1630437%2F9f377de3-217a-4d77-94ac-51d45f56ab77.png</url>
      <title>DEV Community: Bhanuj Kashyap</title>
      <link>https://dev.to/bhanuj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bhanuj"/>
    <language>en</language>
    <item>
      <title>Identity Is Only the Beginning: Exploring Runtime Governance for AI Agents</title>
      <dc:creator>Bhanuj Kashyap</dc:creator>
      <pubDate>Wed, 28 Oct 2026 12:27:29 +0000</pubDate>
      <link>https://dev.to/bhanuj-ai/identity-is-only-the-beginning-exploring-runtime-governance-for-ai-agents-2c6j</link>
      <guid>https://dev.to/bhanuj-ai/identity-is-only-the-beginning-exploring-runtime-governance-for-ai-agents-2c6j</guid>
      <description>&lt;p&gt;&lt;em&gt;An architectural perspective on agent identity, delegated authority, runtime authorization, and execution evidence, informed by Auth0's Agent as Principal and Agent Gateway.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As AI agents evolve from conversational assistants into systems capable of executing real-world actions, their security boundaries become considerably more complicated. An agent that retrieves information presents one class of risk. An agent that can modify customer records, invoke financial transactions, provision infrastructure, or delegate work to another agent introduces an entirely different set of architectural concerns.&lt;/p&gt;

&lt;p&gt;Traditional identity and access management systems have spent decades refining how humans and applications authenticate and access protected resources. However, autonomous agents challenge several assumptions embedded in those systems. They can operate with or without an active user session, maintain execution context across multiple tools, and make decisions that were not explicitly enumerated when their credentials were issued.&lt;/p&gt;

&lt;p&gt;I recently came across two articles from Auth0 that explain these challenges particularly well: &lt;em&gt;Agent as Principal: &lt;a href="https://auth0.com/blog/agent-as-principal-purpose-built-identity-for-agents/" rel="noopener noreferrer"&gt;A Purpose-Built Identity for Agents&lt;/a&gt;&lt;/em&gt; and &lt;em&gt;Auth0 Agent Gateway: &lt;a href="https://auth0.com/blog/auth0-agent-gateway-beta/" rel="noopener noreferrer"&gt;The Identity Control Plane for Customer-Facing AI&lt;/a&gt;&lt;/em&gt;. Together, they describe an approach in which agents have distinct identities, delegated authority is preserved, and tool invocations are evaluated within the appropriate security context.&lt;/p&gt;

&lt;p&gt;What interested me was the architectural convergence with some of the problems we have been addressing while developing BHANUJ, an open-source agent governance platform.&lt;/p&gt;

&lt;p&gt;Our scope is different. We are not building an identity provider, replacing OAuth infrastructure, or attempting to reproduce Auth0's enterprise identity capabilities. Our work focuses on runtime governance, trusted delegation, authorization decisions, and execution evidence.&lt;/p&gt;

&lt;p&gt;Nevertheless, both approaches expose a fundamental architectural question: &lt;strong&gt;How do we preserve accountability and enforce security boundaries when software is no longer simply executing predefined instructions, but making decisions about which actions to perform?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Traditional Application Identity
&lt;/h2&gt;

&lt;p&gt;Consider a conventional application that connects to an external API. The application authenticates using a service account or OAuth client, receives an access token, and makes requests within its assigned permissions. Although these permissions may be broad, the application generally follows execution paths designed and reviewed by engineers.&lt;/p&gt;

&lt;p&gt;Now introduce an AI agent.&lt;/p&gt;

&lt;p&gt;The same application might allow an agent to select tools dynamically, formulate requests, and determine which operations are necessary to fulfil a user's objective. The agent could execute dozens of actions using the same underlying credentials, even though each action carries a different business risk.&lt;/p&gt;

&lt;p&gt;For example, consider an enterprise banking assistant authorized to help a customer manage their accounts. The assistant may retrieve transactions, categorize expenses, and prepare a payment. These operations share the same user context, but they should not automatically inherit identical execution privileges.&lt;/p&gt;

&lt;p&gt;Reading transaction history is not equivalent to initiating a payment. Preparing a payment is not equivalent to submitting it. Similarly, a user granting an agent access to their account does not necessarily authorize every operation that the connected API supports.&lt;/p&gt;

&lt;p&gt;This creates a distinction between authentication, delegated authority, and authorization at the point of execution.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Security concern&lt;/th&gt;
&lt;th&gt;Traditional application model&lt;/th&gt;
&lt;th&gt;Agentic execution model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Identity&lt;/td&gt;
&lt;td&gt;Typically identifies a user, application, or service account&lt;/td&gt;
&lt;td&gt;Must distinguish the agent, application, user, and potentially other delegated actors&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;td&gt;Often based on predefined roles, scopes, and application permissions&lt;/td&gt;
&lt;td&gt;May require decisions specific to the proposed action, execution context, and delegated authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution behaviour&lt;/td&gt;
&lt;td&gt;Primarily follows application-controlled workflows&lt;/td&gt;
&lt;td&gt;May select actions dynamically based on goals and runtime observations&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegation&lt;/td&gt;
&lt;td&gt;Often limited to known service-to-service relationships&lt;/td&gt;
&lt;td&gt;May involve multiple agents acting across several delegation boundaries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Accountability&lt;/td&gt;
&lt;td&gt;Logs commonly identify users, services, and API calls&lt;/td&gt;
&lt;td&gt;Requires correlation between agent identity, delegated authority, policy decisions, and observed actions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Revocation&lt;/td&gt;
&lt;td&gt;Disables credentials, sessions, or application access&lt;/td&gt;
&lt;td&gt;May also need to terminate outstanding authority and prevent additional agent actions&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The challenge is not that established identity standards have become obsolete. OAuth, OpenID Connect, and conventional access controls remain fundamental.&lt;/p&gt;

&lt;p&gt;The problem is that authenticating an agent does not establish that every action the agent subsequently chooses is appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Auth0's Approach: Treating Agents as First-Class Principals
&lt;/h2&gt;

&lt;p&gt;Auth0's Agent as Principal introduces an important distinction between an agent and the underlying application credentials used to authenticate it.&lt;/p&gt;

&lt;p&gt;Rather than treating an agent merely as another machine-to-machine client, the approach gives the agent a persistent identity that can be associated with different execution modes. An agent might operate on behalf of an authenticated user in one workflow and execute autonomously in another. Its identity remains consistent even when the credentials or application context change.&lt;/p&gt;

&lt;p&gt;One particularly relevant detail is the use of OAuth token exchange and actor claims to preserve delegation relationships. When an agent performs an operation on behalf of a user, downstream systems need sufficient information to distinguish the original authority from the actor exercising it.&lt;/p&gt;

&lt;p&gt;This addresses a subtle but consequential security problem.&lt;/p&gt;

&lt;p&gt;Without an explicit delegation model, an agent may authenticate successfully to a downstream service while losing the context explaining why it was authorized to act in the first place. Each system can appear individually secure, yet the complete execution chain becomes difficult to reconstruct.&lt;/p&gt;

&lt;p&gt;Auth0's Agent Gateway extends this identity model into the tool invocation path. It introduces runtime authorization, contextual policy evaluation, credential brokering, and administrative controls designed for customer-facing agents operating across multiple tenants.&lt;/p&gt;

&lt;p&gt;The gateway can evaluate requests against agent, user, and organization context while keeping downstream credentials outside the agent's direct control. This matters because giving an agent access to a credential effectively gives the execution environment an additional capability that may be difficult to constrain after the credential is exposed.&lt;/p&gt;

&lt;p&gt;Together, the two capabilities illustrate how identity infrastructure can evolve to accommodate autonomous execution without abandoning established security protocols.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. BHANUJ AIGP's Runtime Governance
&lt;/h2&gt;

&lt;p&gt;While exploring similar security boundaries in BHANUJ OSS, we approached the problem from the execution side rather than from identity issuance.&lt;/p&gt;

&lt;p&gt;Our starting point was a practical architectural concern: an agent framework already knows how to orchestrate agents, invoke tools, and manage workflow state. Should a governance platform duplicate those responsibilities simply to enforce policies and capture evidence?&lt;/p&gt;

&lt;p&gt;We concluded that governance should remain a separate concern.&lt;/p&gt;

&lt;p&gt;The agent framework should retain ownership of execution. Identity providers should remain authoritative for authentication and credential lifecycle management. The governance layer should evaluate explicitly submitted actions against applicable policies and preserve bounded evidence of those decisions.&lt;/p&gt;

&lt;p&gt;This separation has influenced the design of our open-source capabilities, particularly trusted delegation, runtime action authorization, and framework-integrated execution evidence.&lt;/p&gt;

&lt;p&gt;The relationship between these components becomes clearer when we compare their responsibilities.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Architectural dimension&lt;/th&gt;
&lt;th&gt;Auth0 approach&lt;/th&gt;
&lt;th&gt;BHANUJ OSS approach&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Agent identity&lt;/td&gt;
&lt;td&gt;First-class agent principals with lifecycle management&lt;/td&gt;
&lt;td&gt;Governance identifies participating actors and execution context; it does not replace an identity provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegated authority&lt;/td&gt;
&lt;td&gt;OAuth token exchange and actor-aware identity context&lt;/td&gt;
&lt;td&gt;Trusted delegation relationships and bounded execution authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Runtime authorization&lt;/td&gt;
&lt;td&gt;Gateway evaluates tool requests using identity and policy context&lt;/td&gt;
&lt;td&gt;Runtime Action Authorization evaluates proposed operations against governance policies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Credential management&lt;/td&gt;
&lt;td&gt;Token Vault, short-lived gateway credentials, and token brokering&lt;/td&gt;
&lt;td&gt;Credential lifecycle remains an external infrastructure responsibility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution ownership&lt;/td&gt;
&lt;td&gt;Gateway mediates supported downstream tool access&lt;/td&gt;
&lt;td&gt;Agent framework retains orchestration and execution ownership&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence&lt;/td&gt;
&lt;td&gt;Identity-linked action logging and tenant audit integration&lt;/td&gt;
&lt;td&gt;Bounded execution evidence, policy decisions, and integrity-oriented references&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforcement&lt;/td&gt;
&lt;td&gt;Gateway can mediate and enforce tool access&lt;/td&gt;
&lt;td&gt;Integration must honor the governance decision at the actual execution boundary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Advanced assurance&lt;/td&gt;
&lt;td&gt;Identity, policy, credential, and access controls&lt;/td&gt;
&lt;td&gt;Causal replay and formal bundle attestation are longer-term capabilities, not current OSS claims&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are not statements of feature equivalence. The systems operate at different architectural boundaries, and their enforcement guarantees depend on their respective integrations.&lt;/p&gt;

&lt;p&gt;The important convergence is conceptual: authorization cannot simply be inferred from the existence of a valid identity, and accountability requires more than collecting application logs after execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Example: An Agent Initiating a Payment
&lt;/h2&gt;

&lt;p&gt;Consider a customer asking an AI banking assistant to transfer $5,000 from a savings account to another account.&lt;/p&gt;

&lt;p&gt;Assume the customer is authenticated and the agent has legitimate access to the bank's payment APIs. The agent retrieves the relevant account information and prepares a transfer instruction.&lt;/p&gt;

&lt;p&gt;At this point, authentication has established who the user is and which application or agent is operating. However, the presence of a valid token does not necessarily establish that this particular payment should proceed.&lt;/p&gt;

&lt;p&gt;The system may need to determine whether the destination is permitted, whether the transfer exceeds the customer's configured limits, whether additional approval is required, and whether the agent's delegated authority includes payment execution rather than merely payment preparation.&lt;/p&gt;

&lt;p&gt;A robust architecture separates these responsibilities.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Execution stage&lt;/th&gt;
&lt;th&gt;Question being answered&lt;/th&gt;
&lt;th&gt;Responsible architectural layer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Who is the user and which agent is acting?&lt;/td&gt;
&lt;td&gt;Identity provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delegation&lt;/td&gt;
&lt;td&gt;What authority has the user or calling system granted?&lt;/td&gt;
&lt;td&gt;Identity and delegation infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Action proposal&lt;/td&gt;
&lt;td&gt;What payment does the agent intend to initiate?&lt;/td&gt;
&lt;td&gt;Agent runtime&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy evaluation&lt;/td&gt;
&lt;td&gt;Does this action satisfy the applicable execution constraints?&lt;/td&gt;
&lt;td&gt;Runtime governance&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Enforcement&lt;/td&gt;
&lt;td&gt;Has the authorization decision been enforced before the payment API executes?&lt;/td&gt;
&lt;td&gt;Tool gateway, application, or API enforcement point&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution&lt;/td&gt;
&lt;td&gt;Was the payment accepted, rejected, or left in an indeterminate state?&lt;/td&gt;
&lt;td&gt;Banking service&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence&lt;/td&gt;
&lt;td&gt;What was requested, decided, and observed?&lt;/td&gt;
&lt;td&gt;Governance evidence and operational audit systems&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Suppose the policy requires explicit customer confirmation for payments above $2,000. The governance layer can return a decision indicating that the proposed $5,000 payment must not proceed without the required approval.&lt;/p&gt;

&lt;p&gt;However, there is an important architectural subtlety. Returning a DENY decision is not the same as preventing execution.&lt;/p&gt;

&lt;p&gt;If the agent runtime ignores the decision and calls the payment API directly, the policy engine has not provided an effective security boundary. Enforcement must occur at a point the agent cannot bypass, or the protected service must independently validate the required authorization.&lt;/p&gt;

&lt;p&gt;Similarly, the system must account for what happens if a policy service becomes unavailable, a request is retried, or the delegated authority changes between evaluation and execution.&lt;/p&gt;

&lt;p&gt;These are not theoretical edge cases. They determine whether runtime governance is genuinely enforceable or merely advisory.&lt;/p&gt;

&lt;p&gt;For financial operations, the underlying transaction system must also continue to enforce its own business rules, approval requirements, and idempotency guarantees. An agent governance decision does not replace the bank's transaction authorization controls.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Authorization Decisions &amp;amp; Execution Evidence
&lt;/h2&gt;

&lt;p&gt;This distinction became particularly important during our work on execution evidence.&lt;/p&gt;

&lt;p&gt;A governance system may accurately record that a proposed action was allowed, but this does not establish that the action completed successfully. Conversely, an application may report that an operation succeeded without preserving sufficient information to explain which authority permitted it.&lt;/p&gt;

&lt;p&gt;These represent different facts.&lt;/p&gt;

&lt;p&gt;The authorization decision records what the governance system permitted at a particular boundary. Execution evidence records what the integration observed during the subsequent operation. The downstream system remains authoritative for the actual business outcome.&lt;/p&gt;

&lt;p&gt;For example, an agent might receive authorization to initiate a payment, invoke the API, and then encounter a network timeout. The governance record may show ALLOW, while the client-side execution status remains uncertain. Only reconciliation with the payment system can establish whether the transaction was committed.&lt;/p&gt;

&lt;p&gt;Treating these observations as interchangeable creates misleading audit trails.&lt;/p&gt;

&lt;p&gt;Our open-source work therefore emphasizes bounded evidence, explicit identities for tool invocations, policy decisions, and integrity-oriented references. The objective is to preserve useful execution facts without indiscriminately collecting prompts, credentials, sensitive business data, or internal model reasoning.&lt;/p&gt;

&lt;p&gt;This is also where our longer-term exploration of causal replay and evidence attestation becomes relevant. Reconstructing why a particular outcome occurred is a different problem from proving that an agent was authenticated or authorized.&lt;/p&gt;

&lt;p&gt;Those advanced capabilities remain areas of development. Nevertheless, separating identity, authorization, observed execution, and causal explanation from the outset provides a more coherent foundation for evolving the architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Architectural Boundaries
&lt;/h2&gt;

&lt;p&gt;There is an understandable temptation to centralize identity, authorization, policy management, credential handling, execution, and auditing into a single agent security platform.&lt;/p&gt;

&lt;p&gt;Such consolidation may simplify early demonstrations, but it can also introduce operational coupling. A governance component can inadvertently become responsible for credential availability, tool orchestration, transaction handling, and execution recovery, even when those responsibilities belong elsewhere.&lt;/p&gt;

&lt;p&gt;We have deliberately tried to avoid that direction.&lt;/p&gt;

&lt;p&gt;A composable architecture should establish clear ownership between its control plane and enforcement points. It should make data contracts explicit, preserve failure isolation where feasible, and avoid hidden dependencies between security decisions and downstream execution.&lt;/p&gt;

&lt;p&gt;Several engineering considerations follow from this approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorization context must be explicit.&lt;/strong&gt; A policy engine should not be required to infer a user's identity, tenant, or delegated authority from unrelated application state. The request contract should identify the relevant actors, operation, resource, and supporting authorization context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enforcement must be independently verifiable.&lt;/strong&gt; Integrating an authorization API into a framework does not automatically guarantee that every sensitive operation is mediated. Unprotected execution paths and direct API access remain architectural risks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Governance failures need defined behaviour.&lt;/strong&gt; A timeout or unavailable policy engine must not silently become permission to execute a sensitive action. Failure handling should be explicit and proportionate to the risk of the operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Evidence should be useful without becoming a liability.&lt;/strong&gt; Capturing every prompt, response, credential, and payload may appear attractive for auditability, but it creates substantial privacy, retention, and security concerns. Bounded metadata and protected references often provide a more sustainable approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Component boundaries should support independent evolution.&lt;/strong&gt; Identity infrastructure, governance policy, agent runtimes, and downstream services have different owners and release cycles. Their integration should rely on versioned, explicit contracts rather than implicit assumptions about one another's implementation.&lt;/p&gt;

&lt;p&gt;None of these principles is unique to agentic AI. They are established distributed-systems and security engineering practices. Autonomous execution simply makes the consequences of violating them more visible.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. What We Have Built, and What Remains
&lt;/h2&gt;

&lt;p&gt;BHANUJ.AI is still evolving, and it would be misleading to describe it as a complete enterprise agent security platform.&lt;/p&gt;

&lt;p&gt;Our current implementation work has established foundational governance components, including trusted delegation, runtime action authorization, policy decisions, bounded execution evidence, and framework integration. These provide a practical starting point for experimenting with agent security boundaries and examining how decisions are represented during execution.&lt;/p&gt;

&lt;p&gt;At the same time, significant enterprise concerns require further validation and development. These include comprehensive enforcement coverage, large-scale policy administration, distributed revocation behaviour, operational resilience, integration with external identity systems, and advanced evidence assurance.&lt;/p&gt;

&lt;p&gt;We have also intentionally avoided owning responsibilities better served by established infrastructure. Credential issuance, enterprise authentication, and general-purpose identity lifecycle management should not need to be recreated inside an execution governance platform.&lt;/p&gt;

&lt;p&gt;That boundary is not an indication that those capabilities are unimportant. It reflects an architectural decision about where they belong.&lt;/p&gt;

&lt;p&gt;In that sense, the relevance of Auth0's work is particularly encouraging. It demonstrates how sophisticated identity and delegation infrastructure can address one part of the agent security problem, while independently developed governance components can explore complementary concerns at the execution boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion: From Identity to Accountable Execution
&lt;/h2&gt;

&lt;p&gt;The transition from traditional applications to autonomous agents does not invalidate existing security architecture. It requires us to apply those principles across a more dynamic execution model.&lt;/p&gt;

&lt;p&gt;Identity establishes who is acting. Delegation establishes the authority under which they operate. Runtime authorization evaluates whether a particular action is permissible. Enforcement ensures that the decision is respected. Execution evidence helps explain what was subsequently observed.&lt;/p&gt;

&lt;p&gt;Each responsibility is valuable independently, but the relationships between them determine the trustworthiness of the complete system.&lt;/p&gt;

&lt;p&gt;Reading Auth0's Agent as Principal and Agent Gateway articles reinforced the importance of these boundaries. Our work on BHANUJ OSS has approached the problem from a different direction, but many of the underlying architectural considerations are remarkably consistent.&lt;/p&gt;

&lt;p&gt;For me, the most interesting engineering challenge is no longer just how to give agents identities or permissions. It is how to construct an execution environment in which authority remains explicit, decisions remain enforceable, and consequential actions remain accountable.&lt;/p&gt;

&lt;p&gt;That is the problem we are continuing to explore through open-source implementation.&lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Auth0 — Agent as Principal: A Purpose-Built Identity for Agents&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://auth0.com/blog/agent-as-principal-purpose-built-identity-for-agents/" rel="noopener noreferrer"&gt;https://auth0.com/blog/agent-as-principal-purpose-built-identity-for-agents/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auth0 — Agent Gateway: The Identity Control Plane for Customer-Facing AI&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://auth0.com/blog/auth0-agent-gateway-beta/" rel="noopener noreferrer"&gt;https://auth0.com/blog/auth0-agent-gateway-beta/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BHANUJ — Agent Governance Documentation&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://governance.bhanuj.ai/docs/runtime-action-authorization" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai/docs/runtime-action-authorization&lt;/a&gt;&lt;br&gt;
&lt;a href="https://governance.bhanuj.ai/docs/policy-engine" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai/docs/policy-engine&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>identity</category>
      <category>security</category>
    </item>
    <item>
      <title>Your AI Agent Has Permission to Run. But Who Authorized That Database Change?</title>
      <dc:creator>Bhanuj Kashyap</dc:creator>
      <pubDate>Mon, 19 Oct 2026 08:08:11 +0000</pubDate>
      <link>https://dev.to/bhanuj-ai/your-ai-agent-has-permission-to-run-but-who-authorized-that-database-change-351a</link>
      <guid>https://dev.to/bhanuj-ai/your-ai-agent-has-permission-to-run-but-who-authorized-that-database-change-351a</guid>
      <description>&lt;p&gt;AI agents are becoming increasingly capable of interacting with operational systems. They can query databases, update records, invoke APIs, and coordinate workflows across applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: An operations assistant receives the following request:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Put operational record OPS-001 into maintenance mode.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The assistant understands the request. It identifies the appropriate tool and prepares to execute it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should understanding the request be sufficient authorization to modify the database?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Of course not.&lt;/p&gt;

&lt;p&gt;Yet this is precisely the security boundary that becomes difficult to reason about as AI agents gain access to more tools and enterprise systems.&lt;/p&gt;

&lt;p&gt;I wanted to explore how we could enforce authorization independently of an agent's reasoning, without replacing the agent framework or introducing another orchestration engine. So I built a practical experiment using &lt;strong&gt;LangGraph, SQLite, and BHANUJ-AIGP&lt;/strong&gt;, an open-source AI governance platform.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Problem: Tool access is not task authorization
&lt;/h3&gt;

&lt;p&gt;Imagine an operations assistant with two capabilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;operations.read_status&lt;/code&gt; — inspect an operational record.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;operations.update_status&lt;/code&gt; — modify that record.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The assistant receives a request to update record &lt;code&gt;OPS-001&lt;/code&gt; from &lt;code&gt;PENDING&lt;/code&gt; to &lt;code&gt;MAINTENANCE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Technically, it knows how to perform the operation.&lt;/p&gt;

&lt;p&gt;But several questions remain unanswered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who authorized this particular operation?&lt;/li&gt;
&lt;li&gt;Does that authorization apply to this specific record?&lt;/li&gt;
&lt;li&gt;Is the permission still valid?&lt;/li&gt;
&lt;li&gt;Could the agent reuse the permission for another operation?&lt;/li&gt;
&lt;li&gt;What happens if the authorization service becomes unavailable?&lt;/li&gt;
&lt;li&gt;Can we later establish which decision permitted the database modification?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These questions are distinct from whether the model selected the correct tool.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tool selection determines what an agent intends to do. Authorization determines what it is permitted to do.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  2. Architecture: Separate execution from authorization
&lt;/h3&gt;

&lt;p&gt;The experiment deliberately retains LangGraph as the workflow engine. LangGraph owns the execution. It reads the record, prepares the proposed change, and invokes the tool when permitted. BHANUJ-AIGP owns the independent authorization decision and receives execution evidence.&lt;/p&gt;

&lt;p&gt;The architecture follows this sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User requests an operation
           |
           v
      LangGraph Agent
           |
           v
   Read current record
           |
           v
   Propose database update
           |
           v
    Authorization Check
           |
           v
        AIGP OSS
     Policy Decision
        /      \
      ALLOW    DENY
        |        |
        v        v
     SQLite     Stop
      Update   No Change
        |
        v
    Record Tool
     Execution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is one important architectural distinction here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AIGP does not execute the database operation.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The LangGraph integration enforces the returned authorization decision immediately before invoking SQLite. This preserves a clear separation of responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LangGraph:&lt;/strong&gt; Workflow execution and tool invocation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AIGP:&lt;/strong&gt; Policy evaluation, authorization decisions, and evidence management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SQLite:&lt;/strong&gt; Application data and state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is not to make the agent framework responsible for an entirely new governance system. It is to introduce an explicit security boundary at the point where an AI decision becomes a real-world action.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Authentication vs Delegated Authority
&lt;/h3&gt;

&lt;p&gt;This was one of the most interesting parts of the experiment. A runtime can have a valid identity without being authorized to perform every operation.  &lt;em&gt;In the lab, Keycloak authenticates two separate service identities.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The delegation issuer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A trusted application identity that has permission to issue narrowly scoped delegation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent runtime&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A separate identity that executes the LangGraph workflow and requests authorization before performing a protected operation.&lt;/p&gt;

&lt;p&gt;The runtime cannot simply declare its own authority. Before execution, the integrating application establishes a delegation bound to a particular execution, runtime identity, action, resource, and expiry. The authorization service validates and persists that delegation. When the runtime later proposes a protected tool call, the authorization service independently verifies the delegation and applicable policies.&lt;/p&gt;

&lt;p&gt;This introduces two distinct controls:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is the issuer authorized to delegate this action?&lt;/li&gt;
&lt;li&gt;Is the runtime's proposed operation permitted by the applicable policy and delegation?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The agent cannot select a convenient policy or expand the delegation by changing its prompt.&lt;/p&gt;

&lt;p&gt;This matters because &lt;strong&gt;an authenticated agent is not necessarily an authorized agent&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. The Experiment: An authorized database update
&lt;/h3&gt;

&lt;p&gt;Let's consider the permitted scenario. Our local SQLite database initially contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Record: OPS-001
Status: PENDING
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The LangGraph assistant proposes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Action: operations.update_status
Resource: operational-record:OPS-001
New status: MAINTENANCE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before SQLite executes the update, the runtime requests authorization from AIGP. AIGP evaluates the stored execution-scoped delegation and the active applicable policies. For this scenario, authorization is granted.&lt;/p&gt;

&lt;p&gt;The resulting lab output includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Outcome: WRITE_COMPLETED
Reason: ALLOW_POLICY_MATCHED
SQLite record status: MAINTENANCE
AIGP evidence status: COMPLETED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The operation succeeds because the specific action satisfies the authorization requirements.&lt;/p&gt;

&lt;p&gt;Not merely because the agent has access to the tool.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Remove Authority
&lt;/h3&gt;

&lt;p&gt;Here's where the experiment becomes more interesting. Suppose the runtime receives a delegation that permits only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;operations.read_status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But it attempts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;operations.update_status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proposed operation exceeds the delegated authority. The policy decision is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DENY — DELEGATION_SCOPE_DENIED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Database status: PENDING
Successful TOOL_CALL events: 0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fouaedptu94jm25ib6zkc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fouaedptu94jm25ib6zkc.png" alt="Figure 1 - PENDING SQLite result, no successful tool call, and terminal execution status." width="800" height="460"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The protected mutation never executes. This denial was validated against the running AIGP OSS API, rather than merely simulated by a local mock. An interesting detail - the overall agent execution can still finish successfully because it handled the denial safely.&lt;/p&gt;

&lt;p&gt;That exposes another important distinction:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Successful workflow completion does not imply successful or authorized tool execution.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A well-behaved assistant may complete its task by reporting that the requested action was not permitted. The workflow outcome and the authorization outcome need to remain separate.&lt;/p&gt;




&lt;h3&gt;
  
  
  6. What happens if the authorization service goes down?
&lt;/h3&gt;

&lt;p&gt;A security boundary is useful only if its failure behavior is predictable. Suppose the agent attempts a protected database operation, but the authorization service times out. Should the assistant proceed because the request appears legitimate?&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;For protected operations, the integration follows a fail-closed design. A denied decision, expired authorization, invalid response, mismatched operation, or unavailable authorization service prevents the database write.&lt;/p&gt;

&lt;p&gt;The lab also includes deterministic offline failure exercises for these behaviors. Importantly, those offline fixtures are not presented as genuine AIGP authorization decisions. The &lt;code&gt;aigp&lt;/code&gt; scenario uses the authoritative API; &lt;code&gt;allowed&lt;/code&gt;, &lt;code&gt;denied&lt;/code&gt;, and &lt;code&gt;outage&lt;/code&gt; are local teaching and testing scenarios.&lt;/p&gt;

&lt;p&gt;This distinction matters when evaluating whether a security architecture actually works outside a demonstration.&lt;/p&gt;




&lt;h3&gt;
  
  
  7. Authorization Without Evidence
&lt;/h3&gt;

&lt;p&gt;Preventing an unauthorized operation is essential. But operational teams also need to understand what happened afterward. Consider an investigation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;An agent changed an operational record. Was the change permitted? Which execution performed it? Which authorization decision preceded the tool call?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this experiment, the AIGP integration records a bounded execution history. A typical sequence includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;EXECUTION_STARTED
        |
        v
WORKFLOW_STEP
        |
        v
RUNTIME_ACTION_AUTHORIZATION
        |
        v
TOOL_CALL
        |
        v
EXECUTION_COMPLETED
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foyx4mv6yinmbq2hgxvyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foyx4mv6yinmbq2hgxvyw.png" alt="Figure 1: BHANUJ-AIGP execution evidence showing the runtime authorization decision and its causal relationship to the subsequent tool call." width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A successful tool-call record references the authorization decision through a &lt;code&gt;causation_id&lt;/code&gt;. That allows a reviewer to connect the runtime-reported action to the decision that authorized it. The evidence is deliberately privacy-bounded. It includes identifiers, decision metadata, outcomes, and references rather than storing raw prompts, complete tool payloads, credentials, or model reasoning. There is also an important limitation: AIGP receives the runtime-reported tool outcome. It does not independently witness the SQLite transaction.&lt;/p&gt;

&lt;p&gt;This is useful authorization provenance and execution evidence, not an immutable proof of every underlying database effect.&lt;/p&gt;




&lt;h3&gt;
  
  
  8. Why not implement authorization entirely inside LangGraph?
&lt;/h3&gt;

&lt;p&gt;You absolutely can implement conditional checks inside a LangGraph workflow. The question is whether those checks should constitute the authoritative security boundary. For a small, isolated experiment, local checks may be sufficient.&lt;/p&gt;

&lt;p&gt;However, enterprise systems introduce additional requirements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple agents built using different frameworks.&lt;/li&gt;
&lt;li&gt;Shared enterprise policies.&lt;/li&gt;
&lt;li&gt;Independent policy administration.&lt;/li&gt;
&lt;li&gt;Explicit delegation and revocation.&lt;/li&gt;
&lt;li&gt;Consistent denial behavior.&lt;/li&gt;
&lt;li&gt;Centralized authorization evidence.&lt;/li&gt;
&lt;li&gt;Operational visibility across executions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Embedding authoritative policies independently inside every agent implementation risks creating inconsistent enforcement. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;One framework may enforce a rule differently from another. A future tool integration might bypass a check. Policy changes become difficult to coordinate. The alternative is to separate policy decisions from framework-specific execution.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Each agent runtime integrates with an authoritative authorization service, while retaining responsibility for enforcing the decision at the actual tool boundary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The critical requirement is that the runtime must not provide an alternate path around enforcement.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An independent policy service is not sufficient if tools can still execute without passing through the protected boundary.&lt;/p&gt;




&lt;h3&gt;
  
  
  9. Limitations
&lt;/h3&gt;

&lt;p&gt;There are some deliberate limitations. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The lab does not introduce a new agent orchestration system.&lt;/li&gt;
&lt;li&gt;It does not deploy applications, autonomously repair unauthorized changes, or guarantee that every downstream business constraint is satisfied.&lt;/li&gt;
&lt;li&gt;It does not provide a replayable SQLite execution or demonstrate causal replay.&lt;/li&gt;
&lt;li&gt;The evidence history is not a formally sealed ledger or a cryptographic attestation of the underlying database transaction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally, the integrity binding of tool arguments protects the authorization relationship to the proposed operation. It does not replace business-level validation inside the application. These boundaries are important because AI governance should not become another collection of security claims that are difficult to verify.&lt;/p&gt;




&lt;h3&gt;
  
  
  10. Try Yourself
&lt;/h3&gt;

&lt;p&gt;The implementation is publicly available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hands-on developer guide:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://governance.bhanuj.ai/guides/langgraph-governed-operations" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai/guides/langgraph-governed-operations&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open-source labs:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Bhanuj-AI/labs" rel="noopener noreferrer"&gt;https://github.com/Bhanuj-AI/labs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BHANUJ-AIGP:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://governance.bhanuj.ai" rel="noopener noreferrer"&gt;https://governance.bhanuj.ai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The developer guide walks through the LangGraph workflow, SQLite integration, identity configuration, policy setup, authoritative authorization path, failure scenarios, and execution evidence inspection.&lt;/p&gt;

&lt;p&gt;The first read-only checkpoint requires no model API or paid cloud service. The authoritative authorization exercise additionally requires the local AIGP OSS service and appropriate identity and policy configuration.&lt;/p&gt;




&lt;h3&gt;
  
  
  Larger Engineering Question
&lt;/h3&gt;

&lt;p&gt;As agents become capable of modifying production systems, the security boundary cannot depend solely on what the model believes it is allowed to do. The model may determine the next action. But the authority to execute that action should come from a trusted system outside the model's control. That is the principle this experiment explores.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I'm curious how other engineers are approaching this:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Should authorization for AI agent tool calls live inside the agent framework, at the tool boundary, or in an independent policy service?&lt;/p&gt;

&lt;p&gt;And more importantly, how are you proving that unauthorized actions cannot bypass the enforcement mechanism?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I'm building BHANUJ-AIGP as an open-source project focused on AI governance, runtime authorization, execution evidence, and change assurance. This article describes one practical integration experiment and its current limitations.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>opensource</category>
      <category>python</category>
    </item>
  </channel>
</rss>
