Threats & Vulnerabilities

Securing Inter-Agent Communications: Protocols and Encryption

Practical guide to agent mTLS, signed tokens, attestation and runtime enforcement for secure multi-agent systems.

Maulik Shyani
February 3, 2026
4 min read
Securing Inter Agent

Securing Inter-Agent Channels: mTLS, Signed Tokens, Attestation and Aegis

Agentic systems span orchestrators, regions, and third-party APIs. Without per-agent identity, short-lived cryptographic proofs, and runtime policy enforcement, agent-to-agent calls become high-risk channels for secret leaks, forged headers, and automated fraud. This post unpacks practical controls β€” identity and tokens, transport security, attestation and non-repudiation β€” and shows how Aegis applies them in production to prevent incidents like forged-parent header exploits and unauthorized payments. For operational teams and security engineers, this is a compact implementation playbook plus compliance mapping.

πŸ‘‰πŸ» Protect sensitive data flows across autonomous decision pipelines

Why inter-agent channels are a new threat surface

Agentic workflows add an extra layer between humans and tools: agents call other agents and services autonomously. Industry research shows agentic deployments are accelerating β€” 23% of organizations report scaling agentic systems and another 39% are experimenting. (McKinsey & Company) These trends create new attack vectors: forged parent headers, token replay, man-in-the-middle (MiTM) on cross-region calls, and parameter injection leading to unsafe actions (e.g., high-value payments).

Operationally, teams that treat agent calls like ordinary API traffic miss two properties: (1) call-chaining semantics (parent_agent_id), and (2) the need to inspect parameters and attestation before a high-risk action executes. Legacy controls (static API keys, coarse network ACLs) are insufficient.

Parameter Injection

Identity & tokens β€” design patterns that matter

Short-lived, signed tokens per agent (what and why)

Issue per-agent JWTs signed with an Ed25519 keypair. Tokens include organisation, tenant, agent_id, scopes, expiry (exp), jti (nonce), and an optional parent_agent_claim that itself is a signed mini-token for chained calls. Short lifetimes (minutes) reduce exposure if a token is leaked; jti with a replay store prevents reuse.

Best practice references recommend short-lived access tokens paired with refresh mechanisms. Typical lifetimes for sensitive agent tokens are in the order of minutes to an hour, depending on latency and offline agent needs. (IDPro)

πŸ‘‰πŸ» Secure every API interaction powering your agent-driven operations

Uncontrolled Agent

Implementation checklist

  • Use Ed25519 for compact, fast signatures and easy JWKS rotation.
  • Expose a JWKS endpoint for public key discovery and automated verification.
  • Maintain a Redis-backed jti replay cache with TTL equal to token lifetime.
  • Support parent_agent chaining: parent claim must be present for delegation flows and itself verifiable.
  • Token minting APIs tied to SSO groups or organisation keys to align policy with identity providers.
Agent

Transport security β€” mTLS and proxy termination

mTLS should be enforced between orchestrator ↔ gateway and between gateway ↔ tools when possible. The gateway can terminate TLS (if required) and perform deep inspection, but must re-establish outbound mTLS to preserve end-to-end confidentiality.

Key patterns:

  • Enforce mTLS with short-lived certs or SPIFFE-style identities where available.
  • Gateways validate both TLS peer cert and signed JWT to bind transport to identity.
  • Use TLS pinning or JWKS key-fingerprint checks for inter-region calls to avoid rogue proxies.

Attestation & non-repudiation

Per-call attestation

Every policy decision should optionally include an attestation signature from the gateway: an Ed25519 signature over (agent_id, tool, timestamp, policy_version, decision). That signed artifact becomes part of the trace and audit evidence β€” non-repudiation for auditors.

Observability

Record verification_result, parent_chain_validated, jti_seen, and decision_reason as structured OpenTelemetry span attributes so SOC analysts can quickly filter failed signature verifications or replay attempts.

πŸ‘‰πŸ» Build threat models that evolve with your agentic workflows

How Aegis implements these controls

Aegis is a runtime policy and observability gateway designed for multi-agent systems. It sits between orchestrators and tools to terminate, validate, enforce and sign decisions; acting as β€œIstio + OPA for agents.” Key elements:

  • Token Service: mints short-lived Ed25519 signed JWTs with jti replay protection and JWKS publishing.
  • Gateway / Proxy: Envoy sidecar or forward proxy that enforces mTLS and calls an external authorisation service via ext_authz for each request.
  • Policy Engine: Compiles YAML/JSON policies to OPA bundles; prepared queries and in-memory caches target ≀20ms P99 decision latency. Policies support conditions (amount ranges, regex, time windows) and actions (allow, deny, sanitize, approval_needed).
  • Approval Workflow & Override Tokens: For high-risk actions (e.g., payments > threshold), policies return approval_needed; human approval via Slack/Teams triggers an override one-time token to retry the call.
  • Telemetry & Audit: OTel spans include policy_version, agent_id, decision, reason, and a signed attestation when requested. Logs are SIEM-ready and tamper-resistant versioning is supported for audit trails.

