Implemented user_objects

This commit is contained in:
Kevin Veen-Birkenbach 2025-04-24 21:17:06 +02:00
parent 3203151e84
commit ec79cb8921
No known key found for this signature in database
GPG Key ID: 44D8F11FD62F878E
3 changed files with 9 additions and 5 deletions

View File

@ -65,4 +65,8 @@ ldap:
uri: "{% if applications.ldap.network.local | bool %}ldap://{{ applications.ldap.hostname }}{% else %}ldaps://{{ domains.ldap }}{% endif %}:{{ _ldap_server_port }}"
network:
local: "{{applications.ldap.network.local}}" # Uses the application configuration to define if local network should be available or not
user_objects:
- person # Basic person attributes (sn, cn …) RFC 4519
- inetOrgPerson # Extended Internet / intranet person RFC 2798
- posixAccount # POSIX/UNIX login attributes (uidNumber, gidNumber …) RFC 2307
- nextcloudUser # Nextcloud-specific auxiliary attributes (nextcloudQuota, nextcloudEnabled) Nextcloud schema

View File

@ -2070,7 +2070,7 @@
"false"
],
"userObjectClasses": [
"person, inetOrgPerson, nextcloudUser"
"{{ ldap.user_objects | join(', ') }}"
],
"rdnLDAPAttribute": [
"{{ldap.attributes.user_id}}"

View File

@ -16,9 +16,9 @@ description: Container for application access profiles
# Create User {{ username }}
#######################################################################
dn: {{ ldap.attributes.user_id }}={{ username }},{{ ldap.dn.users }}
objectClass: top
objectClass: inetOrgPerson
objectClass: posixAccount
{% for cls in ldap.user_objects %}
objectClass: {{ cls }}
{% endfor %}
{{ ldap.attributes.user_id }}: {{ username }}
sn: {{ username }}
cn: {{ username }}