Repository navigation
AiSOC v23.5.2
Security
-
Managed-tenant provisioning no longer publishes the known-password demo
administrator (#1966)._default_demo_seedercalled
seed_demo._ensure_user, which upserts the deterministicdemo@example.com
user with the published password, anadminwildcard role and
is_active=True— and moves an existing row into the newly provisioned
tenant. Becauseprovision_from_waitlistdefaults toseed_demo=Trueand
the provision endpoint exposes no seeder field, every ordinary managed
promote created a public administrative login. (The #1904 env-gate that
covered this was itself a casualty of the #1933 stale-base revert — and this
fix supersedes it structurally rather than restoring it.) Provisioning now
seeds labelled starter content only, never the identity;_ensure_user
itself refuses any tenant but the canonical demo tenant before touching the
database; migration 163 retires already-published demo admins in managed
tenants (deactivated, sessions revoked, hash replaced with a sentinel, role
demoted) while leaving the canonical demo tenant working; and a live
negative control re-weakens both layers and asserts the suite fails.
Contributed by @knowlet. -
The threat-actor attribution API is fail-closed again (#1967, restoring
#1904/#1901). A stale-base push serialized an old tree overmain: the
#1933 merge (a cases fix) silently reverted the fail-closed enforcer in
services/threatintel/app/api/auth.pyback to warn-once-and-allow, reverted
its tests, and deleted thetests/test_threatintel_token_env_gate.pygate —
so the v23.5.0 and v23.5.1 tags shipped an enforcer that allows every caller
when the token is unset, while both releases' notes described 503. (The same
revert took the token generation and compose wiring, which #1961 had already
re-added without knowing it was a restoration, and the provisioner demo-seed
gate, which #1966 supersedes structurally.) This restores the enforcer
(unset token → 503 unlessAISOC_THREATINTEL_ALLOW_UNAUTHENTICATED=1is set
deliberately), its once-onlylru_cachewarning, the reverted
test_actor_attribution_auth.pyassertions, and the compose-forwarding gate
— which now coexists with #1961's source-derived wiring gate, two detectors
for one contract.