I am using consul to get some configurations in my Node.js project.
I was able to access the consul key-value pairs with the code given below.
import consul from 'consul';
(new consul()).kv.get('config', (err, result) => {
if (err) throw err;
console.log("result", result);
});
(Using npm "consul")
Now, I have protected consul with ACL and have created 3 tokens:
master_token, a token with write access and a token with read access
As the consul is now ACL protected, the code mentioned above shows me "permission denied"
how can I pass this token in the kv.get method to authenticate my request ?
Thanks in advance.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…