{"id":13650923,"url":"https://github.com/designtesbrot/moleculer-vault","last_synced_at":"2025-04-22T18:33:19.033Z","repository":{"id":39121563,"uuid":"152843604","full_name":"designtesbrot/moleculer-vault","owner":"designtesbrot","description":"🔑A Moleculer Service for HashiCorp's Vault 🔑","archived":false,"fork":false,"pushed_at":"2024-10-30T05:23:25.000Z","size":209,"stargazers_count":10,"open_issues_count":43,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T08:35:58.444Z","etag":null,"topics":["moleculer"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/designtesbrot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-13T06:44:10.000Z","updated_at":"2024-08-23T00:57:27.000Z","dependencies_parsed_at":"2023-11-15T18:38:01.410Z","dependency_job_id":null,"html_url":"https://github.com/designtesbrot/moleculer-vault","commit_stats":{"total_commits":23,"total_committers":6,"mean_commits":"3.8333333333333335","dds":0.4782608695652174,"last_synced_commit":"46025f2be5285ec6ae53c6a76dcc7bfa5ff70c2d"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designtesbrot%2Fmoleculer-vault","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designtesbrot%2Fmoleculer-vault/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designtesbrot%2Fmoleculer-vault/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/designtesbrot%2Fmoleculer-vault/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/designtesbrot","download_url":"https://codeload.github.com/designtesbrot/moleculer-vault/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223618074,"owners_count":17174204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["moleculer"],"created_at":"2024-08-02T02:00:42.646Z","updated_at":"2024-11-10T01:31:26.040Z","avatar_url":"https://github.com/designtesbrot.png","language":"JavaScript","funding_links":[],"categories":["Services"],"sub_categories":["Security, Authentication and Authorization"],"readme":"[![Moleculer logo](http://moleculer.services/images/banner.png)](https://github.com/moleculerjs/moleculer)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdesigntesbrot%2Fmoleculer-vault.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdesigntesbrot%2Fmoleculer-vault?ref=badge_shield)\n\n[![Build Status](https://travis-ci.com/designtesbrot/moleculer-vault.svg?branch=master)](https://travis-ci.com/designtesbrot/moleculer-vault)\n[![Coverage Status](https://coveralls.io/repos/github/designtesbrot/moleculer-vault/badge.svg?branch=master)](https://coveralls.io/github/designtesbrot/moleculer-vault?branch=master)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/eebf58adbe2c4d21b274092a802191da)](https://www.codacy.com/app/designtesbrot/moleculer-vault?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=designtesbrot/moleculer-vault\u0026amp;utm_campaign=Badge_Grade)\n[![Maintainability](https://api.codeclimate.com/v1/badges/df5f0f2c69ec9361d793/maintainability)](https://codeclimate.com/github/designtesbrot/moleculer-vault/maintainability)\n[![Known Vulnerabilities](https://snyk.io/test/github/designtesbrot/moleculer-vault/badge.svg)](https://snyk.io/test/github/designtesbrot/moleculer-vault)\n[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/3351a0953a3bfcf7b64a)\n[![npm version](https://badge.fury.io/js/moleculer-vault.svg)](https://badge.fury.io/js/moleculer-vault)\n\n# Vault Service for the Moleculer framework\n\nThis Services provides actions for communicating with a [Vault Server](https://www.vaultproject.io/). Vault is a tool for \nsecurely accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, \nor certificates. Vault provides a unified interface to any secret, while providing tight access control and recording a detailed audit log.\nThe goal of this package is to provide actions for accessing and managing secrets using a connected vault server.\n\n## Features\n\nThe following List details which features are implemented\n\n- Connect to the Vault on startup\n- Obtain the health status of the Vault\n- Mount Management\n- Write, Read and Delete Secrets from the Vault\n\n## Roadmap\n\nThe following List details which features will potentially be implemented\n\n- Seal and Unseal the Vault\n- Audit Management\n- Auth Management\n- Policy Management\n\n## Install\n\nThis package is available in the npm-registry. In order to use it simply install it with yarn (or npm):\n\n```bash\nyarn add moleculer-vault\n```\n\n## Usage\n\nTo make use of this Service, simply require it and create a new service:\n\n```js\nlet { ServiceBroker } = require(\"moleculer\");\nlet VaultService = require(\"moleculer-vault\");\n\nlet broker = new ServiceBroker({ logger: console });\n\n// Create a service\nbroker.createService({\n    mixins: VaultService,\n    settings: {\n        endpoint: \"http://my-vault:8200\",\n    }\n});\n\n// Start server\nbroker.start().then(() =\u003e broker.call('vault.health'));\n```\n\nFor a more indepth example checkout out the `examples folder`. It includes a docker-compose file, running `docker-compose up` will boot a broker with a vault service and a vault server.\nAll vault service actions are exposed on the API (which you should never do in real live!!!). You can run `curl http://localhost:3000/vault/health` for example.\nThis project includes a [published postman collection](https://app.getpostman.com/run-collection/3351a0953a3bfcf7b64a) enabling you to quickly explore the service in your local environment.\n\n## Settings\n\n\u003c!-- AUTO-CONTENT-START:SETTINGS --\u003e\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `apiVersion` | `String` | **required** | Which API Version of the Vault to use. |\n| `endpoint` | `String` | **required** | Where to find the Vault. |\n| `token` | `String` | `null` | Which token to use for authenticating against the Vault |\n| `waitForInitializationAttempts` | `Number` | **required** | When starting, the service will connect to the Vault. When the Vault is not initialized, it will by default request the initialization status up to 5 times |\n| `waitForInitializationInterval` | `Number` | **required** | When starting, the service will connect to the Vault. When the Vault is not initialized, it will by wait for 1 second before requesting the initialization status again |\n\n\u003c!-- AUTO-CONTENT-END:SETTINGS --\u003e\n\n\u003c!-- AUTO-CONTENT-TEMPLATE:SETTINGS\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n{{#each this}}\n| `{{name}}` | {{type}} | {{defaultValue}} | {{description}} |\n{{/each}}\n{{^this}}\n*No settings.*\n{{/this}}\n\n--\u003e\n\n## Actions\n\n\u003c!-- AUTO-CONTENT-START:ACTIONS --\u003e\n## `health` \n\nObtain the Vaults Health.\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n*No input parameters.*\n\n### Results\n**Type:** `Object`\n\nThe Vaults Health Status.\n\n\n## `mounts` \n\nObtain all mounts of the Vault\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n*No input parameters.*\n\n### Results\n**Type:** `Array.\u003cObject\u003e`\n\n\n\n\n## `mount` \n\nMount a new secret store at a given path\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `mount_point` | `String` | **required** | Specifies the path where the secrets engine will be mounted. |\n| `type` | `String` | **required** | Specifies the type of the backend, such as \"aws\". |\n| `description` | `String` | - | Specifies the human-friendly description of the mount. |\n| `config` | `Object` | - | Specifies configuration options for this mount. |\n| `options` | `Object` | - | Specifies mount type specific options that are passed to the backend. |\n| `local` | `Boolean` | `false` | ENTERPRISE ONLY: Specifies if the secrets engine is a local mount only. Local mounts are not replicated nor (if a secondary) removed by replication. |\n| `seal_wrap` | `Boolean` | `false` | ENTERPRISE ONLY: Enable seal wrapping for the mount. |\n\n### Results\n**Type:** `undefined`\n\n\n\n\n## `remount` \n\nRemount a mount to a different Path\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `from` | `String` | **required** | Specifies the previous mount point. |\n| `to` | `String` | **required** | Specifies the new destination mount point. |\n\n### Results\n**Type:** `undefined`\n\n\n\n\n## `unmount` \n\nUnmount a mount from a path\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `mount_point` | `String` | **required** | Specifies the path where the secrets engine will be mounted. |\n\n### Results\n**Type:** `undefined`\n\n\n\n\n## `write` \n\nWrite data to a Vault Backend\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `path` | `String` | **required** | Specifies the path to write to |\n| `data` | `Object` | **required** | The data to write. Schema of this object\n        depends on the backend that is mounted at the given path |\n| `requestOptions` | `Object` | - | Additional request Options that\n        are passed to the request-promise-native underneath |\n\n### Results\n**Type:** `Object`\n\nSchema depends on the backend that is mounted at\n        the given path\n\n\n## `read` \n\nWrite data from a Vault Backend\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `path` | `String` | **required** | Specifies which data to read |\n| `requestOptions` | `Object` | - | Additional request Options that\n        are passed to the request-promise-native underneath |\n\n### Results\n**Type:** `Object`\n\nSchema depends on the backend that is mounted at\n        the given path\n\n\n## `list` \n\nList data from a Vault Backend\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `path` | `String` | **required** | Specifies which data to list |\n| `requestOptions` | `Object` | - | Additional request Options that\n        are passed to the request-promise-native underneath |\n\n### Results\n**Type:** `Object`\n\nSchema depends on the backend that is mounted at\n        the given path\n\n\n## `delete` \n\nDelete data from a Vault Backend\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `path` | `String` | **required** | Specifies which data to read |\n| `requestOptions` | `Object` | - | Additional request Options that\n        are passed to the request-promise-native underneath |\n\n### Results\n**Type:** `Object`\n\nSchema depends on the backend that is mounted at\n        the given path\n\n\n## `help` \n\nObtain help from a Vault Backend\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n| `path` | `String` | **required** | Specifies for what to obtain help |\n| `requestOptions` | `Object` | - | Additional request Options that\n        are passed to the request-promise-native underneath |\n\n### Results\n**Type:** `Object`\n\nSchema depends on the backend that is mounted at\n        the given path\n\n\n\u003c!-- AUTO-CONTENT-END:ACTIONS --\u003e\n\n\u003c!-- AUTO-CONTENT-TEMPLATE:ACTIONS\n{{#each this}}\n## `{{name}}` {{#each badges}}{{this}} {{/each}}\n{{#since}}\n_\u003csup\u003eSince: {{this}}\u003c/sup\u003e_\n{{/since}}\n\n{{description}}\n\n### Parameters\n| Property | Type | Default | Description |\n| -------- | ---- | ------- | ----------- |\n{{#each params}}\n| `{{name}}` | {{type}} | {{defaultValue}} | {{description}} |\n{{/each}}\n{{^params}}\n*No input parameters.*\n{{/params}}\n\n{{#returns}}\n### Results\n**Type:** {{type}}\n\n{{description}}\n{{/returns}}\n\n{{#hasExamples}}\n### Examples\n{{#each examples}}\n{{this}}\n{{/each}}\n{{/hasExamples}}\n\n{{/each}}\n--\u003e\n\n## Test\n```\n$ docker-compose exec package yarn test\n```\n\nIn development with watching\n\n```\n$ docker-compose up\n```\n\n## License\nmoleculer-vault is available under the [MIT license](https://tldrlegal.com/license/mit-license).\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdesigntesbrot%2Fmoleculer-vault.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdesigntesbrot%2Fmoleculer-vault?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesigntesbrot%2Fmoleculer-vault","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdesigntesbrot%2Fmoleculer-vault","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdesigntesbrot%2Fmoleculer-vault/lists"}