From b79d42707c554b56b978cc68451e9062016ac6a5 Mon Sep 17 00:00:00 2001 From: Matthieu Lamalle Date: Tue, 24 Jan 2023 11:21:57 +0100 Subject: [PATCH] Ajout url de redireciton de logout pour hydra et hydra-oidc --- defaults/main.yml | 1 + templates/cadoles-pod-hydra-oidc-v1.conf.j2 | 3 ++- templates/cadoles-pod-hydra-v1.conf.j2 | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index eff7d6f..e05b7a7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -44,6 +44,7 @@ hydra_urls_consent: "{{ haproxy_public_base_url }}{{ haproxy_hydra_dispatcher_ba hydra_urls_login: "{{ haproxy_public_base_url }}{{ haproxy_hydra_dispatcher_base_path }}/login" hydra_urls_logout: "{{ haproxy_public_base_url }}{{ haproxy_hydra_dispatcher_base_path }}/logout" hydra_url_post_logout: "{{ haproxy_public_base_url }}" +hydra_urls_error: "{{ haproxy_public_base_url }}/erreur" hydra_log_level: warn diff --git a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 index 7dbc700..97475af 100644 --- a/templates/cadoles-pod-hydra-oidc-v1.conf.j2 +++ b/templates/cadoles-pod-hydra-oidc-v1.conf.j2 @@ -15,6 +15,7 @@ PODMAN_ARGS="\ -e 'OIDC_LOGOUT_ENDPOINT={{ hydra_oidc_logout_endpoint }}' \ -e 'POST_LOGOUT_REDIRECT_URL={{ hydra_oidc_post_logout_redirect_url }}' \ -e 'BASE_URL={{ haproxy_public_base_url }}{{ haproxy_hydra_oidc_base_path }}' \ + -e 'REDIRECT_ON_ERROR_URL={{ hydra_urls_error }}' -e 'OIDC_SCOPE={{ hydra_oidc_scope }}' \ -e 'CLIENT_ID_FC={{ hydra_oidc_client_id }}' \ -e 'CLIENT_SECRET_FC={{ hydra_oidc_client_secret }}' \ @@ -22,4 +23,4 @@ PODMAN_ARGS="\ {% for key,value in hydra_oidc_additionnal_env.items() %} -e '{{ key }}={{ value }}' \ {% endfor %} -" \ No newline at end of file +" diff --git a/templates/cadoles-pod-hydra-v1.conf.j2 b/templates/cadoles-pod-hydra-v1.conf.j2 index 3e7fa77..6984fdf 100644 --- a/templates/cadoles-pod-hydra-v1.conf.j2 +++ b/templates/cadoles-pod-hydra-v1.conf.j2 @@ -14,6 +14,7 @@ PODMAN_ARGS="\ -e 'HYDRA_URLS_CONSENT={{ hydra_urls_consent }}' \ -e 'HYDRA_URLS_LOGIN={{ hydra_urls_login }}' \ -e 'HYDRA_URLS_LOGOUT={{ hydra_urls_logout }}' \ + -e 'HYDRA_URLS_ERROR={{ hydra_urls_error }}' \ -e 'HYDRA_URL_POST_LOGOUT={{ hydra_url_post_logout }}' \ -e 'HYDRA_ALLOW_INSECURE=yes' \ -e 'HYDRA_LEVEL={{ hydra_log_level }}' \ -- 2.17.1