summaryrefslogtreecommitdiffstats
path: root/tenant-auth
diff options
context:
space:
mode:
authorJon Marius Venstad <jvenstad@yahoo-inc.com>2019-06-11 14:01:02 +0200
committerJon Marius Venstad <jvenstad@yahoo-inc.com>2019-06-12 13:58:50 +0200
commit88e41c5569cbda0a5e1eb8131f3486d79bfda5cc (patch)
treecc33f7bd59b8f0dff44f7a30f2f55445f977c666 /tenant-auth
parentdf6fedee139ddc7d9a7127d9a3d51cb6e43b7778 (diff)
Docs and TODO
Diffstat (limited to 'tenant-auth')
-rw-r--r--tenant-auth/src/main/java/ai/vespa/hosted/auth/Authenticator.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/tenant-auth/src/main/java/ai/vespa/hosted/auth/Authenticator.java b/tenant-auth/src/main/java/ai/vespa/hosted/auth/Authenticator.java
index 9ded35a5726..0242d0f891b 100644
--- a/tenant-auth/src/main/java/ai/vespa/hosted/auth/Authenticator.java
+++ b/tenant-auth/src/main/java/ai/vespa/hosted/auth/Authenticator.java
@@ -26,7 +26,10 @@ import java.util.Optional;
*/
public class Authenticator {
- /** Returns an SSLContext from "key" and "cert" files found under {@code System.getProperty("vespa.test.credentials.root")}. */
+ /** Returns an SSLContext which provides authentication against a Vespa endpoint.
+ *
+ * If {@code System.getProperty("vespa.test.credentials.root")} is set, key and certificate files
+ * "key" and "cert" in that directory are used; otherwise, the system default SSLContext is returned. */
public SSLContext sslContext() {
try {
Path credentialsRoot = Path.of(System.getProperty("vespa.test.credentials.root"));
@@ -46,10 +49,12 @@ public class Authenticator {
}
}
+ /** Adds necessary authentication to the given HTTP request builder, to be verified by a Vespa endpoint. */
public HttpRequest.Builder authenticated(HttpRequest.Builder request) {
return request;
}
+ /** Returns an authenticated controller client. */
public ControllerHttpClient controller() {
ApplicationId id = ApplicationId.from(requireNonBlankProperty("tenant"),
requireNonBlankProperty("application"),