diff --git a/group_vars/all/00_general.yml b/group_vars/all/00_general.yml index f2c129d5d9..91349401cd 100644 --- a/group_vars/all/00_general.yml +++ b/group_vars/all/00_general.yml @@ -59,21 +59,6 @@ ASYNC_POLL: "{{ 0 if ASYNC_ENABLED | bool else 10 }}" # Don't wait for # default value if not set via CLI (-e) or in playbook vars allowed_applications: [] -# helper -_applications_nextcloud_oidc_flavor: >- - {{ - lookup( - 'config', - 'web-app-nextcloud', - 'oidc.flavor', - ( - 'oidc_login' - if lookup('config', 'web-app-nextcloud', 'compose.services.ldap.enabled', False) - else 'sociallogin' - ) - ) - }} - # Role-based access control # @See https://en.wikipedia.org/wiki/Role-based_access_control RBAC: diff --git a/roles/web-app-nextcloud/config/main.yml b/roles/web-app-nextcloud/config/main.yml index 206049f741..9d935c21b8 100644 --- a/roles/web-app-nextcloud/config/main.yml +++ b/roles/web-app-nextcloud/config/main.yml @@ -43,6 +43,11 @@ compose: oidc: enabled: true shared: true + # flavor decides which OIDC plugin should be used. + # Available options: oidc_login, sociallogin + # @see https://apps.nextcloud.com/apps/oidc_login + # @see https://apps.nextcloud.com/apps/sociallogin + flavor: "oidc_login" coturn: # Keep dedicated TURN provider statically discoverable so normal inventory # generation and local iteration always pull in web-svc-coturn. @@ -154,12 +159,6 @@ compose: shared: true hcaptcha: enabled: "{{ HCAPTCHA_ENABLED | bool }}" - enabled: "{{ lookup('config', 'web-app-nextcloud', 'compose.services.oidc.enabled', False) }}" # Activate OIDC for Nextcloud - # floavor decides which OICD plugin should be used. - # Available options: oidc_login, sociallogin - # @see https://apps.nextcloud.com/apps/oidc_login - # @see https://apps.nextcloud.com/apps/sociallogin - flavor: "oidc_login" # Keeping on sociallogin because the other option is not implemented yet default_quota: '1000000000' # Quota to assign if no quota is specified in the OIDC response (bytes) legacy_login_mask: enabled: False # If true, then legacy login mask is shown. Otherwise just SSO @@ -171,8 +170,6 @@ performance: opcache_memory_consumption: "{{ ((ansible_facts['memtotal_mb'] | int) / 30)|int }}M" # Dynamic set memory consumption plugins_enabled: true # Implemented for speeding up testing and debugging process. For productive environments keep it true and steer the apps via the plugins config -oidc: - flavor: "{{ _applications_nextcloud_oidc_flavor }}" plugins: # List for Nextcloud Plugin Routine # Decides if plugins should be activated or deactivated @@ -313,7 +310,7 @@ plugins: enabled: true oidc_login: # Nextcloud User OIDC: integrates OpenID Connect for user authentication (https://apps.nextcloud.com/apps/oidc_login) - enabled: "{{ _applications_nextcloud_oidc_flavor=='oidc_login' | lower }}" + enabled: "{{ lookup('config', 'web-app-nextcloud', 'compose.services.oidc.flavor') == 'oidc_login' }}" incompatible_plugins: - user_oidc # Will be disabled - sociallogin # Will be disabled @@ -340,7 +337,7 @@ plugins: - fileslibreofficeedit sociallogin: # Nextcloud social login: allows authentication using social networks (https://apps.nextcloud.com/apps/sociallogin) - enabled: "{{ _applications_nextcloud_oidc_flavor=='sociallogin' | lower }}" + enabled: "{{ lookup('config', 'web-app-nextcloud', 'compose.services.oidc.flavor') == 'sociallogin' }}" incompatible_plugins: - user_oidc # Will be disabled - oidc_login # Will be disabled @@ -369,7 +366,7 @@ plugins: enabled: true # Enables the LDAP User Directory Search user_oidc: # Nextcloud User OIDC: integrates OpenID Connect for user authentication (https://apps.nextcloud.com/apps/user_oidc) - enabled: "{{ _applications_nextcloud_oidc_flavor=='user_oidc' | lower }}" + enabled: "{{ lookup('config', 'web-app-nextcloud', 'compose.services.oidc.flavor') == 'user_oidc' }}" incompatible_plugins: - oidc_login - sociallogin diff --git a/roles/web-app-nextcloud/templates/config/oidc.config.php.j2 b/roles/web-app-nextcloud/templates/config/oidc.config.php.j2 index 9d86c35812..9927ea1ad2 100644 --- a/roles/web-app-nextcloud/templates/config/oidc.config.php.j2 +++ b/roles/web-app-nextcloud/templates/config/oidc.config.php.j2 @@ -1,7 +1,7 @@