User Onboarding Model (MVP -> Post-MVP)¶
Purpose¶
Define the product and control-plane onboarding model so the platform feels complete without waiting on MaaS or enterprise federation rollout.
This document separates:
- MVP onboarding path we can implement now
- Post-MVP expansion paths (tenant federation automation, multi-tenant switching)
Current Constraints¶
- Personal account signup/login exists and auto-bootstraps tenant/project context.
- Seeded bootstrap users still exist for local/dev bring-up.
- Tenant/project ownership and membership are now the authorization root.
- MaaS onboarding is explicitly deferred (
A-MAAS-001).
MVP Onboarding Model (Implement Now)¶
Identity and Role Boundaries¶
users.role=adminis platform-admin only (platform scope).- Tenant/project access is controlled by memberships:
tenant_membershipsproject_memberships- Resource ownership is tenant/project-rooted; user id is attribution.
- Extended role taxonomy and lifecycle (platform ops, tenant/project role sets, custom roles) are defined in:
doc/architecture/Role_and_Policy_Lifecycle_Model.md
User Creation and Access Flow¶
- Work account path (MVP behavior):
- uses platform OIDC login path backed by the shared realm setup.
- tenant federation discovery/config is not required for MVP runtime.
- tenant hints are advisory and server-validated.
- UI behavior:
Continue with SSOpath with optional work-email/tenant-hint input; no personal username/password fields in this branch. - Personal account path:
- user signs up/signs in with personal credentials.
- personal sign-in must use public auth/session flows, not internal bootstrap endpoint
POST /api/v1/auth/login. - signup atomically creates personal tenant + default project + owner memberships.
- bootstrap role binding on success:
- tenant role:
tenant_owner - project role:
project_owner
- tenant role:
- UI behavior: personal username/password sign-in and sign-up controls; no SSO redirect in this branch.
- Platform admin can create tenant admin user using current admin path:
POST /api/v1/admin/usersfor identity creation, then- membership binding via
scripts/ops/bind_tenant_admin_membership.sh(single controlled scripted operation, no ad-hoc SQL) until tenant-admin membership APIs land. - script requirements: correlation_id input, explicit actor/target fields, and audit log write in the same operation path.
- Tenant admin manages tenant users and project memberships within tenant scope.
- API resolves user -> active tenant membership -> request-scoped project context.
- If project context is missing for project-owned operations:
- return deterministic
400 invalid_requestwith canonical envelope.
Failure and Deactivation Paths¶
- Personal signup bootstrap is transactionally atomic:
- any failure returns canonical error and no partial tenant/project/membership state is committed.
- If membership is revoked or account is deactivated mid-session:
- subsequent protected calls return canonical authz/auth errors,
- client clears local session and routes user back to sign-in.
UX Expectations (MVP)¶
- Login screen presents two account paths:
Work accountandPersonal account. - Authenticated user sees current tenant/project context in shell/header.
- First-run zero-balance user is routed to billing onboarding CTA (already defined in product UX docs).
- User-management surfaces clearly show actor scope (
platformvstenant/project) and deterministic membership/context errors. - MVP-activated tenant roles in onboarding flows are:
tenant_owner,tenant_admin,tenant_member.- Defined-but-not-activated-by-default roles in onboarding UX are:
tenant_billing_manager,tenant_billing_viewer,tenant_viewer.
Post-MVP Expansion (Not Blocking MVP)¶
- Enterprise SSO federation admin UX (ADR-010 baseline):
- per-tenant OIDC/SAML provider config,
- invite/pre-authorization gate before membership activation.
- Multi-tenant user context switching UX:
- remove MVP single-tenant uniqueness guard when enabled.
- guard location today: partial unique active-membership constraint
ux_tenant_memberships_user_activeontenant_memberships(user_id)indoc/architecture/db_schema_v1.sql; removal means dropping/relaxing that constraint and updating membership selection UX. - Self-service tenant-admin membership APIs/UI:
- replace internal runbook/SQL fallback.
- tracking anchor: this follow-up must be represented in
doc/governance/Agent_Work_Queue.yamlbefore implementation kickoff; architectural dependency isdoc/architecture/adrs/ADR-008-tenant-project-ownership-baseline.md.
Onboarding-Specific Contract Requirements¶
- Personal signup endpoint must be idempotent by key and safe to retry.
- Personal signup bootstrap must be atomic across user+tenant+project+membership creation.
- Work/personal onboarding failures must always return canonical error envelopes.
- Audit for onboarding mutations must include full authz context fields from role lifecycle baseline:
correlation_id,actor_type,actor_id,platform_role,tenant_id,project_id,resource_name(when applicable),reason_code.
Out of Scope for This Sprint¶
- MaaS node onboarding integration.
- Full enterprise IdP admin UX.
- Service-account onboarding UX.
References¶
doc/architecture/adrs/ADR-008-tenant-project-ownership-baseline.mddoc/architecture/Tenant_Federation_SSO_Model.mddoc/product/UX_Implementation_Spec.mddoc/product/UX_Journeys.mddoc/architecture/Role_and_Policy_Lifecycle_Model.md