Machine Learning pathway increased my salary by 40%
Agentic AI Security, Identity, Governance, Risk and Compliance
Security for agents is not a filter on the prompt. It is identity, least privilege, mediated tool execution, verification and evidence. Everything else is advice.
This chapter sets out the security architecture for multi-agent estates: agent identity and authentication, authorisation models including RBAC and ABAC, delegated permissions, secrets management and secure tool execution. It then works through the attack surface — direct and indirect prompt injection, data poisoning, model manipulation, excessive autonomy, privilege escalation, agent impersonation, insecure MCP implementations, communication interception and sensitive data exposure — with controls for each. It closes with governance: audit and accountability, NIST AI RMF and ISO/IEC 42001 alignment, human oversight, regulatory expectations and a risk matrix an enterprise can actually operate.
What this covers
- Who this is for
- Security architects, identity engineers, risk and compliance partners, AI governance leads and platform owners accountable for agent behaviour.
- What it assumes
- Chapters 01 to 06. Familiarity with IAM concepts, secrets management and standard application security practice.
- What you will be able to do
- Design an agent identity and authorisation model, threat-model an agentic process, select controls per attack class, produce the evidence a regulator or auditor will ask for, and structure a governance programme against NIST AI RMF and ISO/IEC 42001.
- Reading time
- About 29 minutes including the question bank and glossary.
Agent identity and authentication
Every agent with write authority needs its own identity. Not a shared service account, not a human's credentials, not an API key embedded in configuration. A distinct identity is what makes least privilege enforceable, what makes audit records attributable, and what makes revocation possible without breaking unrelated processes. Where the identity provider supports workload identity federation, use it; where it does not, issue scoped service credentials per agent with rotation.
Authentication answers who is calling. The harder question is on whose behalf. An agent acting for an employee or a customer carries delegated authority, and the delegation must be explicit: a token or assertion that names both the agent and the principal, scoped to the task, with a lifetime matched to the work. Long-lived broad tokens make revocation impractical and attribution ambiguous.
Agent identity also needs lifecycle management. Agents are created, changed and retired like any other principal. The identity must be revoked when the agent is decommissioned, and the decommissioning must be evidenced — an agent left with valid credentials but no owner is a standing vulnerability and a common finding in security reviews.
- One identity per agent with write authority; no shared accounts.
- Delegated authority carries both agent and principal, scoped and time-bounded.
- Short-lived credentials with rotation over static keys.
- Documented decommissioning with credential revocation evidence.
Authorisation: RBAC, ABAC and least privilege
Role-based access control assigns capability by agent role: an extraction agent may read documents, a posting agent may create journal entries within limits, a supervisor agent may assign tasks. It is understandable and auditable, and it is too coarse on its own for data-level restrictions.
Attribute-based control adds the dimensions that matter in practice: which case, which business unit, which data classification, which purpose, and what value. The combination of role, resource attributes and context is what prevents an agent with legitimate posting authority from posting to the wrong entity or above its limit.
Least privilege for agents has a specific shape. The scope should be the intersection of what the task requires and what the process authorises — not the union of what might be useful. Practically this means tool-level grants rather than system-level credentials, record filters applied server-side, value ceilings enforced in the tool, and no ability for an agent to widen its own scope by calling a tool that would grant it.
| Layer | Controls | Enforced by |
|---|---|---|
| Identity | Which agent is calling | Identity provider, token validation |
| Role | Which capability class | Tool registry, RBAC policy |
| Attribute | Which records, entity, classification, purpose | Policy engine at tool boundary |
| Value | Spend and amount ceilings | Tool validation, not prompt |
| Time | Delegation expiry, session duration | Token lifetime |
Secure tool execution and secrets management
The tool layer is the enforcement point for everything the model is not trusted to decide. It validates arguments against a schema, applies authorisation, enforces limits, executes, records the action and returns a compact structured result. If a control exists only in a system prompt, it does not exist.
Secrets must never enter a model context. Credentials are resolved by the tool at execution time from a secrets manager, scoped to the operation and the agent. Anything else — keys in prompts, environment variables dumped into context, tokens in client-side configuration — is an exposure waiting for a log review or a support ticket to surface it.
Tool execution should also be bounded in effect. A tool that can update one record cannot mass-update; a tool that can send one email cannot send a thousand. Volume ceilings per call and per case are a cheap control that limits the damage of a manipulated agent to something recoverable.
Ask an engineer to make the agent do something its tools forbid by changing only the prompt. If they can, the control is in the wrong place.
The attack surface of an agentic system
Direct prompt injection is a user instructing the agent to ignore its rules. It is the least interesting attack because the attacker is already authenticated and the impact is usually a policy violation rather than a breach. Indirect prompt injection is the serious one: instructions hidden in content the agent reads — an email, a ticket, a PDF, a web page, a supplier's remittance advice — which the agent may follow because it cannot reliably distinguish data from instruction.
Data and model manipulation attack the inputs and the learning. Poisoned documents in a knowledge base, manipulated supplier records, or tampered training data can steer outputs without any prompt at all. Model extraction probes capabilities and boundaries; inversion attempts recover information about training or context data. In agent systems these combine with tool access, so the impact is not a wrong answer but a wrong action.
Agent-specific attacks exploit autonomy and trust between components. Excessive autonomy means the blast radius of any manipulation is large. Privilege escalation attempts to chain tools or impersonate a higher-authority agent to exceed scope. Insecure MCP servers expose administrative capability. Interception of agent-to-agent communication allows task substitution. Sensitive data exposure occurs when retrieval returns records the principal should not see and the agent includes them in output.
| Attack | Mechanism | Primary control |
|---|---|---|
| Direct injection | User overrides instructions | Output policy, tool-level authorisation |
| Indirect injection | Instructions in retrieved content | Content treated as data, instruction separation, confirmation for writes |
| Data poisoning | Manipulated corpus or records | Source allowlists, freshness and integrity checks |
| Excessive autonomy | Broad permission surface | Bounded autonomy, value ceilings |
| Privilege escalation | Tool chaining or impersonation | Per-tool authorisation, no self-grant |
| Insecure MCP | Administrative tools exposed | Curated tool surface, server-side checks |
| A2A interception | Task substitution in transit | Authenticated channels, signed tasks |
| Data exposure | Over-broad retrieval | Server-side filters, field-level control |
Controls that actually reduce risk
Separate instruction from evidence. Retrieved content should enter context in a clearly delimited data channel, with the model instructed that content is never authoritative. This reduces but does not eliminate indirect injection, which is why it must be paired with the next control.
Require confirmation for consequential writes. A write above a value threshold, to a sensitive record, or that is irreversible should require either a deterministic policy check or a human confirmation. The confirmation step is not a security formality; it is the boundary where a manipulated agent stops being able to cause harm.
Bound the effect of any single run: iteration ceilings, tool-call ceilings, spend ceilings, per-case volume limits and time limits. Add output filtering for prohibited content and data-loss patterns such as account numbers or personal identifiers leaving their permitted boundary. And instrument everything — an agent estate without traces cannot be defended, because detection depends on seeing anomalous action sequences.
- Delimit and distrust retrieved content; it is never an instruction.
- Confirmation or deterministic policy check before consequential writes.
- Hard ceilings on iterations, tool calls, spend, volume and duration.
- Output filtering for data-loss and prohibited-content patterns.
- Traces of intent and tool calls as the basis for detection.
Sensitive data, privacy and minimisation
Agents widen the data perimeter because they read across systems to assemble context. The controls are purpose limitation, minimisation and field-level access: send the agent the fields the step needs, under the purpose the process declares, filtered server-side rather than by prompt request. A retrieval tool that returns whole records and asks the model to ignore sensitive fields has already exposed them.
Under India's Digital Personal Data Protection Act, processing needs a lawful basis and purpose limitation, with obligations around notice, retention and erasure. Under the GDPR the same disciplines apply with additional rights. For agent systems the practical consequences are that traces must themselves be data-protected — they often contain the personal data the agent processed — and that retention periods for traces, memory and evaluation sets must be defined rather than indefinite.
Cross-border transfer and model routing add a third layer. If inference happens in another jurisdiction, the transfer must be assessed and documented like any other. Enterprises operating in India with global platforms should verify where inference and memory persist, and whether the vendor's subprocessors meet the same obligations.
If a field is not needed for the decision, do not retrieve it. Filtering in the tool is a control; asking the model to ignore it is not.
Governance frameworks, oversight and audit
NIST AI RMF provides a functional structure — govern, map, measure, manage — that translates well to agent estates: govern sets accountability and policy, map identifies context and affected parties, measure defines and monitors metrics including security and quality, manage allocates response and residual risk. ISO/IEC 42001 provides the management-system wrapper: objectives, roles, documented controls, internal audit and continual improvement. ISO/IEC 27001 covers the underlying information security management that agent systems inherit.
The OWASP guidance for LLM applications supplies the threat taxonomy most security teams now use, including prompt injection and excessive agency. None of these frameworks is a law, and none certifies an agent as safe; they structure judgement and produce evidence. That distinction matters when a regulator asks what you did.
Legally binding obligations, regulatory guidance, voluntary standards and industry practice must be kept separate in any governance document. In India, for example, the DPDP Act creates binding obligations, sector regulators such as the RBI and IRDAI issue binding directions for their regulated entities, and frameworks like NIST AI RMF are voluntary but persuasive. Presenting a voluntary framework as compliance is a common and damaging error.
| Instrument | Type | What it requires of an agent programme |
|---|---|---|
| DPDP Act 2023 (India) | Binding law | Lawful basis, purpose limitation, notice, retention, erasure |
| RBI directions (regulated entities) | Binding direction | Outsourcing, technology risk, audit and accountability |
| EU AI Act (in scope uses) | Binding law | Risk classification, transparency, human oversight, documentation |
| NIST AI RMF | Voluntary framework | Structured risk process and evidence |
| ISO/IEC 42001 | Certifiable standard | AI management system with controls and internal audit |
| OWASP LLM Top 10 | Community guidance | Threat taxonomy and control expectations |
Human oversight, audit trail and accountability
Oversight only counts when the human has the information, the authority and the time to intervene. An approval screen that shows a summary without the evidence is a rubber stamp; an approver without authority to reject is decoration; a queue measured only on throughput trains people to approve quickly. Design oversight deliberately: what the reviewer sees, what they can reject, how their rejection is recorded, and whether their override rate feeds back into evaluation.
The audit trail must answer, for any case: what the process was, which policy version applied, which agents acted with which prompt and model versions, which tools were called with what arguments and results, what the verification decided, who approved, and what was finally committed. Where any of those is missing, the record is not an audit trail — it is a log.
Accountability is organisational. Every agent needs a named owner accountable for its behaviour, and every decision class needs a named accountable function. That is not a technical control, but no technical control survives without it, because someone must decide when behaviour is acceptable and when it must be stopped.
- Reviewers see evidence, not summaries alone.
- Rejection must be possible, recorded and measured.
- Traces capture policy, prompt and model versions per case.
- Every agent has a named owner; every decision class a named function.
Building a risk matrix you can operate
A useful matrix scores likelihood and impact per use case against defined bands, then assigns required controls by score rather than by preference. Impact bands should reference real consequences: financial loss per event, regulatory breach, customer harm, data exposure volume. Likelihood should reference evidence — exception rates, adversarial exposure, number of untrusted data sources.
Controls scale with the band. Low-risk internal assistance may require evaluation and logging. Medium-risk customer-facing work needs confirmation gates, sampled human review and output filtering. High-risk regulated decisions need independent verification, human approval, monitoring with alerting, and a documented rollback. The matrix is what stops every discussion reverting to opinion.
Review cadence matters as much as the initial scoring. A use case that was low risk when it read approved policies becomes high risk when it is extended to read inbound customer email — a change that in most organisations happens without a security review. Re-score on scope change, not annually.
The risk register is usually accurate at go-live and stale within two quarters. Attach re-scoring to change control or it will not happen.
Key focus areas
- Agent identity
- A distinct principal per agent with write authority, revocable and evidenced at decommissioning.
- Delegated authority
- Tokens naming both agent and principal, scoped to the task and time-bounded.
- Least privilege
- Tool-level grants, server-side record filters, value ceilings and no self-grant.
- Attribute-based control
- Case, business unit, classification, purpose and value dimensions beyond role.
- Secrets handling
- Resolution at execution time from a manager; never inside a model context.
- Tool mediation
- Schema validation, authorisation, limits, logging and compact structured results.
- Indirect injection
- Instructions embedded in retrieved content — the primary agent-specific threat.
- Confirmation gates
- Deterministic policy check or human confirmation before consequential writes.
- Effect ceilings
- Iteration, tool-call, spend, volume and duration limits to bound blast radius.
- Data minimisation
- Retrieve only fields the decision needs, filtered server-side for purpose.
- Trace protection
- Treating traces and memory as personal data with defined retention and access.
- Framework status
- Binding law, regulatory direction, voluntary standard and guidance kept explicitly separate.
- Oversight design
- Evidence, authority and time for the reviewer; override rate feeding evaluation.
- Risk re-scoring
- Re-assessment on scope change rather than on an annual cycle.
Key takeaways
- Security controls live in identity, authorisation and tools, not in prompts.
- Every agent with write authority needs its own revocable identity.
- Delegation must name both the agent and the human principal it acts for.
- Secrets never enter model context; tools resolve them at execution time.
- Indirect prompt injection is the defining agent threat; treat retrieved content as data.
- Require deterministic policy checks or human confirmation before consequential writes.
- Bound every run with iteration, spend, volume and duration ceilings.
- Data minimisation must be enforced server-side, not requested from the model.
- Traces contain personal data and need retention and access rules.
- Keep binding law, regulatory direction, voluntary standards and guidance separate.
- NIST AI RMF structures judgement; it does not certify safety.
- ISO/IEC 42001 supplies the management system; ISO/IEC 27001 the security baseline.
- Oversight requires evidence, authority and time, or it is theatre.
- Re-score risk when scope changes, not once a year.
- Accountability is organisational: an owner per agent and per decision class.
Glossary
- ABAC
- Attribute-based access control — authorisation by resource and context attributes.
- Blast radius
- The extent of damage a single compromised or malfunctioning component can cause.
- Confirmation gate
- A required approval or deterministic check before a consequential action commits.
- Data poisoning
- Manipulating source data or training content to corrupt model or agent behaviour.
- Delegated authority
- Permission to act on behalf of a principal, scoped and time-bounded.
- Excessive agency
- An agent holding more capability or autonomy than its task requires.
- Indirect prompt injection
- Malicious instructions embedded in content an agent retrieves and reads.
- Least privilege
- Granting only the access necessary for the specific task.
- Model inversion
- Recovering information about model training or context data through probing.
- Non-human identity
- A machine principal such as an agent, robot or service, subject to IAM governance.
- Output filtering
- Blocking or redacting prohibited or sensitive content in agent output.
- Privilege escalation
- Gaining authority beyond that granted, often by chaining tools or impersonation.
- Purpose limitation
- Using personal data only for the stated purpose for which it was collected.
- RBAC
- Role-based access control — authorisation by assigned role.
- Risk band
- A likelihood and impact classification that determines required controls.
- Secrets manager
- A controlled store issuing credentials at runtime rather than at build time.
- Threat model
- A structured enumeration of attackers, assets and attack paths for a system.
- Trace
- The correlated record of steps and tool calls for one unit of work.
- Zero trust
- An architecture that authenticates and authorises every request regardless of network position.
- Workload identity
- An identity issued to a running workload rather than to a human or a static key.
5 questions to test the model
Where should a spend ceiling on an agent be enforced?
What makes indirect prompt injection more dangerous than direct injection?
Which pairing correctly describes the two standards?
An approval screen shows only a one-line summary. What is the oversight defect?
When should a use case's risk score be revisited?
Questions this page answers
Can we just use one service account for all agents?
How do we stop prompt injection completely?
Do we need a WAF or an LLM firewall?
How do we handle an agent that must act on behalf of a customer?
What belongs in an agent threat model?
How much logging is enough?
How do we satisfy a regulator who asks how the decision was made?
Is MCP inherently insecure?
How do we prevent an agent from widening its own permissions?
What does DPDP compliance require of an agent pipeline?
How do we keep evaluation and test data secure?
Who should own AI security?
How do we detect a compromised agent?
What is the response plan for a suspected agent compromise?
Is human oversight legally required?
How do we handle model provider changes to behaviour?
What is the most common security finding in agent estates?
How do we evidence least privilege to an auditor?
What should be in an AI governance policy?
How does this chapter connect to Chapter 08?
What does Identity mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Authorisation: RBAC, ABAC and least privilege)?
What does Role mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Authorisation: RBAC, ABAC and least privilege)?
What does Attribute mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Authorisation: RBAC, ABAC and least privilege)?
What does Value mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Authorisation: RBAC, ABAC and least privilege)?
What does Time mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Authorisation: RBAC, ABAC and least privilege)?
What does Direct injection mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does Indirect injection mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does Data poisoning mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does Excessive autonomy mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does Privilege escalation mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does Insecure MCP mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does A2A interception mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does Data exposure mean in Agentic AI Security, Identity, Governance, Risk and Compliance (The attack surface of an agentic system)?
What does DPDP Act 2023 (India) mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Governance frameworks, oversight and audit)?
What does RBI directions (regulated entities) mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Governance frameworks, oversight and audit)?
What does EU AI Act (in scope uses) mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Governance frameworks, oversight and audit)?
What does NIST AI RMF mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Governance frameworks, oversight and audit)?
What does ISO/IEC 42001 mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Governance frameworks, oversight and audit)?
What does OWASP LLM Top 10 mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Governance frameworks, oversight and audit)?
What does Agent identity mean in Agentic AI Security, Identity, Governance, Risk and Compliance (Key focus areas)?
Sources and standards
- NIST AI Risk Management Framework (AI RMF 1.0) and Generative AI Profile
Govern, map, measure, manage structure used in this chapter.
- ISO/IEC 42001:2023 — AI management system
Certifiable management system requirements.
- ISO/IEC 27001:2022 — Information security management
Underlying security management baseline.
- OWASP Top 10 for LLM Applications
Threat taxonomy including prompt injection and excessive agency.
- Digital Personal Data Protection Act, 2023
Binding Indian data protection obligations.
- EU Artificial Intelligence Act
Risk classification, transparency and human oversight obligations for in-scope uses.
Continue through the twelve chapters
Controls only work if people can exercise them. Chapter 08 designs the oversight, escalation and decision-transparency model that makes governance operational.
Continue this lesson with a subscription
Multi Agentic Enterprise Workflow Automation is part of the paid catalogue. You have read the free preview. A subscription opens the rest of this lesson, the classroom slides and the assessment questions.
- The full lesson for this topic and every other catalogue topic
- Every classroom slide deck and worked example
- All assessments, with a verifiable certificate on completion
The Free-To-Learn library stays open to everyone and is not affected by this.
