[ platform · account ]

Account · keys · theme

User profile, API key vault (Fernet-encrypted at rest), and the multi-tenant theming controls that drive the whitelabel.

Profile

Email + display name + role + last-login timestamp. The first registered user is auto-promoted to admin; admins can promote/demote others and manage tenant settings. Self-delete is blocked (foot-gun); last-admin-delete is blocked (foot-gun).

API keys

One row per linked provider. Columns: provider id, masked key (e.g. PKGP...44F), linked-at timestamp, last-used-at, status. Buttons:

Keys are stored under Fernet symmetric encryption. The master key sits at data/.auth_secret (chmod 600 + gitignored). Only the masked prefix/suffix is ever surfaced to the UI; the full plaintext key is never readable after submission.

Tenant theme & whitelabel

Admins see the Tenant theme section. Fields:

warn

Tenant CSS is a powerful escape hatch — also a foot-gun. display: none on something important and the dashboard goes blank. Test in an incognito window before saving.

Multi-tenant data isolation

Every per-user resource (API keys, saved sleeves, audit decisions, scheduler history) is keyed on tenant_id. Cross-tenant reads are blocked at the SQL layer in src/traderspace/auth/queries.py.

REST surface

VerbPathPurpose
GET/api/account/meCurrent user profile.
GET/api/account/keysLinked providers (masked).
POST/api/account/keysAdd or rotate.
DELETE/api/account/keys/{id}Unlink.
GET/api/account/tenantTenant theme + display name.
POST/api/account/tenantUpdate theme (admin only).
NVTrader v0.1.18 · docs ·⚠ Not financial advice ·Docs home ·App