feat(registration): add a domain allow list

add:
 - OXICLOUD_REGISTRATION_ALLOWED_EMAIL_DOMAINS to specify list of domains allowing a self registration
 - OXICLOUD_REQUIRE_VERIFIED_EMAIL=true|false
 - OXICLOUD_AUTH_METHODS=password,magic_link (login methods, OIDC is on top of this)
 - OXICLOUD_AUTH_POLICIES=permit_magic_link_for_password_users (OIDC is on top)
This commit is contained in:
Edouard Vanbelle
2026-07-13 23:37:23 +02:00
parent 3fe6af25f1
commit 01da450cf6
6 changed files with 172 additions and 0 deletions
+10
View File
@@ -69,6 +69,16 @@ OXICLOUD_SMTP_FROM='OxiCloud Tests <test@oxicloud.local>'
OXICLOUD_SMTP_TLS=none
OXICLOUD_ALLOW_EXTERNAL_USERS=true
# Public-registration email-domain allowlist. Exercised by
# `registration.hurl` step "off-domain rejection" (attempts to
# register with @nowhere.invalid and asserts 403
# `RegistrationDomainNotAllowed`). Contains BOTH `example.com` (Hurl
# fixtures use it — charlie@example.com etc.) AND `example.test` (E2E
# login.spec uses it — reg-*@example.test). Every legitimate test
# path stays inside the allowlist; the rejection test picks a domain
# outside it deliberately.
OXICLOUD_REGISTRATION_ALLOWED_EMAIL_DOMAINS=example.com,example.test
# PR 12 — magic-link rate-limit caps lowered so external_users.hurl can
# exercise the cap behaviour with a small, deterministic request count.
# Production defaults are 50 / 5 / 200 respectively (see example.env).