diff options
author | Morten Tokle <mortent@verizonmedia.com> | 2019-06-24 09:12:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-24 09:12:12 +0200 |
commit | 60c74055e4fb3ed04398eb8735229a6ad25495ce (patch) | |
tree | bbefc0ee291bce14f260f79b8add42823bcaaa81 | |
parent | 25ae53f995d0110d27afcc430bcf19b1e6ef5755 (diff) | |
parent | c0f332e83da9c484421445b989672bcd21f69f75 (diff) |
Merge pull request #9881 from vespa-engine/mortent/reapply-cfgmodel-tlssecrets
Reapply api changes for tls config
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java | 2 | ||||
-rw-r--r-- | config-model-api/src/main/java/com/yahoo/config/model/api/TlsSecrets.java | 30 |
2 files changed, 32 insertions, 0 deletions
diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java index b5db9f5eddd..9d7ae9759c3 100644 --- a/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/ModelContext.java @@ -59,6 +59,8 @@ public interface ModelContext { boolean useAdaptiveDispatch(); // TODO: Remove when 7.61 is the oldest model in use default boolean enableMetricsProxyContainer() { return false; } + // TODO: Remove temporary default implementation + default Optional<TlsSecrets> tlsSecrets() { return Optional.empty(); } } } diff --git a/config-model-api/src/main/java/com/yahoo/config/model/api/TlsSecrets.java b/config-model-api/src/main/java/com/yahoo/config/model/api/TlsSecrets.java new file mode 100644 index 00000000000..3cb4cedcbac --- /dev/null +++ b/config-model-api/src/main/java/com/yahoo/config/model/api/TlsSecrets.java @@ -0,0 +1,30 @@ +// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.config.model.api; + + public class TlsSecrets { + public static final TlsSecrets MISSING = new TlsSecrets(); + + private final String certificate; + private final String key; + + private TlsSecrets() { + this(null,null); + } + + public TlsSecrets(String certificate, String key) { + this.certificate = certificate; + this.key = key; + } + + public String certificate() { + return certificate; + } + + public String key() { + return key; + } + + public boolean isMissing() { + return this == MISSING; + } +} |