In Oracle Cloud Infrastructure, whoever can use, disable or schedule deletion of a master encryption key controls every bucket, volume and secret that key protects, so Vault security is mostly an IAM policy problem. OCI Vault (the Key Management service) holds master encryption keys in HSMs or software, and the separate Secret Management service stores passwords, certificates, SSH keys and tokens encrypted by those keys. Choices made at creation (vault type, protection mode) cannot be changed later, and a key placed in pending deletion makes its data unreadable at once. This guide covers vault types and HSM options, the IAM resource types and verbs that govern keys and secrets, how services and workloads are granted key use, rotation for keys and secrets, logging and a hardening baseline. It is for OCI cloud security engineers, platform teams and auditors. Details were checked against Oracle documentation on 8 November 2026; tenancy-wide OCI controls are in the Oracle Cloud Infrastructure Security Guide.
This is an independent guide from NHI Mgmt Group, based on Oracle's public documentation as of November 2026. It is not sponsored or reviewed by Oracle. Product features change, so confirm settings against Oracle's current documentation.
Key takeaways
- Pick the vault type and protection mode deliberately. Neither can be changed after creation; automatic key rotation and vault backup are available only in virtual private vaults.
- Separate key administration from key use.
manage keysincludes rotate, delete, import and backup;use keysincludes encrypt, decrypt, sign and export. Give application teamsuse key-delegate, not either of those. - Scope every statement to a key or vault OCID. Oracle's own sample policies use
where target.key.id = '<key_OCID>'; without it a grant covers every key in the compartment. - Treat deletion as an outage. The waiting period is 7 to 30 days (default 30), but data encrypted by the key is inaccessible as soon as deletion is scheduled. Disable or cancel rather than delete when unsure.
- Read secrets with workload identities, not stored API keys. Grant
read secret-bundlesto a dynamic group, scoped bytarget.secret.nameor vault, and apply expiry and reuse rules to every secret.
How identity and access work in OCI Vault
Vault has three building blocks. A vault is the container and its HSM partition. A master encryption key (MEK) lives in a vault, has one or more versions and a stable OCID across rotations. A secret is stored by the Secret Management service, base64 encoded and encrypted by a vault key, but not stored in the HSM. Every action on these is authorised by OCI IAM policy statements written against Vault resource types.
Vault types
| Type | What it is | Capabilities | When to choose it |
|---|---|---|---|
| Default vault | Shares HSM partitions with other vaults | Key versions billed individually; no automatic key rotation; no vault backup | Most workloads without isolation requirements |
| Virtual private vault | Isolated partition on an HSM | 1,000 key versions included; vault backup; automatic key rotation | Regulated data, scheduled rotation, backup and restore needs |
| Dedicated KMS | Customer-managed, single-tenant HSM cluster, three auto-synchronised partitions | HSM-protected keys only; AES, RSA and ECDSA | Requirements for single-tenant HSM control |
| External KMS | Keys held in a third-party key manager outside OCI; OCI holds references | Keys can be disabled from outside at any time | Hold-your-own-key and sovereignty requirements |
Oracle states that its Vault HSMs are certified to FIPS 140-2 Security Level 3. For the trade-offs of keeping keys outside the provider, see the BYOK, HYOK and External Key Management Guide.
Protection modes and algorithms
| Protection mode | Where key material lives | Exportable | Notes |
|---|---|---|---|
| HSM | Inside the HSM; operations run on the HSM | No (public halves of RSA and ECDSA keys can be downloaded) | Default choice for master keys protecting regulated data |
| Software | On a server, encrypted at rest by an HSM root key | Yes | Cheaper; anyone with export permission can extract the key |
| External | Third-party KMS outside OCI | Stays outside OCI | Availability depends on the external system |
- Algorithms: AES keys encrypt and decrypt; RSA keys encrypt, decrypt, sign and verify; ECDSA keys sign and verify only.
- Envelope encryption: Object Storage, Block Volume and File Storage generate data encryption keys and store only the DEK encrypted by your MEK; reading plaintext needs a call to Vault, which IAM controls. A generated DEK must be equal or greater in strength than the MEK. See the Envelope Encryption and KMS Integration Patterns Guide.
- BYOK import: each vault includes a 4,096-bit RSA wrapping key whose public half wraps key material for import; it cannot be created, rotated or deleted by you.
- Region: an integrated service can use a key only when the vault is in the same region. Plan one vault per region per data classification.
- Endpoints: vault provisioning uses a regional endpoint, while key management, cryptographic operations, secret management and secret retrieval each have separate endpoints. Reach them privately through a service gateway rather than an internet gateway.
Admin roles and privileged access
Vault permissions are cumulative across the verbs inspect, read, use and manage. The table shows what each verb adds on the resource types that matter most.
| Resource type | use adds | manage adds | Who should hold it |
|---|---|---|---|
vaults | VAULT_CREATE_KEY, VAULT_IMPORT_KEY, VAULT_CREATE_SECRET | VAULT_CREATE, VAULT_UPDATE, VAULT_DELETE, VAULT_MOVE, VAULT_BACKUP, VAULT_RESTORE, VAULT_REPLICATE | Key administrators only |
keys | KEY_ENCRYPT, KEY_DECRYPT, KEY_EXPORT, KEY_SIGN, KEY_VERIFY | KEY_CREATE, KEY_UPDATE, KEY_ROTATE, KEY_DELETE, KEY_MOVE, KEY_IMPORT, KEY_BACKUP, KEY_RESTORE | use: specific services or signing workloads; manage: key administrators |
key-delegate | KEY_ASSOCIATE, KEY_DISASSOCIATE | None | Teams that attach keys to their buckets, volumes or clusters |
hsm-cluster | HSM_CLUSTER_UPDATE | HSM_CLUSTER_CREATE, HSM_CLUSTER_DELETE, HSM_CLUSTER_MOVE | Dedicated KMS operators |
secrets | SECRET_UPDATE | SECRET_CREATE, SECRET_DELETE, SECRET_MOVE, SECRET_ROTATE, SECRET_REPLICATE_CONFIGURE | Secret owners |
secret-bundles | None (read gives SECRET_BUNDLE_READ, the secret contents) | None | The workload that consumes the secret, and nobody else |
- Do not hand out secret-family broadly:
secret-familyis an aggregate ofsecrets,secret-versionsandsecret-bundles, souse secret-familylets a group read contents. Oracle's sampleAllow group SecretsUsers to use secret-family in tenancyis a starting point, not a least privilege policy. - Split duties: Oracle's sample policies give a SecurityAdmins group
manage vaults,manage keysandmanage secret-familyin the tenancy. In larger organisations split this: one group manages vaults and keys, another manages secrets, and neither reads secret bundles in production. - Watch KEY_EXPORT and request.includePlainTextKey:
use keysincludes export for software keys and data key generation can return plaintext; the policy variablerequest.includePlainTextKeylets you write conditions on that request. - Protect the policies themselves: anyone who can edit IAM policies in the compartment can grant themselves key access. Keep vaults in a dedicated security compartment whose policies only tenancy administrators can change.
Integrations, API tokens and service accounts
Two non-human patterns cover most Vault traffic: OCI services encrypting customer data with your key, and workloads reading secrets.
Letting services use a customer-managed key
Customer-managed encryption needs two statements. The service gets key use, scoped to one key, and the team attaching the key gets use key-delegate. Oracle's documented form is:
- Service grant:
Allow service blockstorage, objectstorage-<region_name>, oke, streaming to use keys in compartment ABC where target.key.id = '<key_OCID>', with oneobjectstorage-entry per region (for exampleobjectstorage-us-ashburn-1). - Delegation grant:
Allow group VolumeWriters to use key-delegate in compartment ABC where target.key.id = '<key_OCID>', or the same for a dynamic group when automation attaches keys.
Workloads reading secrets
- Use workload identity: compute instances, functions and container workloads should authenticate as members of a dynamic group (instance or resource principals) rather than carrying a user's API signing key. A user API key in a container image is a long-lived credential that outlives the workload. See the Workload Identity Federation Guide if your team federates from outside OCI.
- Scope reads to named secrets:
read secret-bundleswithwhere target.secret.name = '...'ortarget.vault.idso a compromised workload reads only its own secrets. - Retrieve at start-up, cache briefly: fetch the current version through
GetSecretBundleorGetSecretBundleByNameand re-read on authentication failure so rotation does not cause outages. - Metadata as a target: workload credentials obtained from the instance metadata service are the prize an attacker in a compromised instance looks for (ATT&CK T1552.005 Cloud Instance Metadata API); dynamic group scope decides how far they reach.
Where identity fits: every service grant, dynamic group and secret reader is a non-human identity with access to protected data. Record an owner for each. See the Secrets Management Guide.
Rotation for keys and secrets
| Item | Mechanism | Limits and behaviour |
|---|---|---|
| Master key, manual | Rotate creates a new key version; OCID unchanged | Old versions stop encrypting but still decrypt; for asymmetric keys you must track which version signed or encrypted what |
| Master key, automatic | Schedule with interval and start date | Virtual private vaults only; 60 to 365 days; key must be enabled; failures can raise OCI Events that trigger Functions |
| Key version quota | Counts against vault limits | AES version counts as 1, RSA and ECDSA versions as 2 |
| Secret, rotation | New secret version; OCID unchanged | Old versions remain with a non-current rotation state |
| Secret, expiry rule | Version lifetime and absolute expiry | Version lifetime 1 to 90 days; absolute expiry 1 to 365 days after creation; optionally block retrieval after expiry |
| Secret, reuse rule | Blocks reuse of earlier contents | Optionally includes deleted versions |
Oracle notes that an expiry rule does not update the secret for you: the version must still be rotated, so pair expiry with an owner and a rotation job against the target system. See the Cryptographic Key Management Guide for cryptoperiod choices.
Logging and detection
The OCI Audit service automatically records calls to supported public API endpoints, including Vault and Secret Management, with request and response parameters. Key rotation success and failure also emit OCI Events.
| Activity | Why it matters | Response |
|---|---|---|
| ScheduleKeyDeletion or key disable | Immediate loss of access to everything the key protects; also a destructive attacker tactic (T1485 Data Destruction) | Page on-call; verify change ticket; cancel deletion within the waiting period if unplanned |
| IAM policy changes mentioning keys, vaults, secret-family or key-delegate | Privilege escalation to key or secret access (T1098 Account Manipulation) | Alert and review the statement diff |
| Spikes in GetSecretBundle by one principal | Bulk secret harvesting (T1555.006 Cloud Secrets Management Stores) | Compare against the workload's normal read pattern |
| Key export or plaintext data key requests | Key material leaving the HSM boundary | Allow only from approved principals |
| Vault backup, restore, move or replicate | Keys copied to new locations or compartments | Require change approval |
| Failed rotation events | Keys silently past their cryptoperiod | Route to the key owner |
Forward Audit events to your SIEM; Cloud Guard detectors can add posture findings. See the OCI Cloud Guard and Security Zones Guide.
Metrics
- Scoped grants: percentage of Vault policy statements with a
target.key.id,target.vault.idortarget.secret.namecondition. - Rotation coverage: percentage of master keys with automatic rotation or a documented manual schedule, and keys past their cryptoperiod.
- Secret rules: percentage of secrets with an expiry rule and a reuse rule.
- Stored user credentials: count of workloads using user API keys instead of dynamic groups (target zero).
- Unplanned destructive actions: key disables or deletion schedules without a change record.
Hardening baseline
- Design: create a dedicated security compartment for vaults; one vault per region per data classification; virtual private vaults where you need rotation schedules or backup; HSM protection mode for master keys.
- Policies: write separate groups for vault administration, key administration and secret ownership; grant services and delegates per key OCID; give workloads
read secret-bundleson named secrets only. Test each statement in a non-production compartment before applying it to production. - Network: reach Vault endpoints through a service gateway from private subnets.
- Rotation: enable automatic key rotation (60 to 365 days) in private vaults; add expiry and reuse rules to secrets and automate rotation against the target systems.
- Deletion safety: prefer disable to delete; when deleting, keep the 30-day default, re-key dependent resources first, and use logs to confirm the key is unused. Remember data is inaccessible as soon as deletion is scheduled; the rollback is cancelling deletion within the window.
- Resilience: back up private vaults, and configure cross-region secret replication where disaster recovery needs secrets in another region. See the Cryptographic Key Management Policy Template.
- Monitoring: alert on the activities in the logging table and review Vault policies quarterly.
Decision guidance
- Oracle-managed or customer-managed keys: Oracle-managed encryption is on by default for storage services; move to customer-managed keys when you need to control revocation, rotation cadence or separation of duties for audit.
- Default or private vault: default vaults suit most teams; choose private vaults when automatic rotation, vault backup or partition isolation is required.
- External KMS: choose it only when keys must stay outside OCI, and accept that the external system becomes a dependency for every encrypt and decrypt.
- Small tenancy: one security compartment, one vault per region, two groups (key admins and secret owners) and per-key service grants is a sound baseline.
Common misconfigurations
- Unscoped service grants:
Allow service objectstorage-... to use keys in tenancylets the service use every key, so a team can encrypt its bucket with another team's key. - Developers with use secret-family in tenancy: copying Oracle's sample unchanged gives read access to every secret's contents.
- Software keys with broad use keys: software-protected keys are exportable, so KEY_EXPORT in the wrong hands means the key has left your control.
- Deletion as cleanup: scheduling deletion of a low-activity key that still protects backups makes them unreadable immediately.
- User API keys in workloads: long-lived signing keys copied into images or CI variables instead of dynamic groups; this is the same class of exposure seen when stolen cloud credentials unlock secret stores (T1078.004 Cloud Accounts).
- Expiry without rotation: an expiry rule set to block retrieval, with no rotation job, takes the application down on the expiry date.
Framework mapping
| Control | NIST SP 800-53 Rev. 5 | NIST CSF 2.0 | ATT&CK addressed |
|---|---|---|---|
| Vault type, HSM protection, rotation | SC-12, SC-13 | PR.DS-01 | T1552 Unsecured Credentials |
| Customer-managed keys for storage services | SC-28 | PR.DS-01 | T1486 Data Encrypted for Impact (restricting who controls keys) |
| Verb and OCID-scoped IAM policies | AC-3, AC-6 | PR.AA-05 | T1098 Account Manipulation |
| Secret rules and workload identities | IA-5 | PR.AA-05 | T1555.006 Cloud Secrets Management Stores, T1078.004 Cloud Accounts |
| Audit logging and alerting | AU-2, AU-6 | PR.PS-04, DE.CM-09 | T1485 Data Destruction |
| Vault backup and secret replication | CP-9 | PR.DS-01 | T1485 Data Destruction |
Practitioner checklist
- Keep vaults in a dedicated compartment whose IAM policies only tenancy administrators can edit.
- Choose vault type and protection mode per data classification before creating keys; use HSM mode for master keys.
- Scope every service, delegate and secret grant with a key, vault or secret condition.
- Separate key administration, secret ownership and secret reading into different groups.
- Use dynamic groups for workloads; remove user API keys from images and pipelines.
- Enable automatic key rotation in private vaults and expiry plus reuse rules on secrets, with rotation jobs.
- Alert on key disable, deletion scheduling, export and Vault-related policy changes.
- Back up private vaults and replicate secrets needed for disaster recovery.
Standards and references
- Oracle: Key Management overview
- Oracle: Details for the Vault service (policy reference)
- Oracle: Common policies
- Oracle: Deleting a master encryption key
- Oracle: Secret rules
- Oracle: Secret Management overview
- Oracle: Audit overview
- NIST: SP 800-53 Rev. 5
Related NHI Mgmt Group resources: Oracle Cloud Infrastructure Security Guide · OCI Cloud Guard and Security Zones Guide · Cryptographic Key Management Guide · Secrets Management Guide