diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-04-25 07:33:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 07:33:23 +0200 |
commit | 46f2cc458e628e7ed3efff6c41f62b302f26508b (patch) | |
tree | f48b4ca978da9cf5b78b06d24c604dceaeb494ae /configserver | |
parent | 17522dc13210408ff9a1da84b9c5c354283389a8 (diff) |
Revert "Revert "Flag to allow disabling mtls""
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java index 34220b64808..8c2be6a5b07 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/deploy/ModelContextImpl.java @@ -28,6 +28,7 @@ import com.yahoo.config.provision.TenantName; import com.yahoo.config.provision.Zone; import com.yahoo.container.jdisc.secretstore.SecretStore; import com.yahoo.vespa.config.server.tenant.SecretStoreExternalIdRetriever; +import com.yahoo.vespa.flags.BooleanFlag; import com.yahoo.vespa.flags.FetchVector; import com.yahoo.vespa.flags.FlagSource; import com.yahoo.vespa.flags.Flags; @@ -295,6 +296,7 @@ public class ModelContextImpl implements ModelContext { private final List<TenantSecretStore> tenantSecretStores; private final SecretStore secretStore; private final StringFlag jvmGCOptionsFlag; + private final boolean allowDisableMtls; public Properties(ApplicationId applicationId, ConfigserverConfig configserverConfig, @@ -329,6 +331,8 @@ public class ModelContextImpl implements ModelContext { this.secretStore = secretStore; this.jvmGCOptionsFlag = PermanentFlags.JVM_GC_OPTIONS.bindTo(flagSource) .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()); + this.allowDisableMtls = PermanentFlags.ALLOW_DISABLE_MTLS.bindTo(flagSource) + .with(FetchVector.Dimension.APPLICATION_ID, applicationId.serializedForm()).value(); } @Override public ModelContext.FeatureFlags featureFlags() { return featureFlags; } @@ -392,6 +396,10 @@ public class ModelContextImpl implements ModelContext { return flagValueForClusterType(jvmGCOptionsFlag, clusterType); } + @Override + public boolean allowDisableMtls() { + return allowDisableMtls; + } public String flagValueForClusterType(StringFlag flag, Optional<ClusterSpec.Type> clusterType) { return clusterType.map(type -> flag.with(CLUSTER_TYPE, type.name())) |