| Did you know ... | Search Documentation: |
| Pack asadb -- flaskserver/docs/SECURITY.md |
SameSite=Lax cookies.RBAC bindings have a role and scope:
{"role":"writer","scope":"database:main"}
* applies globally. Permissions are checked at Flask endpoints before a
request is forwarded to Prolog.
The existing AsaDB SQL user/grant catalog remains available inside the engine. It is a separate SQL authorization surface. Deployments may use both layers, but Flask RBAC is the mandatory network boundary.
The server treats any SQL other than one top-level SELECT as write-capable at the network authorization boundary. This deliberately conservative rule applies to stateless queries, durable sessions, jobs, the panel proxy, and the file API. It rejects multi-statement input for a reader even when a write follows a harmless-looking SELECT.
This lexer is not presented as an SQL parser. AsaDB's Prolog engine remains the parser of record; a future parser-backed classifier may broaden the reader-safe subset only with equivalent regression coverage.
Protect these paths:
ASADB_DATA_DIR ASADB_STATE_DIR/users ASADB_STATE_DIR/tokens ASADB_STATE_DIR/file-api ASADB_TEMP_DIR
Recommended service account ownership:
chown -R asadb:asadb /var/lib/asadb chmod 0700 /var/lib/asadb/server-state chmod 0700 /var/lib/asadb/databases
File API request files may include bearer tokens. They must not be placed in a world-readable directory. Username/password authentication is supported for manual bootstrap, but token authentication is preferred.
The private Prolog panel port is selected from a localhost-only range. Do not publish that range through a container port mapping or firewall rule. Public users should access only Flask.