From 4fd8b3c532b27d1d63784635b23893fca38f56fb Mon Sep 17 00:00:00 2001 From: "Jens L." Date: Tue, 24 Sep 2024 18:39:05 +0200 Subject: [PATCH 01/18] sources/ldap: fix mapping check, fix debug endpoint (#11442) * run connectivity check always Signed-off-by: Jens Langhammer * don't run sync if either sync_ option is enabled and no mappings are set Signed-off-by: Jens Langhammer * misc label fix Signed-off-by: Jens Langhammer * misc writing changse Signed-off-by: Jens Langhammer * add api validation Signed-off-by: Jens Langhammer * fix debug endpoint Signed-off-by: Jens Langhammer --------- Signed-off-by: Jens Langhammer --- authentik/sources/ldap/api.py | 37 +++++++++++++++----- authentik/sources/ldap/signals.py | 9 +++-- authentik/sources/ldap/tests/test_api.py | 32 +++++++++++++++++ web/src/admin/sources/ldap/LDAPSourceForm.ts | 2 +- website/docs/sources/ldap/index.md | 12 ++++--- 5 files changed, 74 insertions(+), 18 deletions(-) diff --git a/authentik/sources/ldap/api.py b/authentik/sources/ldap/api.py index be7625c0a9a2..89ef164cd739 100644 --- a/authentik/sources/ldap/api.py +++ b/authentik/sources/ldap/api.py @@ -3,6 +3,7 @@ from typing import Any from django.core.cache import cache +from django.utils.translation import gettext_lazy as _ from drf_spectacular.utils import extend_schema, inline_serializer from guardian.shortcuts import get_objects_for_user from rest_framework.decorators import action @@ -39,9 +40,8 @@ def get_connectivity(self, source: LDAPSource) -> dict[str, dict[str, str]] | No """Get cached source connectivity""" return cache.get(CACHE_KEY_STATUS + source.slug, None) - def validate(self, attrs: dict[str, Any]) -> dict[str, Any]: + def validate_sync_users_password(self, sync_users_password: bool) -> bool: """Check that only a single source has password_sync on""" - sync_users_password = attrs.get("sync_users_password", True) if sync_users_password: sources = LDAPSource.objects.filter(sync_users_password=True) if self.instance: @@ -49,11 +49,31 @@ def validate(self, attrs: dict[str, Any]) -> dict[str, Any]: if sources.exists(): raise ValidationError( { - "sync_users_password": ( + "sync_users_password": _( "Only a single LDAP Source with password synchronization is allowed" ) } ) + return sync_users_password + + def validate(self, attrs: dict[str, Any]) -> dict[str, Any]: + """Validate property mappings with sync_ flags""" + types = ["user", "group"] + for type in types: + toggle_value = attrs.get(f"sync_{type}s", False) + mappings_field = f"{type}_property_mappings" + mappings_value = attrs.get(mappings_field, []) + if toggle_value and len(mappings_value) == 0: + raise ValidationError( + { + mappings_field: _( + ( + "When 'Sync {type}s' is enabled, '{type}s property " + "mappings' cannot be empty." + ).format(type=type) + ) + } + ) return super().validate(attrs) class Meta: @@ -166,11 +186,12 @@ def debug(self, request: Request, slug: str) -> Response: for sync_class in SYNC_CLASSES: class_name = sync_class.name() all_objects.setdefault(class_name, []) - for obj in sync_class(source).get_objects(size_limit=10): - obj: dict - obj.pop("raw_attributes", None) - obj.pop("raw_dn", None) - all_objects[class_name].append(obj) + for page in sync_class(source).get_objects(size_limit=10): + for obj in page: + obj: dict + obj.pop("raw_attributes", None) + obj.pop("raw_dn", None) + all_objects[class_name].append(obj) return Response(data=all_objects) diff --git a/authentik/sources/ldap/signals.py b/authentik/sources/ldap/signals.py index f53f4ad7f18a..a5c869f15096 100644 --- a/authentik/sources/ldap/signals.py +++ b/authentik/sources/ldap/signals.py @@ -26,17 +26,16 @@ def sync_ldap_source_on_save(sender, instance: LDAPSource, **_): """Ensure that source is synced on save (if enabled)""" if not instance.enabled: return + ldap_connectivity_check.delay(instance.pk) # Don't sync sources when they don't have any property mappings. This will only happen if: # - the user forgets to set them or # - the source is newly created, this is the first save event # and the mappings are created with an m2m event - if ( - not instance.user_property_mappings.exists() - or not instance.group_property_mappings.exists() - ): + if instance.sync_users and not instance.user_property_mappings.exists(): + return + if instance.sync_groups and not instance.group_property_mappings.exists(): return ldap_sync_single.delay(instance.pk) - ldap_connectivity_check.delay(instance.pk) @receiver(password_validate) diff --git a/authentik/sources/ldap/tests/test_api.py b/authentik/sources/ldap/tests/test_api.py index e7dcf4232030..778d58ad80cb 100644 --- a/authentik/sources/ldap/tests/test_api.py +++ b/authentik/sources/ldap/tests/test_api.py @@ -50,3 +50,35 @@ def test_sync_users_password_invalid(self): } ) self.assertFalse(serializer.is_valid()) + + def test_sync_users_mapping_empty(self): + """Check that when sync_users is enabled, property mappings must be set""" + serializer = LDAPSourceSerializer( + data={ + "name": "foo", + "slug": " foo", + "server_uri": "ldaps://1.2.3.4", + "bind_cn": "", + "bind_password": LDAP_PASSWORD, + "base_dn": "dc=foo", + "sync_users": True, + "user_property_mappings": [], + } + ) + self.assertFalse(serializer.is_valid()) + + def test_sync_groups_mapping_empty(self): + """Check that when sync_groups is enabled, property mappings must be set""" + serializer = LDAPSourceSerializer( + data={ + "name": "foo", + "slug": " foo", + "server_uri": "ldaps://1.2.3.4", + "bind_cn": "", + "bind_password": LDAP_PASSWORD, + "base_dn": "dc=foo", + "sync_groups": True, + "group_property_mappings": [], + } + ) + self.assertFalse(serializer.is_valid()) diff --git a/web/src/admin/sources/ldap/LDAPSourceForm.ts b/web/src/admin/sources/ldap/LDAPSourceForm.ts index 3004abec192c..ecca7d4a7df5 100644 --- a/web/src/admin/sources/ldap/LDAPSourceForm.ts +++ b/web/src/admin/sources/ldap/LDAPSourceForm.ts @@ -327,7 +327,7 @@ export class LDAPSourceForm extends BaseSourceForm { ${msg("Additional settings")}
- + => { const args: CoreGroupsListRequest = { diff --git a/website/docs/sources/ldap/index.md b/website/docs/sources/ldap/index.md index 1cb245605640..0fcc59253cee 100644 --- a/website/docs/sources/ldap/index.md +++ b/website/docs/sources/ldap/index.md @@ -18,13 +18,13 @@ To create or edit a source in authentik, open the Admin interface and navigate t - **Update internal password on login**: When the user logs in to authentik using the LDAP password backend, the password is stored as a hashed value in authentik. Toggle off (default setting) if you do not want to store the hashed passwords in authentik. -- **Synch User**: Enable or disable user synchronization between authentik and the LDAP source. +- **Sync users**: Enable or disable user synchronization between authentik and the LDAP source. - **User password writeback**: Enable this option if you want to write password changes that are made in authentik back to LDAP. -- **Synch groups**: Enable/disable group synchronization. Groups are synced in the background every 5 minutes. +- **Sync groups**: Enable/disable group synchronization. Groups are synced in the background every 5 minutes. -- **Sync parent group**: Optionally set this group as the parent group for all synced groups. An example use case of this would be to import Active Directory groups under a root `imported-from-ad` group. +- **Parent group**: Optionally set this group as the parent group for all synced groups. An example use case of this would be to import Active Directory groups under a root `imported-from-ad` group. #### Connection settings @@ -45,7 +45,11 @@ To create or edit a source in authentik, open the Admin interface and navigate t #### LDAP Attribute mapping -- **User Property mappings** and **Group Property Mappings**: Define which LDAP properties map to which authentik properties. The default set of property mappings is generated for Active Directory. See also our documentation on [property mappings](#ldap-source-property-mappings). +- **User Property Mappings** and **Group Property Mappings**: Define which LDAP properties map to which authentik properties. The default set of property mappings is generated for Active Directory. See also our documentation on [property mappings](#ldap-source-property-mappings). + + :::warning + When the **Sync users** and or the **Sync groups** options are enabled, their respective property mapping options must have at least one mapping selected, otherwise the sync will not start. + ::: #### Additional Settings From e941981a3a1c3df451ca902709731026c78a8c79 Mon Sep 17 00:00:00 2001 From: "authentik-automation[bot]" <135050075+authentik-automation[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 02:45:19 +0200 Subject: [PATCH 02/18] core, web: update translations (#11500) Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: rissson <18313093+rissson@users.noreply.github.com> --- locale/en/LC_MESSAGES/django.po | 6 +++++- web/xliff/de.xlf | 3 +++ web/xliff/en.xlf | 3 +++ web/xliff/es.xlf | 3 +++ web/xliff/fr.xlf | 3 +++ web/xliff/ko.xlf | 3 +++ web/xliff/nl.xlf | 3 +++ web/xliff/pl.xlf | 3 +++ web/xliff/pseudo-LOCALE.xlf | 3 +++ web/xliff/ru.xlf | 3 +++ web/xliff/tr.xlf | 3 +++ web/xliff/zh-CN.xlf | 3 +++ web/xliff/zh-Hans.xlf | 3 +++ web/xliff/zh-Hant.xlf | 3 +++ web/xliff/zh_TW.xlf | 3 +++ 15 files changed, 47 insertions(+), 1 deletion(-) diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index ad8090a657fd..3f2e00f50170 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-08 00:09+0000\n" +"POT-Creation-Date: 2024-09-25 00:08+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1849,6 +1849,10 @@ msgstr "" msgid "Used recovery-link to authenticate." msgstr "" +#: authentik/sources/ldap/api.py +msgid "Only a single LDAP Source with password synchronization is allowed" +msgstr "" + #: authentik/sources/ldap/models.py msgid "Server URI" msgstr "" diff --git a/web/xliff/de.xlf b/web/xliff/de.xlf index 294ae02afbc1..435f2ad5169a 100644 --- a/web/xliff/de.xlf +++ b/web/xliff/de.xlf @@ -6898,6 +6898,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/en.xlf b/web/xliff/en.xlf index cdad1612b8b5..bf4af3e4be18 100644 --- a/web/xliff/en.xlf +++ b/web/xliff/en.xlf @@ -7163,6 +7163,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/es.xlf b/web/xliff/es.xlf index 7d351aa2da7a..542b7ec05953 100644 --- a/web/xliff/es.xlf +++ b/web/xliff/es.xlf @@ -6815,6 +6815,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/fr.xlf b/web/xliff/fr.xlf index 598eff85facb..46ac24d74d75 100644 --- a/web/xliff/fr.xlf +++ b/web/xliff/fr.xlf @@ -9087,6 +9087,9 @@ Les liaisons avec les groupes/utilisateurs sont vérifiées par rapport à l'uti authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/ko.xlf b/web/xliff/ko.xlf index 99643b5e00c4..d99b099b1c82 100644 --- a/web/xliff/ko.xlf +++ b/web/xliff/ko.xlf @@ -8732,6 +8732,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/nl.xlf b/web/xliff/nl.xlf index e98122a9c12a..310d263003e0 100644 --- a/web/xliff/nl.xlf +++ b/web/xliff/nl.xlf @@ -8578,6 +8578,9 @@ Bindingen naar groepen/gebruikers worden gecontroleerd tegen de gebruiker van de authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/pl.xlf b/web/xliff/pl.xlf index e736668404e4..4c3e900e8858 100644 --- a/web/xliff/pl.xlf +++ b/web/xliff/pl.xlf @@ -8997,6 +8997,9 @@ Powiązania z grupami/użytkownikami są sprawdzane względem użytkownika zdarz authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/pseudo-LOCALE.xlf b/web/xliff/pseudo-LOCALE.xlf index 567250d82cac..709914d6a3be 100644 --- a/web/xliff/pseudo-LOCALE.xlf +++ b/web/xliff/pseudo-LOCALE.xlf @@ -8960,4 +8960,7 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + Parent Group + diff --git a/web/xliff/ru.xlf b/web/xliff/ru.xlf index e6849abce9ed..32333768386d 100644 --- a/web/xliff/ru.xlf +++ b/web/xliff/ru.xlf @@ -9061,6 +9061,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/tr.xlf b/web/xliff/tr.xlf index 5e79989d48d4..7c5f51ec75d7 100644 --- a/web/xliff/tr.xlf +++ b/web/xliff/tr.xlf @@ -6808,6 +6808,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/zh-CN.xlf b/web/xliff/zh-CN.xlf index ba98082ab620..1db4c463c840 100644 --- a/web/xliff/zh-CN.xlf +++ b/web/xliff/zh-CN.xlf @@ -5746,6 +5746,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + Parent Group + diff --git a/web/xliff/zh-Hans.xlf b/web/xliff/zh-Hans.xlf index 00aeb4e5dec2..f1abb3db9c58 100644 --- a/web/xliff/zh-Hans.xlf +++ b/web/xliff/zh-Hans.xlf @@ -9090,6 +9090,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: authentik 无法保存此应用程序: + + + Parent Group diff --git a/web/xliff/zh-Hant.xlf b/web/xliff/zh-Hant.xlf index 080eb0fe6237..6e3c554ee1f3 100644 --- a/web/xliff/zh-Hant.xlf +++ b/web/xliff/zh-Hant.xlf @@ -6856,6 +6856,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group diff --git a/web/xliff/zh_TW.xlf b/web/xliff/zh_TW.xlf index 03df4ce7dccb..c93c55ef8175 100644 --- a/web/xliff/zh_TW.xlf +++ b/web/xliff/zh_TW.xlf @@ -8693,6 +8693,9 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: + + + Parent Group From dd7ce456b1f7aa2a328155aeb907a0a17a1c04cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:33:10 +0200 Subject: [PATCH 03/18] web: bump @types/node from 22.6.1 to 22.7.0 in /web (#11505) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.6.1 to 22.7.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/package-lock.json | 8 ++++---- web/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 200c1b0eefa8..7f3a5888f176 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -83,7 +83,7 @@ "@types/eslint__js": "^8.42.3", "@types/grecaptcha": "^3.0.9", "@types/guacamole-common-js": "1.5.2", - "@types/node": "^22.6.1", + "@types/node": "^22.7.0", "@types/showdown": "^2.0.6", "@typescript-eslint/eslint-plugin": "^8.7.0", "@typescript-eslint/parser": "^8.7.0", @@ -10327,9 +10327,9 @@ } }, "node_modules/@types/node": { - "version": "22.6.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.6.1.tgz", - "integrity": "sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==", + "version": "22.7.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.0.tgz", + "integrity": "sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw==", "dev": true, "dependencies": { "undici-types": "~6.19.2" diff --git a/web/package.json b/web/package.json index 6c1cd154aa8b..1f5911421405 100644 --- a/web/package.json +++ b/web/package.json @@ -71,7 +71,7 @@ "@types/eslint__js": "^8.42.3", "@types/grecaptcha": "^3.0.9", "@types/guacamole-common-js": "1.5.2", - "@types/node": "^22.6.1", + "@types/node": "^22.7.0", "@types/showdown": "^2.0.6", "@typescript-eslint/eslint-plugin": "^8.7.0", "@typescript-eslint/parser": "^8.7.0", From 896ee8925f62ac968c8962b61e4b945fd4b78e9f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:33:27 +0200 Subject: [PATCH 04/18] core: bump google-api-python-client from 2.146.0 to 2.147.0 (#11504) Bumps [google-api-python-client](https://github.com/googleapis/google-api-python-client) from 2.146.0 to 2.147.0. - [Release notes](https://github.com/googleapis/google-api-python-client/releases) - [Commits](https://github.com/googleapis/google-api-python-client/compare/v2.146.0...v2.147.0) --- updated-dependencies: - dependency-name: google-api-python-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index c66854755fd0..d600bad338bf 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1771,13 +1771,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-api-python-client" -version = "2.146.0" +version = "2.147.0" description = "Google API Client Library for Python" optional = false python-versions = ">=3.7" files = [ - {file = "google_api_python_client-2.146.0-py2.py3-none-any.whl", hash = "sha256:b1e62c9889c5ef6022f11d30d7ef23dc55100300f0e8aaf8aa09e8e92540acad"}, - {file = "google_api_python_client-2.146.0.tar.gz", hash = "sha256:41f671be10fa077ee5143ee9f0903c14006d39dc644564f4e044ae96b380bf68"}, + {file = "google_api_python_client-2.147.0-py2.py3-none-any.whl", hash = "sha256:c6ecfa193c695baa41e84562d8f8f244fcd164419eca3fc9fd7565646668f9b2"}, + {file = "google_api_python_client-2.147.0.tar.gz", hash = "sha256:e864c2cf61d34c00f05278b8bdb72b93b6fa34f0de9ead51d20435f3b65f91be"}, ] [package.dependencies] From 0fde3037492bdff6e3f79d9205d7f0705c500e42 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:33:50 +0200 Subject: [PATCH 05/18] core: bump debugpy from 1.8.5 to 1.8.6 (#11503) Bumps [debugpy](https://github.com/microsoft/debugpy) from 1.8.5 to 1.8.6. - [Release notes](https://github.com/microsoft/debugpy/releases) - [Commits](https://github.com/microsoft/debugpy/compare/v1.8.5...v1.8.6) --- updated-dependencies: - dependency-name: debugpy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/poetry.lock b/poetry.lock index d600bad338bf..b223a6dd8405 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1134,33 +1134,33 @@ tests = ["django", "hypothesis", "pytest", "pytest-asyncio"] [[package]] name = "debugpy" -version = "1.8.5" +version = "1.8.6" description = "An implementation of the Debug Adapter Protocol for Python" optional = false python-versions = ">=3.8" files = [ - {file = "debugpy-1.8.5-cp310-cp310-macosx_12_0_x86_64.whl", hash = "sha256:7e4d594367d6407a120b76bdaa03886e9eb652c05ba7f87e37418426ad2079f7"}, - {file = "debugpy-1.8.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4413b7a3ede757dc33a273a17d685ea2b0c09dbd312cc03f5534a0fd4d40750a"}, - {file = "debugpy-1.8.5-cp310-cp310-win32.whl", hash = "sha256:dd3811bd63632bb25eda6bd73bea8e0521794cda02be41fa3160eb26fc29e7ed"}, - {file = "debugpy-1.8.5-cp310-cp310-win_amd64.whl", hash = "sha256:b78c1250441ce893cb5035dd6f5fc12db968cc07f91cc06996b2087f7cefdd8e"}, - {file = "debugpy-1.8.5-cp311-cp311-macosx_12_0_universal2.whl", hash = "sha256:606bccba19f7188b6ea9579c8a4f5a5364ecd0bf5a0659c8a5d0e10dcee3032a"}, - {file = "debugpy-1.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db9fb642938a7a609a6c865c32ecd0d795d56c1aaa7a7a5722d77855d5e77f2b"}, - {file = "debugpy-1.8.5-cp311-cp311-win32.whl", hash = "sha256:4fbb3b39ae1aa3e5ad578f37a48a7a303dad9a3d018d369bc9ec629c1cfa7408"}, - {file = "debugpy-1.8.5-cp311-cp311-win_amd64.whl", hash = "sha256:345d6a0206e81eb68b1493ce2fbffd57c3088e2ce4b46592077a943d2b968ca3"}, - {file = "debugpy-1.8.5-cp312-cp312-macosx_12_0_universal2.whl", hash = "sha256:5b5c770977c8ec6c40c60d6f58cacc7f7fe5a45960363d6974ddb9b62dbee156"}, - {file = "debugpy-1.8.5-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c0a65b00b7cdd2ee0c2cf4c7335fef31e15f1b7056c7fdbce9e90193e1a8c8cb"}, - {file = "debugpy-1.8.5-cp312-cp312-win32.whl", hash = "sha256:c9f7c15ea1da18d2fcc2709e9f3d6de98b69a5b0fff1807fb80bc55f906691f7"}, - {file = "debugpy-1.8.5-cp312-cp312-win_amd64.whl", hash = "sha256:28ced650c974aaf179231668a293ecd5c63c0a671ae6d56b8795ecc5d2f48d3c"}, - {file = "debugpy-1.8.5-cp38-cp38-macosx_12_0_x86_64.whl", hash = "sha256:3df6692351172a42af7558daa5019651f898fc67450bf091335aa8a18fbf6f3a"}, - {file = "debugpy-1.8.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1cd04a73eb2769eb0bfe43f5bfde1215c5923d6924b9b90f94d15f207a402226"}, - {file = "debugpy-1.8.5-cp38-cp38-win32.whl", hash = "sha256:8f913ee8e9fcf9d38a751f56e6de12a297ae7832749d35de26d960f14280750a"}, - {file = "debugpy-1.8.5-cp38-cp38-win_amd64.whl", hash = "sha256:a697beca97dad3780b89a7fb525d5e79f33821a8bc0c06faf1f1289e549743cf"}, - {file = "debugpy-1.8.5-cp39-cp39-macosx_12_0_x86_64.whl", hash = "sha256:0a1029a2869d01cb777216af8c53cda0476875ef02a2b6ff8b2f2c9a4b04176c"}, - {file = "debugpy-1.8.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e84c276489e141ed0b93b0af648eef891546143d6a48f610945416453a8ad406"}, - {file = "debugpy-1.8.5-cp39-cp39-win32.whl", hash = "sha256:ad84b7cde7fd96cf6eea34ff6c4a1b7887e0fe2ea46e099e53234856f9d99a34"}, - {file = "debugpy-1.8.5-cp39-cp39-win_amd64.whl", hash = "sha256:7b0fe36ed9d26cb6836b0a51453653f8f2e347ba7348f2bbfe76bfeb670bfb1c"}, - {file = "debugpy-1.8.5-py2.py3-none-any.whl", hash = "sha256:55919dce65b471eff25901acf82d328bbd5b833526b6c1364bd5133754777a44"}, - {file = "debugpy-1.8.5.zip", hash = "sha256:b2112cfeb34b4507399d298fe7023a16656fc553ed5246536060ca7bd0e668d0"}, + {file = "debugpy-1.8.6-cp310-cp310-macosx_14_0_x86_64.whl", hash = "sha256:30f467c5345d9dfdcc0afdb10e018e47f092e383447500f125b4e013236bf14b"}, + {file = "debugpy-1.8.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5d73d8c52614432f4215d0fe79a7e595d0dd162b5c15233762565be2f014803b"}, + {file = "debugpy-1.8.6-cp310-cp310-win32.whl", hash = "sha256:e3e182cd98eac20ee23a00653503315085b29ab44ed66269482349d307b08df9"}, + {file = "debugpy-1.8.6-cp310-cp310-win_amd64.whl", hash = "sha256:e3a82da039cfe717b6fb1886cbbe5c4a3f15d7df4765af857f4307585121c2dd"}, + {file = "debugpy-1.8.6-cp311-cp311-macosx_14_0_universal2.whl", hash = "sha256:67479a94cf5fd2c2d88f9615e087fcb4fec169ec780464a3f2ba4a9a2bb79955"}, + {file = "debugpy-1.8.6-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9fb8653f6cbf1dd0a305ac1aa66ec246002145074ea57933978346ea5afdf70b"}, + {file = "debugpy-1.8.6-cp311-cp311-win32.whl", hash = "sha256:cdaf0b9691879da2d13fa39b61c01887c34558d1ff6e5c30e2eb698f5384cd43"}, + {file = "debugpy-1.8.6-cp311-cp311-win_amd64.whl", hash = "sha256:43996632bee7435583952155c06881074b9a742a86cee74e701d87ca532fe833"}, + {file = "debugpy-1.8.6-cp312-cp312-macosx_14_0_universal2.whl", hash = "sha256:db891b141fc6ee4b5fc6d1cc8035ec329cabc64bdd2ae672b4550c87d4ecb128"}, + {file = "debugpy-1.8.6-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:567419081ff67da766c898ccf21e79f1adad0e321381b0dfc7a9c8f7a9347972"}, + {file = "debugpy-1.8.6-cp312-cp312-win32.whl", hash = "sha256:c9834dfd701a1f6bf0f7f0b8b1573970ae99ebbeee68314116e0ccc5c78eea3c"}, + {file = "debugpy-1.8.6-cp312-cp312-win_amd64.whl", hash = "sha256:e4ce0570aa4aca87137890d23b86faeadf184924ad892d20c54237bcaab75d8f"}, + {file = "debugpy-1.8.6-cp38-cp38-macosx_14_0_x86_64.whl", hash = "sha256:df5dc9eb4ca050273b8e374a4cd967c43be1327eeb42bfe2f58b3cdfe7c68dcb"}, + {file = "debugpy-1.8.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0a85707c6a84b0c5b3db92a2df685b5230dd8fb8c108298ba4f11dba157a615a"}, + {file = "debugpy-1.8.6-cp38-cp38-win32.whl", hash = "sha256:538c6cdcdcdad310bbefd96d7850be1cd46e703079cc9e67d42a9ca776cdc8a8"}, + {file = "debugpy-1.8.6-cp38-cp38-win_amd64.whl", hash = "sha256:22140bc02c66cda6053b6eb56dfe01bbe22a4447846581ba1dd6df2c9f97982d"}, + {file = "debugpy-1.8.6-cp39-cp39-macosx_14_0_x86_64.whl", hash = "sha256:c1cef65cffbc96e7b392d9178dbfd524ab0750da6c0023c027ddcac968fd1caa"}, + {file = "debugpy-1.8.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f1e60bd06bb3cc5c0e957df748d1fab501e01416c43a7bdc756d2a992ea1b881"}, + {file = "debugpy-1.8.6-cp39-cp39-win32.whl", hash = "sha256:f7158252803d0752ed5398d291dee4c553bb12d14547c0e1843ab74ee9c31123"}, + {file = "debugpy-1.8.6-cp39-cp39-win_amd64.whl", hash = "sha256:3358aa619a073b620cd0d51d8a6176590af24abcc3fe2e479929a154bf591b51"}, + {file = "debugpy-1.8.6-py2.py3-none-any.whl", hash = "sha256:b48892df4d810eff21d3ef37274f4c60d32cdcafc462ad5647239036b0f0649f"}, + {file = "debugpy-1.8.6.zip", hash = "sha256:c931a9371a86784cee25dec8d65bc2dc7a21f3f1552e3833d9ef8f919d22280a"}, ] [[package]] From 004fb105ed06682aae340c3f7484daf65a3d0c68 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:33:59 +0200 Subject: [PATCH 06/18] website: bump @types/react from 18.3.8 to 18.3.9 in /website (#11502) Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.3.8 to 18.3.9. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- website/package-lock.json | 8 ++++---- website/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/package-lock.json b/website/package-lock.json index 5d32cc61422a..dc02cd3a6489 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -34,7 +34,7 @@ "@docusaurus/module-type-aliases": "^3.3.2", "@docusaurus/tsconfig": "^3.5.2", "@docusaurus/types": "^3.3.2", - "@types/react": "^18.3.8", + "@types/react": "^18.3.9", "cross-env": "^7.0.3", "lockfile-lint": "^4.14.0", "prettier": "3.3.3", @@ -3763,9 +3763,9 @@ "license": "MIT" }, "node_modules/@types/react": { - "version": "18.3.8", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.8.tgz", - "integrity": "sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q==", + "version": "18.3.9", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.9.tgz", + "integrity": "sha512-+BpAVyTpJkNWWSSnaLBk6ePpHLOGJKnEQNbINNovPWzvEUyAe3e+/d494QdEh71RekM/qV7lw6jzf1HGrJyAtQ==", "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" diff --git a/website/package.json b/website/package.json index f75c9a751bd6..48d8f7764cf8 100644 --- a/website/package.json +++ b/website/package.json @@ -54,7 +54,7 @@ "@docusaurus/module-type-aliases": "^3.3.2", "@docusaurus/tsconfig": "^3.5.2", "@docusaurus/types": "^3.3.2", - "@types/react": "^18.3.8", + "@types/react": "^18.3.9", "cross-env": "^7.0.3", "lockfile-lint": "^4.14.0", "prettier": "3.3.3", From c958df9e7c64e3068f054374f1aca53b475848d1 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:02:20 +0200 Subject: [PATCH 07/18] translate: Updates for file locale/en/LC_MESSAGES/django.po in zh-Hans (#11519) Translate django.po in zh-Hans 100% translated source file: 'django.po' on 'zh-Hans'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- locale/zh-Hans/LC_MESSAGES/django.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/locale/zh-Hans/LC_MESSAGES/django.po b/locale/zh-Hans/LC_MESSAGES/django.po index e155b1110923..51b0dbff708b 100644 --- a/locale/zh-Hans/LC_MESSAGES/django.po +++ b/locale/zh-Hans/LC_MESSAGES/django.po @@ -15,7 +15,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-08 00:09+0000\n" +"POT-Creation-Date: 2024-09-25 00:08+0000\n" "PO-Revision-Date: 2022-09-26 16:47+0000\n" "Last-Translator: deluxghost, 2024\n" "Language-Team: Chinese Simplified (https://app.transifex.com/authentik/teams/119923/zh-Hans/)\n" @@ -1882,6 +1882,10 @@ msgstr "创建一个密钥,可用于恢复对 authentik 的访问权限。" msgid "Used recovery-link to authenticate." msgstr "已使用恢复链接进行身份验证。" +#: authentik/sources/ldap/api.py +msgid "Only a single LDAP Source with password synchronization is allowed" +msgstr "仅允许使用密码同步的单个 LDAP 源" + #: authentik/sources/ldap/models.py msgid "Server URI" msgstr "服务器 URI" From 51065b415e44fcd66fe08078ea7a3eca62847bff Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:02:34 +0200 Subject: [PATCH 08/18] translate: Updates for file web/xliff/en.xlf in zh-Hans (#11518) Translate web/xliff/en.xlf in zh-Hans 100% translated source file: 'web/xliff/en.xlf' on 'zh-Hans'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- web/xliff/zh-Hans.xlf | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/web/xliff/zh-Hans.xlf b/web/xliff/zh-Hans.xlf index f1abb3db9c58..0b7b29525e0b 100644 --- a/web/xliff/zh-Hans.xlf +++ b/web/xliff/zh-Hans.xlf @@ -1,4 +1,4 @@ - + @@ -596,9 +596,9 @@ - The URL "" was not found. - 未找到 URL " - "。 + The URL "" was not found. + 未找到 URL " + "。 @@ -1030,8 +1030,8 @@ - To allow any redirect URI, set this value to ".*". Be aware of the possible security implications this can have. - 要允许任何重定向 URI,请将此值设置为 ".*"。请注意这可能带来的安全影响。 + To allow any redirect URI, set this value to ".*". Be aware of the possible security implications this can have. + 要允许任何重定向 URI,请将此值设置为 ".*"。请注意这可能带来的安全影响。 @@ -1752,8 +1752,8 @@ - Either input a full URL, a relative path, or use 'fa://fa-test' to use the Font Awesome icon "fa-test". - 输入完整 URL、相对路径,或者使用 'fa://fa-test' 来使用 Font Awesome 图标 "fa-test"。 + Either input a full URL, a relative path, or use 'fa://fa-test' to use the Font Awesome icon "fa-test". + 输入完整 URL、相对路径,或者使用 'fa://fa-test' 来使用 Font Awesome 图标 "fa-test"。 @@ -2916,8 +2916,8 @@ doesn't pass when either or both of the selected options are equal or above the - Field which contains members of a group. Note that if using the "memberUid" field, the value is assumed to contain a relative distinguished name. e.g. 'memberUid=some-user' instead of 'memberUid=cn=some-user,ou=groups,...' - 包含组成员的字段。请注意,如果使用 "memberUid" 字段,则假定该值包含相对可分辨名称。例如,'memberUid=some-user' 而不是 'memberUid=cn=some-user,ou=groups,...' + Field which contains members of a group. Note that if using the "memberUid" field, the value is assumed to contain a relative distinguished name. e.g. 'memberUid=some-user' instead of 'memberUid=cn=some-user,ou=groups,...' + 包含组成员的字段。请注意,如果使用 "memberUid" 字段,则假定该值包含相对可分辨名称。例如,'memberUid=some-user' 而不是 'memberUid=cn=some-user,ou=groups,...' @@ -3663,8 +3663,8 @@ doesn't pass when either or both of the selected options are equal or above the - When using an external logging solution for archiving, this can be set to "minutes=5". - 使用外部日志记录解决方案进行存档时,可以将其设置为 "minutes=5"。 + When using an external logging solution for archiving, this can be set to "minutes=5". + 使用外部日志记录解决方案进行存档时,可以将其设置为 "minutes=5"。 @@ -3840,10 +3840,10 @@ doesn't pass when either or both of the selected options are equal or above the - Are you sure you want to update ""? + Are you sure you want to update ""? 您确定要更新 - " - " 吗? + " + " 吗? @@ -4919,7 +4919,7 @@ doesn't pass when either or both of the selected options are equal or above the - A "roaming" authenticator, like a YubiKey + A "roaming" authenticator, like a YubiKey 像 YubiKey 这样的“漫游”身份验证器 @@ -5298,7 +5298,7 @@ doesn't pass when either or both of the selected options are equal or above the - If set to a duration above 0, the user will have the option to choose to "stay signed in", which will extend their session by the time specified here. + If set to a duration above 0, the user will have the option to choose to "stay signed in", which will extend their session by the time specified here. 如果设置时长大于 0,用户可以选择“保持登录”选项,这将使用户的会话延长此处设置的时间。 @@ -7722,7 +7722,7 @@ Bindings to groups/users are checked against the user of the event. 成功创建用户并添加到组 - This user will be added to the group "". + This user will be added to the group "". 此用户将会被添加到组 &quot;&quot;。 @@ -9084,7 +9084,7 @@ Bindings to groups/users are checked against the user of the event. 同步组 - ("", of type ) + ("", of type ) (&quot;&quot;,类型为 @@ -9093,7 +9093,8 @@ Bindings to groups/users are checked against the user of the event. Parent Group + 父组 - + \ No newline at end of file From b7b9bd4fbe9557790dc265fadaa75f06322f3421 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:02:43 +0200 Subject: [PATCH 09/18] core: bump twilio from 9.3.1 to 9.3.2 (#11515) Bumps [twilio](https://github.com/twilio/twilio-python) from 9.3.1 to 9.3.2. - [Release notes](https://github.com/twilio/twilio-python/releases) - [Changelog](https://github.com/twilio/twilio-python/blob/main/CHANGES.md) - [Commits](https://github.com/twilio/twilio-python/compare/9.3.1...9.3.2) --- updated-dependencies: - dependency-name: twilio dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index b223a6dd8405..6e7be8bba493 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4667,13 +4667,13 @@ wsproto = ">=0.14" [[package]] name = "twilio" -version = "9.3.1" +version = "9.3.2" description = "Twilio API client and TwiML generator" optional = false python-versions = ">=3.7.0" files = [ - {file = "twilio-9.3.1-py2.py3-none-any.whl", hash = "sha256:48c714e5a1340a3d9001d6c9ccd107434c340ff94a5bc1bfb2473d3dc33f5051"}, - {file = "twilio-9.3.1.tar.gz", hash = "sha256:bd754371353855438a8cf0c38f54580d474afe9655af2d81edb6dbabd8d785c4"}, + {file = "twilio-9.3.2-py2.py3-none-any.whl", hash = "sha256:7fcb2da241d2264b17fbab9ac0ca829c0f0abe23ce6db15d4bb0d4d2d583f953"}, + {file = "twilio-9.3.2.tar.gz", hash = "sha256:250fc6ce6960aa97a2e2ee7e718e3bc0e73d69731b97fe160ed2097f3cbeb5a8"}, ] [package.dependencies] From 5655b9c2bf02ceed73114858dafa2ab167501782 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:02:56 +0200 Subject: [PATCH 10/18] translate: Updates for file web/xliff/en.xlf in zh_CN (#11517) Translate web/xliff/en.xlf in zh_CN 100% translated source file: 'web/xliff/en.xlf' on 'zh_CN'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- web/xliff/zh_CN.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/xliff/zh_CN.xlf b/web/xliff/zh_CN.xlf index 66e188c37ac8..9754482e2f9f 100644 --- a/web/xliff/zh_CN.xlf +++ b/web/xliff/zh_CN.xlf @@ -9090,6 +9090,10 @@ Bindings to groups/users are checked against the user of the event. authentik was unable to save this application: authentik 无法保存此应用程序: + + + Parent Group + 父组 From bb4d7adfd1d65339812823c2e32946e7ee692e62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:03:06 +0200 Subject: [PATCH 11/18] web: bump @types/jquery from 3.5.30 to 3.5.31 in /web/sfe (#11514) Bumps [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery) from 3.5.30 to 3.5.31. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery) --- updated-dependencies: - dependency-name: "@types/jquery" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/sfe/package-lock.json | 8 ++++---- web/sfe/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/sfe/package-lock.json b/web/sfe/package-lock.json index 4dfbdfee78de..7c2421ca80b8 100644 --- a/web/sfe/package-lock.json +++ b/web/sfe/package-lock.json @@ -22,7 +22,7 @@ "@rollup/plugin-swc": "^0.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.7.28", - "@types/jquery": "^3.5.30", + "@types/jquery": "^3.5.31", "rollup": "^4.22.4", "rollup-plugin-copy": "^3.5.0" } @@ -739,9 +739,9 @@ "dev": true }, "node_modules/@types/jquery": { - "version": "3.5.30", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.30.tgz", - "integrity": "sha512-nbWKkkyb919DOUxjmRVk8vwtDb0/k8FKncmUKFi+NY+QXqWltooxTrswvz4LspQwxvLdvzBN1TImr6cw3aQx2A==", + "version": "3.5.31", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.31.tgz", + "integrity": "sha512-rf/iB+cPJ/YZfMwr+FVuQbm7IaWC4y3FVYfVDxRGqmUCFjjPII0HWaP0vTPJGp6m4o13AXySCcMbWfrWtBFAKw==", "dev": true, "dependencies": { "@types/sizzle": "*" diff --git a/web/sfe/package.json b/web/sfe/package.json index 5ea339bfe074..2be645f958d7 100644 --- a/web/sfe/package.json +++ b/web/sfe/package.json @@ -21,7 +21,7 @@ "@rollup/plugin-swc": "^0.4.0", "@swc/cli": "^0.4.0", "@swc/core": "^1.7.28", - "@types/jquery": "^3.5.30", + "@types/jquery": "^3.5.31", "rollup": "^4.22.4", "rollup-plugin-copy": "^3.5.0" } From ec90b668a1cdfa7dd1908af415df67ec2babb74a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:03:15 +0200 Subject: [PATCH 12/18] web: bump @types/jquery from 3.5.30 to 3.5.31 in /web (#11513) Bumps [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery) from 3.5.30 to 3.5.31. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery) --- updated-dependencies: - dependency-name: "@types/jquery" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/package-lock.json | 9 ++++----- web/packages/sfe/package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 7f3a5888f176..2a8a8bdbb008 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -10260,11 +10260,10 @@ } }, "node_modules/@types/jquery": { - "version": "3.5.30", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.30.tgz", - "integrity": "sha512-nbWKkkyb919DOUxjmRVk8vwtDb0/k8FKncmUKFi+NY+QXqWltooxTrswvz4LspQwxvLdvzBN1TImr6cw3aQx2A==", + "version": "3.5.31", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.31.tgz", + "integrity": "sha512-rf/iB+cPJ/YZfMwr+FVuQbm7IaWC4y3FVYfVDxRGqmUCFjjPII0HWaP0vTPJGp6m4o13AXySCcMbWfrWtBFAKw==", "dev": true, - "license": "MIT", "dependencies": { "@types/sizzle": "*" } @@ -30312,7 +30311,7 @@ "@swc/cli": "^0.4.0", "@swc/core": "^1.7.28", "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "@types/jquery": "^3.5.30", + "@types/jquery": "^3.5.31", "lockfile-lint": "^4.14.0", "prettier": "^3.3.2", "rollup": "^4.22.4", diff --git a/web/packages/sfe/package.json b/web/packages/sfe/package.json index d1df86ec6d7e..8a7dc778b6fe 100644 --- a/web/packages/sfe/package.json +++ b/web/packages/sfe/package.json @@ -16,7 +16,7 @@ "@swc/cli": "^0.4.0", "@swc/core": "^1.7.28", "@trivago/prettier-plugin-sort-imports": "^4.3.0", - "@types/jquery": "^3.5.30", + "@types/jquery": "^3.5.31", "lockfile-lint": "^4.14.0", "prettier": "^3.3.2", "rollup": "^4.22.4", From 6bfa0f7d7b91dc9626ff343ae8773d224d18ae20 Mon Sep 17 00:00:00 2001 From: "transifex-integration[bot]" <43880903+transifex-integration[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:03:28 +0200 Subject: [PATCH 13/18] translate: Updates for file locale/en/LC_MESSAGES/django.po in zh_CN (#11516) Translate locale/en/LC_MESSAGES/django.po in zh_CN 100% translated source file: 'locale/en/LC_MESSAGES/django.po' on 'zh_CN'. Co-authored-by: transifex-integration[bot] <43880903+transifex-integration[bot]@users.noreply.github.com> --- locale/zh_CN/LC_MESSAGES/django.po | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/locale/zh_CN/LC_MESSAGES/django.po b/locale/zh_CN/LC_MESSAGES/django.po index 183937a6d43c..406f5babd648 100644 --- a/locale/zh_CN/LC_MESSAGES/django.po +++ b/locale/zh_CN/LC_MESSAGES/django.po @@ -14,7 +14,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-09-08 00:09+0000\n" +"POT-Creation-Date: 2024-09-25 00:08+0000\n" "PO-Revision-Date: 2022-09-26 16:47+0000\n" "Last-Translator: deluxghost, 2024\n" "Language-Team: Chinese (China) (https://app.transifex.com/authentik/teams/119923/zh_CN/)\n" @@ -1881,6 +1881,10 @@ msgstr "创建一个密钥,可用于恢复对 authentik 的访问权限。" msgid "Used recovery-link to authenticate." msgstr "已使用恢复链接进行身份验证。" +#: authentik/sources/ldap/api.py +msgid "Only a single LDAP Source with password synchronization is allowed" +msgstr "仅允许使用密码同步的单个 LDAP 源" + #: authentik/sources/ldap/models.py msgid "Server URI" msgstr "服务器 URI" From 1168856d331b10675d529fda88ced542ed7c77ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:03:39 +0200 Subject: [PATCH 14/18] web: bump @types/node from 22.7.0 to 22.7.2 in /web (#11511) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.0 to 22.7.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/package-lock.json | 8 ++++---- web/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 2a8a8bdbb008..1799f08e11ea 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -83,7 +83,7 @@ "@types/eslint__js": "^8.42.3", "@types/grecaptcha": "^3.0.9", "@types/guacamole-common-js": "1.5.2", - "@types/node": "^22.7.0", + "@types/node": "^22.7.2", "@types/showdown": "^2.0.6", "@typescript-eslint/eslint-plugin": "^8.7.0", "@typescript-eslint/parser": "^8.7.0", @@ -10326,9 +10326,9 @@ } }, "node_modules/@types/node": { - "version": "22.7.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.0.tgz", - "integrity": "sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw==", + "version": "22.7.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.2.tgz", + "integrity": "sha512-866lXSrpGpgyHBZUa2m9YNWqHDjjM0aBTJlNtYaGEw4rqY/dcD7deRVTbBBAJelfA7oaGDbNftXF/TL/A6RgoA==", "dev": true, "dependencies": { "undici-types": "~6.19.2" diff --git a/web/package.json b/web/package.json index 1f5911421405..80437af5ca71 100644 --- a/web/package.json +++ b/web/package.json @@ -71,7 +71,7 @@ "@types/eslint__js": "^8.42.3", "@types/grecaptcha": "^3.0.9", "@types/guacamole-common-js": "1.5.2", - "@types/node": "^22.7.0", + "@types/node": "^22.7.2", "@types/showdown": "^2.0.6", "@typescript-eslint/eslint-plugin": "^8.7.0", "@typescript-eslint/parser": "^8.7.0", From 48f3abfd911caddd6e872d0cf6f4eef8703dfcd4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:03:48 +0200 Subject: [PATCH 15/18] web: bump @sentry/browser from 8.31.0 to 8.32.0 in /web in the sentry group across 1 directory (#11510) web: bump @sentry/browser in /web in the sentry group across 1 directory Bumps the sentry group with 1 update in the /web directory: [@sentry/browser](https://github.com/getsentry/sentry-javascript). Updates `@sentry/browser` from 8.31.0 to 8.32.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/8.32.0/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/8.31.0...8.32.0) --- updated-dependencies: - dependency-name: "@sentry/browser" dependency-type: direct:production update-type: version-update:semver-minor dependency-group: sentry ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/package-lock.json | 98 +++++++++++++++++++++---------------------- web/package.json | 2 +- 2 files changed, 50 insertions(+), 50 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 1799f08e11ea..9f345aafa70d 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -31,7 +31,7 @@ "@open-wc/lit-helpers": "^0.7.0", "@patternfly/elements": "^4.0.1", "@patternfly/patternfly": "^4.224.2", - "@sentry/browser": "^8.31.0", + "@sentry/browser": "^8.32.0", "@webcomponents/webcomponentsjs": "^2.8.0", "base64-js": "^1.5.1", "chart.js": "^4.4.4", @@ -6904,102 +6904,102 @@ "license": "MIT" }, "node_modules/@sentry-internal/browser-utils": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.31.0.tgz", - "integrity": "sha512-Bq7TFMhPr1PixRGYkB/6ar9ws7sj224XzQ+hgpz6OxGEc9fQakvD8t/Nn7dp14k3FI/hcBRA6BBvpOKUUuPgGA==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.32.0.tgz", + "integrity": "sha512-DpUGhk5O1OVjT0fo9wsbEdO1R/S9gGBRDtn9+FFVeRtieJHwXpeZiLK+tZhTOvaILmtSoTPUEY3L5sK4j5Xq9g==", "dependencies": { - "@sentry/core": "8.31.0", - "@sentry/types": "8.31.0", - "@sentry/utils": "8.31.0" + "@sentry/core": "8.32.0", + "@sentry/types": "8.32.0", + "@sentry/utils": "8.32.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/feedback": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.31.0.tgz", - "integrity": "sha512-R3LcC2IaTe8lgi5AU9h0rMgyVPpaTiMSLRhRlVeQPVmAKCz8pSG/um13q37t0BsXpTaImW9yYQ71Aj6h6IrShQ==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.32.0.tgz", + "integrity": "sha512-XB7hiVJQW1tNzpoXIHbvm3rjipIt7PZiJJtFg2vxaqu/FzdgOcYqQiwIKivJVAKuRZ9rIeJtK1jdXQFOc/TRJA==", "dependencies": { - "@sentry/core": "8.31.0", - "@sentry/types": "8.31.0", - "@sentry/utils": "8.31.0" + "@sentry/core": "8.32.0", + "@sentry/types": "8.32.0", + "@sentry/utils": "8.32.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.31.0.tgz", - "integrity": "sha512-r8hmFDwWxeAxpdzBCRWTKQ/QHl8QanFw8XfM0fvFes/H1d/b43Vwc/IiUnsYoMOdooIP8hJFGDKlfq+Y5uVVGA==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.32.0.tgz", + "integrity": "sha512-yiEUnn2yyo1AIQIFNeRX3tdK8fmyKIkxdFS1WiVQmeYI/hFwYBTZPly0FcO/g3xnRMSA2tvrS+hZEaaXfK4WhA==", "dependencies": { - "@sentry-internal/browser-utils": "8.31.0", - "@sentry/core": "8.31.0", - "@sentry/types": "8.31.0", - "@sentry/utils": "8.31.0" + "@sentry-internal/browser-utils": "8.32.0", + "@sentry/core": "8.32.0", + "@sentry/types": "8.32.0", + "@sentry/utils": "8.32.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry-internal/replay-canvas": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.31.0.tgz", - "integrity": "sha512-ConyrhWozx4HluRj0+9teN4XTC1ndXjxMdJQvDnbLFsQhCCEdwUfaZVshV1CFe9T08Bfyjruaw33yR7pDXYktw==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.32.0.tgz", + "integrity": "sha512-oBbhtDBkD+5z/T0NVJ5VenBWAid/S9QdVrod/UqxVqU7F8N+E9/INFQI48zCWr4iVlUMcszJPDElvJEsMDvvBQ==", "dependencies": { - "@sentry-internal/replay": "8.31.0", - "@sentry/core": "8.31.0", - "@sentry/types": "8.31.0", - "@sentry/utils": "8.31.0" + "@sentry-internal/replay": "8.32.0", + "@sentry/core": "8.32.0", + "@sentry/types": "8.32.0", + "@sentry/utils": "8.32.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/browser": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.31.0.tgz", - "integrity": "sha512-LZK0uLPGB4Al+qWc1eaad+H/1SR6CY9a0V2XWpUbNAT3+VkEo0Z/78bW1kb43N0cok87hNPOe+c66SfwdxphVQ==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.32.0.tgz", + "integrity": "sha512-AEKFj64g4iYwEMRvVcxiY0FswmClRXCP1IEvCqujn8OBS8AjMOr1z/RwYieEs0D90yNNB3YEqF8adrKENblJmw==", "dependencies": { - "@sentry-internal/browser-utils": "8.31.0", - "@sentry-internal/feedback": "8.31.0", - "@sentry-internal/replay": "8.31.0", - "@sentry-internal/replay-canvas": "8.31.0", - "@sentry/core": "8.31.0", - "@sentry/types": "8.31.0", - "@sentry/utils": "8.31.0" + "@sentry-internal/browser-utils": "8.32.0", + "@sentry-internal/feedback": "8.32.0", + "@sentry-internal/replay": "8.32.0", + "@sentry-internal/replay-canvas": "8.32.0", + "@sentry/core": "8.32.0", + "@sentry/types": "8.32.0", + "@sentry/utils": "8.32.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/core": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.31.0.tgz", - "integrity": "sha512-5zsMBOML18e5a/ZoR5XpcYF59e2kSxb6lTg13u52f/+NA27EPgxKgXim5dz6L/6+0cizgwwmFaZFGJiFc2qoAA==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.32.0.tgz", + "integrity": "sha512-+xidTr0lZ0c755tq4k75dXPEb8PA+qvIefW3U9+dQMORLokBrYoKYMf5zZTG2k/OfSJS6OSxatUj36NFuCs3aA==", "dependencies": { - "@sentry/types": "8.31.0", - "@sentry/utils": "8.31.0" + "@sentry/types": "8.32.0", + "@sentry/utils": "8.32.0" }, "engines": { "node": ">=14.18" } }, "node_modules/@sentry/types": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.31.0.tgz", - "integrity": "sha512-prRM/n5nlP+xQZSpdEkSR8BwwZtgsLk0NbI8eCjTMu2isVlrlggop8pVaJb7y9HmElVtDA1Q6y4u8TD2htQKFQ==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.32.0.tgz", + "integrity": "sha512-hxckvN2MzS5SgGDgVQ0/QpZXk13Vrq4BtZLwXhPhyeTmZtUiUfWvcL5TFQqLinfKdTKPe9q2MxeAJ0D4LalhMg==", "engines": { "node": ">=14.18" } }, "node_modules/@sentry/utils": { - "version": "8.31.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.31.0.tgz", - "integrity": "sha512-9W2LZ9QIHKc0HSyH/7UmTolc01Q4vX/qMSZk7i1noinlkQtnRUmTP39r1DSITjKCrDHj6zvB/J1RPDUoRcTXxQ==", + "version": "8.32.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.32.0.tgz", + "integrity": "sha512-t1WVERhgmYURxbBj9J4/H2P2X+VKqm7B3ce9iQyrZbdf5NekhcU4jHIecPUWCPHjQkFIqkVTorqeBmDTlg/UmQ==", "dependencies": { - "@sentry/types": "8.31.0" + "@sentry/types": "8.32.0" }, "engines": { "node": ">=14.18" diff --git a/web/package.json b/web/package.json index 80437af5ca71..7c76299eb7cf 100644 --- a/web/package.json +++ b/web/package.json @@ -19,7 +19,7 @@ "@open-wc/lit-helpers": "^0.7.0", "@patternfly/elements": "^4.0.1", "@patternfly/patternfly": "^4.224.2", - "@sentry/browser": "^8.31.0", + "@sentry/browser": "^8.32.0", "@webcomponents/webcomponentsjs": "^2.8.0", "base64-js": "^1.5.1", "chart.js": "^4.4.4", From 4fbc13ad819453081339cbdaed2442fb628bc69e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:04:05 +0200 Subject: [PATCH 16/18] web: bump ts-pattern from 5.3.1 to 5.4.0 in /web (#11512) Bumps [ts-pattern](https://github.com/gvergnaud/ts-pattern) from 5.3.1 to 5.4.0. - [Release notes](https://github.com/gvergnaud/ts-pattern/releases) - [Commits](https://github.com/gvergnaud/ts-pattern/compare/v5.3.1...v5.4.0) --- updated-dependencies: - dependency-name: ts-pattern dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- web/package-lock.json | 9 ++++----- web/package.json | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/web/package-lock.json b/web/package-lock.json index 9f345aafa70d..8fb8eaa617f4 100644 --- a/web/package-lock.json +++ b/web/package-lock.json @@ -48,7 +48,7 @@ "rapidoc": "^9.3.6", "showdown": "^2.1.0", "style-mod": "^4.1.2", - "ts-pattern": "^5.3.1", + "ts-pattern": "^5.4.0", "webcomponent-qr-code": "^1.2.0", "yaml": "^2.5.1" }, @@ -27340,10 +27340,9 @@ } }, "node_modules/ts-pattern": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.3.1.tgz", - "integrity": "sha512-1RUMKa8jYQdNfmnK4jyzBK3/PS/tnjcZ1CW0v1vWDeYe5RBklc/nquw03MEoB66hVBm4BnlCfmOqDVxHyT1DpA==", - "license": "MIT" + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/ts-pattern/-/ts-pattern-5.4.0.tgz", + "integrity": "sha512-hgfOMfjlrARCnYtGD/xEAkFHDXuSyuqjzFSltyQCbN689uNvoQL20TVN2XFcLMjfNuwSsQGU+xtH6MrjIwhwUg==" }, "node_modules/ts-simple-type": { "version": "2.0.0-next.0", diff --git a/web/package.json b/web/package.json index 7c76299eb7cf..e1801e81f735 100644 --- a/web/package.json +++ b/web/package.json @@ -36,7 +36,7 @@ "rapidoc": "^9.3.6", "showdown": "^2.1.0", "style-mod": "^4.1.2", - "ts-pattern": "^5.3.1", + "ts-pattern": "^5.4.0", "webcomponent-qr-code": "^1.2.0", "yaml": "^2.5.1" }, From ff53bccc0fa445882f3265e436266da187dd049e Mon Sep 17 00:00:00 2001 From: Bama <44502143+ObamaTheLlama114@users.noreply.github.com> Date: Thu, 26 Sep 2024 07:32:31 -0500 Subject: [PATCH 17/18] website/scripts/docsmg: final version (#11501) * add docsmg tool * moved to the correct scripts directory * removed test files * added install script and readme draft to docsmg * fix install script * fixed issues * Revert "fixed issues" This reverts commit a51192025fe2f981b641b141a0df10e22e11d42a. * Revert "Revert "fixed issues"" This reverts commit ab68918fea03c0b3ae9641f3e7e4fe75cf0a8542. * added dotenv and updated readme * fixed install script * update readme to ensure that new installers of rust have envs loaded * changed docsmg from using .env to docsmg.env * fixed docsmg to fix internal links in file * fixed docsmg migrate not making directories to file * fixed docsmg migrate trying to read pngs to string * did stuff * fix links * fix links 2 * fix links 3 * fix links * fix links * fix links * fix links * fix links * fixed docsmg migrate replacing links * fixed docsmg migrate replacing links * fixed docsmg migrate replacing links * fixed docsmg migrate replacing links * fixed links * update docsmg fixing links * update docsmg fixing links * update docsmg fixing links * update docsmg removing empty directories * remove changed docs * Revert "remove changed docs" This reverts commit 2e21a5bac866c806145f6822c4db319ef083e684. * remove changed docs * fixed readme --------- Signed-off-by: Tana M Berry Co-authored-by: Tana M Berry --- website/scripts/docsmg/Cargo.lock | 39 +++ website/scripts/docsmg/Cargo.toml | 1 + website/scripts/docsmg/README.md | 6 + website/scripts/docsmg/src/hackyfixes.rs | 24 ++ website/scripts/docsmg/src/links.rs | 34 +++ website/scripts/docsmg/src/main.rs | 2 + website/scripts/docsmg/src/migrate.rs | 279 +++++++++++++++++++--- website/scripts/docsmg/src/migratefile.rs | 1 + 8 files changed, 359 insertions(+), 27 deletions(-) create mode 100644 website/scripts/docsmg/src/hackyfixes.rs create mode 100644 website/scripts/docsmg/src/links.rs diff --git a/website/scripts/docsmg/Cargo.lock b/website/scripts/docsmg/Cargo.lock index f3168bd0346e..0ea7aef5e9c8 100644 --- a/website/scripts/docsmg/Cargo.lock +++ b/website/scripts/docsmg/Cargo.lock @@ -17,6 +17,15 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + [[package]] name = "anstream" version = "0.6.14" @@ -163,6 +172,7 @@ dependencies = [ "clap", "colored", "dotenv", + "regex", "tokio", ] @@ -250,6 +260,35 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "regex" +version = "1.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + [[package]] name = "rustc-demangle" version = "0.1.24" diff --git a/website/scripts/docsmg/Cargo.toml b/website/scripts/docsmg/Cargo.toml index c444efc53046..9a7e18c86119 100644 --- a/website/scripts/docsmg/Cargo.toml +++ b/website/scripts/docsmg/Cargo.toml @@ -10,4 +10,5 @@ anyhow = "1.0.86" clap = { version = "4.5.9", features = ["derive", "env"] } colored = "2.1.0" dotenv = "0.15.0" +regex = "1.10.6" tokio = "1.38.0" diff --git a/website/scripts/docsmg/README.md b/website/scripts/docsmg/README.md index 2fb48672c361..7a3ad9817e93 100644 --- a/website/scripts/docsmg/README.md +++ b/website/scripts/docsmg/README.md @@ -19,6 +19,12 @@ Use this migration tool to: ## Steps to use +1. Generate a migratefile with `docsmg generate >> migratefile` +2. Find the files you want to move in `migratefile` and insert the path you want to move them to after the arrow; ex `path/to/move/from/file.md -> path/to/move/to/file.md` Note: make sure to put spaces on either side of the arrow or that line won't be recognized +3. Once you have entered all the paths you want to move, migrate the files with `docsmg migrate` +4. To revert the migration, use `docsmg unmigrate`; Note: DO NOT edit the migrate file in between steps 3 and 4 +5. Repeat steps 2-4 until you are satisfied with the result + ### Create the mapping file (`migratefile`) 1. Navigate to the `authentik/website` dir. diff --git a/website/scripts/docsmg/src/hackyfixes.rs b/website/scripts/docsmg/src/hackyfixes.rs new file mode 100644 index 000000000000..f7c3ab02044d --- /dev/null +++ b/website/scripts/docsmg/src/hackyfixes.rs @@ -0,0 +1,24 @@ +use std::{ffi::OsStr, fs::{read_to_string, write}, path::PathBuf}; + +use crate::recurse_directory; + +pub fn add_extra_dot_dot_to_expression_mdx(migrate_path: PathBuf) { + let binding = recurse_directory(migrate_path); + let files = binding.iter().filter(|x| if let Some(i) = x.file_name() { + if Some("expression.mdx") == i.to_str() || Some("expressions.md") == i.to_str() { + true + } else { + false + } + } else { + false + }); + + for file in files { + let content = match read_to_string(file) { + Ok(i) => i, + _ => continue, + }; + let _ = write(file, content.replace("../expressions", "../../expressions")); + } +} diff --git a/website/scripts/docsmg/src/links.rs b/website/scripts/docsmg/src/links.rs new file mode 100644 index 000000000000..26d61d9468b2 --- /dev/null +++ b/website/scripts/docsmg/src/links.rs @@ -0,0 +1,34 @@ +use std::{fs::read_to_string, path::PathBuf}; + +use regex::{Captures, Regex}; + +use crate::recurse_directory; + +pub fn shorten_all_external_links(migrate_path: PathBuf) { + let files = recurse_directory(migrate_path.clone()); + for file in files { + let file = migrate_path.join(file); + let absolute_file = file.clone().canonicalize().unwrap(); + let contents = if let Ok(x) = read_to_string(file) { + x + } else { + continue; + }; + let re = Regex::new(r"\[(?.*)\]\((?.*)\)").unwrap(); + let captures: Vec = re.captures_iter(&contents).collect(); + for capture in captures { + let link = &capture["link"]; + let link = PathBuf::from(link); + let absolute_link = absolute_file + .clone() + .parent() + .unwrap() + .join(link) + .canonicalize() + .unwrap(); + shorten_link_relative_to(absolute_link.clone(), absolute_file.clone()); + } + } +} + +fn shorten_link_relative_to(link_to_shorten: PathBuf, relative_to: PathBuf) {} diff --git a/website/scripts/docsmg/src/main.rs b/website/scripts/docsmg/src/main.rs index 2a2be1101601..b6ce1fedf17c 100644 --- a/website/scripts/docsmg/src/main.rs +++ b/website/scripts/docsmg/src/main.rs @@ -3,9 +3,11 @@ use std::{fs, path::PathBuf}; use clap::{Parser, Subcommand}; mod generate; +mod links; mod migrate; mod migratefile; mod r#move; +mod hackyfixes; #[derive(Parser)] struct Cli { diff --git a/website/scripts/docsmg/src/migrate.rs b/website/scripts/docsmg/src/migrate.rs index e2f0ab806a64..685929902571 100644 --- a/website/scripts/docsmg/src/migrate.rs +++ b/website/scripts/docsmg/src/migrate.rs @@ -1,12 +1,11 @@ use std::{ - ffi::OsStr, - fs::{read_to_string, write}, - path::PathBuf, + collections::{HashMap, HashSet, VecDeque}, env::consts::OS, ffi::OsStr, fs::{create_dir_all, read_to_string, remove_file, write, File}, path::{Component, PathBuf}, process::Command }; use colored::Colorize; +use regex::{Captures, Regex}; -use crate::{migratefile::read_migrate_file, recurse_directory}; +use crate::{hackyfixes::add_extra_dot_dot_to_expression_mdx, migratefile::read_migrate_file, recurse_directory, Cli}; pub fn migrate(quiet: bool, migratefile: PathBuf, migrate_path: PathBuf) { if !quiet { @@ -30,6 +29,13 @@ pub fn migrate(quiet: bool, migratefile: PathBuf, migrate_path: PathBuf) { replace_links(migrate_path.clone(), files.clone()); let successful_moves = move_files(quiet, migrate_path.clone(), files); add_redirects(successful_moves.clone(), migrate_path.clone()); + //shorten_all_external_links(migrate_path); + add_extra_dot_dot_to_expression_mdx(migrate_path.clone()); + let _ = Command::new("sh") + .arg("-c") + .arg("find . -empty -type d -delete") + .current_dir(migrate_path) + .output(); } pub fn unmigrate(quiet: bool, migratefile: PathBuf, migrate_path: PathBuf) { @@ -58,7 +64,8 @@ pub fn unmigrate(quiet: bool, migratefile: PathBuf, migrate_path: PathBuf) { .iter() .map(|x| (x.1.clone(), x.0.clone())) .collect(); //switch files to reverse a migration - remove_redirects(successful_moves, migrate_path); + remove_redirects(successful_moves, migrate_path.clone()); + //shorten_all_external_links(migrate_path); } fn move_files( @@ -95,44 +102,262 @@ fn move_files( successful_moves } -fn replace_links(migrate_path: PathBuf, successful_moves: Vec<(PathBuf, PathBuf)>) { +fn replace_links(migrate_path: PathBuf, moves: Vec<(PathBuf, PathBuf)>) { let files = recurse_directory(migrate_path.clone()); + let mut moved = HashSet::new(); + + let mut absolute_moves = vec![]; + for r#move in &moves { + let r#move = ( + migrate_path.join(r#move.0.clone()), + migrate_path.join(r#move.1.clone()), + ); + let absolute_move_0 = r#move + .0 + .canonicalize() + .expect(&format!("{}", r#move.0.display())); + + let _ = create_dir_all(r#move.1.parent().unwrap()); + let tmp_file = File::create_new(&r#move.1); + let absolute_move_1 = r#move.1.clone().canonicalize().expect(&format!( + "{} {:?}", + r#move.1.display(), + tmp_file + )); + // delete file if it didnt already exist + if let Ok(_) = tmp_file { + let _ = remove_file(&r#move.1); + }; + absolute_moves.push((absolute_move_0, absolute_move_1)); + } + let absolute_moves = absolute_moves + .iter() + .map(|x| x.clone()) + .collect::>(); for file in files { - let relative_file = file - .strip_prefix(migrate_path.clone()) - .unwrap() - .to_path_buf(); + let absolute_file = file.canonicalize().unwrap(); + println!("{}", absolute_file.display()); let mut contents = match read_to_string(file.clone()) { Ok(i) => i, Err(_) => continue, }; - let mut replace = vec![]; - for successful_move in &successful_moves { - if migrate_path - .join(successful_move.0.clone()) + + // replace old absolute file with the new absolute file + let old_absolute_file = absolute_file.clone(); + let absolute_file = match absolute_moves.get(&absolute_file) { + Some(file) => { + println!(" new file: {}", file.display()); + moved.insert(absolute_file); + file.clone() + } + None => absolute_file.clone(), + }; + + // get all links in file and remove web links and link to self + let re = Regex::new(r"\[(?[\w \-\*'`]*)\]\((?[\w\-\\/\\.#]*)\)").unwrap(); + let tmp_contents = contents.clone(); + let captures: Vec = re + .captures_iter(&tmp_contents) + .filter(|x| { + let link = &x["link"]; + + !["http", "#", "/"] + .iter() + .fold(false, |acc, x| acc || link.starts_with(x)) + }) + .collect(); + println!(" captures: {}\n", captures.len()); + + for capture in captures { + let mut capture_log = String::new(); + let link = capture["link"].to_owned(); + let link_path; + + let link_postfix_index = link.find('#'); + + let link_postfix = match link_postfix_index { + Some(i) => { + let link_postfix = link[i..].to_owned(); + link_path = link[..i].to_owned(); + Some(link_postfix) + } + None => { + link_path = link.clone(); + None + }, + }; + + let absolute_link = old_absolute_file.parent().unwrap().join(link_path.clone()); + //let _ = create_dir_all(absolute_link.parent().unwrap()); + //let tmp_file = File::create_new(&absolute_link); + + let absolute_link = match absolute_link .canonicalize() - .unwrap() - == file.clone().canonicalize().unwrap() + .or(absolute_link.with_extension("md").canonicalize()) + .or(absolute_link.with_extension("mdx").canonicalize()) { + Ok(link) => link, + _ => { + println!( + " {}: {} -> {}", + "failed".red(), + absolute_file.to_string_lossy().to_string().red(), + absolute_link.to_string_lossy().to_string().red() + ); + continue; + } + }; + let absolute_link = if absolute_link.is_file() { + absolute_link + } else if absolute_link.join("index.md").is_file() { + absolute_link.join("index.md") + } else if absolute_link.join("index.mdx").is_file() { + absolute_link.join("index.mdx") + } else { + println!( + " {}: {} -> {}", + "failed".red(), + absolute_file.to_string_lossy().to_string().red(), + absolute_link.to_string_lossy().to_string().red() + ); + continue; + }; + // delete file if it didnt already exist + //if let Ok(_) = tmp_file { + // let _ = remove_file(&absolute_link); + //}; + capture_log.push_str(&format!(" oldalink: {}\n", absolute_link.display())); + + // replace old absolute link with the new absolute link + let absolute_link = match absolute_moves.get(&absolute_link) { + Some(link) => link.clone(), + None => absolute_link.clone(), + }; + + capture_log.push_str(&format!(" newalink: {}\n", absolute_link.display())); + + // create tmp absolutes and make them into components + let tmp_absolute_file = absolute_file.clone(); + let mut tmp_absolute_file = tmp_absolute_file.components().collect::>(); + let tmp_absolute_link = absolute_link.clone(); + let mut tmp_absolute_link = tmp_absolute_link.components().collect::>(); + // remove the shared path components + loop { + if tmp_absolute_file.front() != tmp_absolute_link.front() + || tmp_absolute_file.front() == None + { + break; + } + tmp_absolute_file.pop_front(); + tmp_absolute_link.pop_front(); + } + capture_log.push_str(&format!( + " shrtfile: {}\n", + tmp_absolute_file.iter().collect::().display() + )); + capture_log.push_str(&format!( + " shrtlink: {}\n", + tmp_absolute_link.iter().collect::().display() + )); + + if tmp_absolute_file.len() <= 0 { + println!( + " {}: {} -> {}", + "failed".red(), + absolute_file.to_string_lossy().to_string().red(), + absolute_link.to_string_lossy().to_string().red() + ); continue; } - let new_successful_move_from = - make_path_relative(successful_move.0.clone(), relative_file.clone()); - let new_successful_move_to = - make_path_relative(successful_move.1.clone(), relative_file.clone()); - replace.push((new_successful_move_from, new_successful_move_to)); - } - for i in replace { - contents = contents.replace( - &format!("({})", i.0.display()), - &format!("({})", i.1.display()), - ); + let escapes = (0..tmp_absolute_file.len() - 1) + .map(|_| Component::Normal("..".as_ref())) + .collect::(); + + let new_link = escapes.join(tmp_absolute_link.iter().collect::()); + // add a . to the begining if it doesnt already start with . or .. + let new_link = match new_link + .components() + .collect::>() + .first() + .iter() + .collect::() + .to_str() + { + Some(".") => new_link, + Some("..") => new_link, + _ => PathBuf::from(".").join(new_link), + }; + let mut new_link = new_link.to_string_lossy().to_string(); + match link_postfix { + Some(i) => new_link.push_str(&i), + None => {} + } + capture_log.push_str(&format!(" old link: {}\n", link)); + capture_log.push_str(&format!(" new link: {}\n", new_link)); + print!("{}", capture_log); + //println!("{} {} {}", absolute_file.display(), absolute_link.display(), new_link.display()); + let tmp_contents = contents.replace(&format!("({})", link), &format!("({})", new_link)); + if tmp_contents == contents { + println!("{}", " nothing replaced".yellow()); + } else { + contents = tmp_contents; + }; + println!(""); } + write(file, contents).unwrap(); } } +fn fix_internal_links_in_file(migrate_path: PathBuf, move_from: PathBuf, move_to: PathBuf) { + let move_from = migrate_path.join(move_from); + let move_to = migrate_path.join(move_to); + let contents = read_to_string(&move_from); + let mut contents = match contents { + Ok(ok) => ok, + Err(_) => return, + }; + let re = Regex::new(r"\[(?.*)\]\((?.*)\)").unwrap(); + let captures: Vec = re.captures_iter(&contents).collect(); + let mut changes = vec![]; + for capture in captures { + //let name = &capture["name"]; + let link = &capture["link"]; + if link.starts_with('#') || link.starts_with("http") { + continue; + } + let link = PathBuf::from(link); + //println!("{} {}", move_from.display(), link.display()); + let absolute_link = move_from + .parent() + .unwrap() + .canonicalize() + .unwrap() + .join(&link); + if move_to.components().collect::>().len() > 1 { + let _ = create_dir_all(move_to.parent().unwrap()); + } + let tmp_file = File::create_new(move_to.clone()); + //println!("{} {} {} {}", name, link.display(), absolute_link.display(), make_path_relative(absolute_link.clone(), move_to.canonicalize().unwrap().clone()).display()); + let new_link = make_path_relative( + absolute_link.clone(), + move_to.canonicalize().unwrap().clone(), + ); + if let Ok(_) = tmp_file { + remove_file(move_to.clone()).unwrap() + }; + changes.push((link.clone(), new_link.clone())); + } + for i in changes { + contents = contents.replace( + &format!("({})", i.0.display()), + &format!("({})", i.1.display()), + ); + } + write(move_from, contents).unwrap(); +} + fn make_path_relative(path: PathBuf, relative_to: PathBuf) -> PathBuf { let mut subdirs = 0; let path_components = path.components().collect::>(); diff --git a/website/scripts/docsmg/src/migratefile.rs b/website/scripts/docsmg/src/migratefile.rs index e6378b5c55d0..e7b24d65025e 100644 --- a/website/scripts/docsmg/src/migratefile.rs +++ b/website/scripts/docsmg/src/migratefile.rs @@ -10,6 +10,7 @@ pub fn read_migrate_file(file: PathBuf) -> anyhow::Result ")) + .filter(|x| !(x.0 == x.1)) .map(|x| { ( x.0.parse().expect("a valid path"), From 035648f0de7fa189379913daa0487938b72dcdad Mon Sep 17 00:00:00 2001 From: Marc 'risson' Schmitt Date: Thu, 26 Sep 2024 18:43:46 +0200 Subject: [PATCH 18/18] providers/oauth2: add indexes on tokens (#11524) --- ...n_authentik_p_token_4bc870_idx_and_more.py | 23 +++++++++++++++++++ authentik/providers/oauth2/models.py | 6 +++++ 2 files changed, 29 insertions(+) create mode 100644 authentik/providers/oauth2/migrations/0019_accesstoken_authentik_p_token_4bc870_idx_and_more.py diff --git a/authentik/providers/oauth2/migrations/0019_accesstoken_authentik_p_token_4bc870_idx_and_more.py b/authentik/providers/oauth2/migrations/0019_accesstoken_authentik_p_token_4bc870_idx_and_more.py new file mode 100644 index 000000000000..5e877bfbb5ca --- /dev/null +++ b/authentik/providers/oauth2/migrations/0019_accesstoken_authentik_p_token_4bc870_idx_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 5.0.9 on 2024-09-26 16:25 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_providers_oauth2", "0018_alter_accesstoken_expires_and_more"), + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.AddIndex( + model_name="accesstoken", + index=models.Index(fields=["token"], name="authentik_p_token_4bc870_idx"), + ), + migrations.AddIndex( + model_name="refreshtoken", + index=models.Index(fields=["token"], name="authentik_p_token_1a841f_idx"), + ), + ] diff --git a/authentik/providers/oauth2/models.py b/authentik/providers/oauth2/models.py index 9484d985149d..bab239d44d01 100644 --- a/authentik/providers/oauth2/models.py +++ b/authentik/providers/oauth2/models.py @@ -376,6 +376,9 @@ class AccessToken(SerializerModel, ExpiringModel, BaseGrantModel): _id_token = models.TextField() class Meta: + indexes = [ + models.Index(fields=["token"]), + ] verbose_name = _("OAuth2 Access Token") verbose_name_plural = _("OAuth2 Access Tokens") @@ -419,6 +422,9 @@ class RefreshToken(SerializerModel, ExpiringModel, BaseGrantModel): _id_token = models.TextField(verbose_name=_("ID Token")) class Meta: + indexes = [ + models.Index(fields=["token"]), + ] verbose_name = _("OAuth2 Refresh Token") verbose_name_plural = _("OAuth2 Refresh Tokens")