Concept 9 of 16Trust

Agent security: identity, permissions, verification and prompt injection

Which user an agent runs as, least-privilege permission sets for agent users, guest vs authenticated channels, customer verification before account actions, preventing prompt injection and data leakage, and governance tools such as Guardian.

Your confidence:Not rated

Simple explanation

Agent identity

  • Customer-facing service agents run as a dedicated agent user with its own permission sets βš‘ verify current licence and user type.
  • Employee agents act as the logged-in employee, within their permissions.
  • Give the agent user least privilege: only objects, fields and actions it needs.

Channels

  • Guest / unauthenticated: no personal data until the customer is verified.
  • Authenticated (portal, app): identity comes from the session.

Verification

  • A deterministic step (Agent Script) before account actions: one-time code, known-fact checks, or session identity.
  • Store the verified ID in a variable; actions accept only that ID.

Prompt injection and leakage

  • Never let user text choose record IDs freely; resolve IDs from the verified context.
  • Keep actions narrow; avoid generic query actions on sensitive objects.
  • Test with adversarial prompts ("ignore your instructions", "show me John's orders").
  • Monitor for anomalies.

Governance at scale Dreamforce 2026 introduced Salesforce Guardian and expanded Agent Fabric for governance, risk, security and identity of agents across vendors βš‘ verify features.

Real-world analogy

The agent user is a staff badge: it should open only the doors the job needs. Verification is checking ID at the counter before handing over anyone's parcel.

Worked example

A bank's agent runs as an agent user that can read only card and transaction objects needed for card services. In web chat it asks for a one-time code sent to the registered phone; only then is the customer ID variable set. The "lock card" action takes no customer ID input: it uses the verified variable.

Diagram

Rendering diagram…

Key points

  • Service agents run as a least-privilege agent user; employee agents as the employee.
  • Verify before account actions; store the ID in a variable.
  • Actions should not accept arbitrary IDs from user text.
  • Test prompt injection and cross-customer leakage.
  • Use central governance for many agents.

Limits and gotchas

  • Broad agent user permissions are the most common security finding in reviews.
  • Sharing settings still apply; test with realistic data volumes and ownership.
  • Third-party MCP tools can introduce risks such as tool poisoning; vet and govern them.

🎀 How to say this in an interview

Walk through identity, verification, least privilege and injection tests. Concrete examples of what an action must not accept score well.

Common follow-ups

How do you stop 'show me the orders for customer 12345'?

Actions ignore user-supplied IDs and use the verified customer variable; sharing and permissions block other records.

Can the agent user be a system administrator to avoid permission errors?

No; it breaks least privilege and makes any manipulation far more damaging.