Product-neutral Realm customer-account lifecycle, authentication ownership, legacy compatibility, and per-Realm identity-service deployment.
| Decision | LOCKED DIRECTION |
| AccessControl | Keep and modernize in place. |
| UserAccounts | Legacy compatibility service; no new product architecture. |
| Accounts | New product-neutral Realm customer-account lifecycle service. |
| Deployment | One AccessControl instance per Realm/environment. |
DreamConsistency.UserAccounts.Api as legacy compatibility,
modernize DreamConsistency.AccessControl.Api while preserving existing
V1 compatibility, and introduce DreamConsistency.Accounts.Api as the
clean product-neutral Realm account lifecycle service.
| Responsibility | AccessControl.Api | Accounts.Api |
|---|---|---|
| Authenticate customer | YES | NO |
| Password verification | YES | NO |
| Password hashing/storage | YES | NO |
| Sessions / tokens | YES | NO |
| Password recovery | YES | NO |
| Invitation redemption | YES | NO |
| Create Realm customer account | NO | YES |
| Account profile / metadata | Read only as needed | YES |
| Tenant ownership relation | Use for auth scope | YES |
| Product-specific Tenant data | NO | NO |
AccessControl remains the Dream Consistency Core authentication authority. Its domain boundary remains valid even though the implementation requires modernization.
Existing V1 behavior remains available for legacy consumers while modern V2+ capabilities are introduced through additive and versioned contracts.
DreamConsistency.Accounts.Api is the clean shared Core service for
Realm customer-account administration.
The existing DreamConsistency.UserAccounts.Api remains available only
for compatibility with existing consumers.
| Allowed | Not Allowed |
|---|---|
| Critical security fixes | New Hestino functionality |
| Production compatibility fixes | New product-specific Tenant models |
| Operational maintenance | New authentication capabilities |
| Minimal dependency/runtime maintenance | New V2 account architecture |
| Safe telemetry/diagnostics | New cross-database workflows |
Realm selection is a deployment concern. Requests do not dynamically provide database connection information or select arbitrary Realm databases.
Product-specific user profile, person, participant, role, preference, and similar operational data remain owned by the product.
The same AccountId acts as the logical cross-database identity. There is no physical cross-database foreign key and email is not used as a database join key.
If the Realm operation succeeds and the product-side operation fails, a retry must recognize the already-created Realm identity and continue safely.
| Date | Change | Author |
|---|---|---|
| 2026-09-03 | Architecture decision established for UserAccounts legacy strategy, AccessControl modernization, and future Accounts.Api. | Branko |
| 2026-09-30 | Added to the central Dream Consistency Architecture Decisions area. | Branko |