From 397dfc29f1df2bd389bede3cfbcb9a0cdf7dcbc5 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 5 Feb 2021 11:43:39 +0100 Subject: [PATCH] sources/ldap: change default object filters to use objectClass= instead of objectCategory --- .../migrations/0010_auto_20210205_1027.py | 29 +++++++++++++++++++ authentik/sources/ldap/models.py | 4 +-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 authentik/sources/ldap/migrations/0010_auto_20210205_1027.py diff --git a/authentik/sources/ldap/migrations/0010_auto_20210205_1027.py b/authentik/sources/ldap/migrations/0010_auto_20210205_1027.py new file mode 100644 index 000000000..4ef47a541 --- /dev/null +++ b/authentik/sources/ldap/migrations/0010_auto_20210205_1027.py @@ -0,0 +1,29 @@ +# Generated by Django 3.1.6 on 2021-02-05 10:27 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("authentik_sources_ldap", "0009_auto_20210204_1834"), + ] + + operations = [ + migrations.AlterField( + model_name="ldapsource", + name="group_object_filter", + field=models.TextField( + default="(objectClass=group)", + help_text="Consider Objects matching this filter to be Groups.", + ), + ), + migrations.AlterField( + model_name="ldapsource", + name="user_object_filter", + field=models.TextField( + default="(objectClass=person)", + help_text="Consider Objects matching this filter to be Users.", + ), + ), + ] diff --git a/authentik/sources/ldap/models.py b/authentik/sources/ldap/models.py index 6dfa45005..fd53b9fcb 100644 --- a/authentik/sources/ldap/models.py +++ b/authentik/sources/ldap/models.py @@ -38,14 +38,14 @@ class LDAPSource(Source): ) user_object_filter = models.TextField( - default="(objectCategory=Person)", + default="(objectClass=person)", help_text=_("Consider Objects matching this filter to be Users."), ) group_membership_field = models.TextField( default="member", help_text=_("Field which contains members of a group.") ) group_object_filter = models.TextField( - default="(objectCategory=Group)", + default="(objectClass=group)", help_text=_("Consider Objects matching this filter to be Groups."), ) object_uniqueness_field = models.TextField(