aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorn.christian@seime.no>2020-01-16 16:00:40 +0100
committerGitHub <noreply@github.com>2020-01-16 16:00:40 +0100
commitdc1810caac1e771a0eb20a10e1fe7c96d1a6de69 (patch)
tree63994555c5dd662e93a7c8db358dcb48cce2d75c /config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java
parent9d3769aad649f631a652025d17325367aeaa455a (diff)
Revert "Bjorncs/additional container port hosted 4443"
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java28
1 files changed, 5 insertions, 23 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java
index 7a08a3c1a7b..d00ce3974fa 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/container/http/ssl/HostedSslConnectorFactory.java
@@ -4,7 +4,6 @@ package com.yahoo.vespa.model.container.http.ssl;
import com.yahoo.config.model.api.TlsSecrets;
import com.yahoo.jdisc.http.ConnectorConfig;
import com.yahoo.jdisc.http.ConnectorConfig.Ssl.ClientAuth;
-import com.yahoo.vespa.model.container.component.SimpleComponent;
import com.yahoo.vespa.model.container.http.ConnectorFactory;
import java.util.List;
@@ -20,33 +19,16 @@ public class HostedSslConnectorFactory extends ConnectorFactory {
private final boolean enforceClientAuth;
- /**
- * Create connector factory that uses a certificate provided by the config-model / configserver.
- */
- public static HostedSslConnectorFactory withProvidedCertificate(String serverName, TlsSecrets tlsSecrets) {
- return new HostedSslConnectorFactory(createConfiguredDirectSslProvider(serverName, tlsSecrets, /*tlsCaCertificates*/null), false);
+ public HostedSslConnectorFactory(String serverName, TlsSecrets tlsSecrets) {
+ this(serverName, tlsSecrets, null, false);
}
- /**
- * Create connector factory that uses a certificate provided by the config-model / configserver and a truststore configured by the application.
- */
- public static HostedSslConnectorFactory withProvidedCertificateAndTruststore(String serverName, TlsSecrets tlsSecrets, String tlsCaCertificates) {
- return new HostedSslConnectorFactory(createConfiguredDirectSslProvider(serverName, tlsSecrets, tlsCaCertificates), true);
- }
-
- /**
- * Create connector factory that uses the default certificate and truststore provided by Vespa (through Vespa-global TLS configuration).
- */
- public static HostedSslConnectorFactory withDefaultCertificateAndTruststore(String serverName) {
- return new HostedSslConnectorFactory(new DefaultSslProvider(serverName), true);
- }
-
- private HostedSslConnectorFactory(SimpleComponent sslProviderComponent, boolean enforceClientAuth) {
- super("tls4443", 4443, sslProviderComponent);
+ public HostedSslConnectorFactory(String serverName, TlsSecrets tlsSecrets, String tlsCaCertificates, boolean enforceClientAuth) {
+ super("tls4443", 4443, createSslProvider(serverName, tlsSecrets, tlsCaCertificates));
this.enforceClientAuth = enforceClientAuth;
}
- private static ConfiguredDirectSslProvider createConfiguredDirectSslProvider(
+ private static ConfiguredDirectSslProvider createSslProvider(
String serverName, TlsSecrets tlsSecrets, String tlsCaCertificates) {
return new ConfiguredDirectSslProvider(
serverName,