diff --git a/defaults/main.yml b/defaults/main.yml index 434f473..0accaa5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -257,3 +257,34 @@ galaxy_uwsgi_config_default: # Options include: client / client-production / client-production-maps (default) galaxy_client_make_target: client-production-maps +# +# Authentification configuration +# authen_conf.xml +# https://github.com/galaxyproject/galaxy/blob/dev/config/auth_conf.xml.sample +# +galaxy_auth: + authenticator: + localdb: + allow-password-change: True + # ldap: + # filter: "'{email}'.endswith('@example.com')" + # allow-register: True + # auto-register: False + # allow-password-change: False + # auto-create-roles: False + # auto-create-groups: False + # auto-assign-roles-to-groups-only: False + # server: "ldap://dc1.example.com" + # ldap-options: "OPT_X_TLS_REQUIRE_CERT=OPT_X_TLS_ALLOW" + # login-use-username: False + # continue-on-failure: False + # search-fields: "uid,mail" + # search-base: "ou=People,dc=example,dc=com" + # search-filter: "(mail={email})" + # search-user: "cn=jsmith,ou=People,dc=domain,dc=com" + # search-password: "mysecret" + # bind-user: "{dn}" + # bind-password: "{password}" + # auto-register-username: "{uid}" + # auto-register-email: "{mail}" + # auto-register-roles: "{gid}" diff --git a/templates/auth_conf.xml.j2 b/templates/auth_conf.xml.j2 new file mode 100644 index 0000000..2f897a3 --- /dev/null +++ b/templates/auth_conf.xml.j2 @@ -0,0 +1,154 @@ + + + +{% if 'ldap' in galaxy_auth['authenticator'] %} + + ldap + {% set ldap = galaxy_auth['authenticator']['ldap'] %} + + + + {% if ldap['filter'] is defined %} + ldap['filter'] + {% endif %} + + + + {% if ldap['allow-register'] is defined %} + ldap['allow-register'] + {% endif %} + + + {% if ldap['auto-register'] is defined %} + ldap['auto-register'] + {% endif %} + + + {% if ldap['allow-password-change'] is defined %} + ldap['allow-password-change'] + {% endif %} + + + {% if ldap['auto-create-roles'] is defined %} + ldap['auto-create-roles'] + {% endif %} + + + {% if ldap['auto-create-groups'] is defined %} + ldap['auto-create-groups'] + {% endif %} + + + {% if ldap['auto-assign-roles-to-groups-only'] is defined %} + ldap['auto-assign-roles-to-groups-only'] + {% endif %} + + + {% if ldap['server'] is defined %} + ldap['server'] + {% endif %} + + + {% if ldap['ldap-options'] is defined %} + ldap['ldap-options'] + {% endif %} + + + {% if ldap['login-use-username'] is defined %} + ldap['login-use-username'] + {% endif %} + + + {% if ldap['continue-on-failure'] is defined %} + ldap['continue-on-failure'] + {% endif %} + + + {% if ldap['search-fields'] is defined %} + ldap['search-fields'] + {% endif %} + {% if ldap['search-base'] is defined %} + ldap['search-base'] + {% endif %} + + {% if ldap['search-filter'] is defined %} + ldap['search-filter'] + {% endif %} + + {% if ldap['search-user'] is defined %} + ldap['search-user'] + {% endif %} + {% if ldap['search-password'] is defined %} + ldap['search-password'] + {% endif %} + + + + {% if ldap['bind-user'] is defined %} + ldap['bind-user'] + {% endif %} + {% if ldap['bind-password'] is defined %} + ldap['bind-password'] + {% endif %} + {% if ldap['auto-register-username'] is defined %} + ldap['auto-register-username'] + {% endif %} + {% if ldap['auto-register-email'] is defined %} + ldap['auto-register-email'] + {% endif %} + {% if ldap['auto-register-roles'] is defined %} + ldap['auto-register-roles'] + {% endif %} + + + +{% endif %} +{% if 'localdb' in galaxy_auth['authenticator'] %} + + localdb + {% set localdb = galaxy_auth['authenticator']['localdb'] %} + + + {{ localdb['allow-password-change']|default("True", true) }} + + +{% endif %} +