Revision 3 (2026-05-09, CONV-31): Stage 2 Tier 3 SSO scope added — Microsoft (Azure AD / Entra ID) OAuth2/OIDC + Custom SSO (SAML 2.0 / OIDC через Okta / Entra ID / generic IdP) теперь accepted as Stage 2 Tier 3 Enterprise gate (per ADR 0008 tier model). Stage 1 scope (Google + email/password) не меняется. См. секцию «Stage 2 Tier 3 SSO methods» ниже.
Revision 2 (2026-05-07, CONV-17): Original decision was «Google SSO only». Revised после permission-and-tenancy interview закрытия (Block F): UAE/MENA market reality — Google Workspace adoption там значительно ниже чем в EU/AU. Email/password fallback теперь mandatory at launch, не deferred. Пароль-флоу больше не «friction hurts conversion» — это primary path для большой части target audience.
Context
Phase 1.3.3 (Login / auth multi-role flow) и 1.3.11 (Signup & tenant data model) требуют хотя бы один auth-метод для Partner team members. Изначально (2026-05-01) предполагалось «SSO покрывает всех», но pieзаказчиков:
- AU / EU rendering studios — большинство на Google Workspace или Microsoft 365 — Google SSO comfortable.
- UAE / MENA agencies, brokers, developers — heterogeneous email landscape (corporate domains often hosted via cPanel / Plesk / Zoho, частые
@gmail.comconsumer accounts тоже встречаются). Google Workspace adoption низкий. Forcing Google SSO = lose 30-50% target audience. - Magic links / passwordless — рассмотрено и rejected для Partner-роли: per-session email round-trip создаёт friction для daily admin users (Manager / Editor открывают админку каждый день). Для Buyer flow — наоборот, magic link идеален (single-use per presentation, см. Phase 1.11.1, ADR будет 0012/buyer flow).
Из CONV-17 (permission-and-tenancy interview, Block F):
- Все 5 Partner-ролей (Owner / Admin / Manager / Editor / Agent) логинятся одинаковым flow.
- Operator (OPL master, staff.offplan.online) — отдельный auth surface, не покрывается этим ADR.
Decision
Two auth methods at launch:
- Google SSO — primary, рекомендуемый CTA на login screen («Continue with Google»).
- Email / password — fallback, equal-weight кнопка («Sign in with email»).
Оба flow используют тот же auth backend (single session model), тот же session cookie scope (*.offplan.online, 30d). User может переключаться между методами для одного и того же email — link two methods to one identity Stage 2.
Password requirements
- Min 12 characters (NIST SP 800-63B Memorized Secret guidance: length over composition rules).
- No composition rules (no «mixed case + digit + symbol» tax).
- HaveIBeenPwned check at signup и at password change — reject если password в known breach corpus. Use API k-anonymity range query — не отправляем full password / hash.
- No periodic forced rotation (NIST: forced rotation вредит, не помогает).
- Reset flow: magic-link на email, валиден 60 minutes, single-use, invalidates все active sessions.
2FA (cross-reference)
2FA отдельный layer над любым auth-методом — see Foundational §2 / Phase 1.3.3:
- Stage 1: optional для всех Partner ролей.
- Stage 2: mandatory для Owner + Admin (роли с billing access).
- staff.offplan.online: mandatory always (operator dashboard).
Stage 2 Tier 3 SSO methods (Revision 3)
Tier 3 (Enterprise) Organisations per ADR 0008 получают доступ к двум дополнительным auth methods как Stage 2 feature gate:
- Microsoft (Azure AD / Entra ID) — OAuth2/OIDC integration. Целевая аудитория: enterprise studios на Microsoft 365 (часто встречается в EU/AU enterprise + некоторых ME developers).
- Custom SSO (SAML 2.0 / OIDC) — generic IdP integration через Okta / Entra ID / OneLogin / etc. Целевая аудитория: large enterprise customers с собственным IdP infrastructure + compliance requirements (SOC2 / ISO27001 / etc).
Tier gating: обе методы доступны только для Tier 3 Organisations (per ADR 0008). Tier 1 / Tier 2 ограничены Stage 1 scope (Google + email/password). Tier 3 Organisation Owner может настроить SSO в Settings → Authentication → SSO Configuration; team members этой Organisation после конфигурации могут использовать Stage 1 methods (Google / email/password) или SSO method as primary login path.
Provider abstraction: auth backend uses provider interface (Stage 1: Google + Local). Stage 2 adds Microsoft + SAML/OIDC providers без rewrite — config + UI button per provider.
Stage 2 implementation timeline: Tier 3 SSO comes online после первого Tier 3 customer commitment (revenue trigger). До этого ADR 0005 v3 = scope reservation, не active build.
Alternatives Considered
- Google SSO only (original 2026-05-01 decision) — rejected after CONV-17. Loses UAE/MENA market. Was based on AU/EU-centric assumption about target audience.
- Microsoft (Azure AD / Entra ID) — moved to accepted for Stage 2 Tier 3 per Revision 3 (2026-05-09). Initial assessment «defer until 3+ enterprise studios попросят» reframed as Tier 3 gate: feature shipped когда первый Tier 3 customer commitment появится (revenue trigger).
- Custom SSO (SAML 2.0 / OIDC через Okta / Entra ID / generic IdP) — moved to accepted for Stage 2 Tier 3 per Revision 3. Same gating logic as Microsoft.
- Magic links only (passwordless) — rejected для Partner-роли: high-frequency daily login → email round-trip friction. Magic links используются для Buyer flow (low-frequency, per-presentation), но не для Partner team.
- WebAuthn / passkeys — promising long-term, но adoption всё ещё низкий за пределами Apple ecosystem (2026-05). Add as additional option в Stage 2/3, не at launch.
- Apple SSO — required by Apple Store rules для iOS apps с Google SSO. Не релевантно — мы web-app, не native app. Add если будет iOS app phase.
Consequences
- Phase 1.3.3 / 1.3.11 scope: реализуем оба flow at launch — Google OAuth2/OIDC + email/password registration / login / reset. Auth provider interface абстрагирован — добавление Microsoft / Apple / WebAuthn в Stage 2 = config + UI button, не rewrite.
- Tier independence: оба метода доступны на всех tier'ах (Free Guest / Tier 1 / Tier 2 / Custom). Не gate'им за paywall.
- Password storage: bcrypt cost 12+ (или Argon2id если backend поддерживает). Salt per-user. Никогда plain-text в логах / responses / Sentry.
- Rate limiting: signup endpoint rate-limited per IP (Phase 1.8.2). Login endpoint rate-limited per email + IP combination (защита от credential stuffing).
- Email enumeration защита: «Reset password» / «Sign in» error messages не различают «email not found» vs «wrong password» — generic «Invalid credentials» / «If account exists, reset link sent».
- Brandbook impact: login screen дизайн должен показывать оба method'а как equal-weight (не «Google primary, email second-class»). Brandbook v2 — see <a href="../brandbook/v2.html">brandbook</a>.
- Tier 3 gate (Revision 3): Microsoft + Custom SSO available только для Tier 3 Organisations per ADR 0008. Tier 1 / Tier 2 — Stage 1 scope (Google + email/password) unchanged. Provider interface allows adding Microsoft + SAML/OIDC providers без rewrite. Tier 3 Organisation Owner configures SSO via Settings → Authentication → SSO Configuration.
- Stage 2 implementation trigger: Microsoft + Custom SSO build starts после first Tier 3 customer commitment (revenue trigger). До этого Revision 3 = scope reservation, не active build.
Revisit trigger
- 3+ studios request Microsoft/Azure AD SSO или large enterprise deal требует — add Microsoft в Stage 2.
- WebAuthn / passkey adoption crosses 50% в industry — реассессмент passwordless как primary.
- Compliance event (UAE NDP / EU eIDAS update) требует определённый auth standard — может форсировать pivot.