Closed ieugen closed 9 months ago
Is there a way to list requests made by vault-clj? I'm trying to debug things:
Looks like you can supply some logging options:
:error-logger ; (fn [text ex])
:event-logger ; (fn [event-name])
https://http-kit.github.io/http-kit/org.httpkit.client.html#var-make-client
But those are not supported by request
function https://http-kit.github.io/http-kit/org.httpkit.client.html#var-request .
I had to switch the code to 1.x branch and it worked.
This is the code that uses vault 1.x and works:
(def client (vault/new-client "https://REDACTED") )
(vault/authenticate! client :token (vault-token))
(try
(kv2/list-secrets client "DocSearch" "/")
(catch Exception e
(println e)))
Is DocSearch
the mount for the kv2 secrets engine? If so, then you should use (kv2/with-mount client "DocSearch")
before calling kv2/list-secrets
on the client.
Thanks. Using the 2.x release I managed to make it work by using with-mount
I decided to test ou vault v2 branch for a project rewrite. I tried to use it but it seems I can't list kv2 secrets (or I am not using the api right).
I get: