platform: split provider/operator admin consoles + password & TOTP 2F… - #20
Conversation
…A login
Replace the single token-paste "Banana X · Admin Portal" with two separate
consoles on one server, for security:
- /provider → Provider Control Plane (our admin: onboarding, all games,
disputes, reports, inspector, admin-account management)
- /admin → Provider Games · Operator Portal (casino admin: only their
assigned games + data; no single-game branding)
- / → redirects to /provider
Real authentication on both consoles: username + password (scrypt) + TOTP
authenticator 2FA (RFC 6238), hand-rolled on node:crypto (no new deps). Login
flow /admin/v1/auth/* mints the same bearer token the Admin API already
verifies; first sign-in forces password set + authenticator enrollment.
Admin accounts (admin_accounts store, in-memory + Postgres) with a bootstrap
provider super-admin seeded from BOOTSTRAP_ADMIN_USERNAME/PASSWORD; providers
create operator admins in-console (provider-only /admin/v1/admin-accounts).
Shared console shell served as /console/app.{css,js}. Docs updated (root
README rewritten as full-project overview, RUNBOOK, GUIDE, platform README,
.env.example). Tests: 96 pass (added password/totp/account/login/mgmt).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 34820812 | Triggered | Username Password | 40dc57d | platform/src/persistence/persistence.ts | View secret |
| 34820814 | Triggered | Generic Password | 40dc57d | platform/src/lib/security/totp.ts | View secret |
| 34820816 | Triggered | Generic Password | 40dc57d | platform/test/admin-auth-login.test.ts | View secret |
| 34820813 | Triggered | Generic High Entropy Secret | 40dc57d | platform/test/totp.test.ts | View secret |
| 34820817 | Triggered | Generic Password | 40dc57d | platform/test/admin-auth-login.test.ts | View secret |
| 34820815 | Triggered | Generic Password | 40dc57d | platform/src/http/admin-assets.ts | View secret |
| 34820817 | Triggered | Generic Password | 40dc57d | platform/test/admin-auth-login.test.ts | View secret |
| 34820817 | Triggered | Generic Password | 40dc57d | platform/test/admin-auth-login.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
WERSIT35
left a comment
There was a problem hiding this comment.
Everything seems good, in security part we use blank passwords, so gitguardian alerts are false, and shoud be ignored for now, dont forget to not push the sensitive files in prod
…A login
Replace the single token-paste "Banana X · Admin Portal" with two separate consoles on one server, for security:
assigned games + data; no single-game branding)
Real authentication on both consoles: username + password (scrypt) + TOTP authenticator 2FA (RFC 6238), hand-rolled on node:crypto (no new deps). Login flow /admin/v1/auth/* mints the same bearer token the Admin API already verifies; first sign-in forces password set + authenticator enrollment.
Admin accounts (admin_accounts store, in-memory + Postgres) with a bootstrap provider super-admin seeded from BOOTSTRAP_ADMIN_USERNAME/PASSWORD; providers create operator admins in-console (provider-only /admin/v1/admin-accounts).
Shared console shell served as /console/app.{css,js}. Docs updated (root README rewritten as full-project overview, RUNBOOK, GUIDE, platform README, .env.example). Tests: 96 pass (added password/totp/account/login/mgmt).