XWiki: LDAP/OIDC admin mapping, config mounts, and REST installs

- LDAP: move settings to xwiki.cfg; enable trylocal (1/0), group_mapping to XWiki.XWikiAdminGroup,
  and mode_group_sync=always.
- OIDC: add groups claim request (oidc.userinfoclaims), map provider group to XWiki.XWikiAdminGroup,
  and use space-separated scopes.
- Compose: mount xwiki.cfg and xwiki.properties into /usr/local/xwiki.
- Extensions: wait for REST readiness; pre-check OIDC/LDAP extensions (URL-encoded IDs);
  install via REST job only if missing.
- Vars: strict mappings to LDAP.* and OIDC.* (no defaults), add XWIKI_ADMIN_GROUP and derived DNs.
- Config: expose ldap.local_enabled; tidy meta tags; README grammar update.

Conversation: https://chatgpt.com/share/68c2b8ad-4814-800f-b377-065f967998db
This commit is contained in:
2025-09-11 13:55:53 +02:00
parent 8bc6e1f921
commit 6418a462ec
11 changed files with 198 additions and 58 deletions

View File

@@ -0,0 +1,20 @@
# ---- Authentication selection
{% if XWIKI_OIDC_ENABLED | bool %}
xwiki.authentication.authclass=org.xwiki.contrib.oidc.auth.OIDCAuthServiceImpl
{% elif XWIKI_LDAP_ENABLED | bool %}
xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl
xwiki.authentication.ldap=1
xwiki.authentication.ldap.trylocal={{ (XWIKI_LDAP_TRYLOCAL | bool) | ternary(1, 0) }}
xwiki.authentication.ldap.group_mapping=XWiki.XWikiAdminGroup={{ XWIKI_LDAP_ADMIN_GROUP_DN }}
xwiki.authentication.ldap.mode_group_sync=always
xwiki.authentication.ldap.server={{ XWIKI_LDAP_SERVER }}
xwiki.authentication.ldap.port={{ XWIKI_LDAP_PORT }}
xwiki.authentication.ldap.base_DN={{ XWIKI_LDAP_BASE_DN }}
xwiki.authentication.ldap.bind_DN={{ XWIKI_LDAP_BIND_DN }}
xwiki.authentication.ldap.bind_pass={{ XWIKI_LDAP_BIND_PASS }}
xwiki.authentication.ldap.fields_mapping={{ XWIKI_LDAP_FIELDS_MAPPING }}
xwiki.authentication.ldap.update_user=1
{% else %}
# Fallback: Native XWiki Auth
# xwiki.authentication.authclass=com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl
{% endif %}