You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Capture the admin password in the SLM setup wizard/provisioning; seed it as the default admin in autobot_users (Postgres now mandatory). Remove AUTOBOT_USER_MODE=single_user branching and the AUTOBOT_DEV_AUTH_BYPASS synthetic-admin path (#6838). Add a login-time unsafe-password warning (soft complaint). Part of #10193.
Scope note — the password-collection mechanism already exists; reuse it
install.sh already handles the admin password with no shipped default (verified):
user-set via --admin-pass= / AUTOBOT_SLM_ADMIN_PASSWORD / the setup wizard (the documented source of truth), else a randomly generated strong fallback (install.sh:565-566);
persisted as SLM_ADMIN_PASSWORD, preserved on reinstall, displayed at the end, passed to ansible (slm_admin_password=).
So this issue is NOT "build password collection" — it's:
Seed the CANONICAL autobot_users admin from that already-collected install/wizard password (instead of seeding slm_users).
Add the login-time unsafe-password warning (only bites when a user provides a weak password; the random fallback is already strong).
Reduces scope materially — the "no default password / user sets own" requirement is already met by install.sh; the work is re-pointing it at the canonical store + killing single_user.
Scope analysis — this is larger/riskier than a typical child; proposed sub-staging
single_user/AUTOBOT_USER_MODE/DeploymentMode.SINGLE_USER/AUTOBOT_DEV_AUTH_BYPASS is referenced across ~34 backend/shared files (agents, api/auth.py, auth_middleware, auth_rbac, LLC deps/api/scheduler, lifespan, user_management/{config,database,base_service}, ssot_config, settings, onboarding, live_events, security_layer, service_registry, …). Most use it to gate Postgres-optional behavior. Eliminating the mode also makes Postgres mandatory on every install and requires seeding a default admin at provision — a deployment/provisioning change, highest blast radius in the epic.
Proposed sub-stages (each its own PR) instead of one 34-file sweep:
Seed default admin in autobot_users at SLM deploy (reuse the install/wizard-collected password) — provisioning + a one-time seed. Makes a real admin exist.
Stages 1-3 are the behavioral change; 4 is mechanical cleanup. This also wants coordination with #10200 (migrate slm_users → autobot_users) so the seeded/migrated admins land in one place.
Recommend: confirm this staging before building (highest-risk change in #10193). Also: the live deploy currently runs single_user + the bypass — these stages change that, so a redeploy/reinstall is needed to realize them.
Stage 2a OPEN — PR #10243 (enabling step before bypass removal)
Investigating stage 2 surfaced a hard coupling: single_user mode is "Postgres-off" (postgres_enabled = mode != SINGLE_USER), so deleting the #6838 bypass in isolation would 500 (engine raises). Also, nothing in provisioning ever set AUTOBOT_ADMIN_PASSWORD — the stage-1 seed would always skip, so removing the bypass without this would leave installs with no admin and no login.
Live cutover runbook — 172.16.168.20 (single_user → single_company / full auth)
Decision (2026-06-21): upgrade the live box to full auth. Code side is done (#10243 merged: default single_company + seed_default_admin from AUTOBOT_ADMIN_PASSWORD, idempotent, Postgres-gated). The live box still has AUTOBOT_USER_MODE=single_user in its backend .env (rsync-excluded, so the deploy didn't change it).
Prerequisites (verified on box)
PostgreSQL active; user DBs present; seed_default_admin wired in lifespan.py Phase 2 (@requires_postgres).
Auth flow: single_company /login → real Postgres credential check (UserService.authenticate), no synthetic bypass (api/auth.py:213).
Final AC (login-time weak-password soft-warning) merged to Dev_new_gui via #10979 (daa33d0). All 5 ACs now complete: seed-admin (#10230/#10243), single_company default, single_user removal (#10861/#10713), AUTOBOT_DEV_AUTH_BYPASS removal, and now the non-blocking login weak-password warning (checks seeded-default/length/common-list; plaintext never logged; 14/14 tests). All required CI checks passed. Closing.
Activity
mrveiss commentedon Jun 15, 2026
Scope note — the password-collection mechanism already exists; reuse it
install.shalready handles the admin password with no shipped default (verified):--admin-pass=/AUTOBOT_SLM_ADMIN_PASSWORD/ the setup wizard (the documented source of truth), else a randomly generated strong fallback (install.sh:565-566);SLM_ADMIN_PASSWORD, preserved on reinstall, displayed at the end, passed to ansible (slm_admin_password=).So this issue is NOT "build password collection" — it's:
autobot_usersadmin from that already-collected install/wizard password (instead of seedingslm_users).single_usermode + theAUTOBOT_DEV_AUTH_BYPASS(security(auth): /api/auth/login accepts ANY password for admin user #6838) synthetic-admin path.Reduces scope materially — the "no default password / user sets own" requirement is already met by install.sh; the work is re-pointing it at the canonical store + killing single_user.
mrveiss commentedon Jun 16, 2026
Scope analysis — this is larger/riskier than a typical child; proposed sub-staging
single_user/AUTOBOT_USER_MODE/DeploymentMode.SINGLE_USER/AUTOBOT_DEV_AUTH_BYPASSis referenced across ~34 backend/shared files (agents,api/auth.py,auth_middleware,auth_rbac, LLCdeps/api/scheduler,lifespan,user_management/{config,database,base_service},ssot_config, settings, onboarding, live_events, security_layer, service_registry, …). Most use it to gate Postgres-optional behavior. Eliminating the mode also makes Postgres mandatory on every install and requires seeding a default admin at provision — a deployment/provisioning change, highest blast radius in the epic.Proposed sub-stages (each its own PR) instead of one 34-file sweep:
autobot_usersat SLM deploy (reuse the install/wizard-collected password) — provisioning + a one-time seed. Makes a real admin exist.api/auth.pyso the user app authenticates against the real seeded admin (depends on 1 + Postgres present). Add the login-time unsafe-password warning.autobot_users; lifespan no longer degrades to no-DB).single_userbranches across the ~30 remaining files — no behavior change once Postgres is always present.Stages 1-3 are the behavioral change; 4 is mechanical cleanup. This also wants coordination with #10200 (migrate
slm_users→autobot_users) so the seeded/migrated admins land in one place.Recommend: confirm this staging before building (highest-risk change in #10193). Also: the live deploy currently runs single_user + the bypass — these stages change that, so a redeploy/reinstall is needed to realize them.
feat(auth): seed default admin into autobot_users at startup (idempot…
mrveiss commentedon Jun 16, 2026
Stage 1 DONE — merged via PR #10230 (
f9ea2c235)Default admin seeded into
autobot_usersat startup (idempotent, Postgres-gated, no shipped default password; readsAUTOBOT_ADMIN_PASSWORD/AUTOBOT_ADMIN_USERNAME). Purely additive — login/single_user/#6838 untouched. Next: stage 2 (remove #6838 synthetic-admin bypass + unsafe-password login warning).mrveiss commentedon Jun 16, 2026
Stage 2a OPEN — PR #10243 (enabling step before bypass removal)
Investigating stage 2 surfaced a hard coupling:
single_usermode is "Postgres-off" (postgres_enabled = mode != SINGLE_USER), so deleting the #6838 bypass in isolation would 500 (engine raises). Also, nothing in provisioning ever setAUTOBOT_ADMIN_PASSWORD— the stage-1 seed would always skip, so removing the bypass without this would leave installs with no admin and no login.Chosen path (safest): split stage 2 into 2a (enable) + 2b (remove).
single_company(Postgres-backed real auth); wire wizard-setSLM_ADMIN_PASSWORD→ backendAUTOBOT_ADMIN_PASSWORDso the seed creates the single canonical admin ("same creds as SLM"). Bypass untouched but now unreachable on the default path.single_user code + 503 gates untouched (stages 3/4).
feat(auth): default to single_company + seed unified admin from SLM c…
mrveiss commentedon Jun 21, 2026
Live cutover runbook — 172.16.168.20 (single_user → single_company / full auth)
Decision (2026-06-21): upgrade the live box to full auth. Code side is done (#10243 merged: default single_company +
seed_default_adminfromAUTOBOT_ADMIN_PASSWORD, idempotent, Postgres-gated). The live box still hasAUTOBOT_USER_MODE=single_userin its backend.env(rsync-excluded, so the deploy didn't change it).Prerequisites (verified on box)
seed_default_adminwired inlifespan.pyPhase 2 (@requires_postgres)./login→ real Postgres credential check (UserService.authenticate), no synthetic bypass (api/auth.py:213).If
AUTOBOT_ADMIN_PASSWORDis not set before restart, no admin is seeded and/loginrejects all creds → locked out. So set it FIRST.Safe ordered steps (backend
/opt/autobot/autobot-backend/.env)AUTOBOT_ADMIN_PASSWORD=<strong>(+ optionalAUTOBOT_ADMIN_USERNAME=admin) — before restart.AUTOBOT_POSTGRES_{HOST,PORT,DB,USER,PASSWORD}set + reachable + migrations applied (autobot_userstable exists).AUTOBOT_USER_MODE=single_company.AUTOBOT_DEV_AUTH_BYPASS.systemctl restart autobot-backend→ Phase 2 seeds admin (idempotent).admin/AUTOBOT_ADMIN_PASSWORD. Verify LLC 503s clear (company-mode features enable).Rollback
AUTOBOT_USER_MODE=single_user+AUTOBOT_DEV_AUTH_BYPASS=true, restart.Follow-ups
feat(auth): login-time weak-password soft warning (non-blocking) (#10199
mrveiss commentedon Jul 6, 2026
Final AC (login-time weak-password soft-warning) merged to Dev_new_gui via #10979 (daa33d0). All 5 ACs now complete: seed-admin (#10230/#10243), single_company default, single_user removal (#10861/#10713), AUTOBOT_DEV_AUTH_BYPASS removal, and now the non-blocking login weak-password warning (checks seeded-default/length/common-list; plaintext never logged; 14/14 tests). All required CI checks passed. Closing.