{"_id":"@bushidogames/vault","_rev":"3-3d1f1b4aa16b53e244590572fe09e4de","name":"@bushidogames/vault","dist-tags":{"latest":"1.0.24"},"versions":{"1.0.8":{"name":"@bushidogames/vault","version":"1.0.8","_id":"@bushidogames/vault@1.0.8","maintainers":[{"name":"kmatuszak","email":"kmatuszak04@icloud.com"},{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"}],"contributors":[{"name":"Wojciech Skowronek","email":"wojciech.skowronek@toptal.com"},{"url":"https://github.com/KMatuszak","name":"Krzysztof Matuszak","email":"kmatuszak04@icloud.com"}],"homepage":"https://github.com/Bushido-Games/vault#readme","bugs":{"url":"https://github.com/Bushido-Games/vault/issues"},"dist":{"shasum":"7201774a8ec41387f1ee64f9e653a66216987252","tarball":"https://registry.npmjs.org/@bushidogames/vault/-/vault-1.0.8.tgz","fileCount":4,"integrity":"sha512-lzgC+n6eGIvjJAus4jWwJcMoZehTaEozZvlO5noYsDjcV5NOxxb3v+e5WZYff/YWwqemgMRsN3PfSX3VSCDQvQ==","signatures":[{"sig":"MEYCIQDF3LrLbYCy2dOtvDhmSkCsjGTbrDyZny4vEGVSHepN9AIhAL3d+zy8/tTgQBzC7VVb9F1VYarEiKGL00wmKuR2+Ggc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6132},"gitHead":"57adf05583d1e34d845cbedc3e1c8157d8ace05e","_npmUser":{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Bushido-Games/vault.git","type":"git"},"_npmVersion":"10.8.2","description":"Repository with configuration and helper scripts of HashiCorp's vault.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"packageManager":"yarn@4.4.1","_npmOperationalInternal":{"tmp":"tmp/vault_1.0.8_1726052983466_0.8954961560965247","host":"s3://npm-registry-packages"}},"1.0.14":{"name":"@bushidogames/vault","version":"1.0.14","_id":"@bushidogames/vault@1.0.14","maintainers":[{"name":"kmatuszak","email":"kmatuszak04@icloud.com"},{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"}],"contributors":[{"name":"Wojciech Skowronek","email":"wojciech.skowronek@toptal.com"},{"url":"https://github.com/KMatuszak","name":"Krzysztof Matuszak","email":"kmatuszak04@icloud.com"}],"homepage":"https://github.com/Bushido-Games/vault#readme","bugs":{"url":"https://github.com/Bushido-Games/vault/issues"},"dist":{"shasum":"385a0183216d63c9afe8ef7d89713176c665b8a0","tarball":"https://registry.npmjs.org/@bushidogames/vault/-/vault-1.0.14.tgz","fileCount":4,"integrity":"sha512-rYoCUbw4G7kUosZcRuMHsIifrzAaWgbpy1ss+aYnuqwvRfNNKDyuCXfXy0vQgdjVc8ZbBqK+y3FTa3aQ9t9qMA==","signatures":[{"sig":"MEYCIQDxNSMqCEkfyrPm3VZU9S6DY452ngj1jD4nkZge7yFTigIhALAPAFlN3Dr9/y30r8lXylnWzO8MAAf9/YejWNBSbT/w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6133},"gitHead":"d8f5fb3cf469be27a8a15405080a7c0d9ea720e3","_npmUser":{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Bushido-Games/vault.git","type":"git"},"_npmVersion":"10.8.2","description":"Repository with configuration and helper scripts of HashiCorp's vault.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"packageManager":"yarn@4.4.1","_npmOperationalInternal":{"tmp":"tmp/vault_1.0.14_1726054176862_0.9645003742534255","host":"s3://npm-registry-packages"}},"1.0.17":{"name":"@bushidogames/vault","version":"1.0.17","_id":"@bushidogames/vault@1.0.17","maintainers":[{"name":"kmatuszak","email":"kmatuszak04@icloud.com"},{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"}],"contributors":[{"name":"Wojciech Skowronek","email":"wojciech.skowronek@toptal.com"},{"url":"https://github.com/KMatuszak","name":"Krzysztof Matuszak","email":"kmatuszak04@icloud.com"}],"homepage":"https://github.com/Bushido-Games/vault#readme","bugs":{"url":"https://github.com/Bushido-Games/vault/issues"},"dist":{"shasum":"f4abc0d2e1a0addd3b4631a8875e4d09d265eb65","tarball":"https://registry.npmjs.org/@bushidogames/vault/-/vault-1.0.17.tgz","fileCount":4,"integrity":"sha512-8tiMgbe2w5LUunQ6Kv7cNP7FpK11O8HcBX8wk0B0kNOKlPnCy02VXGCK+gW+GI5lka7bxw4G8zPC3nPIPqaoHQ==","signatures":[{"sig":"MEUCIQDpWea+WL9/iURK0b5RxqE391jgOXZoeq08ImrJMjswIgIgMCCcKwtyjtPFo8M1DOQgBGWTfdhCPxKwDyfxnWnDplU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6133},"gitHead":"e91663bbefeee471ac53eadbc7753e9e19068d36","_npmUser":{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"},"repository":{"url":"git+ssh://git@github.com/Bushido-Games/vault.git","type":"git"},"_npmVersion":"10.8.2","description":"Repository with configuration and helper scripts of HashiCorp's vault.","directories":{},"_nodeVersion":"22.8.0","_hasShrinkwrap":false,"packageManager":"yarn@4.4.1","_npmOperationalInternal":{"tmp":"tmp/vault_1.0.17_1726054603098_0.8252883301331715","host":"s3://npm-registry-packages"}},"1.0.24":{"name":"@bushidogames/vault","version":"1.0.24","packageManager":"yarn@4.4.1","repository":{"type":"git","url":"git+ssh://git@github.com/Bushido-Games/vault.git"},"contributors":[{"name":"Wojciech Skowronek","email":"wojciech.skowronek@toptal.com"},{"name":"Krzysztof Matuszak","email":"kmatuszak04@icloud.com","url":"https://github.com/KMatuszak"}],"_id":"@bushidogames/vault@1.0.24","gitHead":"091b830d306ce44cc9519644e5b58560d01f0194","description":"Repository with configuration and helper scripts of HashiCorp's vault.","bugs":{"url":"https://github.com/Bushido-Games/vault/issues"},"homepage":"https://github.com/Bushido-Games/vault#readme","_nodeVersion":"18.20.4","_npmVersion":"10.7.0","dist":{"integrity":"sha512-amzwCqpbOBstQWFr0VQFFyEi/kJKjVZZxrdykGBH69BfWRiRtxzgfHfpmguhbWEsb+Z6vcQOcCwEndVjSanDpQ==","shasum":"3fdac8136342a31e09ccd1a2c5b9c2f969c79a17","tarball":"https://registry.npmjs.org/@bushidogames/vault/-/vault-1.0.24.tgz","fileCount":4,"unpackedSize":6133,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxa/uwsgyu9wcl33u0em+AZKaT8QYVNKtLAWqSGa9IgwIhAMjKb0tIA4OeAdAXcpwqkMgL0TLJI5P6UmDRq5EGoAEv"}]},"_npmUser":{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"},"directories":{},"maintainers":[{"name":"kmatuszak","email":"kmatuszak04@icloud.com"},{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vault_1.0.24_1726056151334_0.25998813377314867"},"_hasShrinkwrap":false}},"time":{"created":"2024-09-11T11:09:43.348Z","modified":"2024-09-11T12:02:32.567Z","1.0.8":"2024-09-11T11:09:43.636Z","1.0.14":"2024-09-11T11:29:37.054Z","1.0.17":"2024-09-11T11:36:43.283Z","1.0.24":"2024-09-11T12:02:32.384Z"},"bugs":{"url":"https://github.com/Bushido-Games/vault/issues"},"homepage":"https://github.com/Bushido-Games/vault#readme","repository":{"type":"git","url":"git+ssh://git@github.com/Bushido-Games/vault.git"},"description":"Repository with configuration and helper scripts of HashiCorp's vault.","contributors":[{"name":"Wojciech Skowronek","email":"wojciech.skowronek@toptal.com"},{"name":"Krzysztof Matuszak","email":"kmatuszak04@icloud.com","url":"https://github.com/KMatuszak"}],"maintainers":[{"name":"kmatuszak","email":"kmatuszak04@icloud.com"},{"name":"wojciech-skowronek","email":"wojciech.skowronek@gmail.com"}],"readme":"# Vault\n\nRepository with configuration and helper scripts of HashiCorp's vault.  \n\n## Usage\n\nFirst thing you need to do is authorization. You need to [generate Github personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)  with the `read:org` scope. Store it to $GITHUB_TOKEN local environment by calling:\n\n`export GITHUB_TOKEN=YOUR-GITHUB-PERSONAL-ACCESS-TOKEN`\n\nFor convenience add above command to the `~/.bashrc` or `~/.bash_profile` and restart your terminal.\n\nYou also need to set $VAULT_ADDR environment to point to the vault server address.\n\n`export VAULT_ADDR=\"http://10.0.21.11:8200\"`\n\n**Important!** For successful connection you need to use VPN.\n\nInstall Vault:\n\n```angular2html\ncurl -fsSL https://apt.releases.hashicorp.com/gpg | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg\nsudo apt-add-repository \"deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main\"\nsudo apt-get update && sudo apt-get install vault\n```\n\nYou should be ready to login to the vault calling:\n\n`vault login -method=github token=${GITHUB_TOKEN}`\n\nNow you can use vault api to retrieve, create, update and delete variables:\n\n- Create / Update: `vault kv put bushido/local/hello foo=world`\n- Retrieve: `vault kv get bushido/local/hello`\n- Delete: `vault kv delete bushido/local/hello`\n\nThe path is constructed from three parts:\n\n1. `bushido/` - constant prefix for all paths.\n1. `ENVIRONMENT/` - this can take two options: `local` for local development or `staging` for staging deployments.\n1. `PROJECT_NAME` - a project name. This should exactly match with a project repository name.\n\nFor more details, refer to the [Vault documentation](https://www.vaultproject.io/docs/secrets/kv/kv-v2)\n\n## Scripts\n\n### envvault\n\nHelper for docker-compose. Retrieves project environmental variables and passes them to the docker-compose file\n\n#### Installation\n\n- Copy `scripts/envvault` file to any $PATH folder (e.g. `~/bin/` or `/usr/bin/`).\n- Make sure $GITHUB_TOKEN variable is defined\n\n#### Usage\n\nOptions:\n\n- `-h|--help` - render help message.\n- `-p|--project PROJECT_NAME` - retrieve specific project environment. By default, the script will try to extract the project name from `package.json` file.\n- `-e|--env local|staging` - retrieve variables assigned to selected environment. Default: local.\n- `COMMAND` command to run\n\nExamples:\n\n- `envvault -p shop-managment-tools env | grep BUSHIDO` - useful for quick test if the env were successfully retrieved\n- `envvault -p shop-managment-tools docker-compose up`\n- `envvault -p shop-managment-tools docker-compose run priceManager`\n","readmeFilename":"README.md"}