[Codex Security] Production provisioning restores a known-password platform admin
Provisioning now seeds starter SOC data without creating or reassigning the deterministic demo administrator.
_default_demo_seederno longer imports or calls_ensure_user, removing the provisioning path to the published demo credentials.- Default HTTP provisioning cannot select another seeder, so
seed_demo=trueno longer creates an active wildcard-role account for the new tenant. - New tenants still receive the inactive, invite-pending administrator associated with the waitlist email.
- Connector, alert, and case seeding remains intact for operators who request starter content.
- Regression coverage traps future demo-identity calls while asserting both legitimate data-seeding helpers remain reachable.
Static Verification Checks
-
Default identity sink removed (Passed) — services/api/app/services/tenant_provision/provisioner.py _default_demo_seeder imports only data seeders, establishing the known-password identity sink is unreachable from default provisioning.
-
HTTP callers cannot bypass (Passed) — provision_from_waitlist and provision_tenant expose no caller-controlled seeder, establishing HTTP inputs cannot restore the removed identity path.
-
Invite onboarding remains intact (Passed) — provisioner.py still creates an inactive invite-pending tenant administrator, establishing normal onboarding retains its intended identity flow.
-
Starter content remains seeded (Passed) — test_default_demo_seeder_never_creates_demo_identity asserts both data helpers run and the identity trap remains untouched, establishing starter content is preserved.
-
Final diff boundary review (Passed) — Static inspection of git diff found identity removal and preserved data calls, establishing closure without runtime execution.
-
Finding:
acf_131850631d40f60981dc8e262995f8c8 -
Patch:
arp_34fea74ea824ae1ac3079bffd493078e -
Base commit:
2a0d550165b9f82108a3fe1c487c44aa96ed1b24 -
Patch SHA-256:
65f55fe7a50c3e08c9e58b8e5700a1d47a7d72e7e2b4c1d254a5ef0a3108f73c
Summary by Sourcery
Remove the known-password demo identity from default tenant provisioning while retaining starter SOC data and invite-based administrator onboarding.
Bug Fixes:
- Prevent tenant provisioning from creating the deterministic demo administrator with published credentials.
Enhancements:
- Preserve starter connector, alert, and case seeding while relying on the tenant's normal invite-pending administrator flow.
Tests:
- Add regression coverage ensuring default provisioning invokes starter-data seeders without calling the demo identity helper.
Summary by cubic
Prevents production provisioning from creating the deterministic demo administrator with published credentials.
_default_demo_seederno longer calls_ensure_user; it seeds connectors, alerts, and cases only.- New tenants keep the inactive, invite-pending administrator, and HTTP provisioning offers no way to restore the demo identity path.
- Adds a regression test that fails if provisioning ever recreates the known-password demo user.