Info icon
End of Life Notice: For Trend Cloud One™ - Conformity Customers, Conformity will reach its End of Sale on “July 31st, 2025” and End of Life “July 31st, 2026”. The same capabilities and much more is available in TrendAI Vision One™ Cloud Risk Management. For details, please refer to Upgrade to TrendAI Vision One™
Use the Knowledge Base AI to help improve your Cloud Posture

Autonomous AI Databases Encrypted with Customer-Managed Keys

TrendAI Vision One™ provides continuous assurance that gives peace of mind for your cloud infrastructure, delivering over 1400 automated best practice checks.

Risk Level: High (not acceptable risk)
Rule ID: OCI-AutonomousAIDatabase-008

Ensure that your Oracle Cloud Infrastructure (OCI) Autonomous AI Databases are encrypted with Customer-Managed Keys (CMKs) instead of Oracle-managed keys (i.e. default keys used by OCI for encryption at rest) in order to have a more granular control over your data encryption and decryption process.

Security

In Oracle Cloud Infrastructure (OCI), encryption at rest protects your Autonomous AI Databases and assists in fulfilling your organization's security and compliance requirements. The OCI Autonomous AI Database service encrypts all data at rest by default. The encryption process uses Oracle-managed keys, also known as service-managed keys. However, to meet stringent regulatory standards, you can bring your own keys (i.e. Customer-Managed Keys) in order to fully control who can use the encryption keys and access the encrypted data.


Audit

To determine if your Oracle Cloud Infrastructure (OCI) Autonomous AI Databases are encrypted using Customer-Managed Keys (CMKs), perform the following operations:

Using OCI Console

  1. Sign in to your Oracle Cloud Infrastructure (OCI) account.

  2. Navigate to Autonomous AI Databases console available at https://cloud.oracle.com/db/adbs.

  3. For Applied filters, choose an OCI compartment from the Compartment dropdown menu, to list the Autonomous AI Databases provisioned in the selected compartment.

  4. Click on the name (link) of the Autonomous AI Database that you want to examine, listed in the Display Name column.

  5. Select the Autonomous AI Database information tab, and check the Encryption key attribute value, listed in the Encryption section. If Encryption key is set to Oracle-managed key, encryption at rest using Customer-Managed Keys (CMKs) is not enabled for the selected Oracle Cloud Infrastructure (OCI) Autonomous AI Database.

Using OCI CLI

  1. Run iam compartment list command (Windows/macOS/Linux) with output query filters to list the ID of each compartment available in your Oracle Cloud Infrastructure (OCI) account:

    oci iam compartment list
    	--all
    	--include-root
    	--query 'data[]."id"'
    
  2. The command output should return the requested OCI compartment identifiers (OCIDs):

    [
    	"ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    	"ocid1.compartment.oc1..abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd"
    ]
    
  3. Run db autonomous-database list command (Windows/macOS/Linux) with the ID of the OCI compartment that you want to examine as the identifier parameter, to list the ID of each Autonomous AI Database provisioned in the selected OCI compartment:

    oci db autonomous-database list
    	--compartment-id 'ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--all
    	--query 'data[]."id"'
    
  4. The command output should return the requested database instance IDs:

    [
    	"ocid1.autonomousdatabase.oc1.ap-sydney-1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    	"ocid1.autonomousdatabase.oc1.ap-sydney-1.abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd"
    ]
    
  5. Run db autonomous-database get command (Windows/macOS/Linux) with the name of the Autonomous AI Database that you want to examine as the identifier parameter and custom output filters to determine if encryption at rest using Customer-Managed Keys (CMKs) is enabled for the selected database instance:

    oci db autonomous-database get
    	--autonomous-database-id 'ocid1.autonomousdatabase.oc1.ap-sydney-1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--query='data."kms-key-id"'
    
  6. The command output should return the ID of the Customer-Managed Key (CMK) configured for the selected database instance:

    "ORACLE_MANAGED_KEY"
    

    If the db autonomous-database get command output returns "ORACLE_MANAGED_KEY" instead of the CMK ID, as shown in the output example above, encryption at rest using Customer-Managed Keys (CMKs) is not enabled for the selected Oracle Cloud Infrastructure (OCI) Autonomous AI Database.

Remediation / Resolution

To enable encryption at rest for your Oracle Cloud Infrastructure (OCI) Autonomous AI Databases using Customer-Managed Keys (CMKs), perform the following operations:

