By NHI Mgmt Group Editorial TeamBased on PlainID: “Best Practices for Securing AI Systems with Authorization” (June 30, 2025)

TL;DR: PlainID argues that as AI and LLM systems connect to broader data and tool surfaces, authorization failures increasingly turn into exposure and compliance risk, because prompt filtering, data access, tool access, and response masking must be governed as one policy boundary. Access control now defines whether AI can be adopted responsibly at scale.


At a glance

What this is: This is a PlainID blog analysis arguing that AI system security now depends on four coordinated authorization control points: prompts, data queries, tool access, and response masking.

Why it matters: It matters because IAM teams have to govern AI systems as policy-enforced identity and access surfaces, not as isolated applications with a single access check.

By the numbers:

👉 Read PlainID's analysis of AI authorization controls for secure AI system adoption


Context

AI systems expand the policy surface that identity teams have to govern. Instead of a single application permission check, access now has to be enforced across prompt handling, source data retrieval, tool invocation, and output masking.

That shift matters because AI systems often sit in front of sensitive internal repositories and external services at the same time. Once those pathways are connected, weak authorization does not just expose data, it also creates audit, compliance, and privilege-sprawl problems across the workflow.

The practical problem is not that AI introduces a brand-new security model. It is that the familiar IAM model breaks down when access decisions have to follow the user through multiple control points inside one AI interaction.


Key questions

Q: How should teams implement access control around AI prompts in production applications?

A: Teams should place identity checks and authorization before the model ever sees a request. Validate the caller, confirm consent or usage eligibility, and apply policy decisions at the prompt boundary. This reduces prompt abuse, limits overbroad access, and creates a clear enforcement point for audited decisions. Prompt protection works best when it is treated as a control layer, not a simple input filter.

Q: Why do AI and LLM applications create security risks that traditional tools often miss?

A: AI and LLM applications introduce prompt injection, model leakage, and shadow deployment risks that conventional tools were not designed to inspect. The problem is not only the model, but the full chain of services, containers, data paths, and runtime behavior around it. Security teams need controls that understand how the workload behaves while it is executing.

Q: What breaks when retrieval controls are applied only after an AI answer is generated?

A: Post-retrieval controls can hide text, but they do not prevent unauthorized access from happening. If the system fetches restricted content before checking entitlement, the data has already crossed the policy boundary and may be processed, logged, or blended into other output.

Q: How do MCP tool permissions change AI governance decisions?

A: They turn tool access into a formal authorization problem. IAM teams need to decide which services an AI system may use, under what identity context, and for which task scope, because overly broad tool access can extend the user’s effective privileges.


Technical breakdown

Why AI authorization has to cover the full workflow

AI systems are not secured by a single gate at the application edge. A prompt can trigger retrieval from internal knowledge sources, calls into tools via MCP, and then a generated response that may still contain sensitive content. Each stage creates a separate authorisation moment, and the policy decision at one stage does not automatically protect the next. That is why prompt control, source-data filtering, tool scoping, and response masking need to work together as one enforcement chain rather than separate point controls. In practice, the security boundary follows the interaction, not the interface.

Practical implication: model and enforce authorization as a multi-stage workflow, not as a one-time application login decision.

How RAG changes the data access problem

Retrieval-Augmented Generation changes the access model because the system fetches context from underlying repositories before generating an answer. If retrieval is based only on semantic relevance, the model can surface documents a user should not see, even when the final response looks technically correct. Data access control therefore has to occur at the source, where entitlement and identity context are still available. This is an authorization problem first and a generation problem second. The same principle applies to any AI pattern that blends query, retrieval, and summarisation over governed content.

Practical implication: apply entitlement checks before retrieval, not after generation, or the model can reveal restricted material indirectly.

Why MCP makes tool access a governance issue

The Model Context Protocol creates a standard way for AI systems to reach services and tools, which makes tool governance more important, not less. Once an AI system can invoke external services, the question is no longer only whether the user is authenticated. It is whether the system is authorised to use a specific tool for a specific purpose under a specific policy context. Granular tool access limits reduce the chance that AI can exceed the user’s intended scope, but only if those policies are centrally managed and consistently enforced across the environment.

Practical implication: scope MCP tool permissions by user, purpose, and context, then review them as part of IAM governance.


Threat narrative

Attacker objective: The objective is to use the AI workflow to surface or act on information and services that should have remained outside the user’s access scope.

  1. Entry occurs when a user submits a prompt that reaches connected AI workflow components.
  2. Credential or permission exposure follows when the system retrieves data or invokes tools beyond the user’s intended entitlement boundary.
  3. Escalation happens when overbroad authorization lets the model combine sensitive context from multiple sources into one response.
  4. Impact is data exposure, compliance failure, or unintended access to services that were never meant to be available through the AI path.
  • DeepSeek database exposure 2025: An unauthenticated DeepSeek ClickHouse database exposed over a million log lines with plaintext chat history and API keys in 2025.
  • 12,000 secrets in LLM training data: Truffle Security found 11,908 live API keys and passwords hard-coded in web pages captured by Common Crawl, a dataset used to train LLMs.

Read and download The State of NHI & AI Agent Breach Report 2026, covering 150+ breaches impacting Non-Human Identities including AI Agents.


NHI Mgmt Group analysis

AI system authorization is now an identity problem, not just an application problem. Once an AI workflow can retrieve data, call tools, and return masked or unmasked output, the policy boundary moves from a single app to a chain of identity-mediated decisions. That changes the job of IAM from granting access to governing how access is consumed across multiple stages. Practitioners need to treat AI policy enforcement as part of the core identity plane.

