Encrypting a File System

File Storage file systems use Oracle-managed keys to encrypt a file system by default, which leaves all encryption-related matters to Oracle. Optionally, you can encrypt the data in a file system using your own Vault encryption key.

To encrypt a file system with your own key, ensure that the following prerequisites are met:

  • At least one key vault and key in the Vault service. For more information, see Overview of Vault.
    Caution

    Be sure to back up vaults and keys. Deleting a vault and key otherwise means losing the ability to decrypt any resource or data that the key was used to encrypt. For more information, see Backing Up and Restoring Vaults and Keys.
  • Set the permissions that allow the File Storage service to use keys.

Note

Only symmetric Advanced Encryption Standard (AES) keys are supported for file system encryption.

Required IAM Policy

File systems encrypted using your own key require the ability to read keys stored in Vault. File Storage uses resource principals to grant a specific set of file systems access to the Vault key. This is a two step process, first the file systems which need access must be put into a dynamic group, and then the dynamic group is granted access to read the keys.

  1. Create a dynamic group for the file systems with a rule such as the following:

    ALL { resource.type='filesystem', resource.compartment.id = '<file_system_compartment_OCID>' }
    Note

    If you have more than one rule in the dynamic group, ensure that you use Match any rules defined below option.
  2. Create an IAM policy that gives the dynamic group of file systems access to Vault keys:

    allow dynamic-group <dynamic_group_name> to use keys in compartment <key_compartment_name>

In addition to creating policies for resource principal access, grant the File Storage service user access to read the keys using a policy such as the following:

allow service FssOc<n>Prod to use keys in compartment <key_compartment_name>

The name of the File Storage service user depends on your realm . For realms with realm key numbers of 10 or less, the pattern for the File Storage service user is FssOc<n>Prod, where n is the realm key number. Realms with a realm key number greater than 10 have a service user of fssocprod. For more information about realms, see About Regions and Availability Domains.