From 9ef9e846cb51f6f1a461dd1672f9ac3136b56cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20-=20Le=20Filament?= <remi@le-filament.com> Date: Tue, 5 Sep 2023 14:06:52 +0200 Subject: [PATCH] [FIX] replace deprecated password management --- README.md | 2 +- templates/traefik.toml.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d75793c..77bcc23 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Requirements ------------ This role requires Ansible collection community.docker -Also, this role requires passlib (either python package or python3-passlib apt package) for proper encryption of passwords +Also, this role requires passlib (either python package or python3-passlib apt package) for proper encryption of passwords and specific filter as per https://sources.le-filament.com/-/snippets/3. Role Variables -------------- diff --git a/templates/traefik.toml.j2 b/templates/traefik.toml.j2 index 2b725b0..23ba401 100644 --- a/templates/traefik.toml.j2 +++ b/templates/traefik.toml.j2 @@ -64,7 +64,7 @@ [http.middlewares.limit.buffering] retryExpression = "IsNetworkError() && Attempts() < 5" [http.middlewares.auth.basicAuth] - users = ["{{ host_user }}:{{ srv_proxy_pass | password_hash('apr_md5_crypt', 65534 | random(seed=inventory_hostname) | string) }}"] + users = ["{{ host_user }}:{{ srv_proxy_pass | apr_md5_passwd(65534 | random(seed=inventory_hostname) | string) }}"] [http.middlewares.smtp-stripprefix.stripprefix] prefixes = ["/smtp"] [http.middlewares.norobot-headers.headers] -- GitLab