crewai - 💡(How to fix) Fix RFC: Agent identity & inter-Crew trust — OWASP ASI03/ASI07 compliance gap

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

The OWASP Agentic AI Top 10 (December 2025, 100+ expert contributors) identifies two risks directly relevant to CrewAI deployments:

  • ASI03 — Identity & Privilege Abuse: Agents inherit excessive privileges. Credentials get cached, reused, and escalated across agents. Confused-deputy attacks become easy when no agent has a verifiable identity distinct from the human operator.
  • ASI07 — Insecure Inter-Agent Communication: Multi-agent message exchange lacks authentication. No built-in way to verify that "Agent A" in a crew is actually the authorized agent — not an injected impersonator.

CrewAI currently has no built-in mechanism for agents to carry verifiable identity credentials.

Root Cause

The OWASP Agentic AI Top 10 (December 2025, 100+ expert contributors) identifies two risks directly relevant to CrewAI deployments:

  • ASI03 — Identity & Privilege Abuse: Agents inherit excessive privileges. Credentials get cached, reused, and escalated across agents. Confused-deputy attacks become easy when no agent has a verifiable identity distinct from the human operator.
  • ASI07 — Insecure Inter-Agent Communication: Multi-agent message exchange lacks authentication. No built-in way to verify that "Agent A" in a crew is actually the authorized agent — not an injected impersonator.

CrewAI currently has no built-in mechanism for agents to carry verifiable identity credentials.

Code Example

from crewai import Agent

researcher = Agent(
    role="Senior Researcher",
    goal="Synthesize research on quantum computing trends",
    backstory="...",
    # Optional — zero behavior change when absent
    identity={
        "aat": os.environ["AGENTLAIR_AAT"],  # EdDSA JWT, 1h TTL
        "jwks_uri": "https://agentlair.dev/.well-known/jwks.json",
    }
)
RAW_BUFFERClick to expand / collapse

Context

The OWASP Agentic AI Top 10 (December 2025, 100+ expert contributors) identifies two risks directly relevant to CrewAI deployments:

  • ASI03 — Identity & Privilege Abuse: Agents inherit excessive privileges. Credentials get cached, reused, and escalated across agents. Confused-deputy attacks become easy when no agent has a verifiable identity distinct from the human operator.
  • ASI07 — Insecure Inter-Agent Communication: Multi-agent message exchange lacks authentication. No built-in way to verify that "Agent A" in a crew is actually the authorized agent — not an injected impersonator.

CrewAI currently has no built-in mechanism for agents to carry verifiable identity credentials.

The Gap

In a typical CrewAI deployment today:

  1. Each agent has no cryptographic identity — no verifiable way to assert "I am this agent, running this task, authorized by this human principal"
  2. When crews call external APIs or interact with other crews, there is no identity attestation at the call site
  3. Agent secrets (API keys, tokens) are typically long-lived and broad-scoped — cached in memory with no automatic rotation or scope limitation

OWASP ASI03 specifically names "SSH keys cached in agent memory, cross-agent delegation without scoping, impersonation chains" as the concrete attack vector. As crew-to-crew interaction becomes common (multi-org deployments, federated task delegation), this gap compounds.

Proposed Integration Point

An optional identity field on Agent, carrying a short-lived JWT that external services can verify without contacting a central registry:

from crewai import Agent

researcher = Agent(
    role="Senior Researcher",
    goal="Synthesize research on quantum computing trends",
    backstory="...",
    # Optional — zero behavior change when absent
    identity={
        "aat": os.environ["AGENTLAIR_AAT"],  # EdDSA JWT, 1h TTL
        "jwks_uri": "https://agentlair.dev/.well-known/jwks.json",
    }
)

When present, the agent's tool calls and inter-crew messages carry a verifiable JWT. Any recipient — external API, another crew's trust layer, audit log — can verify the identity offline using standard JWKS key discovery (RFC 7517). No central registry required.

Why JWT/JWKS over Certificate Chains?

Several existing proposals (#5019, #4560) use ECDSA certificate chains and custom registries. JWT + JWKS is the approach already powering OAuth 2.0 and OIDC:

PropertyCertificate chainJWT + JWKS
Key discoveryCustom registryStandard /.well-known/jwks.json
ExpiryManual revocationexp claim, automatic
VerificationPKI toolchainAny JWT library in any language
AlgorithmECDSA P-256EdDSA (Ed25519) — PQ-migration ready
Cross-org interopRegistry-scopedInternet-native

Differentiated from Existing Proposals

The existing issues focus on static agent identity verification (proof that agent X exists). This proposal addresses runtime behavioral trust:

  • Short-lived tokens (1h TTL) — impossible to reuse stolen credentials long-term
  • Human provenance chain — every token traces back to the human API key that provisioned it
  • Behavioral audit trail — what the agent actually did, not just what it claimed to be
  • x402 payment gating — trust that also governs economic interactions between agents

Working Implementation

AgentLair ships this infrastructure today: Ed25519 JWT per agent session, JWKS endpoint, did:web resolution, x402 payment integration, and cross-org behavioral trust scoring. The token is already issued per-session in production.

I'm happy to contribute a CrewAI integration adapter, document the API shape, or just discuss the right interface design. The goal is an open standard interface — the implementation could be AgentLair, another provider, or something CrewAI builds natively.

References

extent analysis

TL;DR

Implementing an optional identity field on Agent with a short-lived JWT can help address identity and privilege abuse issues in CrewAI deployments.

Guidance

  • Introduce an identity field on the Agent object to carry a short-lived JWT that can be verified by external services without contacting a central registry.
  • Use the JWT + JWKS approach, which is already powering OAuth 2.0 and OIDC, for key discovery and verification.
  • Ensure the JWT has a short time-to-live (TTL) to prevent reuse of stolen credentials and include a human provenance chain to track the token's origin.
  • Consider implementing a behavioral audit trail to monitor agent actions and x402 payment gating to govern economic interactions between agents.

Example

from crewai import Agent

researcher = Agent(
    role="Senior Researcher",
    goal="Synthesize research on quantum computing trends",
    backstory="...",
    identity={
        "aat": os.environ["AGENTLAIR_AAT"],  # EdDSA JWT, 1h TTL
        "jwks_uri": "https://agentlair.dev/.well-known/jwks.json",
    }
)

Notes

The proposed solution builds upon existing standards and technologies, such as JWT and JWKS, to provide a secure and scalable identity management system for CrewAI agents.

Recommendation

Apply the proposed workaround by introducing the identity field on the Agent object and using the JWT + JWKS approach for key discovery and verification, as it provides a secure and scalable solution for addressing identity and privilege abuse issues in CrewAI deployments.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING