The cognee permission system
The master switch
ENABLE_BACKEND_ACCESS_CONTROL decides whether any of this runs:
true(default): multi-tenant mode. Every API call requires auth, every dataset operation is permission-checked, and each user+dataset pair gets isolated graph/vector/relational databases (tracked in theDatasetDatabasemodel, supported backends: Kuzu, LanceDB, SQLite, Postgres).false: single-user mode. Permission checks short-circuit to allowed, there is no per-dataset isolation, and every user's operations resolve to the same shared databases and datasets. Authentication is a separate knob:REQUIRE_AUTHENTICATION. Unset, it inherits this switch (so turning access control off also turns auth off) — but ifREQUIRE_AUTHENTICATION=trueis set, endpoints still demand a login; authenticated users are identified but not isolated, all pointing at the same data. The reverse misconfiguration (REQUIRE_AUTHENTICATION=falsewith access control on) is ignored: auth is forced on with a warning, because multi-tenant isolation is meaningless without identity (get_authenticated_user.py).