diff options
author | Bjørn Christian Seime <bjorncs@oath.com> | 2018-02-13 16:46:31 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@oath.com> | 2018-02-13 16:46:31 +0100 |
commit | 7ee1cd259c8817d8f9f89fcb4d7741fe54fd24da (patch) | |
tree | f1b57d9ae9cc690412f028353da473eec38838c0 /controller-server | |
parent | d2b59af5e85b74406c3b0989ab7263cb14ca3dbb (diff) |
Move SecurityFilterUtils to generic filter package
Diffstat (limited to 'controller-server')
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzPrincipalFilter.java | 2 | ||||
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/UserAuthWithAthenzPrincipalFilter.java | 2 | ||||
-rw-r--r-- | controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/filter/SecurityFilterUtils.java (renamed from controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/SecurityFilterUtils.java) | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzPrincipalFilter.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzPrincipalFilter.java index b72cec562d8..81692e790a9 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzPrincipalFilter.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/AthenzPrincipalFilter.java @@ -16,7 +16,7 @@ import java.security.cert.X509Certificate; import java.util.Optional; import java.util.concurrent.Executor; -import static com.yahoo.vespa.hosted.controller.athenz.filter.SecurityFilterUtils.sendErrorResponse; +import static com.yahoo.vespa.hosted.controller.restapi.filter.SecurityFilterUtils.sendErrorResponse; /** * Authenticates Athenz principal, either through: diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/UserAuthWithAthenzPrincipalFilter.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/UserAuthWithAthenzPrincipalFilter.java index 80e14ca7f83..1dc46ed81ab 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/UserAuthWithAthenzPrincipalFilter.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/UserAuthWithAthenzPrincipalFilter.java @@ -21,7 +21,7 @@ import java.util.concurrent.Executor; import java.util.logging.Logger; import java.util.stream.Stream; -import static com.yahoo.vespa.hosted.controller.athenz.filter.SecurityFilterUtils.sendErrorResponse; +import static com.yahoo.vespa.hosted.controller.restapi.filter.SecurityFilterUtils.sendErrorResponse; /** * A variant of the {@link AthenzPrincipalFilter} to be used in combination with a cookie-based diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/SecurityFilterUtils.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/filter/SecurityFilterUtils.java index 8e193d3848f..7e7cf7a575d 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/athenz/filter/SecurityFilterUtils.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/filter/SecurityFilterUtils.java @@ -1,5 +1,5 @@ // 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.athenz.filter; +package com.yahoo.vespa.hosted.controller.restapi.filter; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -12,12 +12,12 @@ import com.yahoo.jdisc.handler.ResponseHandler; /** * @author bjorncs */ -class SecurityFilterUtils { +public class SecurityFilterUtils { private static final ObjectMapper mapper = new ObjectMapper(); private SecurityFilterUtils() {} - static void sendErrorResponse(ResponseHandler responseHandler, int statusCode, String message) { + public static void sendErrorResponse(ResponseHandler responseHandler, int statusCode, String message) { Response response = new Response(statusCode); response.headers().put("Content-Type", "application/json"); ObjectNode errorMessage = mapper.createObjectNode(); |