Giter Site home page Giter Site logo

scala-vault's Issues

Vault Leader

Hi,

We have Vault setup with Consul. Is there a way we can query the Vault leader from your scala-vault plugin? Thanks.

Thanks,
Govind

scala-vault doesn't work with vault 0.10

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

Does this work?

Apologies because I'm probably just being an idiot since I'm new to scala/java, but I can't seem to get this to work.

My project/plugins.sbt is this:

addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")

and this is my build.sbt:

scalaVersion := "2.11.8"
resolvers += Resolver.bintrayRepo("janstenpickle", "maven")
libraryDependencies += "janstenpickle.vault" %% "vault-core" % "0.4.0"
libraryDependencies += "janstenpickle.vault" %% "vault-auth" % "0.4.0"
libraryDependencies += "janstenpickle.vault" %% "vault-manage" % "0.4.0"

when I try to run sbt console
I get

sbt.ResolveException: unresolved dependency: org.uscala#uscala-result_2.11;0.5.1: not found
unresolved dependency: org.uscala#uscala-result-async_2.11;0.5.1: not found

When I go to https://bintray.com/albertpastrana/maven/uscala-result/0.5.1 to try to figure out what's going on, it says "scalas 2.12.1" Does that mean uscala-result needs scala version 2.12, but scala-vault needs 2.11?

Add support for userpass administration

Seeing as the auth module is designed to support userpass authentication and the manage module can be used to enable or disable the userpass backend it would make sense to include some code for managing users.

Cannot connect to vault, reporting "tls: unsupported SSLv2 handshake received"

Hi,

We're trying to use VaultConfig to connect to a vault server running on docker. Vault is reporting "tls: unsupported SSLv2 handshake received" - this suggests netty 3.1.0 is trying sslv2hello. Has anyone seen this before?

There is another possibility and that is that the root ca cert is not available. Other java clients report this however, so there is a difference.

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.