Prompt filtering alone is not a security control boundary. A prompt can be safe and still trigger unsafe retrieval or unsafe tool use if downstream authorization is weak. That means the failure mode is not one bad input, but inconsistent enforcement across the workflow. Organisations that stop at input controls will miss the real exposure path and understate their privilege surface.

Workflow-scoped authorization: the right control concept for AI systems is not broad application access, but policy decisions that follow the identity through prompt, retrieval, tool use, and output. That concept is grounded in how AI systems behave when they are connected to multiple data and service surfaces. The implication is that IAM teams have to measure policy coverage across the whole interaction path, not only at the entry point.

Response masking belongs inside the governance model, not afterthought review. If sensitive data can be generated into an answer, then the control is part of the authorisation boundary and not merely a presentation layer feature. That matters for regulated data, because a compliant source repository can still become a non-compliant output path. Practitioners should align masking rules with identity context and data sensitivity.

NIST and OWASP guidance are converging on the same conclusion: AI security lives or dies on access control discipline. The article’s direction matches broader industry concern that a large share of AI and LLM risk is really authorization risk in new form. The field is moving toward identity-first AI governance, where policy consistency matters more than model novelty. Teams should expect authorisation to become the first audit question for AI deployments.

From our research library:

What this signals

Identity teams should stop treating AI access as a single entitlement. The operational reality is that prompt handling, retrieval, tool use, and masking each create a separate policy decision, and the strongest programmes will govern them as one chain. That is the shift from application security thinking to identity-first AI governance.

Authorization drift will become the most common AI control failure. As AI systems connect to more repositories and services, the risk is not just overexposure at launch but uncontrolled expansion of what the system can reach over time. Teams need to watch for policy gaps between the model interface and the underlying data and tool layers.

Workflow-scoped authorization: this is the governance pattern that matters for AI systems because it binds access decisions to the whole interaction path. Organisations that only secure the entry point will miss the real failure mode, where downstream retrieval and tool execution create the exposure.


For practitioners

  • Define four AI policy checkpoints Establish separate authorization decisions for prompt handling, data retrieval, tool invocation, and response masking. Keep each checkpoint bound to identity context so one approval does not implicitly open the next step.
  • Enforce retrieval-time entitlements Apply source-system permission checks before the RAG engine fetches documents. Do not rely on the model to hide content after retrieval, because that only manages disclosure, not access.
  • Scope MCP tool permissions tightly Limit which services an AI system can reach and under what policy conditions. Review those permissions as part of access governance, not as a separate integration task.
  • Bind masking to identity and sensitivity Use response masking rules that vary by user role, data class, and regulatory context. Treat the output layer as part of the access control boundary whenever the model can surface regulated information.

Key takeaways

  • AI systems create a broader access problem than traditional applications because one interaction can cross prompt, retrieval, tool, and output layers.
  • PlainID’s article aligns with wider industry evidence that authorization failures account for a large share of AI security risk.
  • The right control model is workflow-scoped authorization, with entitlements enforced before retrieval and tool use, not after disclosure.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 sets the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
OWASP Agentic AI Top 10ASI03 — Identity & Privilege AbuseAI systems here are governed through identity and privilege boundaries across prompts, tools and outputs.
Recommendation — Bind AI tool and data access to identity-scoped policy decisions at each workflow stage.
OWASP Non-Human Identity Top 10NHI-04 — Insecure AuthenticationThe article focuses on how AI systems authenticate and are authorised across multiple connected surfaces.
NHI-05 — Overprivileged NHIOverbroad AI access to repositories and tools is the central exposure PlainID warns about.
Recommendation — Enforce identity-bound access checks before AI retrieval or tool use expands the session scope. Reduce AI system privileges to the minimum service and data scope required for each task.
NIST CSF 2.0PR.AA-05 — Access Permissions, Entitlements and AuthorizationsThe article is fundamentally about governing authorizations across AI workflow touchpoints.
Recommendation — Apply authorization governance across prompts, retrieval, tools and output masking.
MITRE ATT&CKTA0006;TA0008 — Credential Access; Lateral MovementThe article describes how excessive AI permissions can expose data and service paths beyond intended scope.
Recommendation — Map AI permission overreach to credential access and lateral movement paths in detection and review.

Key terms

  • Workflow-scoped access: Workflow-scoped access is access limited to the specific tools, data, and actions required for one defined business process. For AI agents, this prevents broad, reusable authority and forces each decision path to stay inside a narrow operational boundary.
  • Retrieval-time entitlement: Retrieval-time entitlement is the rule that a system checks access before it fetches source content for an AI response. It prevents a model from seeing restricted information in the first place, which is more effective than trying to hide the output later.
  • Response Masking: A control that suppresses or redacts sensitive information before it reaches the end user. In identity governance terms, masking is only effective when it is identity-aware and enforced as part of the policy chain, not used as a cosmetic cleanup step after disclosure has already occurred.
  • Tool-scoped Access: A permission model that limits which external tools, APIs, and resources an agent can use for a specific task. For autonomous or semi-autonomous systems, tool scope is a core identity control because access to action often matters more than access to text.

What's in the full article

PlainID's full blog post covers the operational detail this post intentionally leaves for the source:

  • Practical guidance for policy design across the four AI control points described in the article
  • Source-level examples of how authorization should work with RAG data retrieval and tool access
  • Implementation detail on masking rules that vary by user identity and data sensitivity
  • The vendor's own framing for externalized, policy-based access control in AI workflows

👉 PlainID's full post covers the four control points and policy approach in more operational detail.

Deepen your knowledge

NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
NHIMG Editorial Note
Published by the NHIMG editorial team on June 23, 2026.
Updated on October 7, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org