
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@hyperledger/cactus-plugin-keychain-aws-sm
Advanced tools
A keychain implementation storing its entries in AWS Secret Manger.
@hyperledger/cactus-plugin-keychain-aws-sm@hyperledger/cactus-plugin-keychain-aws-sm
This plugin provides a way to interact with the AWS Secrets Manager. Using this one can perform:
The above functionality can either be accessed by importing hte plugin directly as a library (embedding) or by hosting it as a REST API through the Cactus API server
We also publish the Cactus API server as a container image to the Github Container Registry that you can run easily with a one liner. The API server is also embeddable in your own NodeJS project if you choose to do so.
npm
npm install @hyperledger/cactus-plugin-keychain-aws-sm
yarn
yarn add @hyperledger/cactus-plugin-keychain-aws-sm
import {
PluginKeychainAwsSm,
AwsCredentialType,
} from "@hyperledger/cactus-plugin-keychain-aws-sm";
const plugin = new PluginKeychainAwsSm({
// See test cases for exact details on what parameters are needed
});
const res = await plugin.get(
// See function definition for exact details on what parameters are needed and the corresponding output
);
Prerequisites
$HOST:$PORT with the AWS Secrets Manager connector plugin installed on it (and the latter configured to have access to the AWS Secrets manager from point 1)import {
PluginKeychainAwsSm,
AwsCredentialType,
DefaultApi as KeychainAwsSmApi,
} from "@hyperledger/cactus-plugin-keychain-aws-sm";
// Step zero is to deploy the Cactus API server
const apiUrl = `https://${HOST}:${PORT}`;
const config = new Configuration({ basePath: apiUrl });
const apiClient = new KeychainAwsSmApi(config);
// Example: To set a key,value pair
const res = await apiClient.setKeychainEntryV1({
key: key,
value: value,
});
The sequence diagrams for various endpoints are mentioned below




This section explains various monitoring tools used
This creates a prometheus exporter, which scraps the transactions (total transaction count) for the use cases incorporating the use of AWS Secret Manager connector plugin.
The prometheus exporter object is initialized in the PluginKeychainAwsSm class constructor itself, so instantiating the object of the PluginKeychainAwsSm class, gives access to the exporter object.
You can also initialize the prometheus exporter object seperately and then pass it to the IPluginKeychainAwsSmOptions interface for PluginKeychainAwsSm constructor.
getPrometheusExporterMetricsEndpointV1 function returns the prometheus exporter metrics, currently displaying the total transaction count, which currently increments everytime the set() method of the PluginKeychainAwsSm class is called and decreases everytime the delete() method of the PluginKeychainAwsSm class is called.
To use Prometheus with this exporter make sure to install Prometheus main component. Once Prometheus is setup, the corresponding scrape_config needs to be added to the prometheus.yml
- job_name: 'aws_sm_exporter'
metrics_path: 'api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics'
scrape_interval: 5s
static_configs:
- targets: ['{host}:{port}']
Here the host:port is where the prometheus exporter metrics are exposed. The test cases (For example, packages/cactus-plugin-keychain-aws-sm/src/test/typescript/integration/plugin-keychain-aws-sm.test.ts) exposes it over 0.0.0.0 and a random port(). The random port can be found in the running logs of the test case and looks like (42379 in the below mentioned URL)
Metrics URL: http://0.0.0.0:42379/api/v1/plugins/@hyperledger/cactus-plugin-keychain-aws-sm/get-prometheus-exporter-metrics
Once edited, you can start the prometheus service by referencing the above edited prometheus.yml file. On the prometheus graphical interface (defaulted to http://localhost:9090), choose Graph from the menu bar, then select the Console tab. From the Insert metric at cursor drop down, select cactus_keychain_awssm_managed_key_count and click execute
This file contains the various responses of the metrics.
This file contains functions encasing the logic to process the data points
This file lists all the prometheus metrics and what they are used for.
We welcome contributions to Hyperledger Cactus in many forms, and there’s always plenty to do!
Please review CONTRIBUTING.md to get started.
This distribution is published under the Apache License Version 2.0 found in the LICENSE file.
FAQs
A keychain implementation storing its entries in AWS Secret Manger.
We found that @hyperledger/cactus-plugin-keychain-aws-sm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.