Insights · AI Security and Identity
Oracle agentic AI security: four layers between an agent and your dataIAM, agent identity, tool access and database-enforced authorization in OCI Generative AI and Oracle AI Database 26ai. What each layer does, where the defaults are too broad, and what evidence an auditor will ask for.
Every major platform is now answering the same question in its own way: when an AI agent touches enterprise data, whose authority is it using, and what stops it from going further than it should?
Oracle’s answer to AI agent security is worth studying because it doesn’t rely on the model behaving well. It puts the controls in IAM policy and, most interestingly, inside the database itself.
Framing
Why agents change the security model
Traditional applications follow fixed code paths. Review the code and you know what the application can do.
Agents are different. They decide at runtime which tool to call, and they often write their own SQL. That turns an agent into a new class of non-human identity, one whose behavior you cannot fully predict from its configuration.
An agent should be governed like a privileged user, not trusted like a piece of code.
Risk
The threat model
Oracle frames agent risk around three OWASP concerns for AI systems: prompt injection, excessive agency and sensitive data disclosure (Deep Data Security technical brief). In a database, all three end in the same place: unauthorized SQL. I would add a fourth that matters just as much to auditors, which is losing track of which person an agent acted for.
| Risk | What it looks like | Primary control |
|---|---|---|
| Prompt injection | Crafted input steers the agent into an action its user never asked for | Tool scope + database authorization |
| Excessive agency | Agent runs on a broad service account and can reach far beyond its task | Agent identity + least privilege |
| Sensitive data disclosure | Retrieval or SQL pulls restricted rows or fields into a response | Database-enforced authorization |
| Lost accountability | Logs show “the agent” acted, not the person who asked | Identity propagation + audit |
Multi-agent systems widen the blast radius. Oracle notes that one compromised agent can pass actions on to others, which makes attacks harder to detect and contain.
Architecture
Oracle AI agent security in four layers
Every agent request has to clear four independent checks before it reaches data. A failure in one does not open the others.
Agent request · four independent checks
Layer 01
IAM for people
Who can build, operate and call it?
IAM groups + policies
Layer 02
Agent identity
What does the agent run as?
Resource principal, dynamic group
Layer 03
Tool access
Which actions may it take?
Scoped tools, approval for writes
Layer 04
Database authorization
Which rows and fields can it see?
Deep Data Security
If the model is manipulated, layer 04 still decides what data comes back.
Layer 1
IAM for people
OCI IAM decides which humans can create, change and call agents, and it starts closed. By default only the Administrators group can touch Generative AI Agents resources. Everyone else must be granted access by policy (OCI documentation).
The quick-start grant covers the whole service with manage genai-agent-family in tenancy. That is fine for a sandbox and too wide for production. The service has separate resource types for agents, knowledge bases, data sources, ingestion jobs, endpoints, sessions, tools and work requests, so access can be split by role and pinned to a compartment.
# Quick start: every agent resource, whole tenancy
allow group GenAI-admins to manage genai-agent-family in tenancy
# Production: split by role, pinned to one compartment
allow group Agent-builders to manage genai-agent in compartment AI-Dev
allow group Agent-builders to manage genai-agent-knowledge-base in compartment AI-Dev
allow group Agent-operators to manage genai-agent-endpoint in compartment AI-Prod
allow group Agent-users to use genai-agent-endpoint in compartment AI-Prod
allow group Agent-users to manage genai-agent-session in compartment AI-Prod
| Persona | Needs | Should not have |
|---|---|---|
| Agent builder | Manage agents, tools and knowledge bases in a dev compartment | Production endpoints; data buckets beyond what ingestion requires |
| Platform operator | Manage endpoints and monitor work requests | Rights to change agent instructions or tools |
| Application or end user | Use a published endpoint and its sessions | Any rights over agents, tools or knowledge bases |
Oracle’s Fusion guidance makes the same point for AI Agent Studio: keep builder, run and service-account privileges separate, so least-privilege reviews stay manageable (Identity and Security in AI Agent Studio).
Layer 2
Agent identity
An agent never borrows a person’s OCI credentials. It authenticates as a resource principal, belongs to a dynamic group, and gets only what IAM policies grant that group. An agent reading from Oracle AI Database 26ai, for example, needs its dynamic group allowed to read database-tools-family in one compartment.
I would treat every dynamic group exactly like a service account: one per agent or workload, a named owner, the narrowest matching rule you can write, and a line in the periodic access review.
Inbound and outbound are two different questions
For agent applications hosted on OCI Generative AI, Oracle splits authentication in two (OCI documentation: Authentication).
Inbound · who may call the agent
Caller
user or application
signed in via IdP
Agent endpoint
validates OAuth 2.0 token first
Checked by: identity domain · OAuth app registered
No valid token, no call.
Outbound · what the agent may call
Agent application
resource principal
in a dynamic group
OCI services
Object Storage, Database, Vault
Checked by: IAM policy · named actions only
Policies name the dynamic group, never a user.
OAuth is the only supported authentication type for agentic tasks, and it needs an application registered in an OCI identity domain beforehand (Permissions to Generative AI Resources). The same page covers private endpoints with zero trust packet security, which keep agent traffic off the public internet.
Generative AI API keys also go through IAM, with a policy restricted to that key’s principal type and ID. Oracle recommends narrowing those policies to specific models or endpoints, or to chat-only access (Adding Key Permissions).
Layer 3
Tool access
Tools are where an agent’s decisions become actions, so every tool is a permission. OCI Generative AI Agents supports RAG, SQL and function-calling tools, and an Agent tool attaches another agent as a subagent (Agent Tool Guidelines).
Oracle’s Fusion guidance breaks least privilege into three scopes, and I find it the clearest way to review any agent (Fusion AI Agents: Secure by Enforcement):
- Identity scope: which principal and token the agent uses.
- Tool scope: which APIs or actions it may invoke.
- Data scope: which records and fields each action can see.
Oracle’s example: a reporting agent that summarizes procurement exceptions does not need to submit supplier changes.
Supervisor agents and cross-tenancy calls
A supervisor agent routes queries to collaborator agents and merges their answers. Collaborators can sit in a different tenancy, which is where trust quietly crosses an organizational boundary.
Tenancy A · your tenancy
Supervisor agent
routes, merges answers
keeps global history
Finance agent
collaborator · SQL tool
Policy agent
collaborator · RAG tool
Dynamic group: resource.type=’genaiagent’
The supervisor also calls into tenancy B ↓
Tenancy B · partner
HR agent
session-enabled endpoint
Endorse in A + Admit in B
Both tenancy owners must agree.
Oracle’s documented setup gives the supervisor a dynamic group that matches every agent resource and grants manage genai-agent-family in tenancy. That default is broad. In production I would scope it to named compartments and to the individual resource types the supervisor actually uses.
Read-only tools can run unattended. Tools that change records, move money or send messages outside the organization should wait for a person to approve them, the pattern Oracle recommends for AI Agent Studio.
Layer 4
Database-enforced authorization
This is the part of Oracle’s approach I find most significant. Oracle Deep Data Security, in Oracle AI Database 26ai, enforces the end user’s authorization inside the database, even when an agent writes the query (Oracle Deep Data Security).
Why does the location matter? Agents often connect with highly privileged service accounts and generate SQL on the fly. If authorization lives only in application code or model guardrails, one bad query gets around it. Enforced in the database, the same rules apply to every app and every agent that shares the data.
Same agent · same SQL
Two users
Alice · Bob
claim: region=East
claim: region=West
AI agent
SELECT * FROM customers
Oracle AI Database
Deep Data Security
validates token · applies grants
Same query for both users.
Different results
Alice sees
Acme, Birch · SSN = NULL
East rows only
Bob sees
Cedar, Dune · SSN = NULL
West rows only
Deny by default. End user named in audit.
The building blocks
Oracle describes four parts (Building Trusted GenAI Experiences with Oracle Deep Data Security):
- Application identities: trusted apps and agents that connect with their own identity or on behalf of users.
- Data grants: declarative SQL policies that allow operations on specific rows, columns or individual values.
- Data roles: named groups of grants, mapped to identities in an external provider such as OCI IAM or Microsoft Entra ID.
- Secure identity propagation: carries the user’s identity and attributes into the database at runtime, for enforcement and audit.
In practice, the user signs in through an OCI identity domain or another supported provider. The application passes the user’s context and token on the database connection. The database validates the token, sets up an end-user security context and activates the mapped data roles. Users don’t need database accounts.
Nothing is visible unless a grant allows it. Oracle’s own example is a sales manager who sees only customers in their region, even if the agent generates a broader query (Introducing Oracle Deep Data Security). The controls also cover JSON duality views and vector data, so RAG retrieval only pulls authorized documents into the prompt.
Put authorization where the model cannot argue with it: in policy, and in the data.
Driver support is already in the common stacks. Oracle names JDBC and python-oracledb for passing OAuth2 tokens, and ODP.NET 23.26.2 adds extension methods for the context payload (Database-Enforced Authorization for Agentic AI .NET Applications).
Walkthrough
One request, end to end
Take a sales manager asking an agent for this quarter’s at-risk accounts. Here is what each layer checks along the way.
- The user signs inThe identity domain issues an OAuth 2.0 token carrying her identity and group claims.
- The endpoint validates the tokenInbound authentication rejects any caller without a valid token. IAM limits who may use the endpoint at all.
- The agent picks a toolOnly the tools configured for this agent are available. Its read-only SQL tool runs; anything that writes waits for approval.
- The agent calls OCI as itselfAs a resource principal, its dynamic group’s policy lets it reach only the approved database.
- The database enforces her rightsDeep Data Security validates her token, activates her data roles, filters to her region and masks sensitive columns.
- Audit records both identitiesThe log names her and the agent that acted on her behalf.
If a prompt injection tried to widen that query, steps 3 and 5 would still hold. That is the point of enforcing controls outside the model.
The question I would ask your leadership
If one of your agents returned a record its user should never have seen, could you show which agent it was, whose token it carried and which policy let the data through?
If the answer depends on reading the prompt, your authorization lives in the wrong place.
Evidence
Compliance mapping and audit evidence
Each layer produces evidence an auditor can test, and each maps to access-control requirements most programs already cover.
| Control | Oracle mechanism | Evidence | Alignment |
|---|---|---|---|
| Role-based access to agents | IAM groups and policies on genai-agent resource types, by compartment | Policy exports; group membership lists | NIST 800-53 AC-2, AC-3; ISO 27001 A.5.15; SOC 2 CC6.1 |
| Segregation of duties | Separate builder, operator and user groups | Role matrix; no user holds conflicting roles | NIST 800-53 AC-5; ISO 27001 A.5.3 |
| Non-human identity management | Resource principals and dynamic groups, one per agent | Inventory of dynamic groups, rules and owners | NIST 800-53 IA-9, AC-2; SOC 2 CC6.2 |
| Least privilege | Narrow verbs, compartment scope, per-agent tool sets | No tenancy-wide manage grants in production | NIST 800-53 AC-6; ISO 27001 A.8.2 |
| Authenticated access | OAuth 2.0 inbound auth; private endpoints | Endpoint and identity-domain configuration | NIST 800-53 IA-2, SC-7; SOC 2 CC6.6 |
| Data-level authorization | Deep Data Security grants and roles, deny by default | Two users, same query, different results | NIST 800-53 AC-3, AC-4; ISO 27001 A.8.3 |
| Human oversight | Approval before write-capable tools execute | Approval workflow; sample approval records | OWASP LLM Top 10: excessive agency |
| Accountability | Identity propagation into database audit | Audit records naming end user and agent | NIST 800-53 AU-2, AU-3; ISO 27001 A.8.15; SOC 2 CC7.2 |
| Periodic access review | Review of groups, dynamic groups, policies and cross-tenancy statements | Signed review records with remediation | NIST 800-53 AC-2(3); ISO 27001 A.5.18 |
These mappings are indicative. Confirm the exact control IDs against the framework versions your organization is audited on.
Interactive
Is this Oracle agent ready for production?
Nine questions I would want answered before an OCI agent gets access to real data. Answer honestly; the result tells you what to fix first.
Oracle agent readiness check
Nine questions before production
Question 1 of 9
Action
Three things to do before your next agent goes live
- Inventory every agent identity and give each an ownerList every dynamic group, Generative AI API key and cross-tenancy Endorse or Admit statement. An agent identity nobody owns is the new orphaned account.
- Replace the quick-start policiesTenancy-wide
manage genai-agent-familygrants belong in sandboxes. In production, split access by role and pin it to compartments and individual resource types. - Push authorization into the data, then test it like an auditorWhere agents query Oracle AI Database 26ai, use Deep Data Security so the database enforces the user’s rights. Run the same agent query as two users and keep the results as evidence.
None of that depends on which model the agent runs.
The organizations that get agent security right will be the ones that stopped asking the model to behave and started making the infrastructure enforce it.
Primary sources for this perspective
- Oracle documentation — Getting Access to Generative AI Agents
- Oracle documentation — Agent Tool Guidelines in Generative AI Agents
- Oracle documentation — OCI Generative AI Authentication
- Oracle documentation — Permissions to Generative AI Resources
- Oracle documentation — Adding Key Permissions
- Oracle — Deep Data Security
- Oracle — Deep Data Security technical brief (PDF)
- Oracle Database blog — Introducing Oracle Deep Data Security
- Oracle Database blog — Building Trusted GenAI Experiences with Deep Data Security
- Oracle Developers blog — Database-Enforced Authorization for Agentic AI .NET Applications
- Oracle Cloud Infrastructure blog — Fusion AI Agents: Secure by Enforcement
- Oracle Fusion CoE blog — Identity and Security in AI Agent Studio
FAQ
Common questions
What identity does an OCI Generative AI agent use?
A resource principal. The agent belongs to a dynamic group, and IAM policies grant that group specific actions on specific resources. It does not use a person’s OCI credentials.
Can an Oracle AI agent see more data than the user who asked?
Not when Oracle Deep Data Security is in place. The application passes the user’s token to Oracle AI Database 26ai, and the database applies that user’s data grants to every query, including queries the agent writes.
What is Oracle Deep Data Security?
A database-native authorization framework in Oracle AI Database 26ai. It enforces row, column and cell-level access for people and AI agents, using declarative SQL policies and identity propagated from an external identity provider such as OCI IAM or Microsoft Entra ID.
Are Oracle’s default agent policies least privilege?
No. Several documented examples grant manage genai-agent-family in tenancy. They are a starting point. Production policies should be scoped to compartments and to individual resource types such as genai-agent-endpoint and genai-agent-session.
How do supervisor agents call agents in another tenancy?
Through an Agent tool pointing at the other agent’s session-enabled endpoint. It requires an Endorse statement in the calling tenancy and an Admit statement in the target tenancy, so both tenancy owners have to agree.
What evidence should compliance teams collect for Oracle AI agents?
IAM policy exports and group memberships, an inventory of dynamic groups and their owners, tool configurations, approval records for write actions, a two-user test of data-level authorization, and audit records that name the end user as well as the agent.
This perspective reflects Oracle documentation and product blog posts as of 28 September 2026. Policy syntax, resource types and product availability change, so verify current documentation before making architecture decisions. Figure 5 uses illustrative data, and framework mappings are indicative.
Cyber DSC · Insights · CISO perspective · 28 Sep 2026
