amperity / vault-clj

Clojure client for Hashicorp's Vault secret management system.
Other
70 stars 17 forks source link

Implement system mounts interface #91

Closed brendonjwong closed 1 year ago

brendonjwong commented 1 year ago

Implemented the /sys/mounts/ endpoints in vault.sys.mounts. This should resolve https://github.com/amperity/vault-clj/issues/84.

All methods covered with integration tests.

brendonjwong commented 1 year ago
ERROR in (http-api) (http.clj:97)
Uncaught exception, not in assertion.
expected: nil
  actual: clojure.lang.ExceptionInfo: Vault API errors: 1 error occurred:
    * unsupported operation

#:vault.client{:status 405, :headers {:cache-control "no-store", :content-length "64", :content-type "application/json", :date "Sun, 02 Oct 2022 05:50:15 GMT"}, :errors ["1 error occurred:\n\t* unsupported operation\n\n"]}
 at vault.client.http$form_failure.invokeStatic (http.clj:97)
    vault.client.http$form_failure.invoke (http.clj:75)
    vault.client.http$call_api$callback__2616.invoke (http.clj:174)
    org.httpkit.client$request$deliver_resp__752$fn__753.invoke (client.clj:248)
    org.httpkit.client$request$deliver_resp__752.invoke (client.clj:246)
    org.httpkit.client$request$reify__757.onSuccess (client.clj:278)
    org.httpkit.client.Handler.run (RespListener.java:42)
    java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
    java.util.concurrent.FutureTask.run (FutureTask.java:264)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
    java.lang.Thread.run (Thread.java:834)

🤔 this test passes for me locally

greglook commented 1 year ago

This is probably why the test is failing: https://github.com/amperity/vault-clj/blob/e52b1b2c83cf0ed7a0ec2cc2f14ba043fe6b7389/.circleci/config.yml#L19

brendonjwong commented 1 year ago

This is probably why the test is failing:

https://github.com/amperity/vault-clj/blob/e52b1b2c83cf0ed7a0ec2cc2f14ba043fe6b7389/.circleci/config.yml#L19

😬 is there anything that prevents us from bumping that to latest?

greglook commented 1 year ago

No, we should be testing against the latest; most of the APIs are backwards-compatible, some things just won't be supported in the older versions (as you noticed). I've been testing against v1.11.3 locally.