{% extends "admin/dbs/wiki/_layout.html" %} {% block wiki %}

The session guard

This panel can download and overwrite the whole database, so only superusers reach it and every request through it is scored.

What is scored

Time of day, how fast requests are arriving, how risky the attempted action is, session age, whether the network prefix and browser are ones this account has used before, and — when enabled — distance from a known location and implied travel speed.

The model

An IsolationForest, shipped pre-trained on a synthetic corpus so it works from the first request, joined by a forest fitted to your own history once there is enough of it. Nothing is ever pickled or unpickled: models are refit from stored feature rows.

Getting back in

A locked-out account is cleared from a shell, which always beats the detector:

python manage.py dbs security unlock alice

Requests from DBS_TRUSTED_NETWORKS are scored and recorded but never enforced against, and DBS_ANOMALY_ENFORCE = False turns enforcement off entirely.

{% endblock %}