From d926b2d886d5619a99bf6a45ea85f2f0e86d2911 Mon Sep 17 00:00:00 2001 From: Vivek Singh Date: Thu, 6 Sep 2018 01:19:42 +0530 Subject: [PATCH] Add basic auth support for /system/async-report This commit adds basic authentication for `/system/async-report` endpoint. It also adds basic-auth secrets to `queue-worker` service which will be used for gateway calls to `/system/async-report`. Signed-off-by: Vivek Singh --- gateway/server.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gateway/server.go b/gateway/server.go index a8429f9c..4d5351d2 100644 --- a/gateway/server.go +++ b/gateway/server.go @@ -119,8 +119,12 @@ func main() { auth.DecorateWithBasicAuth(faasHandlers.ListFunctions, credentials) faasHandlers.ScaleFunction = auth.DecorateWithBasicAuth(faasHandlers.ScaleFunction, credentials) - faasHandlers.QueryFunction = auth.DecorateWithBasicAuth(faasHandlers.QueryFunction, credentials) - faasHandlers.InfoHandler = auth.DecorateWithBasicAuth(faasHandlers.InfoHandler, credentials) + faasHandlers.QueryFunction = + auth.DecorateWithBasicAuth(faasHandlers.QueryFunction, credentials) + faasHandlers.InfoHandler = + auth.DecorateWithBasicAuth(faasHandlers.InfoHandler, credentials) + faasHandlers.AsyncReport = + auth.DecorateWithBasicAuth(faasHandlers.AsyncReport, credentials) } r := mux.NewRouter()