Direct model connections often create inconsistent access control, weak auditability, and uncontrolled data exposure. Teams can lose visibility into who asked for what, which prompts reached the model, and what content came back. Without gateway controls, it becomes harder to apply safety rules, manage cost, and prove governance during review or incident response.
Why This Matters for Security Teams
When GenAI applications connect straight to models, the security boundary often shifts from controlled policy enforcement to whatever the application code happens to allow. That creates gaps in access control, prompt handling, content filtering, and logging. NHI Management Group has repeatedly shown that identity and secret failures become incident multipliers, as seen in the Top 10 NHI Issues and the Ultimate Guide to NHIs — Regulatory and Audit Perspectives.
The practical problem is not just that model access exists. It is that direct connections collapse multiple governance controls into one application path, making it harder to prove who requested access, what data was sent, and whether policy was enforced consistently. Security teams then inherit a system that is difficult to audit and expensive to remediate after misuse. That risk rises quickly when secrets are embedded in code or reused across services, as highlighted in the State of Secrets in AppSec research. In practice, many security teams discover the control gap only after prompts, tokens, or sensitive outputs have already been exposed, rather than through intentional testing.
How It Works in Practice
Direct model integration usually means the application calls the model endpoint with application-managed credentials and no intervening policy layer. In that design, the app becomes responsible for every decision: authentication, authorization, prompt safety, input filtering, output filtering, rate limiting, and logging. That sounds simple, but it creates a brittle trust model because the application now has to enforce security consistently across every request path.
A policy enforcement point, such as an API gateway or model gateway, changes that pattern by inserting runtime controls between users, applications, and the model. Current guidance suggests applying policy at the request boundary so security teams can evaluate context before the prompt reaches the model, rather than trusting the client to behave correctly. The NIST AI 600-1 GenAI Profile and NIST Cybersecurity Framework 2.0 both support this kind of measurable control plane thinking.
In operational terms, teams usually need four things:
- Request-time authorization so the caller, model, and action are checked together.
- Prompt inspection so sensitive data, unsafe instructions, and disallowed content can be detected before forwarding.
- Output controls so the response can be screened for leakage, hallucinated secrets, or policy violations.
- Central logging so prompt lineage, decision outcomes, and model usage can be reviewed during incident response.
This is also where NHI discipline matters. If the model is reached with long-lived secrets, weak service identity, or broad network reach, the gateway becomes only a partial control. The safer pattern is to pair policy enforcement with short-lived credentials, workload identity, and scoped entitlements, consistent with the lifecycle and governance approach described in Ultimate Guide to NHIs — Lifecycle Processes for Managing NHIs. These controls tend to break down when teams bypass the gateway for latency-sensitive internal calls because policy coverage becomes inconsistent across application paths.
Common Variations and Edge Cases
Tighter policy enforcement often increases latency, implementation effort, and change-management overhead, so organisations have to balance control depth against developer velocity. That tradeoff is real, but it is usually cheaper than investigating uncontrolled model access after the fact.
Best practice is evolving, and there is no universal standard for every GenAI deployment pattern yet. Some environments use inline gateways for all model traffic, while others apply controls only to high-risk workloads, regulated data, or external model calls. The important distinction is whether policy is enforced independently of the application logic. If the app can skip checks, alter prompts, or write directly to the model endpoint, then governance is conditional rather than dependable.
Edge cases appear in multi-tenant platforms, agentic workflows, and embedded copilots. In those settings, a single user request may fan out into multiple tool calls, cached context updates, or retrieval operations, which means a simple allow or deny at the front door may not be sufficient. Security teams should watch for hidden data paths, shared service accounts, and model-to-model chaining, because those patterns can bypass the original policy intent. That is why DeepSeek breach analysis and the LLMjacking research are relevant: once model access is reachable through weak identity controls, attackers focus on the path of least resistance, not the intended architecture.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10, OWASP Agentic AI Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | Direct model links often expose weak NHI authentication and access paths. |
| OWASP Agentic AI Top 10 | A-03 | Agentic and GenAI paths need runtime controls before tool or model use. |
| CSA MAESTRO | T4 | MAESTRO addresses governance gaps in AI service interactions and enforcement. |
| NIST AI RMF | AI RMF governs risk, transparency, and accountability for GenAI systems. | |
| NIST CSF 2.0 | PR.AC-4 | Least-privilege access is central when applications call models directly. |
Document model access controls, monitoring, and accountability for each GenAI workflow.
Related resources from NHI Mgmt Group
- What breaks when organisations let agents and models connect directly to tools without gateway enforcement?
- What breaks when AI applications call models directly without a gateway or shared controls?
- What breaks when AI systems are trusted without runtime policy enforcement?
- What breaks when AI requests are sent directly to multiple model providers without gateway enforcement?