Skip to content

platform: split provider/operator admin consoles + password & TOTP 2F… - #20

Merged
WERSIT35 merged 1 commit into
mainfrom
feat/mobile-rgs-animation-polish
Jul 14, 2026
Merged

platform: split provider/operator admin consoles + password & TOTP 2F…#20
WERSIT35 merged 1 commit into
mainfrom
feat/mobile-rgs-animation-polish

Conversation

@WERSIT35

Copy link
Copy Markdown
Owner

…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).

…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>
@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
provider Ready Ready Preview, Comment Jul 14, 2026 6:45pm

@WERSIT35
WERSIT35 merged commit 8eaa8eb into main Jul 14, 2026
4 of 5 checks passed
@gitguardian

gitguardian Bot commented Jul 14, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 8 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
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
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. 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


🦉 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 WERSIT35 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant