public class HTTPVaultConnectorFactory extends VaultConnectorFactory
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_HOST |
static Integer |
DEFAULT_PORT |
static String |
DEFAULT_PREFIX |
static boolean |
DEFAULT_TLS |
Constructor and Description |
---|
HTTPVaultConnectorFactory()
Default empty constructor.
|
Modifier and Type | Method and Description |
---|---|
HTTPVaultConnector |
build()
Build command, produces connector after initialization.
|
HTTPVaultConnectorFactory |
withHost(String host)
Set hostname (default: 127.0.0.1)
|
HTTPVaultConnectorFactory |
withoutTLS()
Convenience Method for NOT using TLS
|
HTTPVaultConnectorFactory |
withPort(Integer port)
Set port (default: 8200)
|
HTTPVaultConnectorFactory |
withPrefix(String prefix)
Set API prefix.
|
HTTPVaultConnectorFactory |
withSslContext(SSLContext sslContext)
Add a custom SSL context.
|
HTTPVaultConnectorFactory |
withTLS()
Convenience Method for TLS usage (enabled by default)
|
HTTPVaultConnectorFactory |
withTLS(boolean useTLS)
Set TLS usage (default: TRUE)
|
HTTPVaultConnectorFactory |
withTrustedCA(Path cert)
Add a trusted CA certifiate for HTTPS connections.
|
httpFactory
public static final String DEFAULT_HOST
public static final Integer DEFAULT_PORT
public static final boolean DEFAULT_TLS
public static final String DEFAULT_PREFIX
public HTTPVaultConnectorFactory()
public HTTPVaultConnectorFactory withHost(String host)
host
- Hostname or IP addresspublic HTTPVaultConnectorFactory withPort(Integer port)
port
- Vault TCP portpublic HTTPVaultConnectorFactory withTLS(boolean useTLS)
useTLS
- use TLS or notpublic HTTPVaultConnectorFactory withTLS()
public HTTPVaultConnectorFactory withoutTLS()
public HTTPVaultConnectorFactory withPrefix(String prefix)
prefix
- Vault API prefix (default: "/v1/"public HTTPVaultConnectorFactory withTrustedCA(Path cert) throws VaultConnectorException
cert
- path to certificate fileVaultConnectorException
public HTTPVaultConnectorFactory withSslContext(SSLContext sslContext)
withTrustedCA(java.nio.file.Path)
.sslContext
- the SSL contextpublic HTTPVaultConnector build()
VaultConnectorFactory
build
in class VaultConnectorFactory
Copyright © 2016. All rights reserved.