Permissions, custody and remote access
Permission views: column, row and cell
Permissions are declared in the schema and applied by whoever serves the file, before answering. Without the scope, the column comes out null; without the tenant, the row does not come out.
· jsonW 1.3.11
The problem
Many data leaks come from a query that returned more than it should: the ID number that showed up on the front desk screen, the customer who saw another customer's data.
How jsonW solves it
The schema marks the column: +pessoal for personal data and +escopo(financeiro) for whoever has that scope. An integer column named tenant separates customers: blocks belonging to another tenant are never opened. Both together give the cell: the customer's own row, without the personal column.
$ wjsw de-texto "paciente:texto,cpf:codigo?+pessoal,valor:dinheiro+escopo(financeiro),data:tempo,tenant:i64" clin.jsonl clin.jsw
$ WJSW_ESCOPOS="tenant:1" wjsw ver clin.jsw
{paciente:"Ana Souza",cpf:null,valor:null,data:t"2026-11-12T13:00:00.000000Z",tenant:1}
{paciente:"Carla Dias",cpf:null,valor:null,data:t"2026-11-12T15:30:00.000000Z",tenant:1}
$ WJSW_ESCOPOS="financeiro tenant:1" wjsw ver clin.jsw
{paciente:"Ana Souza",cpf:null,valor:180.00 BRL,data:t"2026-11-12T13:00:00.000000Z",tenant:1}
{paciente:"Carla Dias",cpf:null,valor:180.00 BRL,data:t"2026-11-12T15:30:00.000000Z",tenant:1}
Real output, with fictitious data: the same query with two credentials. The unit 1 front desk sees neither the CPF (Brazilian ID) nor the amount; finance sees the amount.
Where it is
In wjsw ver, in wjsw-cgi (Apache, nginx, LiteSpeed, Caddy and IIS) and in the SDKs. The view protects what leaves the server and is not encryption: whoever holds the file has all the data, and for the disk, storage encryption applies.