diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2017-11-16 11:46:50 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2017-11-16 11:46:50 +0100 |
commit | 10810ca09dc4fd26d2994c49dbd9b74c442a1b2d (patch) | |
tree | f4d3b7d777221e1a4aba638a1940e4a69e8f998d /athenz-identity-provider-service | |
parent | 7d0ef9a536a8cab7a7920306171d0f2e7a845462 (diff) |
Disable Athenz ssl keystore configurator in main
Diffstat (limited to 'athenz-identity-provider-service')
-rw-r--r-- | athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/AthenzSslKeyStoreConfigurator.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/AthenzSslKeyStoreConfigurator.java b/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/AthenzSslKeyStoreConfigurator.java index fb4e331f1e9..6ab1da584b7 100644 --- a/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/AthenzSslKeyStoreConfigurator.java +++ b/athenz-identity-provider-service/src/main/java/com/yahoo/vespa/hosted/athenz/instanceproviderservice/AthenzSslKeyStoreConfigurator.java @@ -3,6 +3,7 @@ package com.yahoo.vespa.hosted.athenz.instanceproviderservice; import com.google.inject.Inject; import com.yahoo.component.AbstractComponent; +import com.yahoo.config.provision.SystemName; import com.yahoo.config.provision.Zone; import com.yahoo.jdisc.http.SecretStore; import com.yahoo.jdisc.http.ssl.SslKeyStoreConfigurator; @@ -39,6 +40,7 @@ public class AthenzSslKeyStoreConfigurator extends AbstractComponent implements private final SecretStoreKeyProvider keyProvider; private final AthenzProviderServiceConfig.Zones zoneConfig; private final AtomicBoolean alreadyConfigured = new AtomicBoolean(); + private final Zone zone; @Inject public AthenzSslKeyStoreConfigurator(SecretStore secretStore, @@ -48,10 +50,15 @@ public class AthenzSslKeyStoreConfigurator extends AbstractComponent implements this.certificateClient = new AthenzCertificateClient(config, zoneConfig); this.keyProvider = new SecretStoreKeyProvider(secretStore, zoneConfig.secretName()); this.zoneConfig = zoneConfig; + this.zone = zone; } @Override public void configure(SslKeyStoreContext sslKeyStoreContext) { + // TODO Remove this when main is ready + if (zone.system() != SystemName.cd) { + return; + } if (alreadyConfigured.getAndSet(true)) { // For debugging purpose of SslKeyStoreConfigurator interface throw new IllegalStateException("Already configured. configure() can only be called once."); } |