Refactor LDAP variable schema to use top-level constant LDAP and nested ALL-CAPS keys.

- Converted group_vars/all/13_ldap.yml from lower-case to ALL-CAPS nested keys.
- Updated all roles, tasks, templates, and filter_plugins to reference LDAP.* instead of ldap.*.
- Fixed Keycloak JSON templates to properly quote Jinja variables.
- Adjusted svc-db-openldap filter plugins and unit tests to handle new LDAP structure.
- Updated integration test to only check uniqueness of TOP-LEVEL ALL-CAPS constants, ignoring nested keys.

See: https://chatgpt.com/share/68b01017-efe0-800f-a508-7d7e2f1c8c8d
This commit is contained in:
2025-08-28 10:15:48 +02:00
parent b9da6908ec
commit cb66fb2978
33 changed files with 238 additions and 249 deletions

View File

@@ -170,21 +170,21 @@ OAUTH2_REDIRECT=
# LDAP_SERVER=ldap.example.com
# LDAP_PORT=389
# LDAP_METHOD=plain
# LDAP_UID={{ ldap.user.attributes.id }}
# LDAP_UID={{ LDAP.USER.ATTRIBUTES.ID }}
# LDAP_BASE=dc=example,dc=com
# LDAP_AUTH=simple
# LDAP_BIND_DN=cn=admin,dc=example,dc=com
# LDAP_PASSWORD=password
# LDAP_ROLE_FIELD=ou
# LDAP_FILTER=(&(attr1=value1)(attr2=value2))
LDAP_SERVER="{{ ldap.server.domain }}"
LDAP_PORT="{{ ldap.server.port }}"
LDAP_SERVER="{{ LDAP.SERVER.DOMAIN }}"
LDAP_PORT="{{ LDAP.SERVER.PORT }}"
LDAP_METHOD=
LDAP_UID={{ ldap.user.attributes.id }}
LDAP_BASE="{{ ldap.dn.root }}"
LDAP_BIND_DN="{{ ldap.dn.administrator.data }}"
LDAP_UID={{ LDAP.USER.ATTRIBUTES.ID }}
LDAP_BASE="{{ LDAP.DN.ROOT }}"
LDAP_BIND_DN="{{ LDAP.DN.ADMINISTRATOR.DATA }}"
LDAP_AUTH=password
LDAP_PASSWORD="{{ ldap.bind_credential }}"
LDAP_PASSWORD="{{ LDAP.BIND_CREDENTIAL }}"
LDAP_ROLE_FIELD=
LDAP_FILTER=
{% endif %}