Skip to content

Commit

Permalink
Support nonProxyHosts for Vault client
Browse files Browse the repository at this point in the history
Fixes #16453
  • Loading branch information
gsmet committed May 19, 2021
1 parent 9506d8c commit 7e4d38f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ public static WebClient createHttpClient(Vertx vertx, VaultBootstrapConfig vault
.setConnectTimeout((int) vaultBootstrapConfig.connectTimeout.toMillis())
.setIdleTimeout((int) vaultBootstrapConfig.readTimeout.getSeconds());

if (vaultBootstrapConfig.nonProxyHosts.isPresent()) {
options.setNonProxyHosts(vaultBootstrapConfig.nonProxyHosts.get());
}

boolean trustAll = vaultBootstrapConfig.tls.skipVerify.orElseGet(() -> tlsConfig.trustAll);
if (trustAll) {
skipVerify(options);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ public class VaultBootstrapConfig {
@ConfigItem(defaultValue = DEFAULT_READ_TIMEOUT)
public Duration readTimeout;

/**
* List of remote hosts that are not proxied when the client is configured to use a proxy. This
* list serves the same purpose as the JVM {@code nonProxyHosts} configuration.
*
* <p>
* Entries can use the <i>*</i> wildcard character for pattern matching, e.g <i>*.example.com</i> matches
* <i>www.example.com</i>.
*/
@ConfigItem
public Optional<List<String>> nonProxyHosts;

/**
* List of named credentials providers, such as: `quarkus.vault.credentials-provider.foo.kv-path=mypath`
* <p>
Expand Down

0 comments on commit 7e4d38f

Please sign in to comment.