amperity / vault-clj

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

Specs for authenticate (and other APIs)? #66

Closed bsless closed 11 months ago

bsless commented 2 years ago

Hello, What do you think about adding clojure.spec.alpha specs to authenticate and possibly other parts of the public API, similar to how cognitect's AWS client validates requests before sending them?

I wouldn't mind PRing it

Thanks, Ben

greglook commented 2 years ago

I'm generally in favor of more validation, as long as it doesn't get in the way of compatibility with different versions of the vault API.

bsless commented 2 years ago

My idea in particular was to spec authenticate! itself https://github.com/amperity/vault-clj/blob/master/src/vault/core.clj#L12

greglook commented 12 months ago

I'm open to further validation of the requests on APIs, however I don't think we can use clojure.spec and retain babashka compatibility. For example, in ac8a864b0277751b436367aa90160257ed64efce I switched to a really simplified validation approach for the auth and lease states.