summaryrefslogtreecommitdiffstats
path: root/hosted-api
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2019-06-13 14:24:49 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2019-06-13 14:24:49 +0200
commit17579280e419347d76ff950ebac88844c27a4d8e (patch)
tree7c40f096cef1cec6529eaacfbd9f250cf9c8b261 /hosted-api
parent2bb71582b979a83a39260f3f11466737b94ee47f (diff)
Separate API and deployment authenticators
Diffstat (limited to 'hosted-api')
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/ApiAuthenticator.java8
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/EndpointAuthenticator.java (renamed from hosted-api/src/main/java/ai/vespa/hosted/api/Authenticator.java)7
-rw-r--r--hosted-api/src/main/java/ai/vespa/hosted/api/TestConfig.java5
3 files changed, 11 insertions, 9 deletions
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/ApiAuthenticator.java b/hosted-api/src/main/java/ai/vespa/hosted/api/ApiAuthenticator.java
new file mode 100644
index 00000000000..674faaf0ee7
--- /dev/null
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/ApiAuthenticator.java
@@ -0,0 +1,8 @@
+package ai.vespa.hosted.api;
+
+public interface ApiAuthenticator {
+
+ /** Returns a client authenticated to talk to the hosted Vespa API. */
+ ControllerHttpClient controller();
+
+}
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/Authenticator.java b/hosted-api/src/main/java/ai/vespa/hosted/api/EndpointAuthenticator.java
index acd8a215e7f..62b1d2b4c92 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/Authenticator.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/EndpointAuthenticator.java
@@ -5,11 +5,11 @@ import java.net.http.HttpRequest;
import java.util.Optional;
/**
- * Adds environment dependent authentication to HTTP request against hosted Vespa API and deployments.
+ * Adds environment dependent authentication to HTTP request against Vespa deployments.
*
* @author jonmv
*/
-public interface Authenticator {
+public interface EndpointAuthenticator {
/** Returns an SSLContext which provides authentication against a Vespa endpoint. */
SSLContext sslContext();
@@ -17,7 +17,4 @@ public interface Authenticator {
/** Adds necessary authentication to the given HTTP request builder, to pass the data plane of a Vespa endpoint. */
HttpRequest.Builder authenticated(HttpRequest.Builder request);
- /** Returns a client authenticated to talk to the hosted Vespa API. */
- ControllerHttpClient controller();
-
}
diff --git a/hosted-api/src/main/java/ai/vespa/hosted/api/TestConfig.java b/hosted-api/src/main/java/ai/vespa/hosted/api/TestConfig.java
index a0c679f312e..897b5d3236d 100644
--- a/hosted-api/src/main/java/ai/vespa/hosted/api/TestConfig.java
+++ b/hosted-api/src/main/java/ai/vespa/hosted/api/TestConfig.java
@@ -59,10 +59,7 @@ public class TestConfig {
public ZoneId zone() { return zone; }
/** Returns an immutable view of deployments, per zone, of the application to test. */
- public Map<ZoneId, Map<String, URI>> allDeployments() { return deployments; }
-
- /** Returns the deployment to test in this test runtime. */
- public Map<String, URI> deploymentToTest() { return deployments.get(zone); }
+ public Map<ZoneId, Map<String, URI>> deployments() { return deployments; }
/** Returns the hosted Vespa system this is run against. */
public SystemName system() { return system; }