This tool is meant for searching against key and/or value patterns in Vault. It will generate the full path to the identified key.
- We recommend using
nvm
(Node Version Manager) for managing Node.js versions. You can find installation instructions fornvm
here. - Clone the repository to your local machine.
- Navigate to the project directory.
- Install the necessary dependencies with
npm install
.
This project uses environment variables for configuration. These can be set in a .env
file in the project root. Here is an example .env
file:
VAULT_URL=<url>
VAULT_TOKEN=<token>
- After installing the dependencies, you can run the project using
npm start
. - To run tests, use the command
npm test
. - For building the project, use
npm run build
.
To execute TypeScript files directly from the terminal, you can use the ts-node findVaultPath.ts
command. Here are the options you can pass to the ts-node findVaultPath.ts
command:
--key=^RDS.*
: This option allows you to specify a key.--token=${env:VAULT_TOKEN}
: This option allows you to specify a token.--url=${env:VAULT_URL}
: This option allows you to specify a URL.--csv=output.csv
: This option allows you to specify an output CSV file. ----collect-values
: This flag allows to retrieve values.
Here is an example command line that mirrors the configuration used in the .vscode/launch.json
:
To execute the findVaultPath.ts
script using ts-node
, use the following command:
ts-node --project tsconfig.json findVaultPath.ts --key=^RDS.* --token=${VAULT_TOKEN} --url=${VAULT_URL} --csv=output.csv