Oracle Cloud Infrastructure Documentation

Managing Keys

This topic describes what you can do with keys and key versions in terms of managing their creation and usage. For information about how you can use keys in cryptographic operations, see Using Keys. For information about what you can do with vaults where you store keys, see Managing Vaults.

Management of keys includes the ability to do the following:

  • Create keys
  • View key details
  • View a list of keys
  • View a list of key versions for a specific key
  • Update a key name
  • Manage a key's tags
  • Enable keys for use in cryptographic operations
  • Rotate keys to generate new cryptographic material
  • Disable keys to prevent their usage in cryptographic operations
  • Delete keys to permanently prevent their usage in cryptographic operations or assignment to resources
  • Assign keys to specific resources
  • Remove keys from their assignment to specific resources
  • Move a key to a new compartment

Required IAM Policy

Warning

Keys associated with volumes and buckets will not work unless you authorize Oracle Cloud Infrastructure Block Volume and Oracle Cloud Infrastructure Object Storage to use keys on your behalf. Additionally, you must also authorize users to delegate key usage to these services in the first place. For more information, see Let a user group delegate key usage in a compartment and Let Block Volume and Object Storage services encrypt and decrypt volumes and buckets in Common Policies.

To use Oracle Cloud Infrastructure, you must be given the required type of access in a An IAM document that specifies who has what type of access to your resources. It is used in different ways: to mean an individual statement written in the policy language; to mean a collection of statements in a single, named "policy" document (which has an Oracle Cloud ID (OCID) assigned to it); and to mean the overall body of policies your organization uses to control access to resources. written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you try to perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which A collection of related resources that can be accessed only by certain groups that have been given permission by an administrator in your organization. you should work in.

For administrators: For typical policies that give access to keys and vaults, see Let security admins manage vaults and keys.

Also, be aware that a policy statement with inspect vaults gives the specified group the ability to see all information about the vaults. Likewise, a policy statement with inspect keys gives the specified group the ability to see all information about the keys. For more information, see Details for the Key Management Service.

If you're new to policies, see Getting Started with Policies and Common Policies.

Tagging Resources

You can apply tags to your resources to help you organize them according to your business needs. You can apply tags at the time you create a resource, or you can update the resource later with the desired tags. For general information about applying tags, see Resource Tags.

Monitoring Resources

You can monitor the health, capacity, and performance of your Oracle Cloud Infrastructure resources by using metrics, alarms, and notifications. For more information, see Monitoring Overview and Notifications Overview.

For information about monitoring the traffic associated with your master encryption keys, see Key Management Metrics.

Moving Resources to a Different Compartment

You can move keys from one compartment to another. After you move a key to a new compartment, inherent policies apply immediately and affect access to the key and key versions. Moving a key doesn't affect access to the vault that a key is associated with. You can move a vault from one compartment to another independently of moving any of its keys. For more information, see Managing Compartments.

Using the Console

To create a new key
To view key details
To view a list of keys
To view a list of key versions
To change the name of a key
To manage a key's tags
To enable a key
To rotate a key
To disable a key
To delete a key
To cancel the deletion of a key
To assign a key to a new Object Storage bucket
To assign a key to an existing Object Storage bucket
To assign a key to a new Block Volume
To assign a key to an existing Block Volume
To create a Compute instance with an encrypted boot volume
To assign a key to an existing boot volume
To remove a key assignment from a bucket
To remove a key assignment from a Block Volume
To remove a key assignment from a boot volume
To move a key to a different compartment

Using the Command Line Interface (CLI)

For information about using the CLI, see Command Line Interface (CLI). For a complete list of flags and options available for CLI commands, see CLI Help.

Tip

Each vault has a unique endpoint for create, update, and list operations for keys. This endpoint is referred to as the control plane URL or management endpoint. Each vault also has a unique endpoint for cryptographic operations. This endpoint is known as the data plane URL or the cryptographic endpoint. When using the CLI for key operations, you must provide the appropriate endpoint for the type of operation. To retrieve a vault's endpoints, see instructions in To view vault configuration details.

To create a new key
To create a new key with resource tags
To view a key's details
To view a list of keys
To view a list of key versions
To change the name of a key
To enable a key
To rotate a key
To disable a key
To delete a key
To cancel the deletion of a key
To assign a key to an Object Storage bucket
To update the key assigned to an Object Storage bucket
To create a block volume that's encrypted with a Key Management key
To update a key assigned to an existing Block Volume
To create a boot volume that's encrypted with a Key Management key
To create a Compute instance with a boot volume that's encrypted with a Key Management key
To update a key assigned to an existing boot volume
To remove the key assigned to an Object Storage bucket
To remove a key assigned to a Block Volume
To remove a key assigned to a Block Volume boot volume
To move a key to a different compartment

Using the API

For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.

Use the following operations to manage keys: