You must replicate the vault and keys to use customer-managed encryption
keys with Autonomous Data
Guard with
a remote Standby database. Customer-Managed Encryption Keys are only supported with
a single cross-region Autonomous Data
Guard standby. Multiple cross-region standbys are not supported because Oracle Cloud Infrastructure Vault only supports replication to one remote region.
Create Dynamic Group and Policies for Customer
Managed Keys with Vault in Same Tenancy as Database 🔗
Create
dynamic group and policies to provide access to the vault and keys for
customer-managed keys when the vault and keys are in the same tenancy as the Autonomous Database
instance.
Create a dynamic group to make the master encryption key
accessible to the Autonomous Database instance.
In the Oracle Cloud
Infrastructure console click Identity &
Security.
Under Identity click
Domains and select an
identity domain (or create a new identity
domain).
Under Identity domain,
click Dynamic groups.
Click Create dynamic
group and enter a
Name, a
Description, and a
rule.
Create Dynamic Group for an
existing database:
You can specify that an Autonomous Database instance is part of the dynamic
group. The dynamic group in the following example
includes only the Autonomous Database whose OCID is specified in the
resource.id parameter:
Create a Dynamic Group for a
database that has not been provisioned
yet:
When you are creating the dynamic
group before you provision or clone an Autonomous Database instance, the OCID for the new
database is not yet available. For this case,
create a dynamic group that specifies the
resources in a given compartment:
Write policy statements for the dynamic group to enable access
to Oracle Cloud
Infrastructure resources (vaults and keys).
In the Oracle Cloud
Infrastructure console click Identity &
Security and click
Policies.
To write policies for a dynamic group, click
Create Policy, and enter a
Name and a
Description.
Use the Policy Builder
to create a policy for vault and keys in the local
tenancy.
For example, the following allows
the members of the dynamic group
DGKeyCustomer1 to access the
vaults and keys in the compartment named
training:
Allow dynamic-group DGKeyCustomer1 to use vaults in compartment training
Allow dynamic-group DGKeyCustomer1 to use keys in compartment training
This sample policy applies for a
single compartment. You can specify that a policy
applies for your tenancy, a compartment, a
resource, or a group of resources.
To use customer-managed keys with Autonomous Data
Guard with a remote standby, the
following policy is also required:
Allow dynamic-group DGKeyCustomer1 to manage vaults in compartment training
Allow dynamic-group DGKeyCustomer1 to manage keys in compartment training
Create Dynamic Group and Policies for Customer
Managed Keys with Vault in Different Tenancy than the Database 🔗
Perform
these steps to use customer-managed keys when the Autonomous Database instance and
vaults and keys are in different tenancies.
In this case, you need to supply OCID values when you change
to customer-managed keys. In addition, you need to define dynamic
groups and policies that allow the Autonomous Database
instance to use vaults and keys in a different tenancy.
Copy the master encryption key OCID.
Copy the vault OCID.
Copy the tenancy OCID (the remote tenancy that contains vaults
and keys).
On the tenancy with the Autonomous Database instance, create a dynamic
group.
In the Oracle Cloud
Infrastructure console, on the tenancy with the Autonomous Database instance, click Identity
& Security.
Under Identity click
Domains and select an
identity domain (or create a new identity
domain).
Under Identity domain,
click Dynamic groups.
Click Create dynamic
group and enter a
Name, a
Description, and a
rule.
Create Dynamic Group for an
existing database:
You can specify that an Autonomous Database instance is part of the dynamic
group. The dynamic group in the following example
includes only the Autonomous Database whose OCID is specified in the
resource.id parameter:
Create a Dynamic Group for a
database that has not been provisioned
yet:
When you are creating the dynamic
group before you provision or clone an Autonomous Database instance, the OCID for the new
database is not yet available. For this case,
create a dynamic group that specifies the
resources in a given compartment:
On the tenancy with the Autonomous Database instance, define the
policies to allow access to vaults and keys (where the
vaults and keys are on a different tenancy).
In the Oracle Cloud
Infrastructure console click Identity &
Security.
Under Identity click
Policies.
To write a policy, click Create
Policy.
On the Create Policy page, enter a Name and a
Description.
On the Create Policy page, select
Show manual editor.
In the policy builder, add policies so that the
Autonomous Database instance is able to access vaults
and keys located in the different tenancy. Also
add policies for the IAM group that the IAM user
belongs to so that the Oracle Cloud
Infrastructure Console for the Autonomous Database instance can show details about the
key that resides in a different tenancy.
For example, in the generic
policy, call the tenancy with the Autonomous Database instance Tenancy-1 and the tenancy
with vaults and keys, Tenancy-2:
Copy the following policy and
replace the variables and names with the values
you define, where the dynamic group name
ADB-DynamicGroup is the dynamic
group you created in Step 4:
define tenancy REMTEN as <ocid of tenancy-2>
endorse dynamic-group ADB-DynamicGroup to use vaults in tenancy REMTEN
endorse dynamic-group ADB-DynamicGroup to use keys in tenancy REMTEN
endorse group MyUserGroup to use vaults in tenancy REMTEN
endorse group MyUserGroup to use keys in tenancy REMTEN
For example, the following allows
the members of the dynamic group
DGKeyCustomer1 to access the
remote vaults and keys in the tenancy named
training2:
define tenancy training2 as ocid1.tenancy.oc1..aaa_example_rcyx2a
endorse dynamic-group DGKeyCustomer1 to use vaults in tenancy training2
endorse dynamic-group DGKeyCustomer1 to use keys in tenancy training2
endorse group MyUserGroup to use vaults in tenancy training2
endorse group MyUserGroup to use keys in tenancy training2
Click Create to save the
policy.
Copy the tenancy OCID (the tenancy that contains the Autonomous Database instance).
Copy the Dynamic Group OCID (for the Dynamic Group you created
in Step 4).
On the remote tenancy with vaults and keys, define a dynamic
group and policies to allow the Autonomous Database instance to access vaults and
keys.
In the Oracle Cloud
Infrastructure console, click Identity &
Security.
Under Identity click
Policies.
To create a policy, click Create
Policy.
On the Create Policy page, enter a Name and a
Description.
On the Create Policy page, select
Show manual editor.
In the policy builder, add policies and a
dynamic group to provide access to the dynamic
group on the tenancy with the Autonomous Database instance ( Tenancy-1), such that the
Autonomous Database instance can use the vaults and keys
in Tenancy-2. Also need to add policies to allow
the user group to access the vault and keys to
display information on the Oracle Cloud
Infrastructure Console for the Autonomous Database instance in a different
tenancy.
Use the Policy
Builder to create a dynamic group and
a policy for vaults and keys.
define tenancy ADBTEN as <ocid of tenancy-1>
define dynamic-group REM-ADB-DG as <ocid of the Dynamic Group in tenancy-1>
define group REMGROUP as <group-ocid>
admit dynamic-group REM-ADB-DG of tenancy ADBTEN to use vaults in tenancy
admit dynamic-group REM-ADB-DG of tenancy ADBTEN to use keys in tenancy
admit group REMGROUP of tenancy ADBTEN to use vaults in tenancy
admit group REMGROUP of tenancy ADBTEN to use keys in tenancy
For example define the following on
the remote tenancy to allow the members of the
dynamic group DGKeyCustomer1 and
the group REMGROUP to access the
remote vaults and keys in the tenancy named
training2:
define tenancy adbdemo5 as ocid1.tenancy.oc1..aaa_example_4cnl5q
define dynamic-group REM-ADB-DG as ocid1.dynamicgroup.oc1..aaa_example_526bia
define group REMGROUP as ocid1.group.oc1..aaa_example_6vctn6xsaq
admit dynamic-group REM-ADB-DG of tenancy adbdemo5 to use vaults in tenancy
admit dynamic-group REM-ADB-DG of tenancy adbdemo5 to use keys in tenancy
admit group REMGROUP of tenancy ADBTEN to use vaults in tenancy
admit group REMGROUP of tenancy ADBTEN to use keys in tenancy