Using OCI Console

  1. Sign in to your Oracle Cloud Infrastructure (OCI) account.

  2. Navigate to Vaults console available at https://cloud.oracle.com/security/kms.

  3. For Applied filters, choose the OCI compartment that you want to access from the Compartment dropdown menu.

  4. Choose Create Vault and perform the following actions to create the OCI Vault that will store your new Customer-Managed Key (CMK):

    1. For Create in Compartment, select the appropriate OCI compartment.
    2. For Name, enter a unique name for the new Vault.
    3. (Optional) Check the Make it a virtual private vault setting checkbox if you want a dedicated partition in a Hardware Security Module (HSM).
    4. (Optional) Choose Tags, select Add tag, and use the Key and Value fields to improve resource management by adding resource tags.
    5. Choose Create Vault to deploy your new OCI Vault.
  5. Once the Vault deployment is complete, click on the name (link) of the new OCI Vault instance, listed in the Name column.

  6. Select the Master encryption keys tab, choose Create Key, and perform the following actions to create the Customer-Managed Key (CMK) required for database instance encryption:

    1. For Create in Compartment, select the appropriate OCI compartment.
    2. For Protection Mode, choose the suitable protection mode for your key. The protection mode indicates how the key persists and where cryptographic operations that use the key are performed. Choose HSM to store and process the key on a Hardware Security Module (recommended for use cases with stringent compliance requirements) or Software to store and process the key on a server (recommended for most use cases). For more details about key protection modes, see the OCI official documentation.
    3. For Name, enter a unique name for the new encryption key.
    4. For Key Shape: Algorithm and Key Shape: Length, choose AES (Symmetric key used for Encrypt and Decrypt) with 256 bits.
    5. (Optional) Choose Tags, select Add tag, and use the Key and Value fields to add tags in order to organize your resource.
    6. Choose Create Key to generate your new Customer-Managed Key (CMK).
  7. Once your new KMS key is available, navigate to Autonomous AI Databases console available at https://cloud.oracle.com/db/adbs.

  8. For Applied filters, choose an OCI compartment from the Compartment dropdown menu, to list the Autonomous AI Databases provisioned in the selected compartment.

  9. Click on the name (link) of the Autonomous AI Database that you want to configure, listed in the Display Name column.

  10. Select More actions from the page top menu, choose Manage encryption key, and perform the following actions to select the key:

    1. Choose Encrypt using a customer-managed key.
    2. For Key type, select Oracle.
    3. For Key location, select This tenancy.
    4. For Vault, select the name of the OCI Vault created in step no. 4.
    5. For Master encryption key, select the name of the Customer-Managed Key created in step no. 6.
    6. Choose Save to associate the Customer-Managed Key (CMK) key with the selected OCI Autonomous AI Database.

Using OCI CLI

  1. Run kms management vault create command (Windows/macOS/Linux) to create the OCI Vault that will store your new KMS Customer-Managed Key (CMK):

    oci kms management vault create
    	--display-name 'cc-project5-oci-vault'
    	--vault-type 'DEFAULT'
    	--compartment-id 'ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    
  2. The command output should return the configuration information available for the new OCI Vault:

    {
    	"data": {
    		"compartment-id": "ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd",
    		"crypto-endpoint": null,
    		"defined-tags": {},
    		"display-name": "cc-project5-oci-vault",
    		"external-key-manager-metadata-summary": null,
    		"freeform-tags": {},
    		"id": "ocid1.vault.oc1.ap-sydney-1.abcd1234abcda.aaaabbbbccccddddabcdabcd1234abcd1234abcd1234abcd1234abcd1234",
    		"is-primary": true,
    		"is-vault-replicable": null,
    		"lifecycle-state": "CREATING",
    		"management-endpoint": null,
    		"replica-details": null,
    		"restored-from-vault-id": null,
    		"time-of-deletion": null,
    		"vault-type": "DEFAULT",
    		"wrappingkey-id": ""
    	},
    	"etag": "abcd1234abcd1234abcd1234abcd1234abcd1234"
    }
    
  3. Run kms management vault get command (Windows/macOS/Linux) to describe the management endpoint configured for the OCI Vault created in the previous steps:

    oci kms management vault get
    	--vault-id 'ocid1.vault.oc1.ap-sydney-1.abcd1234abcda.aaaabbbbccccddddabcdabcd1234abcd1234abcd1234abcd1234abcd1234'
    	--query 'data."management-endpoint"'
    
  4. The command output should return the URL of the management endpoint configured for the selected Vault:

    "https://abcd1234abcda-management.kms.ap-sydney-1.oraclecloud.com"
    
  5. Run kms management key create command (Windows/macOS/Linux) to create a new KMS Customer-Managed Key (CMK) for your OCI Vault. For --key-shape parameter, specify the key shape algorithm and length. For --protection-mode parameter, specify the suitable protection mode for your key. For the --endpoint parameter, specify the OCI Vault management endpoint returned in the previous step:

    oci kms management key create
    	--display-name 'cc-project5-kms-key'
    	--key-shape '{"algorithm":"AES","length":32}'
    	--protection-mode 'SOFTWARE'
    	--endpoint 'https://abcd1234abcda-management.kms.ap-sydney-1.oraclecloud.com'
    	--compartment-id 'ocid1.tenancy.oc1..aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--query 'data."id"'
    
  6. The command output should return the configuration information available for the new KMS key:

    "ocid1.key.oc1.ap-sydney-1.abcd1234abcda.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd"
    
  7. Run db autonomous-database configure-key command (Windows/macOS/Linux) with the name of the Autonomous AI Database that you want to configure as the identifier parameter, to enable encryption at rest with OCI KMS Customer-Managed Keys (CMKs) for the selected database instance. For --vault-id, provide the resource ID of your OCI Vault, returned in step no. 2. For the --kms-key-id parameter, specify the ID of your Customer-Managed Key, returned in the previous step:

    oci db autonomous-database configure-key
    	--autonomous-database-id 'ocid1.autonomousdatabase.oc1.ap-sydney-1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    	--vault-id 'ocid1.vault.oc1.ap-sydney-1.abcd1234abcda.aaaabbbbccccddddabcdabcd1234abcd1234abcd1234abcd1234abcd1234'
    	--kms-key-id 'ocid1.key.oc1.ap-sydney-1.abcd1234abcda.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd'
    
  8. The command output should return the command request ID and eTag:

    {
    	"etag": "abcd1234",
    	"opc-work-request-id": "ocid1.coreservicesworkrequest.oc1.ap-sydney-1.aaaabbbbccccddddabcd1234abcd1234abcd1234abcd1234abcd1234abcd"
    }
    

References

Publication date Dec 3, 2025