Example enforcement flow :

  1. Orchestrator calls Finance agent.
  2. Finance agent hits Aegis Gateway with JWT + parent_agent signature.
  3. Gateway validates mTLS + JWT signature + parent chain, evaluates OPA policy (amount ≀ 5000?), decision = deny or approval_needed, emits signed attestation and OTel span, and blocks or allows call.
Aegis Enforce budgets,protects from runaway API costs

Concrete controls mapped to threats (table)

Control

Threat mitigated

Implementation pattern

Ed25519-signed JWTs + JWKS

Forged tokens, signature bypass

Token Service issues tokens; Gateway verifies with JWKS.

jti replay cache

Token replay attacks

Redis store for jti; reject duplicates within TTL.

Parent_agent signed chain

Caller forgery / lateral coercion

Require signed parent token + validate signature chain.

mTLS between orchestrator & gateway

MiTM and transport tampering

Enforce mutual TLS; pin JWKS fingerprint where needed.

Policy as code (OPA)

Parameter injection / bad actions

Rego rules check amount ranges, regex on accounts, DLP redaction.

Operational guidance & testing

Testing scenarios

  • Simulate token replay: reuse jti and ensure Gateway rejects with β€œreplay detected.”
  • Expired token flow: confirm expiry rejection and that logs include exp claim and TTL.
  • Mismatched signature: swap JWKS and validate rejection and OTel span containing verification_result=false.

Developer DX tips

  • Provide SDK helpers that auto-fetch and rotate tokens, attach parent signatures, and surface policy dry-run outputs.
  • Link token minting to SSO groups so policy scoping align with org roles.
  • Use shadow mode for 7–14 days to collect would-deny events before enforcing.

Two comparative tables: metrics & misconfigurations

Key metrics to monitor

Metric

Why it matters

Target / Action

failed_signature_verifications

Detect forging attempts

Alert on >0.1% of calls; investigate source.

replay_attempts

Detect captured token reuse

Block IP/instance; rotate affected keys.

expired_token_rejections

Tracks stale credentials

Tune client rotation; surface for DX.

approval_needed_rate

Human workflow load

Keep low via granular thresholds; automate low-risk cases.

Common misconfigurations

Misconfiguration

Risk

long token TTLs

Extended exposure if leaked

missing jti replay check

Token reuse possible

wildcard allowed_issuers

Attacker can mint tokens for similar issuers

parent_agent optional

Lateral coercion possible

Compliance mapping & audits

Cryptographic proofs and signed attestations produced by the gateway map directly to audit requirements for non-repudiation. Aegis can produce tamper-resistant logs and signed span artifacts to support SOC/ISO evidence requests β€” e.g., mapping to SOC/ISO control objectives for identity, access and logging. For compliance teams, include signed decision artifacts and policy version in every evidence package.

For further reading on agent security and industry guidance, consult the OWASP GenAI Security Project and the OWASP Top 10 for LLMs. (OWASP Gen AI Security Project)

Integration & rollout checklistΒ 

  1. Register agents centrally and issue short-lived signed tokens.
  2. Deploy Aegis Gateway as Envoy sidecar or reverse proxy and require mTLS.
  3. Migrate high-risk actions to policies with approval_needed and shadow mode for tuning.
  4. Enable jti replay protection and parent_agent signature validation.
  5. Export OTel spans and configure dashboards for failed_signature_verifications and approval load.
  6. Run the key rotation playbook and automate JWKS rotation in CI/CD.
Prevent Automation

FAQs

Q1: Should every agent use mTLS or is JWT enough?
Use both. mTLS secures transport; signed JWTs bind identity to the request and enable stateless verification at the gateway.

Q2: How short should token lifetimes be?
Short-lived tokens (minutes to an hour) are recommended; pair with refresh tokens or a minting API for continuous rotation. (Frontegg)

Q3: What if agents are offline or ephemeral?
Support bootstrap tokens with limited scope and explicit attestation (e.g., signed ephemeral certs). Accept longer lifetimes only for constrained offline scenarios and monitor use.

Q4: How do I prevent overload of approval workflows?
Tune thresholds to reduce low-risk approvals, use shadow mode to calibrate, and apply per-agent budgets and rate limits.