Enabling and Updating Auto Key Rotation
Learn about enabling automatic key rotation, and about updating automatic rotation settings for keys that already have this feature enabled.
This feature is available only for private vaults.
You can update automatic key rotation settings to do the following:
- Enable automatic rotation for keys that don't have this feature enabled
- Update the date on which the next rotation happens
- Update the rotation interval (the number of days, between 60 and 365, that pass before a key is rotated)
Manual Key Rotation
See Rotating a Key for information on manually rotating an encryption key. See Key Versions & Rotations in the the Key and Secret Management Concepts topic for an overview of key rotation.
- Open the navigation menu , select Identity & Security, and then select Vault.
- Under List scope, select a compartment that contains the vault that contains the key that you want to update.
- On the Vaults page, select the name of the vault to open its details page.
- In the Key Details page, select Edit auto-rotation settings.
- In the Edit auto-rotation settings page, update auto rotation details such as auto rotation setting, rotation schedule, or rotation interval.
- Select Update.
Open a command prompt and run
Key Update
to edit the auto rotation settings.oci kms management key update --endpoint <control_plane_url> --key-id <id> --auto-key-rotation-details <complex_type> ey_encryption_information> --is-auto-rotation-enabled <true | false> --auto-key-rotation-details <schedule_interval_information>
For example:
oci kms management key update --endpoint https://annnb3f4aacuu-management.kms.us-ashburn-1.oraclecloud.com --key-id ocid1.key.oc1.iad.annnb3f4aacuu.abuwcljsw3722rumzrqf7wkzzo34auj5e34igrw2mqkocjircbggmpfyzmda --is-auto-rotation-enabled true --auto-key-rotation-details '{"rotationIntervalInDays": 90, "timeOfScheduleStart":"2024-05-08T00:00:00Z"}'
Avoid entering confidential information.
For a complete list of parameters and values for CLI commands, see KMS CLI Command Reference.
Use the UpdateKey API with the Management Endpoint to update automatic key rotation settings for a key.
Note
The Management Endpoint is used for management operations including Create, Update, List, Get, and Delete. The Management Endpoint is also called the control plane URL or the KMSMANAGMENT endpoint.
The Cryptographic Endpoint is used for cryptographic operations including Encrypt, Decrypt, Generate Data Encryption Key, Sign, and Verify. The Cryptographic Endpoint is also called the data plane URL or the KMSCRYPTO endpoint.
You can find the management and cryptographic endpoints in a vault's details metadata. See Getting a Vault's Details for instructions.
For regional endpoints for the Key Management, Secret Management, and Secret Retrieval APIs, see API Reference and Endpoints.
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.