From bc9e7e8b93e13424d011ab82c90aa8fa34d7c090 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Jan 2021 15:39:43 +0100 Subject: [PATCH] build(deps): bump structlog from 20.1.0 to 20.2.0 (#445) * build(deps): bump structlog from 20.1.0 to 20.2.0 Bumps [structlog](https://github.com/hynek/structlog) from 20.1.0 to 20.2.0. - [Release notes](https://github.com/hynek/structlog/releases) - [Changelog](https://github.com/hynek/structlog/blob/master/CHANGELOG.rst) - [Commits](https://github.com/hynek/structlog/compare/20.1.0...20.2.0) Signed-off-by: dependabot[bot] * *: use structlog.stdlib instead of structlog for type-hints Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer --- Pipfile.lock | 12 ++++++------ authentik/admin/tasks.py | 2 +- authentik/admin/templatetags/admin_reflection.py | 2 +- authentik/admin/views/overview.py | 2 +- authentik/api/auth.py | 2 +- authentik/core/admin.py | 2 +- authentik/core/channels.py | 2 +- authentik/core/models.py | 2 +- authentik/core/tasks.py | 2 +- authentik/core/views/impersonate.py | 2 +- authentik/events/models.py | 2 +- authentik/flows/management/commands/benchmark.py | 2 +- authentik/flows/markers.py | 2 +- authentik/flows/models.py | 2 +- authentik/flows/planner.py | 2 +- authentik/flows/signals.py | 2 +- authentik/flows/views.py | 2 +- authentik/lib/expression/evaluator.py | 2 +- authentik/lib/sentry.py | 2 +- authentik/lib/templatetags/authentik_utils.py | 2 +- authentik/lib/utils/urls.py | 2 +- authentik/outposts/apps.py | 2 +- authentik/outposts/channels.py | 2 +- authentik/outposts/controllers/base.py | 2 +- authentik/outposts/controllers/k8s/base.py | 2 +- authentik/outposts/models.py | 2 +- authentik/outposts/signals.py | 2 +- authentik/outposts/tasks.py | 2 +- authentik/policies/dummy/models.py | 2 +- authentik/policies/engine.py | 2 +- authentik/policies/expiry/models.py | 2 +- authentik/policies/expression/evaluator.py | 2 +- authentik/policies/hibp/models.py | 2 +- authentik/policies/password/models.py | 2 +- authentik/policies/process.py | 4 ++-- authentik/policies/reputation/signals.py | 2 +- authentik/policies/reputation/tasks.py | 2 +- authentik/policies/signals.py | 2 +- authentik/policies/views.py | 2 +- authentik/providers/oauth2/utils.py | 2 +- authentik/providers/oauth2/views/authorize.py | 2 +- authentik/providers/oauth2/views/introspection.py | 2 +- authentik/providers/oauth2/views/provider.py | 2 +- authentik/providers/oauth2/views/token.py | 2 +- authentik/providers/oauth2/views/userinfo.py | 2 +- authentik/providers/saml/models.py | 2 +- authentik/providers/saml/processors/assertion.py | 4 ++-- .../providers/saml/processors/metadata_parser.py | 2 +- .../providers/saml/processors/request_parser.py | 2 +- authentik/providers/saml/views.py | 8 ++++---- .../management/commands/create_recovery_key.py | 2 +- authentik/root/asgi.py | 2 +- authentik/root/celery.py | 2 +- authentik/root/urls.py | 2 +- authentik/sources/ldap/auth.py | 2 +- authentik/sources/ldap/password.py | 2 +- authentik/sources/ldap/sync.py | 2 +- authentik/sources/oauth/apps.py | 4 ++-- authentik/sources/oauth/clients/base.py | 2 +- authentik/sources/oauth/clients/oauth1.py | 2 +- authentik/sources/oauth/clients/oauth2.py | 2 +- authentik/sources/oauth/types/manager.py | 2 +- authentik/sources/oauth/views/callback.py | 2 +- authentik/sources/oauth/views/dispatcher.py | 2 +- authentik/sources/oauth/views/redirect.py | 2 +- authentik/sources/saml/processors/response.py | 2 +- authentik/sources/saml/signals.py | 2 +- authentik/sources/saml/tasks.py | 2 +- authentik/stages/email/stage.py | 2 +- authentik/stages/email/tasks.py | 2 +- authentik/stages/identification/forms.py | 2 +- authentik/stages/identification/stage.py | 2 +- authentik/stages/otp_static/stage.py | 2 +- authentik/stages/otp_time/stage.py | 2 +- authentik/stages/otp_validate/stage.py | 2 +- authentik/stages/password/stage.py | 2 +- authentik/stages/prompt/stage.py | 2 +- authentik/stages/user_delete/stage.py | 2 +- authentik/stages/user_login/stage.py | 2 +- authentik/stages/user_logout/stage.py | 2 +- authentik/stages/user_write/stage.py | 2 +- lifecycle/migrate.py | 2 +- tests/e2e/test_provider_oauth2_grafana.py | 2 +- tests/e2e/test_provider_oauth2_oidc.py | 2 +- tests/e2e/test_provider_saml.py | 2 +- tests/e2e/test_source_oauth.py | 2 +- tests/e2e/test_source_saml.py | 2 +- tests/e2e/utils.py | 2 +- 88 files changed, 99 insertions(+), 99 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 655676556..7264ec6e9 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -410,10 +410,10 @@ }, "h11": { "hashes": [ - "sha256:3c6c61d69c6f13d41f1b80ab0322f1872702a3ba26e12aa864c928f6a43fbaab", - "sha256:ab6c335e1b6ef34b205d5ca3e228c9299cc7218b049819ec84a388c2525e5d87" + "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6", + "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042" ], - "version": "==0.11.0" + "version": "==0.12.0" }, "hiredis": { "hashes": [ @@ -1006,11 +1006,11 @@ }, "structlog": { "hashes": [ - "sha256:7a48375db6274ed1d0ae6123c486472aa1d0890b08d314d2b016f3aa7f35990b", - "sha256:8a672be150547a93d90a7d74229a29e765be05bd156a35cdcc527ebf68e9af92" + "sha256:33dd6bd5f49355e52c1c61bb6a4f20d0b48ce0328cc4a45fe872d38b97a05ccd", + "sha256:af79dfa547d104af8d60f86eac12fb54825f54a46bc998e4504ef66177103174" ], "index": "pypi", - "version": "==20.1.0" + "version": "==20.2.0" }, "swagger-spec-validator": { "hashes": [ diff --git a/authentik/admin/tasks.py b/authentik/admin/tasks.py index a2a889ea2..e4c7efed6 100644 --- a/authentik/admin/tasks.py +++ b/authentik/admin/tasks.py @@ -2,7 +2,7 @@ from django.core.cache import cache from packaging.version import parse from requests import RequestException, get -from structlog import get_logger +from structlog.stdlib import get_logger from authentik import __version__ from authentik.events.models import Event, EventAction diff --git a/authentik/admin/templatetags/admin_reflection.py b/authentik/admin/templatetags/admin_reflection.py index 33c334dc9..4f4dae144 100644 --- a/authentik/admin/templatetags/admin_reflection.py +++ b/authentik/admin/templatetags/admin_reflection.py @@ -2,7 +2,7 @@ from django import template from django.db.models import Model from django.utils.html import mark_safe -from structlog import get_logger +from structlog.stdlib import get_logger register = template.Library() LOGGER = get_logger() diff --git a/authentik/admin/views/overview.py b/authentik/admin/views/overview.py index 2e216d8ce..95cab9013 100644 --- a/authentik/admin/views/overview.py +++ b/authentik/admin/views/overview.py @@ -5,7 +5,7 @@ from django.http.request import HttpRequest from django.http.response import HttpResponse from django.utils.translation import gettext as _ from django.views.generic import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.admin.forms.overview import FlowCacheClearForm, PolicyCacheClearForm from authentik.admin.mixins import AdminRequiredMixin diff --git a/authentik/api/auth.py b/authentik/api/auth.py index 18f246409..2ee8fecad 100644 --- a/authentik/api/auth.py +++ b/authentik/api/auth.py @@ -5,7 +5,7 @@ from typing import Any, Optional, Tuple, Union from rest_framework.authentication import BaseAuthentication, get_authorization_header from rest_framework.request import Request -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Token, TokenIntents, User diff --git a/authentik/core/admin.py b/authentik/core/admin.py index d30ece7e8..cb37367ce 100644 --- a/authentik/core/admin.py +++ b/authentik/core/admin.py @@ -4,7 +4,7 @@ from django.apps import AppConfig, apps from django.contrib import admin from django.contrib.admin.sites import AlreadyRegistered from guardian.admin import GuardedModelAdmin -from structlog import get_logger +from structlog.stdlib import get_logger LOGGER = get_logger() diff --git a/authentik/core/channels.py b/authentik/core/channels.py index ac359d1e6..9b21d7da5 100644 --- a/authentik/core/channels.py +++ b/authentik/core/channels.py @@ -1,7 +1,7 @@ """Channels base classes""" from channels.exceptions import DenyConnection from channels.generic.websocket import JsonWebsocketConsumer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.api.auth import token_from_header from authentik.core.models import User diff --git a/authentik/core/models.py b/authentik/core/models.py index 6f4a7c49f..2cf95b2a0 100644 --- a/authentik/core/models.py +++ b/authentik/core/models.py @@ -15,7 +15,7 @@ from django.utils.translation import gettext_lazy as _ from guardian.mixins import GuardianUserMixin from model_utils.managers import InheritanceManager from rest_framework.serializers import Serializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.exceptions import PropertyMappingExpressionException from authentik.core.signals import password_changed diff --git a/authentik/core/tasks.py b/authentik/core/tasks.py index d7c5fa091..168255b24 100644 --- a/authentik/core/tasks.py +++ b/authentik/core/tasks.py @@ -8,7 +8,7 @@ from dbbackup.db.exceptions import CommandConnectorError from django.contrib.humanize.templatetags.humanize import naturaltime from django.core import management from django.utils.timezone import now -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import ExpiringModel from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus diff --git a/authentik/core/views/impersonate.py b/authentik/core/views/impersonate.py index 85620d1e5..1d93a02a6 100644 --- a/authentik/core/views/impersonate.py +++ b/authentik/core/views/impersonate.py @@ -3,7 +3,7 @@ from django.http import HttpRequest, HttpResponse from django.shortcuts import get_object_or_404, redirect from django.views import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.middleware import ( SESSION_IMPERSONATE_ORIGINAL_USER, diff --git a/authentik/events/models.py b/authentik/events/models.py index 24e8cb505..193592f47 100644 --- a/authentik/events/models.py +++ b/authentik/events/models.py @@ -9,7 +9,7 @@ from django.core.exceptions import ValidationError from django.db import models from django.http import HttpRequest from django.utils.translation import gettext as _ -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.middleware import ( SESSION_IMPERSONATE_ORIGINAL_USER, diff --git a/authentik/flows/management/commands/benchmark.py b/authentik/flows/management/commands/benchmark.py index f6d963f89..af71e16f5 100644 --- a/authentik/flows/management/commands/benchmark.py +++ b/authentik/flows/management/commands/benchmark.py @@ -7,7 +7,7 @@ from time import time from django import db from django.core.management.base import BaseCommand from django.test import RequestFactory -from structlog import get_logger +from structlog.stdlib import get_logger from authentik import __version__ from authentik.core.models import User diff --git a/authentik/flows/markers.py b/authentik/flows/markers.py index e20f7af93..08a79015b 100644 --- a/authentik/flows/markers.py +++ b/authentik/flows/markers.py @@ -3,7 +3,7 @@ from dataclasses import dataclass from typing import TYPE_CHECKING, Optional from django.http.request import HttpRequest -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.flows.models import Stage diff --git a/authentik/flows/models.py b/authentik/flows/models.py index 5cd69f215..63702ac46 100644 --- a/authentik/flows/models.py +++ b/authentik/flows/models.py @@ -8,7 +8,7 @@ from django.http import HttpRequest from django.utils.translation import gettext_lazy as _ from model_utils.managers import InheritanceManager from rest_framework.serializers import BaseSerializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.models import InheritanceForeignKey, SerializerModel from authentik.policies.models import PolicyBindingModel diff --git a/authentik/flows/planner.py b/authentik/flows/planner.py index 4f4dc54a2..7ed49a69b 100644 --- a/authentik/flows/planner.py +++ b/authentik/flows/planner.py @@ -6,7 +6,7 @@ from django.core.cache import cache from django.http import HttpRequest from sentry_sdk.hub import Hub from sentry_sdk.tracing import Span -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.events.models import cleanse_dict diff --git a/authentik/flows/signals.py b/authentik/flows/signals.py index c1c0c5275..ac3a94024 100644 --- a/authentik/flows/signals.py +++ b/authentik/flows/signals.py @@ -2,7 +2,7 @@ from django.core.cache import cache from django.db.models.signals import post_save from django.dispatch import receiver -from structlog import get_logger +from structlog.stdlib import get_logger LOGGER = get_logger() diff --git a/authentik/flows/views.py b/authentik/flows/views.py index 62fd07127..18afc36b2 100644 --- a/authentik/flows/views.py +++ b/authentik/flows/views.py @@ -15,7 +15,7 @@ from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from django.views.decorators.clickjacking import xframe_options_sameorigin from django.views.generic import TemplateView, View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import USER_ATTRIBUTE_DEBUG from authentik.events.models import cleanse_dict diff --git a/authentik/lib/expression/evaluator.py b/authentik/lib/expression/evaluator.py index 0a96af156..c04789032 100644 --- a/authentik/lib/expression/evaluator.py +++ b/authentik/lib/expression/evaluator.py @@ -7,7 +7,7 @@ from django.core.exceptions import ValidationError from requests import Session from sentry_sdk.hub import Hub from sentry_sdk.tracing import Span -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index acd3c710b..58044b918 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -11,7 +11,7 @@ from ldap3.core.exceptions import LDAPException from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import RedisError, ResponseError from rest_framework.exceptions import APIException -from structlog import get_logger +from structlog.stdlib import get_logger from websockets.exceptions import WebSocketException LOGGER = get_logger() diff --git a/authentik/lib/templatetags/authentik_utils.py b/authentik/lib/templatetags/authentik_utils.py index d2c45af3c..ef20652a1 100644 --- a/authentik/lib/templatetags/authentik_utils.py +++ b/authentik/lib/templatetags/authentik_utils.py @@ -8,7 +8,7 @@ from django.http.request import HttpRequest from django.template import Context from django.templatetags.static import static from django.utils.html import escape, mark_safe -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.lib.config import CONFIG diff --git a/authentik/lib/utils/urls.py b/authentik/lib/utils/urls.py index 450b98485..302fabd36 100644 --- a/authentik/lib/utils/urls.py +++ b/authentik/lib/utils/urls.py @@ -5,7 +5,7 @@ from django.http import HttpResponse from django.shortcuts import redirect, reverse from django.urls import NoReverseMatch from django.utils.http import urlencode -from structlog import get_logger +from structlog.stdlib import get_logger LOGGER = get_logger() diff --git a/authentik/outposts/apps.py b/authentik/outposts/apps.py index ad51ce07b..485f27e56 100644 --- a/authentik/outposts/apps.py +++ b/authentik/outposts/apps.py @@ -12,7 +12,7 @@ from django.db import ProgrammingError from docker.constants import DEFAULT_UNIX_SOCKET from kubernetes.config.incluster_config import SERVICE_TOKEN_FILENAME from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION -from structlog import get_logger +from structlog.stdlib import get_logger LOGGER = get_logger() diff --git a/authentik/outposts/channels.py b/authentik/outposts/channels.py index 22eec3abb..5b013a4e5 100644 --- a/authentik/outposts/channels.py +++ b/authentik/outposts/channels.py @@ -8,7 +8,7 @@ from channels.exceptions import DenyConnection from dacite import from_dict from dacite.data import Data from guardian.shortcuts import get_objects_for_user -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.channels import AuthJsonConsumer from authentik.outposts.models import OUTPOST_HELLO_INTERVAL, Outpost, OutpostState diff --git a/authentik/outposts/controllers/base.py b/authentik/outposts/controllers/base.py index bf30a4a7c..22d1a1177 100644 --- a/authentik/outposts/controllers/base.py +++ b/authentik/outposts/controllers/base.py @@ -1,7 +1,7 @@ """Base Controller""" from dataclasses import dataclass -from structlog import get_logger +from structlog.stdlib import get_logger from structlog.testing import capture_logs from authentik.lib.sentry import SentryIgnoredException diff --git a/authentik/outposts/controllers/k8s/base.py b/authentik/outposts/controllers/k8s/base.py index d2f895380..a79a5b8d5 100644 --- a/authentik/outposts/controllers/k8s/base.py +++ b/authentik/outposts/controllers/k8s/base.py @@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Generic, TypeVar from kubernetes.client import V1ObjectMeta from kubernetes.client.rest import ApiException -from structlog import get_logger +from structlog.stdlib import get_logger from authentik import __version__ from authentik.lib.sentry import SentryIgnoredException diff --git a/authentik/outposts/models.py b/authentik/outposts/models.py index 9861195df..2e675007a 100644 --- a/authentik/outposts/models.py +++ b/authentik/outposts/models.py @@ -24,7 +24,7 @@ from kubernetes.config.incluster_config import load_incluster_config from kubernetes.config.kube_config import load_kube_config_from_dict from model_utils.managers import InheritanceManager from packaging.version import LegacyVersion, Version, parse -from structlog import get_logger +from structlog.stdlib import get_logger from urllib3.exceptions import HTTPError from authentik import __version__ diff --git a/authentik/outposts/signals.py b/authentik/outposts/signals.py index 33bd66e58..aad761cdc 100644 --- a/authentik/outposts/signals.py +++ b/authentik/outposts/signals.py @@ -2,7 +2,7 @@ from django.db.models import Model from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.utils.reflection import class_to_path from authentik.outposts.models import Outpost diff --git a/authentik/outposts/tasks.py b/authentik/outposts/tasks.py index a9195a9de..8ecb8ca3c 100644 --- a/authentik/outposts/tasks.py +++ b/authentik/outposts/tasks.py @@ -6,7 +6,7 @@ from channels.layers import get_channel_layer from django.core.cache import cache from django.db.models.base import Model from django.utils.text import slugify -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus from authentik.lib.utils.reflection import path_to_class diff --git a/authentik/policies/dummy/models.py b/authentik/policies/dummy/models.py index 23fe29c2f..ee78e7a55 100644 --- a/authentik/policies/dummy/models.py +++ b/authentik/policies/dummy/models.py @@ -7,7 +7,7 @@ from django.db import models from django.forms import ModelForm from django.utils.translation import gettext_lazy as _ from rest_framework.serializers import BaseSerializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.policies.models import Policy from authentik.policies.types import PolicyRequest, PolicyResult diff --git a/authentik/policies/engine.py b/authentik/policies/engine.py index 95deb52ef..d1b79c6b8 100644 --- a/authentik/policies/engine.py +++ b/authentik/policies/engine.py @@ -7,7 +7,7 @@ from django.core.cache import cache from django.http import HttpRequest from sentry_sdk.hub import Hub from sentry_sdk.tracing import Span -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.policies.models import Policy, PolicyBinding, PolicyBindingModel diff --git a/authentik/policies/expiry/models.py b/authentik/policies/expiry/models.py index d9c1c4d2e..eca0d9d63 100644 --- a/authentik/policies/expiry/models.py +++ b/authentik/policies/expiry/models.py @@ -7,7 +7,7 @@ from django.forms import ModelForm from django.utils.timezone import now from django.utils.translation import gettext as _ from rest_framework.serializers import BaseSerializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.policies.models import Policy from authentik.policies.types import PolicyRequest, PolicyResult diff --git a/authentik/policies/expression/evaluator.py b/authentik/policies/expression/evaluator.py index 6390188ac..3c5fb8190 100644 --- a/authentik/policies/expression/evaluator.py +++ b/authentik/policies/expression/evaluator.py @@ -4,7 +4,7 @@ from traceback import format_tb from typing import TYPE_CHECKING, List, Optional from django.http import HttpRequest -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.events.models import Event, EventAction from authentik.events.utils import model_to_dict, sanitize_dict diff --git a/authentik/policies/hibp/models.py b/authentik/policies/hibp/models.py index 8dec5a018..de448cd46 100644 --- a/authentik/policies/hibp/models.py +++ b/authentik/policies/hibp/models.py @@ -7,7 +7,7 @@ from django.forms import ModelForm from django.utils.translation import gettext as _ from requests import get from rest_framework.serializers import BaseSerializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.policies.models import Policy, PolicyResult from authentik.policies.types import PolicyRequest diff --git a/authentik/policies/password/models.py b/authentik/policies/password/models.py index 7d98f6b05..e66957cfe 100644 --- a/authentik/policies/password/models.py +++ b/authentik/policies/password/models.py @@ -6,7 +6,7 @@ from django.db import models from django.forms import ModelForm from django.utils.translation import gettext as _ from rest_framework.serializers import BaseSerializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.policies.models import Policy from authentik.policies.types import PolicyRequest, PolicyResult diff --git a/authentik/policies/process.py b/authentik/policies/process.py index 910fff004..a02571478 100644 --- a/authentik/policies/process.py +++ b/authentik/policies/process.py @@ -6,7 +6,7 @@ from typing import Optional from django.core.cache import cache from sentry_sdk.hub import Hub from sentry_sdk.tracing import Span -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.events.models import Event, EventAction from authentik.policies.exceptions import PolicyException @@ -96,5 +96,5 @@ class PolicyProcess(Process): try: self.connection.send(self.execute()) except Exception as exc: # pylint: disable=broad-except - LOGGER.warning(exc) + LOGGER.warning(str(exc)) self.connection.send(PolicyResult(False, str(exc))) diff --git a/authentik/policies/reputation/signals.py b/authentik/policies/reputation/signals.py index fce16d704..47d50cf78 100644 --- a/authentik/policies/reputation/signals.py +++ b/authentik/policies/reputation/signals.py @@ -3,7 +3,7 @@ from django.contrib.auth.signals import user_logged_in, user_login_failed from django.core.cache import cache from django.dispatch import receiver from django.http import HttpRequest -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.utils.http import get_client_ip from authentik.policies.reputation.models import ( diff --git a/authentik/policies/reputation/tasks.py b/authentik/policies/reputation/tasks.py index 78fafee53..17781ca1c 100644 --- a/authentik/policies/reputation/tasks.py +++ b/authentik/policies/reputation/tasks.py @@ -1,6 +1,6 @@ """Reputation tasks""" from django.core.cache import cache -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus diff --git a/authentik/policies/signals.py b/authentik/policies/signals.py index 1c5595240..33045766e 100644 --- a/authentik/policies/signals.py +++ b/authentik/policies/signals.py @@ -2,7 +2,7 @@ from django.core.cache import cache from django.db.models.signals import post_save from django.dispatch import receiver -from structlog import get_logger +from structlog.stdlib import get_logger LOGGER = get_logger() diff --git a/authentik/policies/views.py b/authentik/policies/views.py index a2491b133..c40454b9d 100644 --- a/authentik/policies/views.py +++ b/authentik/policies/views.py @@ -7,7 +7,7 @@ from django.contrib.auth.views import redirect_to_login from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ from django.views.generic.base import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application, Provider, User from authentik.flows.views import SESSION_KEY_APPLICATION_PRE diff --git a/authentik/providers/oauth2/utils.py b/authentik/providers/oauth2/utils.py index 88c272bbf..f28fde0fc 100644 --- a/authentik/providers/oauth2/utils.py +++ b/authentik/providers/oauth2/utils.py @@ -6,7 +6,7 @@ from typing import List, Optional, Tuple from django.http import HttpRequest, HttpResponse, JsonResponse from django.utils.cache import patch_vary_headers -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.providers.oauth2.errors import BearerTokenError from authentik.providers.oauth2.models import RefreshToken diff --git a/authentik/providers/oauth2/views/authorize.py b/authentik/providers/oauth2/views/authorize.py index 23fe4024f..7be40f599 100644 --- a/authentik/providers/oauth2/views/authorize.py +++ b/authentik/providers/oauth2/views/authorize.py @@ -9,7 +9,7 @@ from django.http import HttpRequest, HttpResponse from django.http.response import Http404 from django.shortcuts import get_object_or_404, redirect from django.utils import timezone -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application from authentik.events.models import Event, EventAction diff --git a/authentik/providers/oauth2/views/introspection.py b/authentik/providers/oauth2/views/introspection.py index cb38e6dcc..80a63a588 100644 --- a/authentik/providers/oauth2/views/introspection.py +++ b/authentik/providers/oauth2/views/introspection.py @@ -3,7 +3,7 @@ from dataclasses import dataclass, field from django.http import HttpRequest, HttpResponse from django.views import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.providers.oauth2.errors import TokenIntrospectionError from authentik.providers.oauth2.models import IDToken, OAuth2Provider, RefreshToken diff --git a/authentik/providers/oauth2/views/provider.py b/authentik/providers/oauth2/views/provider.py index 4caa90f8c..cbe21316f 100644 --- a/authentik/providers/oauth2/views/provider.py +++ b/authentik/providers/oauth2/views/provider.py @@ -4,7 +4,7 @@ from typing import Any, Dict from django.http import HttpRequest, HttpResponse, JsonResponse from django.shortcuts import get_object_or_404, reverse from django.views import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application from authentik.providers.oauth2.constants import ( diff --git a/authentik/providers/oauth2/views/token.py b/authentik/providers/oauth2/views/token.py index 78f4b41c8..9b7433c73 100644 --- a/authentik/providers/oauth2/views/token.py +++ b/authentik/providers/oauth2/views/token.py @@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional from django.http import HttpRequest, HttpResponse from django.views import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.utils.time import timedelta_from_string from authentik.providers.oauth2.constants import ( diff --git a/authentik/providers/oauth2/views/userinfo.py b/authentik/providers/oauth2/views/userinfo.py index d0f0f542f..7ccdde78d 100644 --- a/authentik/providers/oauth2/views/userinfo.py +++ b/authentik/providers/oauth2/views/userinfo.py @@ -4,7 +4,7 @@ from typing import Any, Dict, List from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext_lazy as _ from django.views import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.providers.oauth2.constants import ( SCOPE_GITHUB_ORG_READ, diff --git a/authentik/providers/saml/models.py b/authentik/providers/saml/models.py index fedf183de..2536456b0 100644 --- a/authentik/providers/saml/models.py +++ b/authentik/providers/saml/models.py @@ -8,7 +8,7 @@ from django.http import HttpRequest from django.shortcuts import reverse from django.utils.translation import gettext_lazy as _ from rest_framework.serializers import Serializer -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import PropertyMapping, Provider from authentik.crypto.models import CertificateKeyPair diff --git a/authentik/providers/saml/processors/assertion.py b/authentik/providers/saml/processors/assertion.py index 0540f18d1..179a15ecf 100644 --- a/authentik/providers/saml/processors/assertion.py +++ b/authentik/providers/saml/processors/assertion.py @@ -6,7 +6,7 @@ import xmlsec from django.http import HttpRequest from lxml import etree # nosec from lxml.etree import Element, SubElement # nosec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.exceptions import PropertyMappingExpressionException from authentik.lib.utils.time import timedelta_from_string @@ -95,7 +95,7 @@ class AssertionProcessor: attribute_statement.append(attribute) except PropertyMappingExpressionException as exc: - LOGGER.warning(exc) + LOGGER.warning(str(exc)) continue return attribute_statement diff --git a/authentik/providers/saml/processors/metadata_parser.py b/authentik/providers/saml/processors/metadata_parser.py index 9e32ccf8c..e2168501d 100644 --- a/authentik/providers/saml/processors/metadata_parser.py +++ b/authentik/providers/saml/processors/metadata_parser.py @@ -7,7 +7,7 @@ from cryptography.hazmat.backends import default_backend from cryptography.x509 import load_pem_x509_certificate from defusedxml.lxml import fromstring from lxml import etree # nosec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.crypto.models import CertificateKeyPair from authentik.providers.saml.models import SAMLBindings, SAMLProvider diff --git a/authentik/providers/saml/processors/request_parser.py b/authentik/providers/saml/processors/request_parser.py index 9f38bae6a..1f1e80109 100644 --- a/authentik/providers/saml/processors/request_parser.py +++ b/authentik/providers/saml/processors/request_parser.py @@ -7,7 +7,7 @@ from urllib.parse import quote_plus import xmlsec from defusedxml import ElementTree from lxml import etree # nosec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.providers.saml.exceptions import CannotHandleAssertion from authentik.providers.saml.models import SAMLProvider diff --git a/authentik/providers/saml/views.py b/authentik/providers/saml/views.py index 57cf0d9a8..ad1f4f50f 100644 --- a/authentik/providers/saml/views.py +++ b/authentik/providers/saml/views.py @@ -13,7 +13,7 @@ from django.utils.translation import gettext_lazy as _ from django.views import View from django.views.decorators.csrf import csrf_exempt from django.views.generic.edit import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application, Provider from authentik.events.models import Event, EventAction @@ -128,7 +128,7 @@ class SAMLSSOBindingRedirectView(SAMLSSOView): provider=self.provider, message=str(exc), ).save() - LOGGER.info(exc) + LOGGER.info(str(exc)) return bad_request_message(self.request, str(exc)) return None @@ -152,7 +152,7 @@ class SAMLSSOBindingPOSTView(SAMLSSOView): ) self.request.session[SESSION_KEY_AUTH_N_REQUEST] = auth_n_request except CannotHandleAssertion as exc: - LOGGER.info(exc) + LOGGER.info(str(exc)) return bad_request_message(self.request, str(exc)) return None @@ -274,7 +274,7 @@ class MetadataImportView(LoginRequiredMixin, FormView): provider.save() messages.success(self.request, _("Successfully created Provider")) except ValueError as exc: - LOGGER.warning(exc) + LOGGER.warning(str(exc)) messages.error( self.request, _("Failed to import Metadata: %(message)s" % {"message": str(exc)}), diff --git a/authentik/recovery/management/commands/create_recovery_key.py b/authentik/recovery/management/commands/create_recovery_key.py index 19ce7c950..201c3ef67 100644 --- a/authentik/recovery/management/commands/create_recovery_key.py +++ b/authentik/recovery/management/commands/create_recovery_key.py @@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand from django.urls import reverse from django.utils.timezone import now from django.utils.translation import gettext as _ -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Token, TokenIntents, User diff --git a/authentik/root/asgi.py b/authentik/root/asgi.py index 454daffba..e3dd85374 100644 --- a/authentik/root/asgi.py +++ b/authentik/root/asgi.py @@ -16,7 +16,7 @@ from channels.routing import ProtocolTypeRouter, URLRouter from defusedxml import defuse_stdlib from django.core.asgi import get_asgi_application from sentry_sdk.integrations.asgi import SentryAsgiMiddleware -from structlog import get_logger +from structlog.stdlib import get_logger # DJANGO_SETTINGS_MODULE is set in gunicorn.conf.py diff --git a/authentik/root/celery.py b/authentik/root/celery.py index 28443ebab..ad17921e0 100644 --- a/authentik/root/celery.py +++ b/authentik/root/celery.py @@ -5,7 +5,7 @@ from logging.config import dictConfig from celery import Celery from celery.signals import after_task_publish, setup_logging, task_postrun, task_prerun from django.conf import settings -from structlog import get_logger +from structlog.stdlib import get_logger # set the default Django settings module for the 'celery' program. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "authentik.root.settings") diff --git a/authentik/root/urls.py b/authentik/root/urls.py index c5a427984..e33bd535d 100644 --- a/authentik/root/urls.py +++ b/authentik/root/urls.py @@ -5,7 +5,7 @@ from django.contrib import admin from django.urls import include, path from django.views.generic import RedirectView from django.views.i18n import JavaScriptCatalog -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.views import error from authentik.lib.utils.reflection import get_apps diff --git a/authentik/sources/ldap/auth.py b/authentik/sources/ldap/auth.py index aa5347176..f10bf169c 100644 --- a/authentik/sources/ldap/auth.py +++ b/authentik/sources/ldap/auth.py @@ -4,7 +4,7 @@ from typing import Optional import ldap3 from django.contrib.auth.backends import ModelBackend from django.http import HttpRequest -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.sources.ldap.models import LDAPSource diff --git a/authentik/sources/ldap/password.py b/authentik/sources/ldap/password.py index bab51f258..0769c6040 100644 --- a/authentik/sources/ldap/password.py +++ b/authentik/sources/ldap/password.py @@ -5,7 +5,7 @@ from typing import Optional import ldap3 import ldap3.core.exceptions -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.sources.ldap.models import LDAPSource diff --git a/authentik/sources/ldap/sync.py b/authentik/sources/ldap/sync.py index fa7ad88a3..e2be44d84 100644 --- a/authentik/sources/ldap/sync.py +++ b/authentik/sources/ldap/sync.py @@ -4,7 +4,7 @@ from typing import Any, Dict import ldap3 import ldap3.core.exceptions from django.db.utils import IntegrityError -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.exceptions import PropertyMappingExpressionException from authentik.core.models import Group, User diff --git a/authentik/sources/oauth/apps.py b/authentik/sources/oauth/apps.py index dde12f478..7aad40515 100644 --- a/authentik/sources/oauth/apps.py +++ b/authentik/sources/oauth/apps.py @@ -3,7 +3,7 @@ from importlib import import_module from django.apps import AppConfig from django.conf import settings -from structlog import get_logger +from structlog.stdlib import get_logger LOGGER = get_logger() @@ -23,4 +23,4 @@ class AuthentikSourceOAuthConfig(AppConfig): import_module(source_type) LOGGER.debug("Loaded OAuth Source Type", type=source_type) except ImportError as exc: - LOGGER.debug(exc) + LOGGER.debug(str(exc)) diff --git a/authentik/sources/oauth/clients/base.py b/authentik/sources/oauth/clients/base.py index 0672e3fbf..3d4e090c4 100644 --- a/authentik/sources/oauth/clients/base.py +++ b/authentik/sources/oauth/clients/base.py @@ -6,7 +6,7 @@ from django.http import HttpRequest from requests import Session from requests.exceptions import RequestException from requests.models import Response -from structlog import get_logger +from structlog.stdlib import get_logger from authentik import __version__ from authentik.sources.oauth.models import OAuthSource diff --git a/authentik/sources/oauth/clients/oauth1.py b/authentik/sources/oauth/clients/oauth1.py index 4ba926207..f558f18a2 100644 --- a/authentik/sources/oauth/clients/oauth1.py +++ b/authentik/sources/oauth/clients/oauth1.py @@ -5,7 +5,7 @@ from urllib.parse import parse_qsl from requests.exceptions import RequestException from requests.models import Response from requests_oauthlib import OAuth1 -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.sources.oauth.clients.base import BaseOAuthClient from authentik.sources.oauth.exceptions import OAuthSourceException diff --git a/authentik/sources/oauth/clients/oauth2.py b/authentik/sources/oauth/clients/oauth2.py index d5228f4a5..f710db06f 100644 --- a/authentik/sources/oauth/clients/oauth2.py +++ b/authentik/sources/oauth/clients/oauth2.py @@ -6,7 +6,7 @@ from urllib.parse import parse_qsl from django.utils.crypto import constant_time_compare, get_random_string from requests.exceptions import RequestException from requests.models import Response -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.sources.oauth.clients.base import BaseOAuthClient diff --git a/authentik/sources/oauth/types/manager.py b/authentik/sources/oauth/types/manager.py index 6824ab624..a74c67398 100644 --- a/authentik/sources/oauth/types/manager.py +++ b/authentik/sources/oauth/types/manager.py @@ -3,7 +3,7 @@ from enum import Enum from typing import Callable, Dict, List from django.utils.text import slugify -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.sources.oauth.models import OAuthSource from authentik.sources.oauth.views.callback import OAuthCallback diff --git a/authentik/sources/oauth/views/callback.py b/authentik/sources/oauth/views/callback.py index bbebab813..fc91e730a 100644 --- a/authentik/sources/oauth/views/callback.py +++ b/authentik/sources/oauth/views/callback.py @@ -8,7 +8,7 @@ from django.shortcuts import redirect from django.urls import reverse from django.utils.translation import gettext as _ from django.views.generic import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.events.models import Event, EventAction diff --git a/authentik/sources/oauth/views/dispatcher.py b/authentik/sources/oauth/views/dispatcher.py index bb192ad7b..d89dc2fc1 100644 --- a/authentik/sources/oauth/views/dispatcher.py +++ b/authentik/sources/oauth/views/dispatcher.py @@ -2,7 +2,7 @@ from django.http import Http404 from django.shortcuts import get_object_or_404 from django.views import View -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.sources.oauth.models import OAuthSource from authentik.sources.oauth.types.manager import MANAGER, RequestKind diff --git a/authentik/sources/oauth/views/redirect.py b/authentik/sources/oauth/views/redirect.py index af1bb4dc2..aa0919946 100644 --- a/authentik/sources/oauth/views/redirect.py +++ b/authentik/sources/oauth/views/redirect.py @@ -4,7 +4,7 @@ from typing import Any, Dict from django.http import Http404 from django.urls import reverse from django.views.generic import RedirectView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.sources.oauth.models import OAuthSource from authentik.sources.oauth.views.base import OAuthClientMixin diff --git a/authentik/sources/saml/processors/response.py b/authentik/sources/saml/processors/response.py index 568d22df0..655365849 100644 --- a/authentik/sources/saml/processors/response.py +++ b/authentik/sources/saml/processors/response.py @@ -7,7 +7,7 @@ from defusedxml.lxml import fromstring from django.core.cache import cache from django.core.exceptions import SuspiciousOperation from django.http import HttpRequest, HttpResponse -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.flows.models import Flow diff --git a/authentik/sources/saml/signals.py b/authentik/sources/saml/signals.py index b4629f89a..cf6b92709 100644 --- a/authentik/sources/saml/signals.py +++ b/authentik/sources/saml/signals.py @@ -2,7 +2,7 @@ from django.contrib.auth.signals import user_logged_out from django.dispatch import receiver from django.http import HttpRequest -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User diff --git a/authentik/sources/saml/tasks.py b/authentik/sources/saml/tasks.py index a2ed2a0a8..55dff9c5b 100644 --- a/authentik/sources/saml/tasks.py +++ b/authentik/sources/saml/tasks.py @@ -1,6 +1,6 @@ """authentik saml source tasks""" from django.utils.timezone import now -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus diff --git a/authentik/stages/email/stage.py b/authentik/stages/email/stage.py index b7316b8c5..5d2ef8991 100644 --- a/authentik/stages/email/stage.py +++ b/authentik/stages/email/stage.py @@ -8,7 +8,7 @@ from django.utils.http import urlencode from django.utils.timezone import now from django.utils.translation import gettext as _ from django.views.generic import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Token from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER diff --git a/authentik/stages/email/tasks.py b/authentik/stages/email/tasks.py index 28131cd38..bf1e02634 100644 --- a/authentik/stages/email/tasks.py +++ b/authentik/stages/email/tasks.py @@ -6,7 +6,7 @@ from typing import Any, Dict, List from celery import group from django.core.mail import EmailMultiAlternatives from django.core.mail.utils import DNS_NAME -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus from authentik.root.celery import CELERY_APP diff --git a/authentik/stages/identification/forms.py b/authentik/stages/identification/forms.py index d431f544e..706c291f1 100644 --- a/authentik/stages/identification/forms.py +++ b/authentik/stages/identification/forms.py @@ -2,7 +2,7 @@ from django import forms from django.core.validators import validate_email from django.utils.translation import gettext_lazy as _ -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.admin.fields import ArrayFieldSelectMultiple from authentik.flows.models import Flow, FlowDesignation diff --git a/authentik/stages/identification/stage.py b/authentik/stages/identification/stage.py index 1bcef47e1..949b12743 100644 --- a/authentik/stages/identification/stage.py +++ b/authentik/stages/identification/stage.py @@ -7,7 +7,7 @@ from django.http import HttpResponse from django.shortcuts import reverse from django.utils.translation import gettext as _ from django.views.generic import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Source, User from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER diff --git a/authentik/stages/otp_static/stage.py b/authentik/stages/otp_static/stage.py index 701244488..a51bb0af9 100644 --- a/authentik/stages/otp_static/stage.py +++ b/authentik/stages/otp_static/stage.py @@ -4,7 +4,7 @@ from typing import Any, Dict from django.http import HttpRequest, HttpResponse from django.views.generic import FormView from django_otp.plugins.otp_static.models import StaticDevice, StaticToken -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.stage import StageView diff --git a/authentik/stages/otp_time/stage.py b/authentik/stages/otp_time/stage.py index ebdb5efd2..08984ece2 100644 --- a/authentik/stages/otp_time/stage.py +++ b/authentik/stages/otp_time/stage.py @@ -8,7 +8,7 @@ from django_otp.plugins.otp_totp.models import TOTPDevice from lxml.etree import tostring # nosec from qrcode import QRCode from qrcode.image.svg import SvgFillImage -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.stage import StageView diff --git a/authentik/stages/otp_validate/stage.py b/authentik/stages/otp_validate/stage.py index c4dba0a02..fae6086f4 100644 --- a/authentik/stages/otp_validate/stage.py +++ b/authentik/stages/otp_validate/stage.py @@ -4,7 +4,7 @@ from typing import Any, Dict from django.http import HttpRequest, HttpResponse from django.views.generic import FormView from django_otp import user_has_device -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.flows.models import NotConfiguredAction from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER diff --git a/authentik/stages/password/stage.py b/authentik/stages/password/stage.py index 315d274f7..6af83a16e 100644 --- a/authentik/stages/password/stage.py +++ b/authentik/stages/password/stage.py @@ -9,7 +9,7 @@ from django.forms.utils import ErrorList from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ from django.views.generic import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.flows.models import Flow, FlowDesignation diff --git a/authentik/stages/prompt/stage.py b/authentik/stages/prompt/stage.py index 7b1db0222..93ecf8b21 100644 --- a/authentik/stages/prompt/stage.py +++ b/authentik/stages/prompt/stage.py @@ -2,7 +2,7 @@ from django.http import HttpResponse from django.utils.translation import gettext_lazy as _ from django.views.generic import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.flows.stage import StageView from authentik.stages.prompt.forms import PromptForm diff --git a/authentik/stages/user_delete/stage.py b/authentik/stages/user_delete/stage.py index 7504c150f..03c34afd6 100644 --- a/authentik/stages/user_delete/stage.py +++ b/authentik/stages/user_delete/stage.py @@ -3,7 +3,7 @@ from django.contrib import messages from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ from django.views.generic import FormView -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import User from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER diff --git a/authentik/stages/user_login/stage.py b/authentik/stages/user_login/stage.py index 47df6990a..c559a9ca7 100644 --- a/authentik/stages/user_login/stage.py +++ b/authentik/stages/user_login/stage.py @@ -3,7 +3,7 @@ from django.contrib import messages from django.contrib.auth import login from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.stage import StageView diff --git a/authentik/stages/user_logout/stage.py b/authentik/stages/user_logout/stage.py index d658f38ca..8a09aa5af 100644 --- a/authentik/stages/user_logout/stage.py +++ b/authentik/stages/user_logout/stage.py @@ -1,7 +1,7 @@ """Logout stage logic""" from django.contrib.auth import logout from django.http import HttpRequest, HttpResponse -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.flows.stage import StageView diff --git a/authentik/stages/user_write/stage.py b/authentik/stages/user_write/stage.py index 94595aedd..9f020f19f 100644 --- a/authentik/stages/user_write/stage.py +++ b/authentik/stages/user_write/stage.py @@ -4,7 +4,7 @@ from django.contrib.auth import update_session_auth_hash from django.contrib.auth.backends import ModelBackend from django.http import HttpRequest, HttpResponse from django.utils.translation import gettext as _ -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.middleware import SESSION_IMPERSONATE_USER from authentik.core.models import User diff --git a/lifecycle/migrate.py b/lifecycle/migrate.py index 89e917f45..75ad665a0 100755 --- a/lifecycle/migrate.py +++ b/lifecycle/migrate.py @@ -6,7 +6,7 @@ from pathlib import Path from typing import Any from psycopg2 import connect -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.lib.config import CONFIG diff --git a/tests/e2e/test_provider_oauth2_grafana.py b/tests/e2e/test_provider_oauth2_grafana.py index 9e20a3830..12ca33a65 100644 --- a/tests/e2e/test_provider_oauth2_grafana.py +++ b/tests/e2e/test_provider_oauth2_grafana.py @@ -8,7 +8,7 @@ from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as ec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application from authentik.crypto.models import CertificateKeyPair diff --git a/tests/e2e/test_provider_oauth2_oidc.py b/tests/e2e/test_provider_oauth2_oidc.py index 438eaba99..bbd9348d4 100644 --- a/tests/e2e/test_provider_oauth2_oidc.py +++ b/tests/e2e/test_provider_oauth2_oidc.py @@ -10,7 +10,7 @@ from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as ec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application from authentik.crypto.models import CertificateKeyPair diff --git a/tests/e2e/test_provider_saml.py b/tests/e2e/test_provider_saml.py index 136ddd2a8..0601e3453 100644 --- a/tests/e2e/test_provider_saml.py +++ b/tests/e2e/test_provider_saml.py @@ -10,7 +10,7 @@ from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as ec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.models import Application from authentik.crypto.models import CertificateKeyPair diff --git a/tests/e2e/test_source_oauth.py b/tests/e2e/test_source_oauth.py index 4281d041e..8a1a85f8e 100644 --- a/tests/e2e/test_source_oauth.py +++ b/tests/e2e/test_source_oauth.py @@ -11,7 +11,7 @@ from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as ec -from structlog import get_logger +from structlog.stdlib import get_logger from yaml import safe_dump from authentik.flows.models import Flow diff --git a/tests/e2e/test_source_saml.py b/tests/e2e/test_source_saml.py index cd53d14ae..a8d60697e 100644 --- a/tests/e2e/test_source_saml.py +++ b/tests/e2e/test_source_saml.py @@ -8,7 +8,7 @@ from docker.types import Healthcheck from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support import expected_conditions as ec -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.crypto.models import CertificateKeyPair from authentik.flows.models import Flow diff --git a/tests/e2e/utils.py b/tests/e2e/utils.py index 6ab15fe93..5a8ec1e77 100644 --- a/tests/e2e/utils.py +++ b/tests/e2e/utils.py @@ -26,7 +26,7 @@ from selenium.webdriver.common.by import By from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.support.ui import WebDriverWait -from structlog import get_logger +from structlog.stdlib import get_logger from authentik.core.api.users import UserSerializer from authentik.core.models import User