Bläddra i källkod

matrix-tuwunel: drop the removed LDAP name_attribute option

Tuwunel v1.9.0 removes `[global.ldap] name_attribute` and no longer checks
a secondary attribute for the localpart, so a directory entry must carry it
in `uid_attribute` to allow login.

A leftover key produces no boot warning, so the playbook reports it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
pull/5553/head
Slavi Pantaleev 1 dag sedan
förälder
incheckning
c075013553
3 ändrade filer med 9 tillägg och 2 borttagningar
  1. +0
    -1
      roles/custom/matrix-tuwunel/defaults/main.yml
  2. +9
    -0
      roles/custom/matrix-tuwunel/tasks/validate_config.yml
  3. +0
    -1
      roles/custom/matrix-tuwunel/templates/tuwunel.toml.j2

+ 0
- 1
roles/custom/matrix-tuwunel/defaults/main.yml Visa fil

@@ -331,7 +331,6 @@ matrix_tuwunel_config_ldap_bind_dn: ''
matrix_tuwunel_config_ldap_bind_password_file: ''
matrix_tuwunel_config_ldap_filter: '(objectClass=*)'
matrix_tuwunel_config_ldap_uid_attribute: 'uid'
matrix_tuwunel_config_ldap_name_attribute: 'givenName'
matrix_tuwunel_config_ldap_admin_base_dn: ''
matrix_tuwunel_config_ldap_admin_filter: ''



+ 9
- 0
roles/custom/matrix-tuwunel/tasks/validate_config.yml Visa fil

@@ -5,6 +5,15 @@

---

- name: (Deprecation) Catch and report renamed tuwunel variables
ansible.builtin.fail:
msg: >-
Your configuration contains a variable, which now has a different name.
Please rename the variable (`{{ item.old }}` -> `{{ item.new }}`) on your configuration file (vars.yml).
when: "lookup('ansible.builtin.varnames', ('^' + item.old + '$'), wantlist=True) | length > 0"
with_items:
- {'old': 'matrix_tuwunel_config_ldap_name_attribute', 'new': '<removed> (tuwunel v1.9.0 dropped the option; the localpart must appear in the attribute named by `matrix_tuwunel_config_ldap_uid_attribute`)'}

- name: Fail if required tuwunel settings not defined
ansible.builtin.fail:
msg: >-


+ 0
- 1
roles/custom/matrix-tuwunel/templates/tuwunel.toml.j2 Visa fil

@@ -194,7 +194,6 @@ bind_password_file = {{ matrix_tuwunel_config_ldap_bind_password_file | to_json
{% endif %}
filter = {{ matrix_tuwunel_config_ldap_filter | to_json }}
uid_attribute = {{ matrix_tuwunel_config_ldap_uid_attribute | to_json }}
name_attribute = {{ matrix_tuwunel_config_ldap_name_attribute | to_json }}
{% if matrix_tuwunel_config_ldap_admin_base_dn | length > 0 %}
admin_base_dn = {{ matrix_tuwunel_config_ldap_admin_base_dn | to_json }}
{% endif %}


Laddar…
Avbryt
Spara