aboutsummaryrefslogtreecommitdiffstats
path: root/controller-server/src/main/java/com/yahoo
diff options
context:
space:
mode:
Diffstat (limited to 'controller-server/src/main/java/com/yahoo')
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java10
-rw-r--r--controller-server/src/main/java/com/yahoo/vespa/hosted/restapi/impl/StatusPageResource.java14
2 files changed, 12 insertions, 12 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java
index 44493d6818a..1c32b35f599 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/impl/AthenzClientFactoryImpl.java
@@ -10,7 +10,7 @@ import com.yahoo.athenz.auth.token.PrincipalToken;
import com.yahoo.athenz.auth.util.Crypto;
import com.yahoo.athenz.zms.ZMSClient;
import com.yahoo.athenz.zts.ZTSClient;
-import com.yahoo.jdisc.http.SecretStore;
+import com.yahoo.vespa.hosted.controller.api.integration.security.KeyService;
import com.yahoo.vespa.hosted.controller.athenz.AthenzClientFactory;
import com.yahoo.vespa.hosted.controller.athenz.NToken;
import com.yahoo.vespa.hosted.controller.athenz.ZmsClient;
@@ -27,13 +27,13 @@ import static com.yahoo.vespa.hosted.controller.athenz.AthenzUtils.USER_PRINCIPA
*/
public class AthenzClientFactoryImpl implements AthenzClientFactory {
- private final SecretStore secretStore;
+ private final KeyService secretService;
private final AthenzConfig config;
private final AthenzPrincipalAuthority athenzPrincipalAuthority;
@Inject
- public AthenzClientFactoryImpl(SecretStore secretStore, AthenzConfig config) {
- this.secretStore = secretStore;
+ public AthenzClientFactoryImpl(KeyService secretService, AthenzConfig config) {
+ this.secretService = secretService;
this.config = config;
this.athenzPrincipalAuthority = new AthenzPrincipalAuthority(config.principalHeaderName());
}
@@ -82,7 +82,7 @@ public class AthenzClientFactoryImpl implements AthenzClientFactory {
private PrivateKey getServicePrivateKey() {
AthenzConfig.Service service = config.service();
- String privateKey = secretStore.getSecret(service.privateKeySecretName(), service.privateKeyVersion()).trim();
+ String privateKey = secretService.getSecret(service.privateKeySecretName(), service.privateKeyVersion()).trim();
return Crypto.loadPrivateKey(privateKey);
}
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/restapi/impl/StatusPageResource.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/restapi/impl/StatusPageResource.java
index 67c69ddc887..f5852b9dfcf 100644
--- a/controller-server/src/main/java/com/yahoo/vespa/hosted/restapi/impl/StatusPageResource.java
+++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/restapi/impl/StatusPageResource.java
@@ -4,7 +4,7 @@ package com.yahoo.vespa.hosted.restapi.impl;
import com.fasterxml.jackson.databind.JsonNode;
import com.google.inject.Inject;
import com.yahoo.container.jaxrs.annotation.Component;
-import com.yahoo.jdisc.http.SecretStore;
+import com.yahoo.vespa.hosted.controller.api.integration.security.KeyService;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
@@ -24,20 +24,20 @@ import javax.ws.rs.core.UriBuilder;
public class StatusPageResource implements com.yahoo.vespa.hosted.controller.api.statuspage.StatusPageResource {
private final Client client;
- private final SecretStore secretStore;
+ private final KeyService keyService;
@Inject
- public StatusPageResource(@Component SecretStore secretStore) {
- this(secretStore, ClientBuilder.newClient());
+ public StatusPageResource(@Component KeyService keyService) {
+ this(keyService, ClientBuilder.newClient());
}
- protected StatusPageResource(SecretStore secretStore, Client client) {
- this.secretStore = secretStore;
+ protected StatusPageResource(KeyService keyService, Client client) {
+ this.keyService = keyService;
this.client = client;
}
protected UriBuilder statusPageURL(String page, String since) {
- String[] secrets = secretStore.getSecret("vespa_hosted.controller.statuspage_api_key").split(":");
+ String[] secrets = keyService.getSecret("vespa_hosted.controller.statuspage_api_key").split(":");
UriBuilder uriBuilder = UriBuilder.fromUri("https://" + secrets[0] + ".statuspage.io/api/v2/" + page + ".json?api_key=" + secrets[1]);
if (since != null) {
uriBuilder.queryParam("since", since);