Skip to content
This repository has been archived by the owner on Sep 30, 2019. It is now read-only.

scala-vault doesn't work with vault 0.10 #16

Open
es1o opened this issue Aug 9, 2018 · 0 comments
Open

scala-vault doesn't work with vault 0.10 #16

es1o opened this issue Aug 9, 2018 · 0 comments

Comments

@es1o
Copy link

es1o commented Aug 9, 2018

Hello.
I use scala-vault 0.4.1 and it doesn't work with vault 0.10.4.
My code:

    val config = VaultConfig(WSClient(new URL("http://localhost:8200")), "root")
    val secrets = Secrets(config, "secret")
    val response1 = secrets.set("some_secret", "some_key", "some_value")
    println(response1.attemptRun)
    val response = secrets.getAll("some_secret")
    println(response.attemptRun)

Results:

Ok(Fail(Received failure response from server: 404
 {"request_id":"4b8b8334-1f9e-8b5e-5970-58f632831756","lease_id":"","renewable":false,"lease_duration":0,"data":null,"wrap_info":null,"warnings":["Invalid path for a versioned K/V secrets engine. See the API docs for the appropriate API endpoints to use. If using the Vault CLI, use 'vault kv put' for this operation."],"auth":null}))
Ok(Fail(Received failure response from server: 404
 {"request_id":"2f22cc0f-3ec1-7f24-0d01-e9b74b57b74b","lease_id":"","renewable":false,"lease_duration":0,"data":null,"wrap_info":null,"warnings":["Invalid path for a versioned K/V secrets engine. See the API docs for the appropriate API endpoints to use. If using the Vault CLI, use 'vault kv get' for this operation."],"auth":null}))

With vault 0.6.2 everything works correctly.

I did some debug with simple ruby application (vault doesn't show API calls) and looks like API has been changed:

When I'll try to create secret with official client i get:

127.0.0.1 - - [09/Aug/2018:09:07:25 +0200] "GET /v1/sys/internal/ui/mounts/secret/hello HTTP/1.1" 404 526 0.0095
127.0.0.1 - - [09/Aug/2018:09:07:26 +0200] "PUT /v1/secret/hello HTTP/1.1" 404 483 0.0010
127.0.0.1 - - [09/Aug/2018:09:07:25 CEST] "GET /v1/sys/internal/ui/mounts/secret/hello HTTP/1.1" 404 526
- -> /v1/sys/internal/ui/mounts/secret/hello
127.0.0.1 - - [09/Aug/2018:09:07:25 CEST] "PUT /v1/secret/hello HTTP/1.1" 404 483
- -> /v1/secret/hello

With scala-vault:

127.0.0.1 - - [09/Aug/2018:09:08:22 +0200] "POST /v1/secret/some_secret HTTP/1.1" 404 490 0.0286
127.0.0.1 - - [09/Aug/2018:09:08:22 CEST] "POST /v1/secret/some_secret HTTP/1.1" 404 490
- -> /v1/secret/some_secret
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant