Skip to content

build(deps): bump django from 5.1.12 to 5.1.13 (cherry-pick #17198 to version-2025.6)#17200

Closed
authentik-automation[bot] wants to merge 2 commits into
version-2025.6from
cherry-pick/17198-to-version-2025.6
Closed

build(deps): bump django from 5.1.12 to 5.1.13 (cherry-pick #17198 to version-2025.6)#17200
authentik-automation[bot] wants to merge 2 commits into
version-2025.6from
cherry-pick/17198-to-version-2025.6

Conversation

@authentik-automation

Copy link
Copy Markdown
Contributor

⚠️ This cherry-pick has conflicts that require manual resolution.

Cherry-pick of #17198 to version-2025.6 branch.

Original PR: #17198
Original Author: @dependabot[bot]
Cherry-picked commit: e756594

Please resolve the conflicts in this PR before merging.

This cherry-pick has conflicts that need manual resolution.

Original PR: #17198
Original commit: e756594
@codecov

codecov Bot commented Oct 1, 2025

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1850 1 1849 2
View the top 1 failed test(s) by shortest run time
tests.e2e.test_provider_ldap.TestProviderLDAP::test_ldap_bind_search
Stack Traces | 46.2s run time
self = <unittest.case._Outcome object at 0x7f723b74b360>
test_case = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
subTest = False

    @contextlib.contextmanager
    def testPartExecutor(self, test_case, subTest=False):
        old_success = self.success
        self.success = True
        try:
>           yield

.../hostedtoolcache/Python/3.13.7.............../x64/lib/python3.13/unittest/case.py:58: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
result = <TestCaseFunction test_ldap_bind_search>

    def run(self, result=None):
        if result is None:
            result = self.defaultTestResult()
            startTestRun = getattr(result, 'startTestRun', None)
            stopTestRun = getattr(result, 'stopTestRun', None)
            if startTestRun is not None:
                startTestRun()
        else:
            stopTestRun = None
    
        result.startTest(self)
        try:
            testMethod = getattr(self, self._testMethodName)
            if (getattr(self.__class__, "__unittest_skip__", False) or
                getattr(testMethod, "__unittest_skip__", False)):
                # If the class or method was skipped.
                skip_why = (getattr(self.__class__, '__unittest_skip_why__', '')
                            or getattr(testMethod, '__unittest_skip_why__', ''))
                _addSkip(result, self, skip_why)
                return result
    
            expecting_failure = (
                getattr(self, "__unittest_expecting_failure__", False) or
                getattr(testMethod, "__unittest_expecting_failure__", False)
            )
            outcome = _Outcome(result)
            start_time = time.perf_counter()
            try:
                self._outcome = outcome
    
                with outcome.testPartExecutor(self):
                    self._callSetUp()
                if outcome.success:
                    outcome.expecting_failure = expecting_failure
                    with outcome.testPartExecutor(self):
>                       self._callTestMethod(testMethod)

.../hostedtoolcache/Python/3.13.7.............../x64/lib/python3.13/unittest/case.py:651: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
method = <bound method TestProviderLDAP.test_ldap_bind_search of <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>>

    def _callTestMethod(self, method):
>       if method() is not None:

.../hostedtoolcache/Python/3.13.7.............../x64/lib/python3.13/unittest/case.py:606: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
args = (), kwargs = {}

    @wraps(func)
    def wrapper(self: TransactionTestCase, *args, **kwargs):
        """Run test again if we're below max_retries, including tearDown and
        setUp. Otherwise raise the error"""
        nonlocal count
        try:
>           return func(self, *args, **kwargs)

tests/e2e/utils.py:323: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>,)
kwargs = {}, file = 'default/flow-default-invalidation-flow.yaml'
content = 'version: 1\nmetadata:\n  name: Default - Invalidation flow\nentries:\n- attrs:\n    designation: invalidation\n    na...0\n    stage: !KeyOf default-invalidation-logout\n    target: !KeyOf flow\n  model: authentik_flows.flowstagebinding\n'

    @wraps(func)
    def wrapper(*args, **kwargs):
        for file in files:
            content = BlueprintInstance(path=file).retrieve()
            Importer.from_string(content).apply()
>       return func(*args, **kwargs)

.../blueprints/tests/__init__.py:25: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>,)
kwargs = {}, config = <AuthentikTenantsConfig: authentik_tenants>

    @wraps(func)
    def wrapper(*args, **kwargs):
        config = apps.get_app_config(app_name)
        if isinstance(config, ManagedAppConfig):
            config._on_startup_callback(None)
>       return func(*args, **kwargs)

.../blueprints/tests/__init__.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>,)
kwargs = {}, config = <AuthentikOutpostConfig: authentik_outposts>

    @wraps(func)
    def wrapper(*args, **kwargs):
        config = apps.get_app_config(app_name)
        if isinstance(config, ManagedAppConfig):
            config._on_startup_callback(None)
>       return func(*args, **kwargs)

.../blueprints/tests/__init__.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>

    @retry()
    @apply_blueprint(
        "default/flow-default-authentication-flow.yaml",
        "default/flow-default-invalidation-flow.yaml",
    )
    @reconcile_app("authentik_tenants")
    @reconcile_app("authentik_outposts")
    def test_ldap_bind_search(self):
        """Test simple bind + search"""
        # Remove akadmin to ensure list is correct
        # Remove user before starting container so it's not cached
        User.objects.filter(username="akadmin").delete()
    
        outpost = self._prepare()
        server = Server("ldap://localhost:3389", get_info=ALL)
        _connection = Connection(
            server,
            raise_exceptions=True,
            user=f"cn={self.user.username},ou=users,dc=ldap,dc=goauthentik,dc=io",
            password=self.user.username,
        )
        _connection.bind()
        self.assertTrue(
            Event.objects.filter(
                action=EventAction.LOGIN,
                user={
                    "pk": self.user.pk,
                    "email": self.user.email,
                    "username": self.user.username,
                },
            )
        )
    
        embedded_account = Outpost.objects.filter(managed=MANAGED_OUTPOST).first().user
    
        _connection.search(
            "ou=Users,DC=ldaP,dc=goauthentik,dc=io",
            "(objectClass=user)",
            search_scope=SUBTREE,
            attributes=[ALL_ATTRIBUTES, ALL_OPERATIONAL_ATTRIBUTES],
        )
        response: list = _connection.response
        # Remove raw_attributes to make checking easier
        for obj in response:
            del obj["raw_attributes"]
            del obj["raw_dn"]
            obj["attributes"] = dict(obj["attributes"])
        o_user = outpost.user
        expected = [
            {
                "dn": f"cn={o_user.username},ou=users,dc=ldap,dc=goauthentik,dc=io",
                "attributes": {
                    "cn": o_user.username,
                    "sAMAccountName": o_user.username,
                    "uid": o_user.uid,
                    "name": o_user.name,
                    "displayName": o_user.name,
                    "sn": o_user.name,
                    "mail": "",
                    "objectClass": [
                        "top",
                        "person",
                        "organizationalPerson",
                        "inetOrgPerson",
                        "user",
                        "posixAccount",
                        "goauthentik.io/ldap/user",
                    ],
                    "uidNumber": 2000 + o_user.pk,
                    "gidNumber": 2000 + o_user.pk,
                    "memberOf": [],
                    "homeDirectory": f"/home/{o_user.username}",
                    "ak-active": True,
                    "ak-superuser": False,
                },
                "type": "searchResEntry",
            },
            {
                "dn": f"cn={embedded_account.username},ou=users,dc=ldap,dc=goauthentik,dc=io",
                "attributes": {
                    "cn": embedded_account.username,
                    "sAMAccountName": embedded_account.username,
                    "uid": embedded_account.uid,
                    "name": embedded_account.name,
                    "displayName": embedded_account.name,
                    "sn": embedded_account.name,
                    "mail": "",
                    "objectClass": [
                        "top",
                        "person",
                        "organizationalPerson",
                        "inetOrgPerson",
                        "user",
                        "posixAccount",
                        "goauthentik.io/ldap/user",
                    ],
                    "uidNumber": 2000 + embedded_account.pk,
                    "gidNumber": 2000 + embedded_account.pk,
                    "memberOf": [],
                    "homeDirectory": f"/home/{embedded_account.username}",
                    "ak-active": True,
                    "ak-superuser": False,
                },
                "type": "searchResEntry",
            },
            {
                "dn": f"cn={self.user.username},ou=users,dc=ldap,dc=goauthentik,dc=io",
                "attributes": {
                    "cn": self.user.username,
                    "sAMAccountName": self.user.username,
                    "uid": self.user.uid,
                    "name": self.user.name,
                    "displayName": self.user.name,
                    "sn": self.user.name,
                    "mail": self.user.email,
                    "objectClass": [
                        "top",
                        "person",
                        "organizationalPerson",
                        "inetOrgPerson",
                        "user",
                        "posixAccount",
                        "goauthentik.io/ldap/user",
                    ],
                    "uidNumber": 2000 + self.user.pk,
                    "gidNumber": 2000 + self.user.pk,
                    "memberOf": [
                        f"cn={group.name},ou=groups,dc=ldap,dc=goauthentik,dc=io"
                        for group in self.user.ak_groups.all()
                    ],
                    "homeDirectory": f"/home/{self.user.username}",
                    "ak-active": True,
                    "ak-superuser": True,
                    "extraAttribute": ["bar"],
                },
                "type": "searchResEntry",
            },
        ]
