AWS KMS Encryption
Protect Secrets Manager connection details with AWS KMS

Keeper Secrets Manager integrates with AWS KMS in order to provide encryption 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 AWS KMS
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 Java Secrets Manager SDK
Supports Java 11 and above
Supports the JavaScript Secrets Manager SDK
Requires aws-sdk/client-kms package
Supports the Python Secrets Manager SDK
Requires boto3 package
Supports the .Net Secrets Manager SDK
Requires AWSSDK.KeyManagementService
Supports the GoLang Secrets Manager SDK
Requires aws-sdk-v2
Setup
1. Install Module
Setting up project using Gradle or Maven
Gradle
Maven
The Secrets Manager AWS Key Management Service Integration can be installed using npm
The Secrets Manager HSM modules are located in the Keeper Secrets Manager storage module which can be installed using pip
boto3 is a prerequisite for the AWS KSM integration. Install it to your machine using pip.
The Secrets Manager AWS Key Management Service Integration can be installed using
The Secrets Manager AWS Key Management Service Integration can be installed using
2. Configure AWS Connection
By default the boto3 library will utilize the default connection session setup with the AWS CLI with the aws configure command. If you would like to specify the connection details, the two configuration files located at ~/.aws/config and ~/.aws/credentials can be manually edited.
Alternatively, configuration variables can be provided explicitly as an access key using the AwsSessionConfig data class and providing aws_access_key_id , aws_secret_access_key and aws_session_token variables.
3. Add AWS KMS Storage to Your Code
Once AWS 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 Specified Connection credentials
To do this, use AwsKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, AwsSessionConfig, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AWSKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, AWS Session credentials - AWSSessionConfig , as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AwsKmsKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, AwsSessionConfig, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AWSKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, AwsSessionConfig, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AWSKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, AwsSessionConfig, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
Using Default Connection
To do this, use AwsKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AWSKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID , as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AwsKmsKeyvalueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AWSKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
To do this, use AWSKeyValueStorage as your Secrets Manager storage in the SecretsManager constructor.
The storage will require an AWS Key ID, as well as the name of the Secrets Manager configuration file which will be encrypted by AWS KMS.
Using the AWS KMS Integration
Once setup, the Secrets Manager AWS KMS integration supports all Secrets Manager SDK functionality. Your code will need to be able to access the AWS KMS APIs in order to manage the decryption of the configuration file when run.
Additional Options
Change Key
We can change key that is used for encrypting the 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 left false, will just return decrypted configuration.
You're ready to use the KSM integration 👍
Last updated
Was this helpful?

