Oracle Key Vault Encryption
Protect Secrets Manager connection details with Oracle Key Vault

Keeper Secrets Manager integrates with Oracle Key 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 Oracle Key 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
Support the Java/Kotlin Secrets Manager SDK.
Required Oracle packages: oci-java-sdk-keymanagement, oci-java-sdk-common and oci-java-sdk-common-httpclient-jersey.
OCI Key needs
ENCRYPTandDECRYPTpermissions.
Supports the JavaScript Secrets Manager SDK
Requires the oci-keymanagement package from OCI SDK.
OCI KMS Key needs
ENCRYPTandDECRYPTpermissions.
Supports the Python Secrets Manager SDK
Requires
ocipackageUser credentials to be used will need to have key vault permissions
Supports the .Net Secrets Manager SDK.
Requires OCI.DotNetSDK.Keymanagement.
Requires
EncryptandDecryptpermissions.
Supports the GoLang Secrets Manager SDK
Requires the oci-keymanagement package from OCI SDK.
OCI KMS Key needs
ENCRYPTandDECRYPTpermissions.
Setup
1. Install Module
Setting up project using Gradle or Maven
Gradle
Maven
The Secrets Manager Oracle Key Vault module can be installed using npm
The Secrets Manager OCI KSM module can be installed using pip
oci is a prerequisite for the Oracle Key Vault integration. Install it to your machine using pip.
The Secrets Manager oracle KSM module can be installed using dotnet nuget package manager.
The Secrets Manager oracle KSM module Integration can be installed using
2. Configure Oracle KV Connection
Ensure that you have an Oracle Key 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)
Alternatively, You will need to add the correct configuration for your OCI environment, including the details for accessing Oracle Key Vault.
3. Add Oracle Key Vault Storage to Your Code
Once Oracle connection has been configured, You can fetch the Key to encrypt / decrypt KSM configuration using integration and you need to tell the Secrets Manager SDK to utilize the KMS as storage.
Using Oracle Key Vault Integration
Once setup, the Secrets Manager Oracle Key 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 Oracle config file location, Oracle configuration profile(if there are multiple profile configurations) and the Oracle KMS Crypto endpoint , Oracle KMS Management endpoint as well as the name of the Secrets Manager configuration file which will be encrypted by Oracle KMS.
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, oracle config file location, configuration profile as well as the name of the Secrets Manager configuration file which will be encrypted by Oracle KMS 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, oracle config file location, configuration profile as well as the name of the Secrets Manager configuration file which will be encrypted by Oracle KMS and OCI session configuration shown below.
To do this, use NewOracleKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The NewOracleKeyVaultStorage requires the following parameters to encrypt the KSM configuration using Oracle Vault:
ksmConfigFileName : The file name of KSM configuration.
keyConfig : Provide oracle key credentials KeyID and KeyVersionID.
oracleConfig : Provide oracle credentials VaultManagementEndpoint, VaultCryptoEndpoint.
By default, the oci-keymanagement library will use the default OCI configuration file (~/.oci/config).
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
We can decrypt the config if current implementation is to be migrated onto a different cloud or if you want your raw credentials back. The function accepts a boolean which when set to true will save the decrypted configuration to file and if it is false, will just return decrypted configuration.
You're ready to use the KSM integration 👍
Last updated
Was this helpful?