>       self.assert_list_dict_equal(expected, response)

tests/e2e/test_provider_ldap.py:320: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
expected = [{'attributes': {'ak-active': True, 'ak-superuser': False, 'cn': 'ak-outpost-68b88ec542dd463880d1b5fee145b221', 'displ...pKEqcoU8recGG', ...}, 'dn': 'cn=uOtnOq9pKEqcoU8recGG,ou=users,dc=ldap,dc=goauthentik,dc=io', 'type': 'searchResEntry'}]
actual = [{'attributes': {'ak-active': True, 'ak-superuser': False, 'cn': 'ak-outpost-65239cc68f4f42fca59cff1cbd487088', 'creat....timezone.utc), ...}, 'dn': 'cn=uOtnOq9pKEqcoU8recGG,ou=users,dc=ldap,dc=goauthentik,dc=io', 'type': 'searchResEntry'}]
match_key = 'dn'

    def assert_list_dict_equal(self, expected: list[dict], actual: list[dict], match_key="dn"):
        """Assert a list of dictionaries is identical, ignoring the ordering of items"""
        self.assertEqual(len(expected), len(actual))
        for res_item in actual:
            all_matching = [x for x in expected if x[match_key] == res_item[match_key]]
            self.assertEqual(len(all_matching), 1)
            matching = all_matching[0]
>           self.assertDictEqual(res_item, matching)

tests/e2e/test_provider_ldap.py:406: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
d1 = {'attributes': {'ak-active': True, 'ak-superuser': False, 'cn': 'ak-outpost-65239cc68f4f42fca59cff1cbd487088', 'create...'dn': 'cn=ak-outpost-65239cc68f4f42fca59cff1cbd487088,ou=users,dc=ldap,dc=goauthentik,dc=io', 'type': 'searchResEntry'}
d2 = {'attributes': {'ak-active': True, 'ak-superuser': False, 'cn': 'ak-outpost-65239cc68f4f42fca59cff1cbd487088', 'displa...'dn': 'cn=ak-outpost-65239cc68f4f42fca59cff1cbd487088,ou=users,dc=ldap,dc=goauthentik,dc=io', 'type': 'searchResEntry'}
msg = None

    def assertDictEqual(self, d1, d2, msg=None):
        self.assertIsInstance(d1, dict, 'First argument is not a dictionary')
        self.assertIsInstance(d2, dict, 'Second argument is not a dictionary')
    
        if d1 != d2:
            standardMsg = '%s != %s' % _common_shorten_repr(d1, d2)
            diff = ('\n' + '\n'.join(difflib.ndiff(
                           pprint.pformat(d1).splitlines(),
                           pprint.pformat(d2).splitlines())))
            standardMsg = self._truncateMessage(standardMsg, diff)
>           self.fail(self._formatMessage(msg, standardMsg))

.../hostedtoolcache/Python/3.13.7.............../x64/lib/python3.13/unittest/case.py:1206: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.e2e.test_provider_ldap.TestProviderLDAP testMethod=test_ldap_bind_search>
msg = "{'dn'[101 chars]': {'ak-superuser': False, 'cn': 'ak-outpost-6[934 chars]try'} != {'dn'[101 chars]': {'cn': 'ak-outpo... 'cn=ak-outpost-65239cc68f4f42fca59cff1cbd487088,ou=users,dc=ldap,dc=goauthentik,dc=io',\n   'type': 'searchResEntry'}"

    def fail(self, msg=None):
        """Fail immediately, with the given message."""
>       raise self.failureException(msg)
E       AssertionError: {'dn'[101 chars]': {'ak-superuser': False, 'cn': 'ak-outpost-6[934 chars]try'} != {'dn'[101 chars]': {'cn': 'ak-outpost-65239cc68f4f42fca59cff1c[668 chars]try'}
E         {'attributes': {'ak-active': True,
E                         'ak-superuser': False,
E                         'cn': 'ak-outpost-65239cc68f4f42fca59cff1cbd487088',
E       -                 'createTimestamp': datetime.datetime(2025, 10, 1, 23, 52, 4, tzinfo=datetime.timezone.utc),
E                         'displayName': 'Outpost authentik Embedded Outpost '
E                                        'Service-Account',
E                         'gidNumber': 2021,
E                         'homeDirectory': '/home/ak-outpost-65239cc68f4f42fca59cff1cbd487088',
E                         'mail': '',
E                         'memberOf': [],
E       -                 'modifyTimestamp': datetime.datetime(1, 1, 1, 0, 0, tzinfo=datetime.timezone.utc),
E                         'name': 'Outpost authentik Embedded Outpost Service-Account',
E                         'objectClass': ['top',
E                                         'person',
E                                         'organizationalPerson',
E                                         'inetOrgPerson',
E                                         'user',
E                                         'posixAccount',
E                                         'goauthentik.io/ldap/user'],
E       -                 'pwdChangedTime': datetime.datetime(2025, 10, 1, 23, 52, 4, tzinfo=datetime.timezone.utc),
E                         'sAMAccountName': 'ak-outpost-65239cc68f4f42fca59cff1cbd487088',
E                         'sn': 'Outpost authentik Embedded Outpost Service-Account',
E                         'uid': 'eace9facd475d97bd8d217c51e5c90f43293949d75944293c0061bcf8cd18f69',
E                         'uidNumber': 2021},
E          'dn': 'cn=ak-outpost-65239cc68f4f42fca59cff1cbd487088,ou=users,dc=ldap,dc=goauthentik,dc=io',
E          'type': 'searchResEntry'}

.../hostedtoolcache/Python/3.13.7.............../x64/lib/python3.13/unittest/case.py:732: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@netlify

netlify Bot commented Oct 1, 2025

Copy link
Copy Markdown

Deploy Preview for authentik-integrations failed. Why did it fail? →

Name Link
🔨 Latest commit e24c0ee
🔍 Latest deploy log https://app.netlify.com/projects/authentik-integrations/deploys/68ddbc153c06050008636818

@netlify

netlify Bot commented Oct 1, 2025

Copy link
Copy Markdown

Deploy Preview for authentik-docs ready!

Name Link
🔨 Latest commit e24c0ee
🔍 Latest deploy log https://app.netlify.com/projects/authentik-docs/deploys/68ddbc159f99a700081454df
😎 Deploy Preview https://deploy-preview-17200--authentik-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@melizeche melizeche closed this Nov 18, 2025
@dominic-r
dominic-r deleted the cherry-pick/17198-to-version-2025.6 branch December 24, 2025 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant