diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2018-07-05 17:21:20 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2018-07-05 17:21:20 +0200 |
commit | be4d31b70c0cb186b87aae95fa2ccb392d39b9cc (patch) | |
tree | 06f14a4a5dd9162899ab8e27832e0ee21afb78f6 /controller-api | |
parent | 20d413cee8e3c7553101187f6778d214fe8c7708 (diff) |
Remove ZtsClient in controller-api/controller-server
- Replace old ZtsClient with new one from vespa-athenz module
- Add getControllerIdentity() to AthenzClientFactory
- Remove dependency on athenz-zts-java-client
Diffstat (limited to 'controller-api')
3 files changed, 4 insertions, 35 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/AthenzClientFactory.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/AthenzClientFactory.java index 72e7c758070..e95e97527da 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/AthenzClientFactory.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/AthenzClientFactory.java @@ -1,13 +1,17 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.athenz; +import com.yahoo.vespa.athenz.api.AthenzIdentity; import com.yahoo.vespa.athenz.api.NToken; +import com.yahoo.vespa.athenz.client.zts.ZtsClient; /** * @author bjorncs */ public interface AthenzClientFactory { + AthenzIdentity getControllerIdentity(); + ZmsClient createZmsClientWithServicePrincipal(); ZtsClient createZtsClientWithServicePrincipal(); diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/ZtsClient.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/ZtsClient.java deleted file mode 100644 index eefd11bdeec..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/ZtsClient.java +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.athenz; - -import com.yahoo.vespa.athenz.api.AthenzDomain; -import com.yahoo.vespa.athenz.api.AthenzIdentity; - -import java.util.List; - -/** - * @author bjorncs - */ -public interface ZtsClient { - - List<AthenzDomain> getTenantDomainsForUser(AthenzIdentity principal); - -} diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/ZtsException.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/ZtsException.java deleted file mode 100644 index 2be998e1544..00000000000 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/athenz/ZtsException.java +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.hosted.controller.api.integration.athenz; - -/** - * @author bjorncs - */ -public class ZtsException extends RuntimeException { - - private final int code; - - public ZtsException(int code, Throwable cause) { - super(cause.getMessage(), cause); - this.code = code; - } - - public int getCode() { - return code; - } -} |