diff options
author | Andreas Eriksen <andreer@pvv.ntnu.no> | 2019-04-26 15:57:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-26 15:57:52 +0200 |
commit | 1295138eec707300ba25ab3c6a97c2735229c3b4 (patch) | |
tree | 7af422b0b6b6fc424bf8694eb74c0222040f50be /controller-api | |
parent | 4564507a491b5497b5d60ecc0305e5a017ab5c46 (diff) | |
parent | 259fa915ba39923e4cdd7663548a4eec84583575 (diff) |
Merge pull request #9198 from vespa-engine/andreer/certificate-manager
andreer/certificate manager
Diffstat (limited to 'controller-api')
3 files changed, 18 insertions, 7 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/certificates/CertificateProvider.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/certificates/CertificateProvider.java new file mode 100644 index 00000000000..2503325760d --- /dev/null +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/certificates/CertificateProvider.java @@ -0,0 +1,9 @@ +package com.yahoo.vespa.hosted.controller.api.integration.certificates; + +import java.security.KeyPair; +import java.security.cert.X509Certificate; +import java.util.List; + +public interface CertificateProvider { + List<X509Certificate> requestCaSignedCertificate(KeyPair keyPair, List<String> domains); +} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java index 63faadfe555..1fd63beab39 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/MemoryNameService.java @@ -43,10 +43,12 @@ public class MemoryNameService implements NameService { } @Override - public Record createTxt(RecordName name, RecordData txtData) { - Record record = new Record(Record.Type.TXT, name, txtData); - records.add(record); - return record; + public List<Record> createTxtRecords(RecordName name, List<RecordData> txtData) { + List<Record> records = txtData.stream() + .map(data -> new Record(Record.Type.TXT, name, data)) + .collect(Collectors.toList()); + this.records.addAll(records); + return records; } @Override diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java index 1bac0f6cfc1..903ea250935 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dns/NameService.java @@ -32,10 +32,10 @@ public interface NameService { /** * Create a new TXT record containing the provided data. * @param name Name of the created record - * @param txtData TXT data for the record, consisting of one or more space-separated <em>double-quoted</em> strings: "string1" "string2" - * @return The created record + * @param txtRecords TXT data values for the record, each consisting of one or more space-separated <em>double-quoted</em> strings: "string1" "string2" + * @return The created records */ - Record createTxt(RecordName name, RecordData txtData); + List<Record> createTxtRecords(RecordName name, List<RecordData> txtRecords); /** Find all records matching given type and name */ List<Record> findRecords(Record.Type type, RecordName name); |