{"id":19281784,"url":"https://github.com/scality/vaultclient","last_synced_at":"2025-04-22T01:31:07.412Z","repository":{"id":9070448,"uuid":"47975465","full_name":"scality/vaultclient","owner":"scality","description":" Client library for the Proprietary Scality Auth server backing the FOSS S3 server","archived":false,"fork":false,"pushed_at":"2025-04-10T10:39:28.000Z","size":1510,"stargazers_count":8,"open_issues_count":17,"forks_count":3,"subscribers_count":56,"default_branch":"development/8.5","last_synced_at":"2025-04-10T11:44:20.731Z","etag":null,"topics":["zenko"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scality.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-12-14T13:03:43.000Z","updated_at":"2025-03-18T18:56:13.000Z","dependencies_parsed_at":"2024-04-17T09:38:08.705Z","dependency_job_id":"f6877298-38e3-42e9-8c9d-6af6974ad40c","html_url":"https://github.com/scality/vaultclient","commit_stats":null,"previous_names":[],"tags_count":490,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scality%2Fvaultclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scality%2Fvaultclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scality%2Fvaultclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scality%2Fvaultclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scality","download_url":"https://codeload.github.com/scality/vaultclient/tar.gz/refs/heads/development/8.5","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250161974,"owners_count":21385014,"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":["zenko"],"created_at":"2024-11-09T21:24:14.466Z","updated_at":"2025-04-22T01:31:07.401Z","avatar_url":"https://github.com/scality.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vault Client Library\n\n[![CircleCI](https://circleci.com/gh/scality/vaultclient?style=svg)](https://circleci.com/gh/circleci/circleci-docs)\n\nThis repository provides a client library for any service that relies on\nVault. This repository also provides a CLI binary to interact with Vault.\n\nThis client supports a part of the protocol described in Vault's\n[repository](https://github.com/scality/Vault/blob/master/Protocol.md). The\nrelevant parts are:\n\n- Create account\n- Generate account access key\n- List accounts\n- Delete account\n- Authenticate V2\n- Authenticate V4\n- Get email addresses\n- Get canonical ids\n\nYou can check our [quickstart guide](QUICKSTART.md).\n\n## Contributing\n\nIn order to contribute, please follow the\n[Contributing Guidelines](\nhttps://github.com/scality/Guidelines/blob/master/CONTRIBUTING.md).\n\n## Prerequisite\n\nTo use vaultclient with an existing S3 Connector deployment, Vault requires\nthe use of AWS signature v4 and valid administration credentials\nin its administrative interfaces (that is: to create, delete, and\nlist accounts, users, and access keys). To vaultcient for an existing\ndeployment, admin credentials need to be captured from the\nsupervisor node. The admin credentials are stored in the same folder as the\ninventory file post S3 Connector deployment completion. For example:\n\n```sh\n$\u003e cat federation/env/s3config/vault/admin-clientprofile/admin1.json\n{\n    \"accessKey\": \"\u003cadministrative access key for Vault\u003e\",\n    \"secretKeyValue\": \"\u003cadministrative secret key for Vault\u003e\"\n}\n```\n\nThere are three ways of passing the content of the file to vaultclient:\n\n* Name the file `.vaultclient.conf` and place it in your home folder; that is: `~/.vaultclient.conf`\n\n* Set environment variable `VAULT_CONFIG` with the path of the file: `export VAULT_CONFIG=\u003cfilepath\u003e`\n\n* Pass the filepath in the command line with option `--config`\n\nAn example of the third option is:\n\n```sh\n$ bin/vaultclient create-account --name account0 --email d3v@null \\\n                                 --config \u003cpath\u003e\n```\n\nTo use it outside the S3 Connector's Docker container environment,\nVaultclient needs an environment with Node.js 10.x and the latest\nversion of Yarn installed.\n\nRecommended Node version: 10.x\n\nNode.js can be installed from [nodejs.org](https://nodejs.org/en/download/) and\nYarn can be installed from [yarnpkg.com](https://yarnpkg.com/en/docs/install).\n\n## Installation\n\nOpen a terminal and run the following:\n\n```sh\n# Clone this repository in a folder in your home.\n$\u003e git clone https://github.com/scality/vaultclient.git ~/vaultClient\n# Go into the cloned folder.\n$\u003e cd ~/vaultClient\n# Install relative dependencies.\n$\u003e yarn install\n# Configure the Vault administrator credentials in the same directory,\n# using the format shown in the following example.\n$\u003e cat admin.conf\n{\n    \"accessKey\": \"\u003cadministrative access key for Vault\u003e\",\n    \"secretKeyValue\": \"\u003cadministrative secret key for Vault\u003e\"\n}\n# Use the vaultclient binary with the prefix shown in the following example.\n$\u003e ./bin/vaultclient --config ./admin.conf --host \u003cS3C-storage-node-IP\u003e \\\n    --port 8600 \u003csubcommand\u003e\n```\n\nAlternatively, if you are using S3 Connector storage node, vaultclient can be\nfound in the ```scality-vault``` Docker container.\n\n```sh\n# SSH to a storage node and exec to the scality-vault Docker container.\n$\u003e docker exec -it scality-vault bash\n# Change directories to that of vaultclient.\n$\u003e cd node_modules/vaultclient/\n# Configure the Vault administrator credentials in the same directory,\n# using the format shown in the following example.\n$\u003e cat admin.conf\n{\n    \"accessKey\": \"\u003cadministrative access key for Vault\u003e\",\n    \"secretKeyValue\": \"\u003cadministrative secret key for Vault\u003e\"\n}\n# You can use the vaultclient binary with the prefix described\n# by the following parameters:\n$\u003e ./bin/vaultclient --config ./admin.conf --host 127.0.0.1 --port 8600 \\\n    \u003csubcommand\u003e\n```\n\n## Command-line usage\n\nFor general help, run:\n\n```sh\n$\u003e ./bin/vaultclient -h\n```\n\nFor help on a specific command, run:\n\n```sh\n$\u003e ./bin/vaultclient subcommand -h\n```\n\nExample:\n\n```sh\n$\u003e ./bin/vaultclient create-account -h\n\n  Usage: create-account [options]\n\n  Options:\n\n    -h, --help             output usage information\n    --name \u003cNAME\u003e\n    --email \u003cEMAIL\u003e\n```\n\nSee [examples](./EXAMPLES.md) to have an overview of all available commands.\n\n### Command-line HTTPS support\n\nSee [examples](./EXAMPLES.md) to know how to set up https.\n\n## Javascript API usage\n\nSee [examples](./EXAMPLES.md) to know how to set up and use the API\nfrom javascript code.\n\n### Javascript API HTTPS support\n\nThe programmatical client supports both the HTTP and HTTPS protocols. HTTP is\nthe default protocol. To enable HTTPS, set the constructor's argument ```useHttps```\nto true.\n\nSee [examples](./EXAMPLES.md) to know how to see all constructor arguments.\n\n```js\nconst vaultclient = require('vaultclient');\n\nconst client = new vaultclient.Client('auth.mydomain.com', 8500,\n    true, // This argument set up https\n);\n```\n\nTo enable two way https encryption, set the constructor argument ```cert```\nand ```key``` to the content of the client certificate. To use your own\ncertificate authority, set the constructor argument ```ca``` to the content of\nyour authority certificate.\n\n### Javascript API use of Vault administration credentials\n\nVault administrative credentials must be passed to the constructor if using\nan administrative route.\n\nSee [examples](./EXAMPLES.md) to know how to see all constructor arguments.\n\n```js\nconst vaultclient = require('vaultclient');\n\nconst client = new vaultclient.Client('auth.mydomain.com', 8500, false,\n    undefined, undefined, undefined, true, '7C66DCVN609K7ZHDBVZ0',\n    'JXxTT04NxiWb6NcES+rpkHnkXszDq3KxexocJIJ9');\n\nclient.createAccount('account0', { email: 'dev@null' }, (err, data) =\u003e {\n    console.log(data);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscality%2Fvaultclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscality%2Fvaultclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscality%2Fvaultclient/lists"}