open class SlimVaultClient
A very simple Vault client - does not intend to be complete.
Author
Clement Escoffier
SlimVaultClient(vertx: Vertx, configuration: JsonObject)
Creates an instance of SlimVaultClient. |
static val TOKEN_HEADER: String |
open fun close(): Unit
Closes the client. |
|
open fun createToken(tokenRequest: TokenRequest, resultHandler: Handler<AsyncResult<Auth>>): Unit
Creates a new token. |
|
open fun delete(path: String, resultHandler: Handler<AsyncResult<Void>>): Unit
Deletes a secret from `path`. |
|
open fun getToken(): String |
|
open fun list(path: String, resultHandler: Handler<AsyncResult<MutableList<String>>>): Unit
Lists secrets from path (children). |
|
open fun loginWithAppRole(roleId: String, secretId: String, resultHandler: Handler<AsyncResult<Auth>>): Unit
Logs in against the `AppRole` backend. |
|
open fun loginWithCert(resultHandler: Handler<AsyncResult<Auth>>): Unit
Logs in against the `Cert` backend. Certificates are configured directly on the client instance. |
|
open fun loginWithUserCredentials(username: String, password: String, resultHandler: Handler<AsyncResult<Auth>>): Unit
Logs in against the `userpass` backend. |
|
open fun lookupSelf(resultHandler: Handler<AsyncResult<Lookup>>): Unit
Looks up for the current token metadata. |
|
open fun read(path: String, responseHandler: Handler<AsyncResult<Secret>>): Unit
Reads a secret from `path`. |
|
open fun renewSelf(leaseDurationInSecond: Long, resultHandler: Handler<AsyncResult<Auth>>): Unit
Renews the current token. |
|
open fun setToken(token: String): SlimVaultClient
Sets the token. |
|
open fun write(path: String, secrets: JsonObject, resultHandler: Handler<AsyncResult<Secret>>): Unit
Write a secret to `path`. |