Configure Oracle Cloud connection¶
The following guide illustrates connecting Certificate Manager - SaaS with Oracle Cloud Infrastructure (OCI).
Connect Certificate Manager - SaaS to Oracle Cloud to manage the certificates stored in the OCI Certificates service. Certificate Manager - SaaS discovers the certificates in an OCI compartment, imports new certificates into it, and renews them in place. Because a renewal adds a new version to the same certificate, the OCI services that use the certificate, such as load balancers and API gateways, pick up the renewed certificate without any changes.
Certificate Manager - SaaS connects to Oracle Cloud directly and signs each request with an OCI API signing key that belongs to a dedicated user.
Before you begin¶
You're going to need a few things to complete this procedure.
- The System Administrator, PKI Administrator, or Resource Owner role. If you have the Resource Owner role, you must own or belong to at least one team.
- An Oracle Cloud tenancy in the commercial realm.
- An OCI user for Certificate Manager - SaaS, with an API signing key. To set them up, see Step 1: Prepare Oracle Cloud.
- The Oracle Cloud identifiers (OCIDs) of your tenancy, the user, and each compartment you want to manage, and the fingerprint of the API signing key.
- At least one active VSatellite to provision certificates to Oracle Cloud. Discovery doesn't need a VSatellite.
Note
- Only the commercial Oracle Cloud realm is supported. Government and sovereign regions aren't supported.
- Certificate Manager - SaaS authenticates with an API signing key only. Instance principals, resource principals, and workload identity federation aren't supported.
- Each cloud keystore covers one compartment in one region. Child compartments aren't included. To manage certificates in other compartments or regions, add a cloud keystore for each.
- Certificate Manager - SaaS doesn't attach certificates to OCI services. After you provision a certificate for the first time, reference it from the OCI service, for example a load balancer listener.
- Certificate Manager - SaaS encrypts the private key and passphrase with keys managed by a key management service (KMS) and uses them only inside Certificate Manager - SaaS. It never displays them again. Guest users can view the cloud provider but see only its region.
Step 1: Prepare Oracle Cloud¶
Use a dedicated user and group for Certificate Manager - SaaS, and grant them access only to the compartments you want to manage.
- In the Oracle Cloud Console, select Identity & Security > Users, and create a user only for Certificate Manager - SaaS. Don't use the tenancy administrator or a person's account.
-
Generate an RSA key pair in PEM format, at least 2048 bits, and protect the private key with a passphrase. For example:
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -aes-256-cbc -out oci_api_key.pem openssl pkey -in oci_api_key.pem -pubout -out oci_api_key_public.pemThis creates an encrypted PKCS #8 private key, which we recommend. Certificate Manager - SaaS also accepts PKCS #1 keys, unencrypted keys, and legacy encrypted PEM keys (
Proc-Type: 4,ENCRYPTED). -
On the user's page, select API Keys > Add API Key, and upload the public key. Copy the fingerprint that the Console shows.
Tip
An OCI user can have up to three API keys, so you can rotate the key without downtime: upload a new key, update the cloud provider with it, and then delete the old key in OCI.
-
Copy the OCID of your tenancy from Tenancy Information, and the OCID of the user from the user's page.
- Create a group that contains only this user.
-
For each compartment you want to manage, create a policy for the group. For the statements, see Oracle Cloud IAM policies.
Step 2: Create a cloud provider¶
- Sign in to Certificate Manager - SaaS.
- Click Integrations > Cloud Providers.
- Click New, and then select Oracle Cloud.
- Enter a Name for the new cloud provider. This name helps Certificate Manager - SaaS users identify this cloud provider.
- Select an Owning Team. If you need to create a new team, see create a new team.
-
Click Continue.
Note
- Owning Team - The Owning Team is responsible for the administration, management, and control of a designated cloud provider, with the authority to update, modify, and delete cloud provider resources.
- Authorized Team - The Authorize Team is granted permission to use specific resources of a cloud provider. Although team members can perform tasks like creating a keystore, their permissions may be limited regarding broader modifications to the provider's configuration. Unlike the Owning Team, users may not have the authority to update and delete Cloud Providers.
-
In Tenancy OCID, enter the OCID of your tenancy. It starts with
ocid1.tenancy.. - In User OCID, enter the OCID of the user that owns the API signing key. It starts with
ocid1.user.. - In Region, select the region to authenticate with, for example your home region. The region must be one your tenancy is subscribed to. Each cloud keystore sets its own region for the certificates.
- In Key Fingerprint, enter the fingerprint of the API signing key, as 16 hexadecimal pairs separated by colons.
- In Private Key, paste the whole PEM-encoded RSA private key, from its
BEGINline to itsENDline, or click Upload Private Key File and select the key file. - (Optional) In Passphrase, enter the passphrase of the private key. Leave it empty for an unencrypted key.
-
Click Save.
Certificate Manager - SaaS saves the cloud provider as Not validated. It doesn't check your settings until you validate the connection in the next step.
Note
You can add only one cloud provider for each tenancy and user. If you add a second cloud provider for the same tenancy and user, Certificate Manager - SaaS rejects it. To change the key of an existing cloud provider, see Rotate the API signing key.
Step 3: Validate the connection¶
- Click Integrations > Cloud Providers.
- Find the cloud provider you created, click the more options button to its right, and select Validate.
The validation checks that the private key can be read and that the fingerprint belongs to an active API key of the user. It doesn't need any IAM policy. Until the cloud provider is validated, you can't select it for a cloud keystore.
If the connection fails, check your settings against Troubleshooting.
Step 4: Add a cloud keystore¶
- Sign in to Certificate Manager - SaaS.
- Click Installations > Cloud Keystores.
- Click New, and then select Oracle Cloud Certificates.
- Enter a Name for the new cloud keystore.
- Select an Owning Team. If you need to create a new team, see create a new team.
-
Select an Authorized Team.
Note
- Owning Team - The Owning Team is responsible for the administration, management, and control of a designated cloud provider, with the authority to update, modify, and delete cloud provider resources.
- Authorized Team - The Authorize Team is granted permission to use specific resources of a cloud provider. Although team members can perform tasks like creating a keystore, their permissions may be limited regarding broader modifications to the provider's configuration. Unlike the Owning Team, users may not have the authority to update and delete Cloud Providers.
-
(Optional) To limit which service accounts can provision to this cloud keystore, turn off All Service Accounts Access, and then select the service accounts in Authorized Service Accounts. Learn more about service account access.
- Select an Oracle Cloud Provider. Only validated cloud providers appear in the list.
- In Region, select the region where the certificates are stored. Certificate Manager - SaaS fills in the cloud provider's region, which you can change.
-
In Compartment OCID, enter the OCID of the compartment that holds the certificates. It starts with
ocid1.compartment.. For the root compartment, enter the tenancy OCID. Child compartments aren't included.Note
You can't change the Region or Compartment OCID after you save the cloud keystore. You can add only one cloud keystore for each cloud provider, region, and compartment.
-
(Optional) To run discovery as soon as the cloud keystore is created, turn on Start discovery immediately. To also discover expired certificates, turn on Include expired certificates. To run discovery on a schedule, see Set up Oracle Cloud discovery schedule.
- Click Save. Certificate Manager - SaaS checks that it can read certificates in the compartment, and then shows the new cloud keystore in the list.
Step 5: Provision a certificate¶
-
Click the
button to the right of the new cloud keystore you just created and select Provision.Tip
Here you also have the option to delete certificates if needed.
-
From the dropdown, search for the certificate you want, select it, and click Provision. This creates a new certificate (new installation on the keystore).
-
(Optional) Here, you also can re-provision, replace, or delete a certificate. These options modify an existing machine installation.
- Select your Cloud Keystore, and a details panel will appear on the right.
- Click on the
button to the right of your certificate. - Choose the appropriate action: Re-provision, Replace, or Delete, and proceed through the user interface steps until the process is complete.
Info
- Re-provision - This action re-provisions your current certificate.
- Replace - Choose this option to substitute your current certificate with a different one.
- Delete - This action removes the selected certificate from the table.
Note
If using Google Cloud Platform, go to your Google service account, under Certificate Manager, and select Certificates. Click the Refresh button. You should now see your certificate in the list with an active status.
At this point you have successfully connected Certificate Manager - SaaS to your cloud provider and successfully provisioned a certificate.
When you provision a certificate to Oracle Cloud:
- (Optional) In Oracle Cloud Certificate Name, enter a name for the certificate in Oracle Cloud. If you leave it empty, Certificate Manager - SaaS derives the name from the common name and the last eight hexadecimal digits of the serial number. The name must be unique in the tenancy, at most 255 characters, and contain only letters, digits, periods (.), underscores (_), and hyphens (-). Names of certificates that are pending deletion in OCI are also taken.
- Certificate Manager - SaaS tags each new certificate with the freeform tag
managedBy=cyberark-cm, and waits up to 10 minutes for Oracle Cloud to report it as active. - After the first provisioning, reference the certificate from your OCI service, for example a load balancer listener. Certificate Manager - SaaS doesn't attach it for you.
Renewal¶
When you renew, re-provision, or replace a certificate, Certificate Manager - SaaS adds a new current version to the same Oracle Cloud certificate. The certificate's OCID doesn't change, so the OCI services that reference it use the new version without any changes.
The exception is a certificate that was deleted in Oracle Cloud, is pending deletion, or is failed. In that case, Certificate Manager - SaaS creates a new certificate with a new OCID, and you must point your OCI service to the new certificate.
- The new certificate must have the same common name as the current version. Oracle Cloud doesn't accept a new version with a different common name. To change the common name, provision it as a new certificate, and then point your OCI service to it.
- If the new certificate has the same serial number as the current version, Certificate Manager - SaaS doesn't create a new version.
- After a successful renewal, Certificate Manager - SaaS schedules the deprecated versions that it created for deletion. It always keeps the current and previous versions, and it never deletes versions that you uploaded yourself. This cleanup needs the
manage leaf-certificate-versionspolicy. Without it, renewals still succeed, but a certificate eventually reaches the Oracle Cloud limit of 30 versions.
View-only certificates¶
Certificates issued by an Oracle Cloud private certificate authority (CA) are labeled Managed by Oracle Cloud and are view-only in Certificate Manager - SaaS. You can't renew, re-provision, or replace them; manage them in Oracle Cloud instead. The only action available for a view-only certificate is to delete it from Certificate Manager - SaaS.
Deleting an installation¶
When you delete an installation in Certificate Manager - SaaS, Certificate Manager - SaaS removes it only from its own inventory. It never deletes the certificate in Oracle Cloud.
Set up Oracle Cloud discovery schedule¶
- In the Certificate Manager - SaaS toolbar, click Installations, and then select Cloud Keystores.
- Select the cloud keystore you want to run discovery on.
- In the pane that opens on the right, select the Discovery Configuration tab, and then turn on Enable scheduled discovery. To also discover expired certificates, turn on Include expired certificates.
- Under Repeat, select Daily, Weekly, or Advanced, and then choose a time.
- Click Save.
To run discovery right away, select the cloud keystore and click Discover Now.
Discovery imports every certificate in the keystore's compartment whose state is active or updating. It skips certificates that are deleted, pending deletion, or failed, and certificates in child compartments. With Include expired certificates turned off, it also skips certificates whose current version has expired. Discovery reads only the public certificate and its chain; it never retrieves a private key.
For each certificate, the Installations tab of the cloud keystore shows its Version, whether it's In Use, and the OCI resources it's Referenced By, such as load balancers or API gateways.
Rotate the API signing key¶
Certificate Manager - SaaS can't rotate the API signing key for you. To replace it:
- In Oracle Cloud, upload a new public key to the Certificate Manager - SaaS user, as in Step 1: Prepare Oracle Cloud, and copy its fingerprint.
- In Certificate Manager - SaaS, select the cloud provider, and then select the Properties tab.
-
Enter the new Key Fingerprint, and then enter the new Private Key and, if it's encrypted, its Passphrase. The stored private key is hidden; clear it to enter the new one.
Note
When you change the Tenancy OCID, User OCID, Region, Key Fingerprint, or Passphrase, you must enter the private key again.
-
Click Save.
- Validate the cloud provider again. Any change to the connection settings sets the cloud provider back to Not validated, and its cloud keystores can't discover or provision certificates until you validate it.
- In Oracle Cloud, delete the old API key.
Oracle Cloud IAM policies¶
Grant these policies to the group that contains the Certificate Manager - SaaS user, in each compartment that has a cloud keystore. Replace <group> and <compartment> with your own values. For the root compartment, write in tenancy instead of in compartment <compartment>.
| Feature | Policy statements |
|---|---|
| Cloud provider validation | None |
| Keystore validation and discovery | Allow group <group> to read leaf-certificates in compartment <compartment>Allow group <group> to read leaf-certificate-bundles in compartment <compartment> |
| Referenced By (optional) | Allow group <group> to inspect certificate-associations in compartment <compartment> |
| Provisioning and renewal | Allow group <group> to manage leaf-certificates in compartment <compartment> |
| Version cleanup (recommended) | Allow group <group> to manage leaf-certificate-versions in compartment <compartment> |
Note
read leaf-certificate-bundlescovers public certificate bundles only. Reading a bundle with its private key needs an extra condition, which Certificate Manager - SaaS never requests. Don't add it.- Without
inspect certificate-associations, discovery still works, but Certificate Manager - SaaS can't show whether a certificate is in use or which resources reference it. - Without
manage leaf-certificate-versions, renewals still succeed, but Certificate Manager - SaaS can't delete the deprecated versions it created. - The OCI services that use the certificates, such as load balancers, need their own policies to read certificate bundles. Set them up as Oracle documents for each service.
- Use one Certificate Manager - SaaS user for each tenancy. If two cloud providers with different users have keystores on the same compartment, Certificate Manager - SaaS discovers and renews the same certificates twice.
Oracle Cloud certificate requirements¶
Certificate Manager - SaaS checks each certificate against the Oracle Cloud import rules before it writes anything to Oracle Cloud, so a rejected certificate never leaves a failed certificate in your compartment. To provision to Oracle Cloud, a certificate must meet these requirements:
- Key: RSA 2048 or 4096 bits, or EC P-256 or P-384.
- Signature: SHA-256, SHA-384, or SHA-512, with RSA or ECDSA.
- Chain: The issuing certificate chain must be present, and it can't mix RSA and ECDSA keys.
- Size: The certificate can be at most 10,240 bytes, the private key at most 5,120 bytes, and the certificate with its chain at most 51,200 bytes.
- Validity: The certificate can't be expired, and it can't be valid beyond 2038. The issuing and root CAs can expire later.
-
Country: If the subject has a country, it must be a valid ISO 3166 country code.
Oracle Cloud also sets these limits:
- 5,000 certificates for each region in a tenancy.
- 30 versions for each certificate.
- 30 associations for each certificate.
Troubleshooting¶
| Symptom | Likely cause | Fix |
|---|---|---|
| The private key can't be parsed. | The key isn't a PEM-encoded RSA key, or the passphrase is wrong. | Paste the RSA private key (PKCS #1 or PKCS #8) and the correct passphrase. |
| Oracle Cloud rejects the request signature (HTTP 401). | The tenancy OCID, user OCID, or fingerprint is wrong, the public key isn't uploaded, or the tenancy isn't subscribed to the region. | Check the values against the user's API keys, and select a region your tenancy is subscribed to. |
| The user can't be found (HTTP 404). | The user OCID is wrong or belongs to another tenancy. | Correct the User OCID. |
| The key fingerprint doesn't match an active API key of the user. | The key was deleted or deactivated, or the fingerprint belongs to another key. | Upload the key again, or correct the Key Fingerprint. |
| Government and sovereign clouds aren't supported. | The region belongs to a government or sovereign realm. | Use a commercial region. |
| The cloud provider is rejected as a duplicate. | A cloud provider for the same tenancy and user already exists. | Update the existing cloud provider instead. |
| Keystore validation reports that the compartment isn't found, or that the user's group has no policy to read certificates in it. | The compartment OCID or region is wrong, or read leaf-certificates is missing. | Correct the compartment or region, or add the policy. |
| A certificate is missing after discovery. | It's in a child compartment, isn't active or updating, or has expired while Include expired certificates is off. | Add a cloud keystore for that compartment, or change the discovery setting. |
| In Use is unknown. | inspect certificate-associations is missing. | Add the policy. It's optional. |
| Provisioning fails with a message about the key, signature, chain, size, 2038, expiry, or country code. | The certificate doesn't meet the Oracle Cloud certificate requirements. | Issue a certificate that meets them. |
| Oracle Cloud requires the same common name for a new version. | The renewal or replacement has a different common name. | Provision it as a new certificate, and then point your OCI service to it. |
| The certificate is managed by Oracle Cloud and is view-only. | An Oracle Cloud private CA issued the certificate. | Manage the certificate in Oracle Cloud. |
| The certificate name is taken in the tenancy (HTTP 409). | Another certificate, possibly one pending deletion, uses the name, or manage leaf-certificates is missing. | Choose another name, run discovery to manage the existing certificate, or add the policy. |
| The certificate has the maximum of 30 versions. | The certificate reached the Oracle Cloud version limit, and Certificate Manager - SaaS couldn't delete any deprecated versions it created. | Add manage leaf-certificate-versions, delete deprecated versions in Oracle Cloud, or provision the certificate as a new certificate. |
| The certificate operation didn't finish within 10 minutes. | Oracle Cloud is still creating or updating the certificate. | Try again later. |
Error messages from Oracle Cloud include its opc-request-id. Give this ID to Oracle Support if you need their help.
What's next?¶
- Add more cloud keystores for other compartments or regions.
- Discover certificates on Oracle Cloud.
- Provision certificates to cloud keystores.