| Session-first over JWT-only |
Core API flows still revolve around session tokens, cookies, and store.GetSession; JWT is optional and only active when auth.enable is true |
The current control plane and BFF flows already depend on session semantics |
Authentication is not purely JWT-based and mixes in-memory plus DB-backed session behavior |
Primary persistence through store.Store |
API, services, and startup code all consume internal/store.Store |
This isolates memory vs postgres differences and centralizes domain facts |
The interface surface is large and both implementations must stay aligned |
| GORM is limited to admin-side models |
Admin settings, homepage video, sandbox binding, and tenant / XWorkmate models use GORM; core identity and fact tables stay in the store layer |
Admin-side models change less often and are easier to evolve with GORM |
Developers must understand two persistence styles |
| Agent authentication uses pre-shared tokens |
agentserver.Registry authenticates tokens by SHA-256 digest of configured credentials |
This keeps agent onboarding simple for private or controlled deployments |
There is no built-in short-lived token rotation protocol |
| Xray config follows a generated convergence model |
xrayconfig.Generator / PeriodicSyncer always rebuild clients[] from the source of truth |
Full regeneration is simpler and avoids drift from partial patching |
The runtime needs file write access plus validate / restart command permissions |
| XWorkmate secrets are locator-only in profiles |
Profiles keep locator metadata only; raw secret values are read and written through Vault |
This prevents raw tokens from being persisted in API payloads or DB rows |
Runtime behavior depends on Vault availability; /profile/sync conflicts when bridge credentials are missing |
Root account is strictly admin@svc.plus |
store.RootAdminEmail, RBAC schema, and ensureRootUser enforce a single canonical root identity |
This prevents root-role sprawl and keeps privilege normalization explicit |
Legacy admin rows may be demoted or normalized during startup |