<?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: erz</title>
    <description>The latest articles on DEV Community by erz (@erz).</description>
    <link>https://dev.to/erz</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%2F1412414%2F0b57c1fa-a992-49b9-ada2-f1a2d294c0c9.jpeg</url>
      <title>DEV Community: erz</title>
      <link>https://dev.to/erz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/erz"/>
    <language>en</language>
    <item>
      <title>Securing AI Agents &amp; MCP Servers: OAuth Delegation (XAA) &amp; Exfiltration Detection</title>
      <dc:creator>erz</dc:creator>
      <pubDate>Wed, 28 Oct 2026 22:16:20 +0000</pubDate>
      <link>https://dev.to/erz/securing-ai-agents-mcp-servers-oauth-delegation-xaa-exfiltration-detection-3mi2</link>
      <guid>https://dev.to/erz/securing-ai-agents-mcp-servers-oauth-delegation-xaa-exfiltration-detection-3mi2</guid>
      <description>&lt;p&gt;Most &lt;strong&gt;MCP (Model Context Protocol) servers&lt;/strong&gt; deployed today rely on static &lt;strong&gt;Service Accounts&lt;/strong&gt; [00:04:14]. This creates two major flaws: over-privileged agents and zero human accountability in the logs (every action just shows up as &lt;code&gt;svc-ai-agent&lt;/code&gt;).&lt;/p&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%2Fe6unl1059mw3vcetv3vf.jpg" 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%2Fe6unl1059mw3vcetv3vf.jpg" alt=" " width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Following recent incidents (Asana MCP, Cline, Salesforce) [00:05:15], we built a lab (Azure APIM, MCP Server, Okta, CrowdStrike) to test two things:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Replacing Service Accounts with Delegated Tokens (XAA)
&lt;/h3&gt;

&lt;p&gt;To enforce least privilege down to the MCP server and keep human attribution in the SIEM, we implemented a 3-step token exchange using &lt;strong&gt;Cross-App Access (XAA)&lt;/strong&gt; [00:12:05]:&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Why IAM isn't enough (Tool-based Exfiltration)
&lt;/h3&gt;

&lt;p&gt;​Even with strict token delegation, an agent can still abuse a legitimate tool (like http_request) to base64-encode and exfiltrate secrets the user is allowed to read [00:19:18]. Catching this requires correlating API Gateway prompt inspection (Azure APIM) with SIEM identity &amp;amp; network logs [00:20:34], alongside strict tool sandboxing/whitelisting [00:24:17].&lt;/p&gt;

&lt;p&gt;​&lt;strong&gt;Lab Walkthrough (Video)&lt;/strong&gt;&lt;br&gt;
​(Note: Audio is in French — YouTube English auto-captions work well, and the console/terminal demos are visual).&lt;/p&gt;

&lt;p&gt;​  &lt;iframe src="https://www.youtube.com/embed/cyNgbxRZkrs" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;​Direct timestamps to skip the intro:&lt;br&gt;
​[00:08:54] — Lab architecture &amp;amp; Service Account vulnerability demo&lt;br&gt;
​[00:12:05] — Implementing XAA 3-step token delegation&lt;br&gt;
​[00:15:27] — Auth Server scopes &amp;amp; group policies configuration&lt;br&gt;
​[00:18:58] — Bypassing IAM: Data exfiltration via http_request tool&lt;br&gt;
​[00:20:34] — Catching the leak: Azure APIM prompt inspection &amp;amp; SIEM correlation&lt;br&gt;
​[00:23:57] — Limitations: Tool sandboxing &amp;amp; fully autonomous agents&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>security</category>
      <category>ai</category>
      <category>cybersecurity</category>
    </item>
  </channel>
</rss>
