{"id":15732282,"url":"https://github.com/stopsopa/vault_prototype","last_synced_at":"2025-03-31T03:25:45.146Z","repository":{"id":57390974,"uuid":"389928138","full_name":"stopsopa/vault_prototype","owner":"stopsopa","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-06T10:30:48.000Z","size":222,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T07:27:09.111Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stopsopa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-27T09:44:23.000Z","updated_at":"2021-08-06T10:30:51.000Z","dependencies_parsed_at":"2022-09-26T16:51:05.712Z","dependency_job_id":null,"html_url":"https://github.com/stopsopa/vault_prototype","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fvault_prototype","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fvault_prototype/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fvault_prototype/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stopsopa%2Fvault_prototype/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stopsopa","download_url":"https://codeload.github.com/stopsopa/vault_prototype/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246409767,"owners_count":20772545,"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":[],"created_at":"2024-10-04T00:08:50.832Z","updated_at":"2025-03-31T03:25:45.123Z","avatar_url":"https://github.com/stopsopa.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n[![Build Status](https://travis-ci.com/stopsopa/vault_prototype.svg?branch=master)](https://travis-ci.com/stopsopa/vault_prototype)\n[![npm version](https://badge.fury.io/js/vault_prototype.svg)](https://badge.fury.io/js/vault_prototype)\n[![codecov](https://codecov.io/gh/stopsopa/vault_prototype/branch/master/graph/badge.svg?token=QDL8DQ33UY)](https://codecov.io/gh/stopsopa/vault_prototype)\n\n\n\n# Installation\n\n```bash\n\nyarn add vault_prototype\n\nnpm install vault_prototype\n\n```\n\n# Using token\n\n```js\n\nconst vault_prototype = require('vault_prototype');\n\n(async function () {\n\n    try {\n\n        const vault = vault_prototype({\n            apiVersion: 'v1',\n            endpoint: 'http://127.0.0.1:3370',\n            token: 's.Jfium3aoAYNVvFHQpUxB8EGR' ,\n        });\n\n        const secrets = await vault.get(`secret/hello-world/data/test`);\n\n        console.log(secrets);\n        // { password: 'my-long-password', xxx: 'yyy' }\n    }\n    catch (e) {\n\n        console.log({\n            general_vault_error: e\n        })\n    }\n\n}());\n\n```\n\n# AppRole\n\nhttps://www.vaultproject.io/docs/auth/approle#via-the-cli-1\n\n```js\n\nconst vault_prototype = require('vault_prototype');\n\n(async function () {\n\n    try {\n\n        const vault = vault_prototype({\n            apiVersion: 'v1',\n            endpoint: 'http://127.0.0.1:3370'\n        });\n\n        await vault.generateTokenAppRole({\n            role_id     : process.env.VAULT_ROLE_ID,\n            secret_id   : process.env.VAULT_SECRET_ID,\n        });\n\n        const secrets = await vault.get(`secret/hello-world/data/test`);\n\n        console.log(secrets)\n        // { password: 'my-long-password', xxx: 'yyy' }\n    }\n    catch (e) {\n\n        console.log({\n            general_vault_error: e\n        })\n    }\n\n}());\n\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstopsopa%2Fvault_prototype","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstopsopa%2Fvault_prototype","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstopsopa%2Fvault_prototype/lists"}