settings.js — the sentinel.allow map
The primary grant file is settings.js, the standard Node-RED configuration file. Grants live in the sentinel.allow map. Each key is an npm package name exactly as it appears in node_modules/; the value is an array of capability strings:
settings.js
sentinel.allow map and merges it with the packages section of .sentinel-grants.json to build the active grant table.
.sentinel-grants.json — the UI-managed grants file
Sentinel also looks for a .sentinel-grants.json file in the Node-RED userDir (next to settings.js). This file is the backing store for the Sentinel editor panel — the Node-RED UI reads and writes it directly through admin API routes, so operators can manage grants in the browser without touching settings.js.
The file has two top-level sections:
.sentinel-grants.json
The packages section (caller grants)
The packages section is equivalent to settings.sentinel.allow. Entries here are merged with settings.js at runtime. This is what the Sentinel UI writes when you add a package grant through the editor panel.
The nodeTypes section (target permissions)
The nodeTypes section provides the target side of the dual-axis check. It is keyed on the target node’s type, and each entry lists which caller packages are allowed to perform a given operation on nodes of that type.
The dual-axis model gives two independent paths to grant access:
- Caller path — a package holds the capability in its
packagesentry (insettings.jsor.sentinel-grants.json). This is a broad grant: the package can access that capability on any node it reaches viagetNode(). - Target path — the target node type lists the caller in its
nodeTypesentry. This is a narrow grant: only the listed packages can access that capability on nodes of that specific type, regardless of what they hold in their own grants.
undefined for the guarded property.Ownership and separation
The separation of the two files is intentional.| File | Owner | Where it lives |
|---|---|---|
settings.js | Deployment tooling | Outside the writable volume |
.sentinel-grants.json | Sentinel UI panel | Inside the writable userDir (/data) |
settings.js is mounted read-only so it cannot be modified at runtime — a malicious node cannot edit the file to grant itself new permissions:
.sentinel-grants.json lives in the writable /data directory, giving the UI panel a place to persist operator changes made through the browser.
Node-type permissions — examples
Grant specific packages access to a config node’s credentials:.sentinel-grants.json
node-red-contrib-influxdb gets target-side access. Any other package without node:credentials:read in its own grants is blocked.
Allow multiple consumers, block all others:
.sentinel-grants.json
.sentinel-grants.json
.sentinel-grants.json
node:credentials:read in its packages entry can still access the node via the caller path — the [] only closes the target-based path, not the caller-based path.
Complete example combining both sections
.sentinel-grants.json
The
nodeTypes section is purely additive: if the caller is listed, access is granted immediately. If it is not, Sentinel falls through to the packages section and settings.js grants as normal. An entry in nodeTypes cannot block a package that already holds the capability in its caller grants.