The attacker calls OCI Generative AI models with a stolen IAM credential or a Generative AI API key, and the tenancy pays for the tokens. Some attackers also create dedicated AI clusters, add data sources or tools to agents, or turn off agent guardrails to reach the data behind them. Cut off the stolen credential and the attacker's API keys first, then save the policies and agent settings they changed.
Look here
Log
Search for
Audit, Generative AI management
API key, cluster and endpoint changes: CreateApiKey, UpdateApiKey, SetApiKeyState, RenewApiKey, CreateDedicatedAiCluster, CreateEndpoint. data.eventName is the API operation name, so confirm the names in your export
Audit, agents
Changes to agent endpoints, data sources, ingestion jobs and tools: UpdateAgentEndpoint, CreateDataSource, UpdateDataSource, CreateDataIngestionJob, CreateTool, UpdateTool
Audit, policies
Policies that open Generative AI to new principals: CreatePolicy and UpdatePolicy whose statements name generative-ai-family or generative-ai-chat, or allow any-user where request.principal.type='generativeaiapikey'
Audit, inference, and copies of prompts
Inference calls, if Audit records them. Search the export for Chat and EmbedText and record whether they appear, because the Generative AI documentation does not say. GenerateText has been unavailable since June 26, 2026. Audit has no field for the request body, and Generative AI has no entry in the Logging service log reference. Prompts exist only where your application or API Gateway logged them, or in agent traces returned to the caller
Monitoring metrics
Invocation and token volume, documented for hosting dedicated AI clusters and endpoints: TotalInvocationCount, InputTokenCount, OutputTokenCount
Cost
Daily cost by service and SKU: oci usage-api usage-summary request-summarized-usages --tenant-id <tenancy-ocid> --time-usage-started <utc> --time-usage-ended <utc> --granularity DAILY --query-type COST --group-by '["service","skuName"]'
Current state, API keys
API keys the owners do not recognize: oci generative-ai api-key-collection list-api-keys -c <compartment-ocid> --all
Deactivate each secret of every suspect Generative AI API key. Deactivation is reversible and keeps the key for evidence. Run the command once per secret: oci generative-ai api-key set-api-key-state --api-key-id <ocid> --key-name <key-name> --state INACTIVE
3
Save each policy that grants Generative AI to any-user, then remove or narrow those statements: oci iam policy update --policy-id <ocid> --statements file://known-good.json
4
If IAM deny policies are already enabled, deny the suspect group. Deny overrides allow. Enabling deny policies is permanent, so leave that to the tenancy owner: deny group <group> to use generative-ai-chat in tenancy
5
Set agent endpoint guardrails back to the baseline. The file sets content moderation, prompt injection and personally identifiable information (PII) protection to Block: oci generative-ai-agent agent-endpoint update --agent-endpoint-id <ocid> --guardrail-config file://guardrails.json
6
Record, then delete the endpoints the attacker created destructive: oci generative-ai endpoint delete --endpoint-id <ocid>
7
Record, then delete the dedicated AI clusters the attacker created destructive: oci generative-ai dedicated-ai-cluster delete --dedicated-ai-cluster-id <ocid>
8
Once the case owner agrees, revoke the stolen secrets irreversible: oci generative-ai api-key set-api-key-state --api-key-id <ocid> --key-name <key-name> --state REVOKED
Eradicate and recover
#
Item
1
List the data sources of each knowledge base. Remove unknown ones and re-ingest from known sources: oci generative-ai-agent data-source list -c <compartment-ocid> --knowledge-base-id <ocid> --all
2
List the tools of each agent and remove unknown ones: oci generative-ai-agent tool list -c <compartment-ocid> --agent-id <ocid>
3
Issue new API keys with expiry dates, store them in Vault, and rotate through the standby secret
4
Limit API key policies to named keys and models with request.principal.id and target.model.id
5
Serve models through a Generative AI private endpoint
6
Add a budget on the AI compartment: oci budgets budget budget create -c <tenancy-ocid> --amount <n> --reset-period MONTHLY --target-type COMPARTMENT --targets '["<compartment-ocid>"]'
7
Add a forecast alert to the budget: oci budgets budget alert-rule create --budget-id <ocid> --type FORECAST --threshold 80 --threshold-type PERCENTAGE
Watch out
Each API key has two secrets, and either one authenticates. Set the state on both.
Prompts and outputs kept by your application, API Gateway or agent traces can contain sensitive data. Restrict access to those copies and preserve them as evidence.
Cost Analysis data can take up to 48 hours to appear, and budget alerts are evaluated every 24 hours. Re-run the cost query two days after containment before closing the case.
A hosting dedicated AI cluster has a minimum commitment of 744 unit-hours, and Oracle's billing example charges that minimum for shorter use.
Oracle documentation: Generative AI API keys, activating, deactivating and revoking an API key, adding API key permissions, IAM policies for Generative AI, API-level permissions for API keys and for chat, Enterprise AI governance, metric details, paying for dedicated AI clusters, creating an endpoint in Generative AI Agents, Audit overview, contents of an Audit log event, Logging service log reference, deny policies, Cost Analysis, cost reports, Budgets overview; OCI CLI help for generative-ai, generative-ai-agent, usage-api and budgets. Checked September 2026. Rechecked October 2026: Generative AI API keys, Generative AI release notes (deprecated APIs), Audit overview, Logging service log reference, and every command against OCI CLI 3.94.2.