Connecting to Vault Agent - Error: connect ECONNREFUSED 127.0.0.1:8200
I'm connecting to Vault Agent which does auth and token rotation so the client app doesn't need to do auth/token renew manipulations.
Here is the code:
var vault_secret_path = process.env.VAULT_SECRET_PATH;
var options = {
token: ''
};
var vault = require("node-vault")(options);
var creds;
process.env.VAULT_SKIP_VERIFY = 'true';
vault.read(vault_secret_path)
.then((result) => {
//console.log(result);
creds = result.data
})
.catch((err) => console.error(err.message));
but I'm gettig in output:
Error: connect ECONNREFUSED 127.0.0.1:8200
I can connect to the above port without any authentication and read secrets using vault binary.
Does this library support NOT to authenticate with Vault Agent ?
Tried to specify options with an empty token - but no success.
Please could someone give an hint how to skip auth ?
Regards, Constantin
hi constantin, i am also having the same problem. If you found any solution can you post it here.
Thanks Varun
Hey, no activity since 2019; Please reopen if the issue consists
what is the solution to this issue?
I have tried so hard but unable to fix it