Creating IAM Policies for Object Storage Encryption using KMS key

Create Oracle Cloud Infrastructure Identity and Access Management (IAM) policies for Object Storage to use the KMS encryption keys in a compartment.

A policy with the following policy statement:

allow service objectstorage to use keys in compartment <name_of_compartment> where target.key.id='<ocid_of_key>'

That policy statement grants Object Storage the right to use the KMS keys in the <name_of_compartment> with a target key ID of <ocid_of_key>.