From 846b63a17b9b0ee2c007b0ebf24c87106f8b864f Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 17 Aug 2022 13:36:56 +0200 Subject: [PATCH] *: remove some very verbose logging messages Signed-off-by: Jens Langhammer --- authentik/policies/views.py | 1 - authentik/providers/oauth2/views/authorize.py | 9 ++------- internal/outpost/proxyv2/proxyv2.go | 3 +-- internal/web/proxy.go | 2 -- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/authentik/policies/views.py b/authentik/policies/views.py index ae1c8abfd..293be99f7 100644 --- a/authentik/policies/views.py +++ b/authentik/policies/views.py @@ -70,7 +70,6 @@ class PolicyAccessView(AccessMixin, View): # Check if user is unauthenticated, so we pass the application # for the identification stage if not request.user.is_authenticated: - LOGGER.warning("user not authenticated") return self.handle_no_permission() # Check permissions result = self.user_has_access() diff --git a/authentik/providers/oauth2/views/authorize.py b/authentik/providers/oauth2/views/authorize.py index 37eb2ab37..b09605be7 100644 --- a/authentik/providers/oauth2/views/authorize.py +++ b/authentik/providers/oauth2/views/authorize.py @@ -24,12 +24,7 @@ from authentik.flows.challenge import ( HttpChallengeResponse, ) from authentik.flows.models import in_memory_stage -from authentik.flows.planner import ( - PLAN_CONTEXT_APPLICATION, - PLAN_CONTEXT_SSO, - FlowPlan, - FlowPlanner, -) +from authentik.flows.planner import PLAN_CONTEXT_APPLICATION, PLAN_CONTEXT_SSO, FlowPlanner from authentik.flows.stage import StageView from authentik.flows.views.executor import SESSION_KEY_PLAN from authentik.lib.utils.time import timedelta_from_string @@ -353,7 +348,7 @@ class AuthorizationFlowInitView(PolicyAccessView): # planner.use_cache = False planner.allow_empty_flows = True scope_descriptions = UserInfoView().get_scope_descriptions(self.params.scope) - plan: FlowPlan = planner.plan( + plan = planner.plan( self.request, { PLAN_CONTEXT_SSO: True, diff --git a/internal/outpost/proxyv2/proxyv2.go b/internal/outpost/proxyv2/proxyv2.go index 3acaccef9..951a0068a 100644 --- a/internal/outpost/proxyv2/proxyv2.go +++ b/internal/outpost/proxyv2/proxyv2.go @@ -66,10 +66,9 @@ func NewProxyServer(ac *ak.APIController) *ProxyServer { } func (ps *ProxyServer) HandleHost(rw http.ResponseWriter, r *http.Request) bool { - a, host := ps.lookupApp(r) + a, _ := ps.lookupApp(r) if a != nil { if a.Mode() == api.PROXYMODE_PROXY { - ps.log.WithField("host", host).Trace("routing to proxy outpost") a.ServeHTTP(rw, r) return true } diff --git a/internal/web/proxy.go b/internal/web/proxy.go index 66a1ece32..388d53fa1 100644 --- a/internal/web/proxy.go +++ b/internal/web/proxy.go @@ -11,7 +11,6 @@ import ( "github.com/prometheus/client_golang/prometheus" "goauthentik.io/internal/outpost/proxyv2/application" "goauthentik.io/internal/utils/sentry" - "goauthentik.io/internal/utils/web" ) func (ws *WebServer) configureProxy() { @@ -65,7 +64,6 @@ func (ws *WebServer) configureProxy() { Requests.With(prometheus.Labels{ "dest": "py", }).Observe(float64(time.Since(before))) - ws.log.WithField("host", web.GetHost(r)).Trace("routing to application server") rp.ServeHTTP(rw, r) })) }