diff --git a/authentik/lib/default.yml b/authentik/lib/default.yml index 0d1f15b62..45ffb3073 100644 --- a/authentik/lib/default.yml +++ b/authentik/lib/default.yml @@ -73,6 +73,7 @@ outposts: ldap: task_timeout_hours: 2 + page_size: 50 tls: ciphers: null diff --git a/authentik/sources/ldap/sync/base.py b/authentik/sources/ldap/sync/base.py index 235c7be26..97b1c381a 100644 --- a/authentik/sources/ldap/sync/base.py +++ b/authentik/sources/ldap/sync/base.py @@ -9,6 +9,7 @@ from structlog.stdlib import BoundLogger, get_logger from authentik.core.exceptions import PropertyMappingExpressionException from authentik.events.models import Event, EventAction +from authentik.lib.config import CONFIG from authentik.lib.merge import MERGE_LIST_UNIQUE from authentik.sources.ldap.auth import LDAP_DISTINGUISHED_NAME from authentik.sources.ldap.models import LDAPPropertyMapping, LDAPSource @@ -92,7 +93,7 @@ class BaseLDAPSynchronizer: types_only=False, get_operational_attributes=False, controls=None, - paged_size=5, + paged_size=int(CONFIG.y("ldap.page_size", 50)), paged_criticality=False, ): """Search in pages, returns each page""" diff --git a/website/docs/installation/configuration.md b/website/docs/installation/configuration.md index dd3fceb0e..71d83fe13 100644 --- a/website/docs/installation/configuration.md +++ b/website/docs/installation/configuration.md @@ -277,6 +277,16 @@ Timeout in hours for LDAP synchronization tasks. Defaults to `2`. +### `AUTHENTIK_LDAP__PAGE_SIZE` + +:::info +Requires authentik 2023.6.1 +::: + +Page size for LDAP synchronization. Controls the number of objects created in a single task. + +Defaults to `50`. + ### `AUTHENTIK_LDAP__TLS__CIPHERS` :::info