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] <support@github.com>

* *: 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 <jens.langhammer@beryju.org>
This commit is contained in:
dependabot[bot] 2021-01-01 15:39:43 +01:00 committed by GitHub
parent 08c58ce3fb
commit bc9e7e8b93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
88 changed files with 99 additions and 99 deletions

12
Pipfile.lock generated
View File

@ -410,10 +410,10 @@
}, },
"h11": { "h11": {
"hashes": [ "hashes": [
"sha256:3c6c61d69c6f13d41f1b80ab0322f1872702a3ba26e12aa864c928f6a43fbaab", "sha256:36a3cb8c0a032f56e2da7084577878a035d3b61d104230d4bd49c0c6b555a9c6",
"sha256:ab6c335e1b6ef34b205d5ca3e228c9299cc7218b049819ec84a388c2525e5d87" "sha256:47222cb6067e4a307d535814917cd98fd0a57b6788ce715755fa2b6c28b56042"
], ],
"version": "==0.11.0" "version": "==0.12.0"
}, },
"hiredis": { "hiredis": {
"hashes": [ "hashes": [
@ -1006,11 +1006,11 @@
}, },
"structlog": { "structlog": {
"hashes": [ "hashes": [
"sha256:7a48375db6274ed1d0ae6123c486472aa1d0890b08d314d2b016f3aa7f35990b", "sha256:33dd6bd5f49355e52c1c61bb6a4f20d0b48ce0328cc4a45fe872d38b97a05ccd",
"sha256:8a672be150547a93d90a7d74229a29e765be05bd156a35cdcc527ebf68e9af92" "sha256:af79dfa547d104af8d60f86eac12fb54825f54a46bc998e4504ef66177103174"
], ],
"index": "pypi", "index": "pypi",
"version": "==20.1.0" "version": "==20.2.0"
}, },
"swagger-spec-validator": { "swagger-spec-validator": {
"hashes": [ "hashes": [

View File

@ -2,7 +2,7 @@
from django.core.cache import cache from django.core.cache import cache
from packaging.version import parse from packaging.version import parse
from requests import RequestException, get from requests import RequestException, get
from structlog import get_logger from structlog.stdlib import get_logger
from authentik import __version__ from authentik import __version__
from authentik.events.models import Event, EventAction from authentik.events.models import Event, EventAction

View File

@ -2,7 +2,7 @@
from django import template from django import template
from django.db.models import Model from django.db.models import Model
from django.utils.html import mark_safe from django.utils.html import mark_safe
from structlog import get_logger from structlog.stdlib import get_logger
register = template.Library() register = template.Library()
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -5,7 +5,7 @@ from django.http.request import HttpRequest
from django.http.response import HttpResponse from django.http.response import HttpResponse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic import FormView 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.forms.overview import FlowCacheClearForm, PolicyCacheClearForm
from authentik.admin.mixins import AdminRequiredMixin from authentik.admin.mixins import AdminRequiredMixin

View File

@ -5,7 +5,7 @@ from typing import Any, Optional, Tuple, Union
from rest_framework.authentication import BaseAuthentication, get_authorization_header from rest_framework.authentication import BaseAuthentication, get_authorization_header
from rest_framework.request import Request 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 from authentik.core.models import Token, TokenIntents, User

View File

@ -4,7 +4,7 @@ from django.apps import AppConfig, apps
from django.contrib import admin from django.contrib import admin
from django.contrib.admin.sites import AlreadyRegistered from django.contrib.admin.sites import AlreadyRegistered
from guardian.admin import GuardedModelAdmin from guardian.admin import GuardedModelAdmin
from structlog import get_logger from structlog.stdlib import get_logger
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -1,7 +1,7 @@
"""Channels base classes""" """Channels base classes"""
from channels.exceptions import DenyConnection from channels.exceptions import DenyConnection
from channels.generic.websocket import JsonWebsocketConsumer 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.api.auth import token_from_header
from authentik.core.models import User from authentik.core.models import User

View File

@ -15,7 +15,7 @@ from django.utils.translation import gettext_lazy as _
from guardian.mixins import GuardianUserMixin from guardian.mixins import GuardianUserMixin
from model_utils.managers import InheritanceManager from model_utils.managers import InheritanceManager
from rest_framework.serializers import Serializer 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.exceptions import PropertyMappingExpressionException
from authentik.core.signals import password_changed from authentik.core.signals import password_changed

View File

@ -8,7 +8,7 @@ from dbbackup.db.exceptions import CommandConnectorError
from django.contrib.humanize.templatetags.humanize import naturaltime from django.contrib.humanize.templatetags.humanize import naturaltime
from django.core import management from django.core import management
from django.utils.timezone import now 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.core.models import ExpiringModel
from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus

View File

@ -3,7 +3,7 @@
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.shortcuts import get_object_or_404, redirect from django.shortcuts import get_object_or_404, redirect
from django.views import View from django.views import View
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.middleware import ( from authentik.core.middleware import (
SESSION_IMPERSONATE_ORIGINAL_USER, SESSION_IMPERSONATE_ORIGINAL_USER,

View File

@ -9,7 +9,7 @@ from django.core.exceptions import ValidationError
from django.db import models from django.db import models
from django.http import HttpRequest from django.http import HttpRequest
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.middleware import ( from authentik.core.middleware import (
SESSION_IMPERSONATE_ORIGINAL_USER, SESSION_IMPERSONATE_ORIGINAL_USER,

View File

@ -7,7 +7,7 @@ from time import time
from django import db from django import db
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.test import RequestFactory from django.test import RequestFactory
from structlog import get_logger from structlog.stdlib import get_logger
from authentik import __version__ from authentik import __version__
from authentik.core.models import User from authentik.core.models import User

View File

@ -3,7 +3,7 @@ from dataclasses import dataclass
from typing import TYPE_CHECKING, Optional from typing import TYPE_CHECKING, Optional
from django.http.request import HttpRequest 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.core.models import User
from authentik.flows.models import Stage from authentik.flows.models import Stage

View File

@ -8,7 +8,7 @@ from django.http import HttpRequest
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from model_utils.managers import InheritanceManager from model_utils.managers import InheritanceManager
from rest_framework.serializers import BaseSerializer 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.lib.models import InheritanceForeignKey, SerializerModel
from authentik.policies.models import PolicyBindingModel from authentik.policies.models import PolicyBindingModel

View File

@ -6,7 +6,7 @@ from django.core.cache import cache
from django.http import HttpRequest from django.http import HttpRequest
from sentry_sdk.hub import Hub from sentry_sdk.hub import Hub
from sentry_sdk.tracing import Span 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.core.models import User
from authentik.events.models import cleanse_dict from authentik.events.models import cleanse_dict

View File

@ -2,7 +2,7 @@
from django.core.cache import cache from django.core.cache import cache
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.dispatch import receiver from django.dispatch import receiver
from structlog import get_logger from structlog.stdlib import get_logger
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -15,7 +15,7 @@ from django.template.response import TemplateResponse
from django.utils.decorators import method_decorator from django.utils.decorators import method_decorator
from django.views.decorators.clickjacking import xframe_options_sameorigin from django.views.decorators.clickjacking import xframe_options_sameorigin
from django.views.generic import TemplateView, View 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.core.models import USER_ATTRIBUTE_DEBUG
from authentik.events.models import cleanse_dict from authentik.events.models import cleanse_dict

View File

@ -7,7 +7,7 @@ from django.core.exceptions import ValidationError
from requests import Session from requests import Session
from sentry_sdk.hub import Hub from sentry_sdk.hub import Hub
from sentry_sdk.tracing import Span 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.core.models import User

View File

@ -11,7 +11,7 @@ from ldap3.core.exceptions import LDAPException
from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import ConnectionError as RedisConnectionError
from redis.exceptions import RedisError, ResponseError from redis.exceptions import RedisError, ResponseError
from rest_framework.exceptions import APIException from rest_framework.exceptions import APIException
from structlog import get_logger from structlog.stdlib import get_logger
from websockets.exceptions import WebSocketException from websockets.exceptions import WebSocketException
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -8,7 +8,7 @@ from django.http.request import HttpRequest
from django.template import Context from django.template import Context
from django.templatetags.static import static from django.templatetags.static import static
from django.utils.html import escape, mark_safe 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.core.models import User
from authentik.lib.config import CONFIG from authentik.lib.config import CONFIG

View File

@ -5,7 +5,7 @@ from django.http import HttpResponse
from django.shortcuts import redirect, reverse from django.shortcuts import redirect, reverse
from django.urls import NoReverseMatch from django.urls import NoReverseMatch
from django.utils.http import urlencode from django.utils.http import urlencode
from structlog import get_logger from structlog.stdlib import get_logger
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -12,7 +12,7 @@ from django.db import ProgrammingError
from docker.constants import DEFAULT_UNIX_SOCKET from docker.constants import DEFAULT_UNIX_SOCKET
from kubernetes.config.incluster_config import SERVICE_TOKEN_FILENAME from kubernetes.config.incluster_config import SERVICE_TOKEN_FILENAME
from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION from kubernetes.config.kube_config import KUBE_CONFIG_DEFAULT_LOCATION
from structlog import get_logger from structlog.stdlib import get_logger
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -8,7 +8,7 @@ from channels.exceptions import DenyConnection
from dacite import from_dict from dacite import from_dict
from dacite.data import Data from dacite.data import Data
from guardian.shortcuts import get_objects_for_user 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.core.channels import AuthJsonConsumer
from authentik.outposts.models import OUTPOST_HELLO_INTERVAL, Outpost, OutpostState from authentik.outposts.models import OUTPOST_HELLO_INTERVAL, Outpost, OutpostState

View File

@ -1,7 +1,7 @@
"""Base Controller""" """Base Controller"""
from dataclasses import dataclass from dataclasses import dataclass
from structlog import get_logger from structlog.stdlib import get_logger
from structlog.testing import capture_logs from structlog.testing import capture_logs
from authentik.lib.sentry import SentryIgnoredException from authentik.lib.sentry import SentryIgnoredException

View File

@ -3,7 +3,7 @@ from typing import TYPE_CHECKING, Generic, TypeVar
from kubernetes.client import V1ObjectMeta from kubernetes.client import V1ObjectMeta
from kubernetes.client.rest import ApiException from kubernetes.client.rest import ApiException
from structlog import get_logger from structlog.stdlib import get_logger
from authentik import __version__ from authentik import __version__
from authentik.lib.sentry import SentryIgnoredException from authentik.lib.sentry import SentryIgnoredException

View File

@ -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 kubernetes.config.kube_config import load_kube_config_from_dict
from model_utils.managers import InheritanceManager from model_utils.managers import InheritanceManager
from packaging.version import LegacyVersion, Version, parse from packaging.version import LegacyVersion, Version, parse
from structlog import get_logger from structlog.stdlib import get_logger
from urllib3.exceptions import HTTPError from urllib3.exceptions import HTTPError
from authentik import __version__ from authentik import __version__

View File

@ -2,7 +2,7 @@
from django.db.models import Model from django.db.models import Model
from django.db.models.signals import post_save, pre_delete from django.db.models.signals import post_save, pre_delete
from django.dispatch import receiver 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.lib.utils.reflection import class_to_path
from authentik.outposts.models import Outpost from authentik.outposts.models import Outpost

View File

@ -6,7 +6,7 @@ from channels.layers import get_channel_layer
from django.core.cache import cache from django.core.cache import cache
from django.db.models.base import Model from django.db.models.base import Model
from django.utils.text import slugify 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.tasks import MonitoredTask, TaskResult, TaskResultStatus
from authentik.lib.utils.reflection import path_to_class from authentik.lib.utils.reflection import path_to_class

View File

@ -7,7 +7,7 @@ from django.db import models
from django.forms import ModelForm from django.forms import ModelForm
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework.serializers import BaseSerializer 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.models import Policy
from authentik.policies.types import PolicyRequest, PolicyResult from authentik.policies.types import PolicyRequest, PolicyResult

View File

@ -7,7 +7,7 @@ from django.core.cache import cache
from django.http import HttpRequest from django.http import HttpRequest
from sentry_sdk.hub import Hub from sentry_sdk.hub import Hub
from sentry_sdk.tracing import Span 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.core.models import User
from authentik.policies.models import Policy, PolicyBinding, PolicyBindingModel from authentik.policies.models import Policy, PolicyBinding, PolicyBindingModel

View File

@ -7,7 +7,7 @@ from django.forms import ModelForm
from django.utils.timezone import now from django.utils.timezone import now
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from rest_framework.serializers import BaseSerializer 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.models import Policy
from authentik.policies.types import PolicyRequest, PolicyResult from authentik.policies.types import PolicyRequest, PolicyResult

View File

@ -4,7 +4,7 @@ from traceback import format_tb
from typing import TYPE_CHECKING, List, Optional from typing import TYPE_CHECKING, List, Optional
from django.http import HttpRequest 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.models import Event, EventAction
from authentik.events.utils import model_to_dict, sanitize_dict from authentik.events.utils import model_to_dict, sanitize_dict

View File

@ -7,7 +7,7 @@ from django.forms import ModelForm
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from requests import get from requests import get
from rest_framework.serializers import BaseSerializer 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.models import Policy, PolicyResult
from authentik.policies.types import PolicyRequest from authentik.policies.types import PolicyRequest

View File

@ -6,7 +6,7 @@ from django.db import models
from django.forms import ModelForm from django.forms import ModelForm
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from rest_framework.serializers import BaseSerializer 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.models import Policy
from authentik.policies.types import PolicyRequest, PolicyResult from authentik.policies.types import PolicyRequest, PolicyResult

View File

@ -6,7 +6,7 @@ from typing import Optional
from django.core.cache import cache from django.core.cache import cache
from sentry_sdk.hub import Hub from sentry_sdk.hub import Hub
from sentry_sdk.tracing import Span 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.events.models import Event, EventAction
from authentik.policies.exceptions import PolicyException from authentik.policies.exceptions import PolicyException
@ -96,5 +96,5 @@ class PolicyProcess(Process):
try: try:
self.connection.send(self.execute()) self.connection.send(self.execute())
except Exception as exc: # pylint: disable=broad-except except Exception as exc: # pylint: disable=broad-except
LOGGER.warning(exc) LOGGER.warning(str(exc))
self.connection.send(PolicyResult(False, str(exc))) self.connection.send(PolicyResult(False, str(exc)))

View File

@ -3,7 +3,7 @@ from django.contrib.auth.signals import user_logged_in, user_login_failed
from django.core.cache import cache from django.core.cache import cache
from django.dispatch import receiver from django.dispatch import receiver
from django.http import HttpRequest 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.lib.utils.http import get_client_ip
from authentik.policies.reputation.models import ( from authentik.policies.reputation.models import (

View File

@ -1,6 +1,6 @@
"""Reputation tasks""" """Reputation tasks"""
from django.core.cache import cache 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.core.models import User
from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus

View File

@ -2,7 +2,7 @@
from django.core.cache import cache from django.core.cache import cache
from django.db.models.signals import post_save from django.db.models.signals import post_save
from django.dispatch import receiver from django.dispatch import receiver
from structlog import get_logger from structlog.stdlib import get_logger
LOGGER = get_logger() LOGGER = get_logger()

View File

@ -7,7 +7,7 @@ from django.contrib.auth.views import redirect_to_login
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic.base import View 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.core.models import Application, Provider, User
from authentik.flows.views import SESSION_KEY_APPLICATION_PRE from authentik.flows.views import SESSION_KEY_APPLICATION_PRE

View File

@ -6,7 +6,7 @@ from typing import List, Optional, Tuple
from django.http import HttpRequest, HttpResponse, JsonResponse from django.http import HttpRequest, HttpResponse, JsonResponse
from django.utils.cache import patch_vary_headers 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.errors import BearerTokenError
from authentik.providers.oauth2.models import RefreshToken from authentik.providers.oauth2.models import RefreshToken

View File

@ -9,7 +9,7 @@ from django.http import HttpRequest, HttpResponse
from django.http.response import Http404 from django.http.response import Http404
from django.shortcuts import get_object_or_404, redirect from django.shortcuts import get_object_or_404, redirect
from django.utils import timezone from django.utils import timezone
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.models import Application from authentik.core.models import Application
from authentik.events.models import Event, EventAction from authentik.events.models import Event, EventAction

View File

@ -3,7 +3,7 @@ from dataclasses import dataclass, field
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.views import View 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.errors import TokenIntrospectionError
from authentik.providers.oauth2.models import IDToken, OAuth2Provider, RefreshToken from authentik.providers.oauth2.models import IDToken, OAuth2Provider, RefreshToken

View File

@ -4,7 +4,7 @@ from typing import Any, Dict
from django.http import HttpRequest, HttpResponse, JsonResponse from django.http import HttpRequest, HttpResponse, JsonResponse
from django.shortcuts import get_object_or_404, reverse from django.shortcuts import get_object_or_404, reverse
from django.views import View from django.views import View
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.models import Application from authentik.core.models import Application
from authentik.providers.oauth2.constants import ( from authentik.providers.oauth2.constants import (

View File

@ -6,7 +6,7 @@ from typing import Any, Dict, List, Optional
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.views import View 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.lib.utils.time import timedelta_from_string
from authentik.providers.oauth2.constants import ( from authentik.providers.oauth2.constants import (

View File

@ -4,7 +4,7 @@ from typing import Any, Dict, List
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.views import View from django.views import View
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.providers.oauth2.constants import ( from authentik.providers.oauth2.constants import (
SCOPE_GITHUB_ORG_READ, SCOPE_GITHUB_ORG_READ,

View File

@ -8,7 +8,7 @@ from django.http import HttpRequest
from django.shortcuts import reverse from django.shortcuts import reverse
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from rest_framework.serializers import Serializer 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.core.models import PropertyMapping, Provider
from authentik.crypto.models import CertificateKeyPair from authentik.crypto.models import CertificateKeyPair

View File

@ -6,7 +6,7 @@ import xmlsec
from django.http import HttpRequest from django.http import HttpRequest
from lxml import etree # nosec from lxml import etree # nosec
from lxml.etree import Element, SubElement # 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.core.exceptions import PropertyMappingExpressionException
from authentik.lib.utils.time import timedelta_from_string from authentik.lib.utils.time import timedelta_from_string
@ -95,7 +95,7 @@ class AssertionProcessor:
attribute_statement.append(attribute) attribute_statement.append(attribute)
except PropertyMappingExpressionException as exc: except PropertyMappingExpressionException as exc:
LOGGER.warning(exc) LOGGER.warning(str(exc))
continue continue
return attribute_statement return attribute_statement

View File

@ -7,7 +7,7 @@ from cryptography.hazmat.backends import default_backend
from cryptography.x509 import load_pem_x509_certificate from cryptography.x509 import load_pem_x509_certificate
from defusedxml.lxml import fromstring from defusedxml.lxml import fromstring
from lxml import etree # nosec from lxml import etree # nosec
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.crypto.models import CertificateKeyPair from authentik.crypto.models import CertificateKeyPair
from authentik.providers.saml.models import SAMLBindings, SAMLProvider from authentik.providers.saml.models import SAMLBindings, SAMLProvider

View File

@ -7,7 +7,7 @@ from urllib.parse import quote_plus
import xmlsec import xmlsec
from defusedxml import ElementTree from defusedxml import ElementTree
from lxml import etree # nosec 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.exceptions import CannotHandleAssertion
from authentik.providers.saml.models import SAMLProvider from authentik.providers.saml.models import SAMLProvider

View File

@ -13,7 +13,7 @@ from django.utils.translation import gettext_lazy as _
from django.views import View from django.views import View
from django.views.decorators.csrf import csrf_exempt from django.views.decorators.csrf import csrf_exempt
from django.views.generic.edit import FormView 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.core.models import Application, Provider
from authentik.events.models import Event, EventAction from authentik.events.models import Event, EventAction
@ -128,7 +128,7 @@ class SAMLSSOBindingRedirectView(SAMLSSOView):
provider=self.provider, provider=self.provider,
message=str(exc), message=str(exc),
).save() ).save()
LOGGER.info(exc) LOGGER.info(str(exc))
return bad_request_message(self.request, str(exc)) return bad_request_message(self.request, str(exc))
return None return None
@ -152,7 +152,7 @@ class SAMLSSOBindingPOSTView(SAMLSSOView):
) )
self.request.session[SESSION_KEY_AUTH_N_REQUEST] = auth_n_request self.request.session[SESSION_KEY_AUTH_N_REQUEST] = auth_n_request
except CannotHandleAssertion as exc: except CannotHandleAssertion as exc:
LOGGER.info(exc) LOGGER.info(str(exc))
return bad_request_message(self.request, str(exc)) return bad_request_message(self.request, str(exc))
return None return None
@ -274,7 +274,7 @@ class MetadataImportView(LoginRequiredMixin, FormView):
provider.save() provider.save()
messages.success(self.request, _("Successfully created Provider")) messages.success(self.request, _("Successfully created Provider"))
except ValueError as exc: except ValueError as exc:
LOGGER.warning(exc) LOGGER.warning(str(exc))
messages.error( messages.error(
self.request, self.request,
_("Failed to import Metadata: %(message)s" % {"message": str(exc)}), _("Failed to import Metadata: %(message)s" % {"message": str(exc)}),

View File

@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand
from django.urls import reverse from django.urls import reverse
from django.utils.timezone import now from django.utils.timezone import now
from django.utils.translation import gettext as _ 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 from authentik.core.models import Token, TokenIntents, User

View File

@ -16,7 +16,7 @@ from channels.routing import ProtocolTypeRouter, URLRouter
from defusedxml import defuse_stdlib from defusedxml import defuse_stdlib
from django.core.asgi import get_asgi_application from django.core.asgi import get_asgi_application
from sentry_sdk.integrations.asgi import SentryAsgiMiddleware 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 # DJANGO_SETTINGS_MODULE is set in gunicorn.conf.py

View File

@ -5,7 +5,7 @@ from logging.config import dictConfig
from celery import Celery from celery import Celery
from celery.signals import after_task_publish, setup_logging, task_postrun, task_prerun from celery.signals import after_task_publish, setup_logging, task_postrun, task_prerun
from django.conf import settings 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. # set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "authentik.root.settings") os.environ.setdefault("DJANGO_SETTINGS_MODULE", "authentik.root.settings")

View File

@ -5,7 +5,7 @@ from django.contrib import admin
from django.urls import include, path from django.urls import include, path
from django.views.generic import RedirectView from django.views.generic import RedirectView
from django.views.i18n import JavaScriptCatalog 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.core.views import error
from authentik.lib.utils.reflection import get_apps from authentik.lib.utils.reflection import get_apps

View File

@ -4,7 +4,7 @@ from typing import Optional
import ldap3 import ldap3
from django.contrib.auth.backends import ModelBackend from django.contrib.auth.backends import ModelBackend
from django.http import HttpRequest from django.http import HttpRequest
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.models import User from authentik.core.models import User
from authentik.sources.ldap.models import LDAPSource from authentik.sources.ldap.models import LDAPSource

View File

@ -5,7 +5,7 @@ from typing import Optional
import ldap3 import ldap3
import ldap3.core.exceptions import ldap3.core.exceptions
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.models import User from authentik.core.models import User
from authentik.sources.ldap.models import LDAPSource from authentik.sources.ldap.models import LDAPSource

View File

@ -4,7 +4,7 @@ from typing import Any, Dict
import ldap3 import ldap3
import ldap3.core.exceptions import ldap3.core.exceptions
from django.db.utils import IntegrityError 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.exceptions import PropertyMappingExpressionException
from authentik.core.models import Group, User from authentik.core.models import Group, User

View File

@ -3,7 +3,7 @@ from importlib import import_module
from django.apps import AppConfig from django.apps import AppConfig
from django.conf import settings from django.conf import settings
from structlog import get_logger from structlog.stdlib import get_logger
LOGGER = get_logger() LOGGER = get_logger()
@ -23,4 +23,4 @@ class AuthentikSourceOAuthConfig(AppConfig):
import_module(source_type) import_module(source_type)
LOGGER.debug("Loaded OAuth Source Type", type=source_type) LOGGER.debug("Loaded OAuth Source Type", type=source_type)
except ImportError as exc: except ImportError as exc:
LOGGER.debug(exc) LOGGER.debug(str(exc))

View File

@ -6,7 +6,7 @@ from django.http import HttpRequest
from requests import Session from requests import Session
from requests.exceptions import RequestException from requests.exceptions import RequestException
from requests.models import Response from requests.models import Response
from structlog import get_logger from structlog.stdlib import get_logger
from authentik import __version__ from authentik import __version__
from authentik.sources.oauth.models import OAuthSource from authentik.sources.oauth.models import OAuthSource

View File

@ -5,7 +5,7 @@ from urllib.parse import parse_qsl
from requests.exceptions import RequestException from requests.exceptions import RequestException
from requests.models import Response from requests.models import Response
from requests_oauthlib import OAuth1 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.clients.base import BaseOAuthClient
from authentik.sources.oauth.exceptions import OAuthSourceException from authentik.sources.oauth.exceptions import OAuthSourceException

View File

@ -6,7 +6,7 @@ from urllib.parse import parse_qsl
from django.utils.crypto import constant_time_compare, get_random_string from django.utils.crypto import constant_time_compare, get_random_string
from requests.exceptions import RequestException from requests.exceptions import RequestException
from requests.models import Response from requests.models import Response
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.sources.oauth.clients.base import BaseOAuthClient from authentik.sources.oauth.clients.base import BaseOAuthClient

View File

@ -3,7 +3,7 @@ from enum import Enum
from typing import Callable, Dict, List from typing import Callable, Dict, List
from django.utils.text import slugify 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.models import OAuthSource
from authentik.sources.oauth.views.callback import OAuthCallback from authentik.sources.oauth.views.callback import OAuthCallback

View File

@ -8,7 +8,7 @@ from django.shortcuts import redirect
from django.urls import reverse from django.urls import reverse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic import View 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.core.models import User
from authentik.events.models import Event, EventAction from authentik.events.models import Event, EventAction

View File

@ -2,7 +2,7 @@
from django.http import Http404 from django.http import Http404
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.views import View 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.models import OAuthSource
from authentik.sources.oauth.types.manager import MANAGER, RequestKind from authentik.sources.oauth.types.manager import MANAGER, RequestKind

View File

@ -4,7 +4,7 @@ from typing import Any, Dict
from django.http import Http404 from django.http import Http404
from django.urls import reverse from django.urls import reverse
from django.views.generic import RedirectView 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.models import OAuthSource
from authentik.sources.oauth.views.base import OAuthClientMixin from authentik.sources.oauth.views.base import OAuthClientMixin

View File

@ -7,7 +7,7 @@ from defusedxml.lxml import fromstring
from django.core.cache import cache from django.core.cache import cache
from django.core.exceptions import SuspiciousOperation from django.core.exceptions import SuspiciousOperation
from django.http import HttpRequest, HttpResponse 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.core.models import User
from authentik.flows.models import Flow from authentik.flows.models import Flow

View File

@ -2,7 +2,7 @@
from django.contrib.auth.signals import user_logged_out from django.contrib.auth.signals import user_logged_out
from django.dispatch import receiver from django.dispatch import receiver
from django.http import HttpRequest from django.http import HttpRequest
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.core.models import User from authentik.core.models import User

View File

@ -1,6 +1,6 @@
"""authentik saml source tasks""" """authentik saml source tasks"""
from django.utils.timezone import now 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.core.models import User
from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus from authentik.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus

View File

@ -8,7 +8,7 @@ from django.utils.http import urlencode
from django.utils.timezone import now from django.utils.timezone import now
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic import FormView 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.core.models import Token
from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER

View File

@ -6,7 +6,7 @@ from typing import Any, Dict, List
from celery import group from celery import group
from django.core.mail import EmailMultiAlternatives from django.core.mail import EmailMultiAlternatives
from django.core.mail.utils import DNS_NAME 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.lib.tasks import MonitoredTask, TaskResult, TaskResultStatus
from authentik.root.celery import CELERY_APP from authentik.root.celery import CELERY_APP

View File

@ -2,7 +2,7 @@
from django import forms from django import forms
from django.core.validators import validate_email from django.core.validators import validate_email
from django.utils.translation import gettext_lazy as _ 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.admin.fields import ArrayFieldSelectMultiple
from authentik.flows.models import Flow, FlowDesignation from authentik.flows.models import Flow, FlowDesignation

View File

@ -7,7 +7,7 @@ from django.http import HttpResponse
from django.shortcuts import reverse from django.shortcuts import reverse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic import FormView 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.core.models import Source, User
from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER

View File

@ -4,7 +4,7 @@ from typing import Any, Dict
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.views.generic import FormView from django.views.generic import FormView
from django_otp.plugins.otp_static.models import StaticDevice, StaticToken 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.planner import PLAN_CONTEXT_PENDING_USER
from authentik.flows.stage import StageView from authentik.flows.stage import StageView

View File

@ -8,7 +8,7 @@ from django_otp.plugins.otp_totp.models import TOTPDevice
from lxml.etree import tostring # nosec from lxml.etree import tostring # nosec
from qrcode import QRCode from qrcode import QRCode
from qrcode.image.svg import SvgFillImage 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.planner import PLAN_CONTEXT_PENDING_USER
from authentik.flows.stage import StageView from authentik.flows.stage import StageView

View File

@ -4,7 +4,7 @@ from typing import Any, Dict
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.views.generic import FormView from django.views.generic import FormView
from django_otp import user_has_device 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.models import NotConfiguredAction
from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER

View File

@ -9,7 +9,7 @@ from django.forms.utils import ErrorList
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic import FormView 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.core.models import User
from authentik.flows.models import Flow, FlowDesignation from authentik.flows.models import Flow, FlowDesignation

View File

@ -2,7 +2,7 @@
from django.http import HttpResponse from django.http import HttpResponse
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
from django.views.generic import FormView 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.flows.stage import StageView
from authentik.stages.prompt.forms import PromptForm from authentik.stages.prompt.forms import PromptForm

View File

@ -3,7 +3,7 @@ from django.contrib import messages
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _ from django.utils.translation import gettext as _
from django.views.generic import FormView 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.core.models import User
from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER from authentik.flows.planner import PLAN_CONTEXT_PENDING_USER

View File

@ -3,7 +3,7 @@ from django.contrib import messages
from django.contrib.auth import login from django.contrib.auth import login
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _ 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.planner import PLAN_CONTEXT_PENDING_USER
from authentik.flows.stage import StageView from authentik.flows.stage import StageView

View File

@ -1,7 +1,7 @@
"""Logout stage logic""" """Logout stage logic"""
from django.contrib.auth import logout from django.contrib.auth import logout
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.flows.stage import StageView from authentik.flows.stage import StageView

View File

@ -4,7 +4,7 @@ from django.contrib.auth import update_session_auth_hash
from django.contrib.auth.backends import ModelBackend from django.contrib.auth.backends import ModelBackend
from django.http import HttpRequest, HttpResponse from django.http import HttpRequest, HttpResponse
from django.utils.translation import gettext as _ 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.middleware import SESSION_IMPERSONATE_USER
from authentik.core.models import User from authentik.core.models import User

View File

@ -6,7 +6,7 @@ from pathlib import Path
from typing import Any from typing import Any
from psycopg2 import connect from psycopg2 import connect
from structlog import get_logger from structlog.stdlib import get_logger
from authentik.lib.config import CONFIG from authentik.lib.config import CONFIG

View File

@ -8,7 +8,7 @@ from docker.types import Healthcheck
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as ec 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.core.models import Application
from authentik.crypto.models import CertificateKeyPair from authentik.crypto.models import CertificateKeyPair

View File

@ -10,7 +10,7 @@ from docker.types import Healthcheck
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as ec 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.core.models import Application
from authentik.crypto.models import CertificateKeyPair from authentik.crypto.models import CertificateKeyPair

View File

@ -10,7 +10,7 @@ from docker.types import Healthcheck
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as ec 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.core.models import Application
from authentik.crypto.models import CertificateKeyPair from authentik.crypto.models import CertificateKeyPair

View File

@ -11,7 +11,7 @@ from docker.types import Healthcheck
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as ec 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 yaml import safe_dump
from authentik.flows.models import Flow from authentik.flows.models import Flow

View File

@ -8,7 +8,7 @@ from docker.types import Healthcheck
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as ec 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.crypto.models import CertificateKeyPair
from authentik.flows.models import Flow from authentik.flows.models import Flow

View File

@ -26,7 +26,7 @@ from selenium.webdriver.common.by import By
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.remote.webdriver import WebDriver from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.support.ui import WebDriverWait 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.api.users import UserSerializer
from authentik.core.models import User from authentik.core.models import User