Compare commits
12 Commits
default-va
...
wip/hotfix
Author | SHA1 | Date | |
---|---|---|---|
c9b6f359be | |||
f1f7570864 | |||
3d11c50b0a | |||
6c008bb053 | |||
6ae24ccf81 | |||
8d3ca8fe91 | |||
bb1c734c2c | |||
554d79b3b7 | |||
d365d2ec50 | |||
9fb1118961 | |||
daa8612bae | |||
793582e621 |
@ -53,6 +53,11 @@ hydra_public_cors_allowed_origins: []
|
|||||||
hydra_log_level: warn
|
hydra_log_level: warn
|
||||||
hydra_log_leak_sensitive_values: no
|
hydra_log_leak_sensitive_values: no
|
||||||
|
|
||||||
|
# Durée de vie des "refresh_token"
|
||||||
|
hydra_ttl_refresh_token: "24h"
|
||||||
|
|
||||||
|
hydra_bcrypt_cost: 8
|
||||||
|
|
||||||
# This value should not be changed after first deployment !
|
# This value should not be changed after first deployment !
|
||||||
hydra_secrets_seed: "{{ inventory_hostname }}"
|
hydra_secrets_seed: "{{ inventory_hostname }}"
|
||||||
|
|
||||||
@ -77,6 +82,7 @@ hydra_dispatcher_available_locales:
|
|||||||
- en
|
- en
|
||||||
hydra_dispatcher_sentry_dsn:
|
hydra_dispatcher_sentry_dsn:
|
||||||
hydra_dispatcher_sentry_environment:
|
hydra_dispatcher_sentry_environment:
|
||||||
|
hydra_dispatcher_redis_dsn:
|
||||||
hydra_dispatcher_mounts: []
|
hydra_dispatcher_mounts: []
|
||||||
hydra_dispatcher_disable_app_auto_select: true
|
hydra_dispatcher_disable_app_auto_select: true
|
||||||
hydra_dispatcher_webhook: false
|
hydra_dispatcher_webhook: false
|
||||||
@ -166,9 +172,6 @@ hydra_saml_debug: no
|
|||||||
# Niveau de verbosité du service shibboleth-sp
|
# Niveau de verbosité du service shibboleth-sp
|
||||||
hydra_saml_sp_log_level: WARN
|
hydra_saml_sp_log_level: WARN
|
||||||
|
|
||||||
# Durée de vie des "refresh_token"
|
|
||||||
hydra_ttl_refresh_token: "24h"
|
|
||||||
|
|
||||||
# Inclure les règles de cartographie des attributs SAML fournis par défaut par le projet hydra-shibboleth-sp-v3
|
# Inclure les règles de cartographie des attributs SAML fournis par défaut par le projet hydra-shibboleth-sp-v3
|
||||||
hydra_saml_include_sp_default_attributes_mapping: "yes"
|
hydra_saml_include_sp_default_attributes_mapping: "yes"
|
||||||
|
|
||||||
@ -226,6 +229,7 @@ oidc_test_app_public_base_url: "{{ haproxy_public_base_url }}{{ haproxy_oidc_tes
|
|||||||
|
|
||||||
enable_hydra_oidc: no
|
enable_hydra_oidc: no
|
||||||
hydra_oidc_debug: no
|
hydra_oidc_debug: no
|
||||||
|
hydra_oidc_internal_port: 8080
|
||||||
hydra_oidc_hydra_url_error:
|
hydra_oidc_hydra_url_error:
|
||||||
hydra_oidc_base_url:
|
hydra_oidc_base_url:
|
||||||
hydra_oidc_cookie_path: "{{ haproxy_hydra_oidc_base_path }}"
|
hydra_oidc_cookie_path: "{{ haproxy_hydra_oidc_base_path }}"
|
||||||
|
10
files/mpm_prefork.conf
Normal file
10
files/mpm_prefork.conf
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# prefork MPM
|
||||||
|
|
||||||
|
<IfModule mpm_prefork_module>
|
||||||
|
StartServers 10
|
||||||
|
MinSpareServers 10
|
||||||
|
MaxSpareServers 20
|
||||||
|
MaxRequestWorkers 128
|
||||||
|
MaxConnectionsPerChild 2000
|
||||||
|
</IfModule>
|
||||||
|
|
24
files/www.conf.gotmpl
Normal file
24
files/www.conf.gotmpl
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{%- raw -%}
|
||||||
|
[www]
|
||||||
|
user = www-data
|
||||||
|
group = www-data
|
||||||
|
|
||||||
|
listen = {{ env.Getenv "PHP_FPM_LISTEN" "/tmp/php-fpm.sock" }}
|
||||||
|
listen.owner = www-data
|
||||||
|
listen.group = www-data
|
||||||
|
listen.mode = 0660
|
||||||
|
|
||||||
|
pm = dynamic
|
||||||
|
pm.max_children = {{ env.Getenv "PHP_FPM_MAX_CHILDREN" "5" }}
|
||||||
|
pm.start_servers = {{ env.Getenv "PHP_FPM_START_SERVERS" "2" }}
|
||||||
|
pm.min_spare_servers = {{ env.Getenv "PHP_FPM_MIN_SPARE_SERVERS" "1" }}
|
||||||
|
pm.max_spare_servers = {{ env.Getenv "PHP_FPM_MAX_SPARE_SERVERS" "3" }}
|
||||||
|
|
||||||
|
pm.status_path = /healthcheck
|
||||||
|
pm.status_listen = 127.0.0.1:8091
|
||||||
|
|
||||||
|
clear_env = no
|
||||||
|
|
||||||
|
php_admin_value[display_errors] = {{ env.Getenv "PHP_FPM_DISPLAY_ERRORS" "off" }}
|
||||||
|
php_admin_value[memory_limit] = {{ env.Getenv "PHP_FPM_MEMORY_LIMIT" "32m" }}
|
||||||
|
{% endraw %}
|
@ -46,6 +46,7 @@
|
|||||||
name: cadoles-pod-hydra-oidc-v1
|
name: cadoles-pod-hydra-oidc-v1
|
||||||
state: restarted
|
state: restarted
|
||||||
become: true
|
become: true
|
||||||
|
when: not install_only
|
||||||
|
|
||||||
- name: Restart cadoles-pod-hydra-ldap-v1
|
- name: Restart cadoles-pod-hydra-ldap-v1
|
||||||
service:
|
service:
|
||||||
|
@ -89,6 +89,10 @@ properties:
|
|||||||
hydra_ttl_refresh_token:
|
hydra_ttl_refresh_token:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
|
hydra_brypt_cost:
|
||||||
|
type: number
|
||||||
|
description: Coût CPU pour calculer des hachages de secret (4-31)
|
||||||
|
|
||||||
# This value should not be changed after first deployment !
|
# This value should not be changed after first deployment !
|
||||||
hydra_secrets_seed:
|
hydra_secrets_seed:
|
||||||
type: string
|
type: string
|
||||||
|
21
tasks/configure-hydra-sp.yml
Normal file
21
tasks/configure-hydra-sp.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
# Simple task to update the config files of cadoles-pod-shibboleth-sp only.
|
||||||
|
|
||||||
|
- name: Configure cadoles-pod-shibboleth-sp-v3
|
||||||
|
ansible.builtin.template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_items:
|
||||||
|
- src: cadoles-pod-shibboleth-sp-v3.conf.j2
|
||||||
|
dest: /etc/cadoles-pod-shibboleth-sp-v3.conf
|
||||||
|
mode: u=rw,g=r
|
||||||
|
- src: shibboleth-attribute-map.inc.xml.j2
|
||||||
|
dest: /etc/shibboleth/attribute-map.inc.xml
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
- src: shibboleth-attribute-policy.inc.xml.j2
|
||||||
|
dest: /etc/shibboleth/attribute-policy.inc.xml
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
notify:
|
||||||
|
- Restart cadoles-pod-shibboleth-sp-v3
|
||||||
|
become: true
|
@ -27,8 +27,13 @@
|
|||||||
|
|
||||||
- name: Configure cadoles-pod-hydra-remote-user-v1 (2)
|
- name: Configure cadoles-pod-hydra-remote-user-v1 (2)
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: hydra-remote-user-v1-apache.conf
|
src: "{{ item.src }}"
|
||||||
dest: /etc/hydra-remote-user/apache.conf
|
dest: "{{ item.dest }}"
|
||||||
|
with_items:
|
||||||
|
- src: hydra-remote-user-v1-apache.conf
|
||||||
|
dest: /etc/hydra-remote-user/apache.conf
|
||||||
|
- src: mpm_prefork.conf
|
||||||
|
dest: /etc/hydra-remote-user/mpm_prefork.conf
|
||||||
notify:
|
notify:
|
||||||
- Restart cadoles-pod-hydra-remote-user-v1
|
- Restart cadoles-pod-hydra-remote-user-v1
|
||||||
become: true
|
become: true
|
||||||
|
@ -85,6 +85,17 @@
|
|||||||
- Restart cadoles-pod-hydra-dispatcher-v1
|
- Restart cadoles-pod-hydra-dispatcher-v1
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Configure cadoles-pod-hydra-dispatcher-v1 (2)
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
with_items:
|
||||||
|
- src: www.conf.gotmpl
|
||||||
|
dest: /etc/hydra-dispatcher/www.conf.gotmpl
|
||||||
|
notify:
|
||||||
|
- Restart cadoles-pod-hydra-dispatcher-v1
|
||||||
|
become: true
|
||||||
|
|
||||||
- name: Configure passwordless authentification if enabled
|
- name: Configure passwordless authentification if enabled
|
||||||
ansible.builtin.include_tasks: hydra-passwordless.yml
|
ansible.builtin.include_tasks: hydra-passwordless.yml
|
||||||
when: enable_hydra_passwordless
|
when: enable_hydra_passwordless
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
name:
|
name:
|
||||||
- cadoles-pod-hydra-dispatcher-v1={{ cadoles_pod_hydra_dispatcher_v1_package_version }}
|
- cadoles-pod-hydra-dispatcher-v1={{ cadoles_pod_hydra_dispatcher_v1_package_version }}
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
allow_downgrade: true
|
||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
@ -23,3 +24,14 @@
|
|||||||
notify:
|
notify:
|
||||||
- Restart cadoles-pod-hydra-dispatcher-v1
|
- Restart cadoles-pod-hydra-dispatcher-v1
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
|
- name: Configure cadoles-pod-hydra-dispatcher-v1 (2)
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
with_items:
|
||||||
|
- src: www.conf.gotmpl
|
||||||
|
dest: /etc/hydra-dispatcher/www.conf.gotmpl
|
||||||
|
notify:
|
||||||
|
- Restart cadoles-pod-hydra-dispatcher-v1
|
||||||
|
become: true
|
||||||
|
38
tasks/update-hydra-remote-user.yml
Normal file
38
tasks/update-hydra-remote-user.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
# Simple task to update the package/container cadoles-pod-hydra-remote-user only.
|
||||||
|
- name: Install hydra-remote-user package
|
||||||
|
ansible.builtin.apt:
|
||||||
|
name:
|
||||||
|
- cadoles-pod-hydra-remote-user-v1={{ cadoles_pod_hydra_remote_user_v1_package_version }}
|
||||||
|
update_cache: yes
|
||||||
|
state: present
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Configure cadoles-pod-hydra-remote-user-v1
|
||||||
|
template:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
|
with_items:
|
||||||
|
- src: cadoles-pod-hydra-remote-user-v1.conf.j2
|
||||||
|
dest: /etc/cadoles-pod-hydra-remote-user-v1.conf
|
||||||
|
mode: u=rw,g=r
|
||||||
|
- src: hydra-remote-user.yml.j2
|
||||||
|
dest: /etc/hydra-remote-user/conf.d/remote-user.yml
|
||||||
|
mode: u=rw,g=r,o=r
|
||||||
|
notify:
|
||||||
|
- Restart cadoles-pod-hydra-remote-user-v1
|
||||||
|
become: true
|
||||||
|
|
||||||
|
- name: Configure cadoles-pod-hydra-remote-user-v1 (2)
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: "{{ item.src }}"
|
||||||
|
dest: "{{ item.dest }}"
|
||||||
|
with_items:
|
||||||
|
- src: hydra-remote-user-v1-apache.conf
|
||||||
|
dest: /etc/hydra-remote-user/apache.conf
|
||||||
|
- src: mpm_prefork.conf
|
||||||
|
dest: /etc/hydra-remote-user/mpm_prefork.conf
|
||||||
|
notify:
|
||||||
|
- Restart cadoles-pod-hydra-remote-user-v1
|
||||||
|
become: true
|
@ -8,15 +8,5 @@
|
|||||||
state: present
|
state: present
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Configure cadoles-pod-shibboleth-sp-v3
|
- name: Configure hydra SP
|
||||||
template:
|
ansible.builtin.include_tasks: configure-hydra-sp.yml
|
||||||
src: "{{ item.src }}"
|
|
||||||
dest: "{{ item.dest }}"
|
|
||||||
mode: "{{ item.mode }}"
|
|
||||||
with_items:
|
|
||||||
- src: cadoles-pod-shibboleth-sp-v3.conf.j2
|
|
||||||
dest: /etc/cadoles-pod-shibboleth-sp-v3.conf
|
|
||||||
mode: u=rw,g=r
|
|
||||||
notify:
|
|
||||||
- Restart cadoles-pod-shibboleth-sp-v3
|
|
||||||
become: true
|
|
||||||
|
@ -4,7 +4,7 @@ PODMAN_ARGS="\
|
|||||||
--replace \
|
--replace \
|
||||||
--network=slirp4netns:allow_host_loopback=true \
|
--network=slirp4netns:allow_host_loopback=true \
|
||||||
--tz=local \
|
--tz=local \
|
||||||
-p 127.0.0.1:3000:80 \
|
-p 127.0.0.1:3000:8080 \
|
||||||
-e APP_ENV=prod \
|
-e APP_ENV=prod \
|
||||||
-e 'APP_DEBUG={{ hydra_dispatcher_debug }}' \
|
-e 'APP_DEBUG={{ hydra_dispatcher_debug }}' \
|
||||||
-e HYDRA_ADMIN_BASE_URL=http://10.0.2.2:4445 \
|
-e HYDRA_ADMIN_BASE_URL=http://10.0.2.2:4445 \
|
||||||
@ -20,8 +20,16 @@ PODMAN_ARGS="\
|
|||||||
-e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \
|
-e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \
|
||||||
-e 'SENTRY_DSN={{ hydra_dispatcher_sentry_dsn }}' \
|
-e 'SENTRY_DSN={{ hydra_dispatcher_sentry_dsn }}' \
|
||||||
-e 'SENTRY_ENVIRONMENT={{ hydra_dispatcher_sentry_environment }}' \
|
-e 'SENTRY_ENVIRONMENT={{ hydra_dispatcher_sentry_environment }}' \
|
||||||
|
-e 'REDIS_DSN={{ hydra_dispatcher_redis_dsn }}' \
|
||||||
|
--mount type=tmpfs,tmpfs-size=512M,destination=/app/var/cache \
|
||||||
-e 'DISABLE_APP_AUTO_SELECT={{ hydra_dispatcher_disable_app_auto_select }}' \
|
-e 'DISABLE_APP_AUTO_SELECT={{ hydra_dispatcher_disable_app_auto_select }}' \
|
||||||
-v /etc/hydra-dispatcher/conf.d:/var/www/config/hydra \
|
-e 'PHP_FPM_MEMORY_LIMIT=128m' \
|
||||||
|
-e 'PHP_FPM_MAX_CHILDREN=128' \
|
||||||
|
-e 'PHP_FPM_START_SERVERS=42' \
|
||||||
|
-e 'PHP_FPM_MIN_SPARE_SERVERS=24' \
|
||||||
|
-e 'PHP_FPM_MAX_SPARE_SERVERS=64' \
|
||||||
|
-v /etc/hydra-dispatcher/www.conf.gotmpl:/etc/php81/php-fpm.d/www.conf.gotmpl \
|
||||||
|
-v /etc/hydra-dispatcher/conf.d:/app/config/hydra \
|
||||||
{% for item in hydra_dispatcher_mounts %}
|
{% for item in hydra_dispatcher_mounts %}
|
||||||
-v {{ item.host }}:{{ item.container }} \
|
-v {{ item.host }}:{{ item.container }} \
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -4,7 +4,7 @@ PODMAN_ARGS="\
|
|||||||
--replace \
|
--replace \
|
||||||
--network=slirp4netns:allow_host_loopback=true \
|
--network=slirp4netns:allow_host_loopback=true \
|
||||||
--tz=local \
|
--tz=local \
|
||||||
-p 127.0.0.1:3004:80 \
|
-p 127.0.0.1:3004:{{ hydra_oidc_internal_port | default(8080) }} \
|
||||||
-e APP_ENV=prod \
|
-e APP_ENV=prod \
|
||||||
-e 'APP_DEBUG={{ hydra_oidc_debug }}' \
|
-e 'APP_DEBUG={{ hydra_oidc_debug }}' \
|
||||||
-e 'HYDRA_ADMIN_BASE_URL=http://10.0.2.2:3000' \
|
-e 'HYDRA_ADMIN_BASE_URL=http://10.0.2.2:3000' \
|
||||||
|
@ -6,6 +6,7 @@ PODMAN_ARGS="\
|
|||||||
--tz=local \
|
--tz=local \
|
||||||
-v /etc/hydra-remote-user/conf.d:/var/www/config/remote_user \
|
-v /etc/hydra-remote-user/conf.d:/var/www/config/remote_user \
|
||||||
-v /etc/hydra-remote-user/apache.conf:/etc/apache2/sites-available/000-default.conf \
|
-v /etc/hydra-remote-user/apache.conf:/etc/apache2/sites-available/000-default.conf \
|
||||||
|
-v /etc/hydra-remote-user/mpm_prefork.conf:/etc/apache2/mods-available/mpm_prefork.conf \
|
||||||
-v /etc/hosts:/etc/hosts:ro \
|
-v /etc/hosts:/etc/hosts:ro \
|
||||||
-e APP_ENV=prod \
|
-e APP_ENV=prod \
|
||||||
-e 'APP_DEBUG={{ hydra_saml_debug }}' \
|
-e 'APP_DEBUG={{ hydra_saml_debug }}' \
|
||||||
@ -14,4 +15,4 @@ PODMAN_ARGS="\
|
|||||||
-e HYDRA_ADMIN_BASE_URL=http://10.0.2.2:3000 \
|
-e HYDRA_ADMIN_BASE_URL=http://10.0.2.2:3000 \
|
||||||
-e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \
|
-e 'TRUSTED_PROXIES=127.0.0.1,10.0.2.0/24' \
|
||||||
-e 'LOGOUT_REDIRECT_URL_PATTERN={{ haproxy_public_base_url }}{{ haproxy_hydra_saml_base_path }}/Shibboleth.sso/Logout?return=%s' \
|
-e 'LOGOUT_REDIRECT_URL_PATTERN={{ haproxy_public_base_url }}{{ haproxy_hydra_saml_base_path }}/Shibboleth.sso/Logout?return=%s' \
|
||||||
"
|
"
|
||||||
|
@ -25,5 +25,6 @@ PODMAN_ARGS="\
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
-e 'HYDRA_SECRETS_SYSTEM={{ lookup('ansible.builtin.password', '/dev/null length=32 seed=hydra_secrets_seed') }}' \
|
-e 'HYDRA_SECRETS_SYSTEM={{ lookup('ansible.builtin.password', '/dev/null length=32 seed=hydra_secrets_seed') }}' \
|
||||||
-e 'HYDRA_OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT={{ lookup('ansible.builtin.password', '/dev/null length=32 seed=hydra_secrets_seed') }}' \
|
-e 'HYDRA_OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT={{ lookup('ansible.builtin.password', '/dev/null length=32 seed=hydra_secrets_seed') }}' \
|
||||||
|
-e 'HYDRA_BCRYPT_COST={{ hydra_bcrypt_cost }}' \
|
||||||
-v /etc/hydra/clients.d:/etc/hydra/clients.d \
|
-v /etc/hydra/clients.d:/etc/hydra/clients.d \
|
||||||
"
|
"
|
||||||
|
@ -12,7 +12,7 @@ PODMAN_ARGS="\
|
|||||||
-e 'APACHE_FORCE_HTTPS={{ "true" if haproxy_public_base_url.startswith('https') else "false" }}' \
|
-e 'APACHE_FORCE_HTTPS={{ "true" if haproxy_public_base_url.startswith('https') else "false" }}' \
|
||||||
-e 'SP_HANDLER_BASE_PATH={{ haproxy_hydra_saml_base_path }}' \
|
-e 'SP_HANDLER_BASE_PATH={{ haproxy_hydra_saml_base_path }}' \
|
||||||
-e 'SP_SESSIONS_REDIRECT_LIMIT=host+allow' \
|
-e 'SP_SESSIONS_REDIRECT_LIMIT=host+allow' \
|
||||||
-e 'SP_SESSIONS_REDIRECT_ALLOW={{ hydra_saml_allowed_redirects | default([]) | join(' ') }}' \
|
-e 'SP_SESSIONS_REDIRECT_ALLOW={{ hydra_saml_allowed_redirects | join(' ') }}' \
|
||||||
-e 'SP_INCLUDE_DEFAULT_ATTRIBUTES_MAPPING={{ hydra_saml_include_sp_default_attributes_mapping }}' \
|
-e 'SP_INCLUDE_DEFAULT_ATTRIBUTES_MAPPING={{ hydra_saml_include_sp_default_attributes_mapping }}' \
|
||||||
-e 'SP_INCLUDE_DEFAULT_ATTRIBUTES_POLICY={{ hydra_saml_include_sp_default_attributes_policy }}' \
|
-e 'SP_INCLUDE_DEFAULT_ATTRIBUTES_POLICY={{ hydra_saml_include_sp_default_attributes_policy }}' \
|
||||||
-v '/etc/shibboleth/attribute-map.inc.xml:/etc/shibboleth/attribute-map.inc.xml' \
|
-v '/etc/shibboleth/attribute-map.inc.xml:/etc/shibboleth/attribute-map.inc.xml' \
|
||||||
|
Reference in New Issue
Block a user