For the complete documentation index, see llms.txt. This page is also available as Markdown.

Oracle Cloud Infrastructure (OCI) Vault Encryption

Protect Secrets Manager connection details with OCI Vault

Keeper Secrets Manager integrates with Oracle Cloud Infrastructure (OCI) Vault in order to provide protection for Keeper Secrets Manager configuration files. With this integration, you can protect connection details on your machine while taking advantage of Keeper's zero-knowledge encryption of all your secret credentials.

Features

  • Encrypt and Decrypt your Keeper Secrets Manager configuration files with OCI Vault

  • Protect against unauthorized access to your Secrets Manager connections

  • Requires only minor changes to code for immediate protection. Works with all Keeper Secrets Manager SDK functionality

Prerequisites

  • Supports the JavaScript Secrets Manager SDK

  • oci-keymanagement is bundled — no separate install required.

  • OCI KMS Key needs ENCRYPT and DECRYPT permissions.

Setup

1. Install Module

Setting up project using Gradle or Maven

Gradle

Maven

The Secrets Manager OCI Vault module can be installed using npm

The Secrets Manager OCI KSM module can be installed using pip

oci is a prerequisite for the OCI Vault integration. Install it to your machine using pip.

The Secrets Manager OCI Vault module can be installed using dotnet nuget package manager.

2. Configure OCI Vault Connection

Ensure that you have an OCI Vault instance available, and you know its OCID (Oracle Cloud Identifier). By default, the `oci key management` library will use the default OCI configuration file (~/.oci/config)

See the Oracle documentation for more information on setting up OCI Keys:

Alternatively, You will need to add the correct configuration for your OCI environment, including the details for accessing OCI Vault.

The configuration file should look like this (replace with your actual details):

[DEFAULT] user=ocid1.user.oc1..example_unique_id fingerprint=xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx key_file=/path/to/your/private/api/key.pem tenancy=ocid1.tenancy.oc1..example_unique_id region=us-phoenix-1

3. Add OCI Vault Storage to Your Code

Once the OCI Vault connection has been configured, you can use the OCI Vault integration to encrypt and decrypt the KSM configuration. Tell the Secrets Manager SDK to use OCI Vault as storage.

Using OCI Vault Integration

Once setup, the Secrets Manager OCI Vault integration supports all Secrets Manager SDK functionality. Your code will need to be able to access the OCI Keys in order to manage the encryption and decryption of the KSM configuration file. Using Specified Connection credentials

To do this, create OracleKeyValueStorage instance and use this in SecretManagerOptions constructor.

The OracleKeyValueStorage will require the name of the Secrets Manager configuration file with profile and configuration.

To do this, use OracleKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.

The storage will require an OCI config file location, OCI configuration profile (if there are multiple profile configurations) and the OCI KMS Crypto endpoint , OCI KMS Management endpoint as well as the name of the Secrets Manager configuration file which will be encrypted by OCI Vault.

To do this, use OracleKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.

The storage will require a OCI Key ID, key version Id, KMS Crypto endpoint, KMS management endpoint, OCI config file location, configuration profile as well as the name of the Secrets Manager configuration file which will be encrypted by OCI Vault and OCI session configuration shown below.

To do this, use OracleKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.

The storage will require a OCI Key ID, key version Id, KMS Crypto endpoint, KMS management endpoint, OCI config file location, configuration profile as well as the name of the Secrets Manager configuration file which will be encrypted by OCI Vault and OCI session configuration shown below.

Additional Options

Change Key

We can change key that is used for encrypting the KSM configuration, examples below show the code needed to use it

Decrypt Config

You can decrypt the configuration file to migrate to a different cloud provider or to retrieve your raw credentials. Pass true to save the decrypted configuration back to the file, or false to return the plaintext without modifying the file.

Check out the KSM SDKs documentation for more examples and functionality

Last updated