Authorization
What an authenticated principal may do. For how it proved identity, see authentication. The rules this page relies on are catalogued in constraints.
The permission catalogue
Authorization is checked against string permission codes held in a closed domain catalogue (constraint). Adding a code means four things in one change: editing the catalogue, adding it to the catalogue's complete collection, seeding a database row, and, if any controller names it in a policy attribute, registering a matching authorization policy by hand.
The seeded permission rows must stay a superset of the catalogue. Otherwise a code exists that no administrator can ever be granted.
A permission code describes a capability of the platform, never one plugin's protocol. A plugin's
endpoints reuse the generic codes: plugin settings and a plugin's own HTTP endpoints are governed by
integrations.manage, raw protocol writes by devices.manage. A per-plugin code would put a vendor's
vocabulary into core access control, where it outlives the plugin and cannot be granted coherently once the
plugin is external.
Paired codes and Administrator-only codes
Some codes are seeded as read and write pairs and gate a controller at class level with the read code, so
a holder of the write code who lacks the read code reaches nothing (geofences.*, cameras.media.*).
Seed and grant both halves together. dashboards.view reads the shared dashboards and pins them;
dashboards.manage changes them, so a manager also needs the read code to list them, and a user without it
gets only personal dashboards in the tab list, never an auto-pinned default. Every seeded role except Guest
holds dashboards.view.
Some codes are held by Administrator only, by design, and no other seeded role lists them:
| Code | Why it is Administrator-only |
|---|---|
workloads.approve |
Approving privileged sidecar installs and workload-provider settings is close to node-root authority; it is distinct from the plugin-permission workloads.deploy |
workflows.scripting |
Authoring or running any workflow with an arbitrary-code block; not part of automations.manage (see scripting) |
devices.onboard |
The device-onboarding endpoints, which commission hardware onto the household's fabrics |
egress.manage |
Changing the egress allowlist, which opens private addresses to outbound calls |
cameras.media.manage |
Turns the media plane's WebRTC, fMP4 and transcoding rungs off for the whole household |
egress.view goes to Administrator and Power User. integrations.read browses the marketplace but never
installs; installing still requires integrations.manage.
Boot-time seeding and default grants
Seeds are idempotent and run on every start. ReeveDatabaseInitializer inserts any permission code
missing from the database and grants it to the roles whose defaults list it, on the boot that inserts it,
so a code introduced after a database exists reaches every deployment without a per-code migration.
Default grants are given once. A built-in role's default grant is applied only when the role is created on this boot, or when its permission code is inserted into the catalogue on this boot. "Created this boot" is read off the database: on a database whose users table is empty, which is every fresh database, nobody could have changed a grant yet, so every built-in role and code count as new and the defaults apply in full, including removing a migration-seeded grant that is not a default. Administrator is the exception and always holds the whole catalogue. A grant an administrator removed is never added back; an upgrade grants a new code only to the default roles that list it and revokes nothing already held. The seeder prunes surplus grants solely for roles it created in the same run. A new code and its grants are saved together, so a boot cut short cannot catalogue a code that grant-once then never offers. Deleting a built-in role recreates it with its defaults on the next boot.
Consequences:
- Editing the role seed table reaches a fresh database and a new code, and reaches no deployed household for an existing code; that needs a migration.
- A code that a migration (not the initializer) inserts must grant itself to the roles that need it, because the initializer then sees it as already present.
- The seeder changes the database and purges no session; a live session picks the new grant up on its next slide (see authentication).
- Missing defaults are not re-added on every boot, so a removal made in the role editor stays removed after a restart.
The initializer also keeps the built-in administrator usable (see authentication) and owns a permanent "System" plugin instance to which platform-originated sources, such as manual location reports, are attributed; it ships no runnable code and is never started.
Effective permissions and privilege tiers
One chokepoint computes the effective permission set. For a PAT request it is the already-intersected claim set, and only for the token's own user; reading the database set there would hand a token the rights its scope withholds. Otherwise it is the full database set. A PAT principal is identified by the token-id claim, which a cookie principal never carries. Role-derived codes come from one query shared by the single-user and bulk paths.
The set an actor may grant is its own effective set plus the baseline role: conferring the floor is never
escalation, and Administrator-only codes are excluded. Through the actor's own token the effective set is the
token's, and neither the owner's system role nor the built-in administrator flag lifts the grant limit or
the tier guard, so a token narrowed to users.manage or roles.manage cannot mint an Administrator. A roles.manage holder may not confer a code it
lacks (403), nor edit, rename or strip a role that already holds a code outside its grantable set (403),
since that reaches every holder of the role. Tier guards use the target's effective privilege: a user who is not a system administrator
never administers a system administrator, and manages only targets no more privileged than one it could
have created. A users.manage or roles.manage holder in that position cannot create, modify, reset or
inspect the access of a more privileged user, and grants are clamped to the actor's own set.
No admin route changes the caller's own credentials or access: clearing or resetting one's own second
factor, setting one's own password, linking an identity to oneself and changing one's own device or scene
access there are refused (403), because none of them asks for the current password or a step-up. The
self-service routes under /api/users/me/*, which do, are the way to change one's own sign-in methods.
With the tier guard, only the built-in administrator changes another administrator's access, and nobody
changes the built-in administrator's own access through the API.
Where enforcement lives
The dominant pattern is an imperative check inside the service that performs the operation, raising an unauthorized exception the controller maps to 403. Policy attributes exist for a subset of codes and are defence in depth.
Service-level checks travel with the business operation, so a second caller (a background runner, another controller) cannot reach the operation ungated. A policy attribute needs its policy registered: an unregistered policy name throws at request time and answers 500 to everyone instead of 403 to the unauthorised.
The API never leaks internals or existence
- A permission denial is one generic 403, identical whether it comes from a controller or the exception handler; the exact missing code goes to the server log only. A security exception never degrades to a 500 when a controller forgets the catch.
- Anything the caller may not see answers 404, never 403, so no endpoint can probe existence: another principal's onboarding session, a physical device's sources, a scene the caller cannot administer, a device the caller may not view or one outside the token's scope (its detail, history, model findings and area names). Write paths on cross-user resources answer 404 rather than 403. A device command is the exception: a caller that may not control the device gets 403 whether or not it may view it, because scene and automation runs read a not-found answer as a removed device.
- Authorization runs before any kind inference or short-circuit, including the self-merge check, so an unauthorized caller gets 403 and never a 400 or 409 that tells whether a key is a canonical capability or a device exists.
- Raw PostgreSQL and EF text, server paths and parameter names are never returned. PostgreSQL class-22 data exceptions caused by client input answer 400 on write paths (an allow-list of input-shaped codes on reads); an optimistic-concurrency race answers 409 and is matched first, because it is a subtype; a unique violation answers 409 without the constraint name; a deadlock stays a 500.
- Error text that reaches a phone during device onboarding is generic, because provider exceptions can carry provider internals. A workflow cancel or author-time gate denial is equally generic.
- A workflow compile refusal's detail is the workflow library's and Reeve's own words, never a fault's.
Device and scene access
Effective device access combines role permissions with an optional per-user override (hidden or view-only) and optional per-user time windows. The time-window verdict takes precedence over the override. With the base permission a user reaches everything except an explicit hide or a device outside its window; without it, only an explicit view-only grant inside its window. Time windows restrict device control and device history only: analytics series and utility metering data follow the per-device override and base view permission and stay visible outside a window, because aggregates and metered consumption are records of what already happened, not live access to a device.
Access belongs to the logical device; a physical device inherits its parent's grant, and there are no
per-source grants. Device management writes on both layers (rename, room, metadata, merge, detach,
removal and the rest of devices.manage) also pass the per-device visibility gate and refuse with 404, so a
hide holds against a manager and a hidden device cannot be merged into a visible one.
Time windows are evaluated against the IANA time zone of the household's home row, so daylight-saving
changes are followed. A window grants from its start, inclusive, to its end, exclusive, in home-local time,
and a window whose start equals its end is refused on write. A window whose start is after its end crosses
midnight: it grants from the start to midnight on its own day and from midnight to the end on the next day,
so a Monday 22:00–06:00 window grants Monday night and Tuesday morning, not Monday morning, and a Sunday
window continues into Monday. The admin editor accepts such windows and marks their end as the next day. A
household time zone the host cannot resolve, or no home row, puts every time-windowed device and scene
outside its windows; access without windows is unaffected. The access check and the reconciler log an
error naming the zone, at most once per zone every 15 minutes on each replica; the realtime and command
paths decide from the access state the reconciler built, so its log covers them.
One evaluator is shared by the domain check, the database-side accessible-devices filter and the point check, so the list, the detail read and the command path can never disagree about who may act. Every new read path over device- or scene-scoped data must materialise the accessible filter as a SQL predicate applied before counting and paging (constraint), or it becomes a direct-object-reference hole; filtering in memory afterwards yields wrong totals and empty pages. Accessible ids are materialised on the primary context before a query against the read replica, since a cross-context subquery throws. Result ordering uses the device id as a tie-breaker, so paging neither duplicates nor skips equal names. The device-event history log and the merge-suggestion list apply the accessible filter and the token's device filter. A replacement device is named only to a caller who can view it within their token scope.
Persisted user-curated device lists, such as favourites, must resolve through the permanent half of the access filter only. A window is a statement about the clock, not about access: projecting a stored list through the time-window filter on read, then storing the client's echo back, deletes every entry that merely happened to be outside its window at that moment.
Scenes
Scene access is binary: one flag governs both seeing a scene in the list and activating it. It is granted
by default to anyone holding scenes.control or scenes.manage (which implies it), revoked by a per-scene
hidden override, and restricted by the same time windows, resolved in the home's local time. Device
permissions give no scene access, and scenes.manage is the only code that edits a scene.
An edit, enable or delete also needs access to that scene, so a hidden scene answers its writes with 404 before
anything is written. An editor cannot make a scene do more to a device than they could do themselves: a new
action, a changed value or turning bypass on refuses with 400 when it touches a device the editor cannot control
now, or that the editor's token scope does not cover, and the refusal reads the same as for a device that does not
exist. An action left as it was needs no control of its device. It counts as unchanged when its device, capability
and canonical value match the stored action after both values are normalised. A stored value in another spelling,
such as the same JSON with its fields in another order or other whitespace from a bundle import or demo content,
therefore still counts as unchanged and does not refuse the edit. A workflow bundle import that carries scenes
creates them under the same rules: it needs scenes.manage on top of automations.manage, and control of every
device the scenes' actions name after the device mapping, or nothing is imported.
A scene's details leave out its actions on devices the reader may not view, and the scene list counts only the
actions the reader may see, so a scene names and counts no hidden device.
An edit keeps those actions where they were, since the editor never saw them to send back, and turning bypass on
refuses while the scene holds one.
Activation runs with the executor's permissions, so it is a grant of device control and sits behind a code
of its own. Family Member, Household Member and Power User hold scenes.control; Read-only Viewer and
Guest hold neither code. The web application hides every scene control the role lacks. A custom role that
should run scenes needs scenes.control, and so does a personal access token's scope.
A plugin is an executor with no user behind it. A plugin instance granted the plugin permission
scenes.control lists every enabled scene and can activate any of them. The per-scene hidden override and
the time windows are not applied to it, and the audit entry of the activation names no user. The scene's
actions run with the device access of the user who created the scene, so an action on a device that user
cannot control now is skipped. A scene that bypasses its executor's permissions runs every action, for a
plugin as for a user. The operator's grant of that permission to the plugin is the whole authorization, so
grant it only to a plugin that may run every scene.
Exactly one dispatch path bypasses per-user device access: scene activation for a scene that runs
with its executor's permissions. It lives on a separate first-party interface, deliberately absent
from the plugin-facing device service, so plugin, scripting and workflow code cannot call the bypass and
reaches it only by activating such a scene; the plugin-facing send always enforces the per-user check.
The workflow blocks that write to a device (SetProperty, SetRawDeviceProperty) send through that
service as the run's owner, so the owner's device access and time windows hold for them. A device
hidden from the owner fails the write with device.not-found, as a missing one does; a device the owner
may view but not control, or only outside a time window, keeps the access refusal.
The blocks that read devices (GetProperty, WaitForProperty, GetRawDeviceProperty, GetDevices) see
only what the run's owner may view: a hidden device fails the read with device.not-found, as a missing one does, and
is left out of GetDevices.
Triggers and parked waits answer the same question. A fire of a trigger bound to a device (StateChange on a
device, DeviceEvent, CameraMotion, CameraObjectDetected, CameraPlateRecognized, CameraSoundDetected) whose
workflow's owner may not view that device is dropped before it starts a run or wakes a run parked on the trigger. In
an All automation such a trigger, as a sibling of the one that fired, counts as not satisfied without its state being
read. A device report does not wake a WaitForProperty run whose owner may not view the device: the wait behaves as if the
device were silent for that owner, and stays parked until its timeout or a report after the owner may view it again.
The read, the fire, the sibling check and the wake use one resolution, IAuthorizationService.GetEffectiveDeviceAccessAsync(...).CanView
and its batched form FilterViewersAsync, which share one code path: the hidden and view-only overrides, the role
permissions, another member's presence device and the owner's time windows at the home's local time of the check.
The automation lookups run without the caller's ambient identity, so a fire raised inside a personal-access-token
request is answered from the owner's roles, not from that token's scopes.
The raw-property write (POST /api/devices/{id}/raw-properties and SetRawDeviceProperty) takes only the
target's controllable capabilities and the unmapped properties its source declares writable, never an arbitrary
vendor key, under the same device control, time windows and token scope, and it is audited.
Locations and geofences
Location access is two-sided. Reporting and reading one's own fixes (/api/locations/me/*) need only a
signed-in session, or a token that stands in for its owner (see personal access tokens). Reading another member's latest position or history (/api/locations/users/latest,
/api/locations/user/{id}/...) needs locations.view or home.manage, enforced by one policy that accepts
either; Family Member, Household Member and Power User hold locations.view by default, Guest and Read-only
Viewer hold neither. The web map pages, the dashboard map widget, the presence device page and the phone's
map gate other members on the same pair. The home's own coordinates follow the same pair: GET /api/home
answers everyone signed in, but with latitude and longitude null for a caller who holds neither, and a
script reads them through its workflow owner's permissions. hasLocation tells every caller whether the home has
coordinates, so the sun-trigger form warns only when it truly has none.
The presence device a member's reports create (a logical device holding their home or away state) is gated
on the same pair. A user who holds neither sees no other member's presence device in any device read,
history or push, as if it carried a Hidden override; their own presence device stays visible, and an
explicit override on a presence device still decides for that user. The access state applies the rule to the
access context and the device audience, and the authorization service's device filter and point check apply the
same predicate, so device lists, history, alerts and room subscriptions follow it as well. The access state
rebuilds asynchronously from change capture, so until that rebuild lands a new presence device has the default
audience: reads through the access context and the push of a second report reach every active holder of devices.view or devices.control.
Only the push of the report that creates the device is suppressed; the authorization service reads the
database and applies the rule at once.
Geofences are household data with no per-creator filter: geofences.view lists every geofence and
geofences.manage changes or deletes any of them. Whoever may view geofences sees each one's centre and
radius, which often reveals where the home is even when the home's own coordinates are hidden from callers
without locations.view or home.manage; an operator who does not want that removes geofences.view from the
role in the role editor (see known limitations).
The geofence keeps its creator. A member's reported
location is evaluated against every geofence, and the enter or leave latch is kept per member and zone, so
one crossing is announced once for the member who made it. A geofence trigger with no zone fires for its
owner's crossing of any household zone. Deleting a user deletes the geofences they created, with their
latches; an automation that named one never fires again.
The access state
Reads, commands, camera, analytics and utility decide from the user's access context, and a realtime push
goes to the audience of the device, both derived from the access state: the users with their status and
role permission codes, their device overrides and time windows, and the home time zone
(constraint). The state is rebuilt from
PostgreSQL after any access change and replaces the previous one on every replica; a request or a hub
invocation reads the state of its pinned generation, so a change acknowledged to its writer is visible on
every serving replica from then on, and neither the context nor the audience is re-read from PostgreSQL per
request.
The audience of a device is the active users holding devices.view or devices.control through a role,
without the users with a Hidden override on that device and with the active users with a ViewOnly
override. For a member's presence device the role holders are narrowed first to its owner and the holders of
locations.view or home.manage. A disabled or pending user is in no audience. Pushes do not apply time
windows. A device that no override names, including one just created, reaches the default audience.
The access context is cached per user and per token under a key that carries the state's version, so a
changed state is never answered from an older context, and the token partition stops a narrow token from
reusing or poisoning the owner's full-session context. The entry expires after
Authorization:Cache:AccessContextTtl (5 s), which only limits how long a superseded version stays in
memory; authorization caches measure elapsed time on a monotonic clock. A token request takes its
permission codes from the token's claims only for the token's owner; for any other user they come from the
state. A replica that does not serve a configuration generation refuses an access check with
ReplicaNotServingException and sends no push, rather than answer from a state that may miss an
acknowledged revocation.
Realtime hubs
AdminUpdatesHub admits any signed-in user but adds the connection only to the groups of permissions it
holds; alert pushes carry an id, and the client refetches its own filtered view. Membership is decided at
connect and rechecked against PostgreSQL when an applied access change requests it and every 5 s, so a user
who loses integrations.manage leaves the group at the next recheck, not at once. A PAT connection is
bounded by the permission codes its claims carried at connect and is dropped once the token stops being
live.
On DeviceUpdatesHub a connection receives pushes for every device it may access and cannot narrow them
(delivery). Debugger hub commands
need the session owner or home.manage. Live revocation of hub connections is described in
authentication.
Personal access tokens
A token is a long-lived bearer credential that lives in a script, a scheduler or an agent configuration, places a session cookie never goes, so its blast radius is a property of what a token is, not of who created it (constraint).
A token's effective permission set is ceiling ∩ scope ∩ owner, applied in the order owner, scope,
ceiling:
- Ceiling: a capability limit that is a constant in the domain assembly, never configuration; an
instance-level switch would be turned off first thing. The ceiling admits the whole catalogue. A narrower
automation surface (
devices.view,devices.control,rooms.view,dashboards.view,utility.view,notifications.send,geofences.view,geofences.manage) is kept beside it, and pointing the ceiling at it is a one-line change. - Scope: the permissions the token itself requests, plus a device filter resolved live per request (all devices, room groups, or explicit ids) and an optional CIDR allowlist matched against the real connection address. A null scope means no narrowing.
- Owner: the issuing user's current permissions, so a token can never outrank or outlive the person behind it.
Never widen that set anywhere else. The intersection is computed once and read from principal claims, but only to answer for the token's own owner. A token says nothing about anybody else, so a question about any other user is answered from that user's roles in the database, exactly as the session-cookie path is. A token principal that names no user at all is refused rather than guessed at. A token's scope is part of the intersection, so a token scoped to device permissions holds no scene access even when its owner does.
The device filter is orthogonal to permissions. The permission filter applies when the principal is built;
the device filter additionally restricts every request that resolves to a specific device, even when
devices.view is in scope. Device endpoints carry no gate of their own, so every single-device entry point
asserts the scope; single-device reads refuse, and audit the rejection, while lists intersect the scope
before pagination and drop out-of-scope devices silently, so totals stay honest and logs do not flood. A
silent list filter treats a null scope as allowed, unlike an explicit access assertion, and a malformed scope
denies everything. "Groups" resolve to every device in the listed rooms; there is no device-group entity.
Analytics honour the device scope too, or a single-device token could enumerate every device and numeric
capability.
A token stands in for its owner when it has no scope, or every permission over all devices. The owner's own
data, which no permission governs (their location reports and history under /api/locations/me/*, their push
targets under /api/users/me/push-devices, their preferences under /api/users/me/preferences, and
their tab layout (GET and PUT /api/dashboards/tabs, DELETE /api/dashboards/tabs/pin/{id})), is
reachable only by such a token; a narrower one gets 403 there. The dashboard routes that a permission governs
keep that permission as their gate: listing personal dashboards and pinning take dashboards.view, editing them
dashboards.edit. The live device channel (/hubs/devices)
delivers by the owner's audience and carries the owner's in-app notifications, so it admits only such a token
too and aborts any narrower one at connect. The token, password, two-factor, passkey, step-up and onboarding
routes under /api/users/me/* take the session cookie only, so no token can mint or list tokens there, and so
do signing out (POST /api/auth/logout) and signing out every session (POST /api/auth/logout/all), so a
token cannot end its owner's sessions. GET /api/auth/me answers any authenticated caller.
The CIDR allowlist handles dual-stack clients (::ffff:x.y.z.w matches x.y.z.0/24), an empty list never
matches, and creating a token rejects the first malformed entry, so the 400 names the row.
Scope validation is deliberately asymmetric: a permission code unknown to the catalogue, or above the
ceiling, is an error, while a known code the issuing user does not currently hold is only a warning, so a
token can be pre-issued ahead of a role change. GET /api/users/me/tokens/permissions lists the codes the
caller may put in a scope: their own permissions clamped to the ceiling.
Tokens can never mint, list or revoke tokens, clear a second factor, or drive any interactive-only
surface. Interactive-only surfaces carry [SessionCookieOnly], which refuses any inbound bearer
credential with 403 interactive authentication required before the permission check runs: token management and admin token, credential and second-factor
administration, linking and unlinking an external identity, setting a user's password through the user edit
route, password change, step-up, second-factor and passkey enrolment, onboarding, device
onboarding, baby-monitor sessions and camera media.
Tokens are stored only as a hash with a short display prefix; the raw value is shown once at issue. Last-used markers are written best-effort from a fresh scope.
Rate limiting
Every named policy counts through IRateLimitStorage in Redis, shared by every replica, so a budget never
multiplies by the pod count. Replicas share a budget only when they share the Redis and the RateLimiting:KeyPrefix (default ratelimit).
There is no in-process mode, so budgets survive restarts.
| Policy | Partition | Budget |
|---|---|---|
auth |
Client address | RateLimiting:Auth:PermitLimit per RateLimiting:Auth:WindowSeconds (10 per 60 s) |
2fa-verify, 2fa-webauthn-verify |
Client address | 100 per minute, beside each challenge's own attempt cap |
2fa-enroll-verify, 2fa-webauthn-enroll-verify |
User, or client address when anonymous | 10 per hour |
2fa-step-up |
User | 30 per hour |
password-change, step-up-password |
User | 5 per 15 minutes |
pat-create |
User | 5 per hour |
secrets-bind |
User | 60 per hour |
discovery-scan |
User | 5 per hour |
plugin-sync |
User or client | 10 per hour |
blueprints-sync |
Repository | RateLimiting:BlueprintSync:* (1 per 60 s) |
blueprints-validate-all |
User or client | 1 per minute |
widgets-sync |
Repository | 1 per minute |
webhooks |
Webhook id | 5 per 10 s |
Per-user policies partition on the user-id claim, which a token principal also carries, so token traffic shares a browser session's budget. Per-address policies partition by IPv4 address or the /64 of an IPv6 address, after the forwarded-headers middleware; requests with no peer address share one bucket, so a missing address never escapes a limit. Behind an untrusted proxy every client shares one bucket per policy (see forwarded headers).
The fixed-window limiter needs storage that increments and arms the first-increment expiry atomically: one
MULTI/EXEC of INCR, an expiry with NX (which keeps the window fixed and re-arms a counter that lost
its expiry rather than locking the key out) and a TTL read for Retry-After. Returning a permit credits
whichever window is running, never creates a counter, never goes below zero and never moves a window end.
No covered policy queues, and the synchronous non-blocking acquire is unsupported and denies. A limiter for a
key nobody has used for ten seconds is dropped from memory; its count lives in the storage, so dropping it
loses nothing. While Redis does not answer, every named limit and the login gate fail closed.
Two limits are deliberately per replica. A global concurrency limiter sheds load with 429 and a
Retry-After header, because it protects that replica's own database pool: size
RateLimiting:Concurrency:MaxConcurrentRequests (80) around four times the pool. Health and metrics
endpoints are exempt so probes always answer, unless a /health request carries a credential. The long-lived
connections are exempt too, because the limiter holds its permit until the response ends: every SignalR hub, the
workload gateway, the camera stream.ws, webrtc.ws, stream.mp4 and event clip routes, and the Matter-bridge
media stream. The camera routes keep their viewer and event-media slots, and the workload gateway and the
Matter-bridge stream keep the handshake limiter in front of their token lookup. The hubs have no budget of their
own: nothing caps the open hub connections of a replica, and every hub requires an authenticated caller. The workload
handshake limiter counts failed handshakes per source before this replica's token and crypto work.
Destructive administration
Refused with 409 and a machine-readable code: deleting yourself, deleting or demoting the last
active administrator, disabling the built-in administrator or removing its Administrator role, deleting
a role still in use, and deleting a user who owns shared resources. The workflow counts carry no
ON DELETE RESTRICT, so that ownership check is the only refusal. Restarting the host requires an explicit
confirmation flag.
Anonymous endpoints
The set of endpoints reachable without authentication is closed and deliberate: health probes, the login
options and password sign-in, passkey login start and finish, the second-factor login step, the anonymous
reset-link redeem, webhook triggers, the plugin OAuth callback, the public widget runtime, and
provider-authenticated assistant endpoints. Each carries its own compensating control. /health/details
answers anonymously with statuses only; the safe-mode reason, the unresolved secret reference count and check
descriptions need home.manage. The anonymous identity-provider list returns only id and display name.
Minimal-API endpoints and real-time hubs are not covered by the automated controller route check.
Input hygiene
- Request bodies refuse a repeated member name, so no JSON key is resolved by "last one wins".
- Enum values crossing the wire fail closed when undefined; numeric strings are refused even when they map to a declared value.
- List queries page through central helpers; a raw
.Skip(...)is forbidden, because an unbounded page overflows into a negativeOFFSET. Oversized query arguments are capped. - CSV exports use one cell encoder that prefixes leading formula triggers (
=,+,-,@, TAB, CR) with an apostrophe before quoting, and they write asynchronously, since a started response that fails on synchronous IO is silently truncated. - Stored URL fields on dashboards are validated deny-by-default on every write path:
javascript:,data:,vbscript:,file:andblob:are refused case-insensitively after control characters are stripped (browsers strip them before resolving the scheme); HTTP, HTTPS, relative paths and empty values are accepted. A definition that does not parse, or nests too deep, is refused rather than skipped, since an unscanned definition could carry stored XSS; URL-named keys are matched without word boundaries on purpose. - Currency codes are three uppercase letters and a known ISO 4217 code when the runtime exposes the list.
- A namespace check matches a whole root segment, so
ReeveWorkflow.*counts as first-party andContoso.Reeve.Xdoes not.
Rules that are easy to get wrong
- A workflow that runs another workflow re-checks ownership. The target id is node configuration, so the sub-workflow block resolves the child against the owner of the workflow running it, and a run started under one user's token never reaches another user's workflow.
- An installed widget's manifest, runtime and files are served to every signed-in user, not only to its installer, so it renders on a shared dashboard for each viewer; installing and uninstalling need the install permission, and its holders list, update-check and uninstall every installation. Dashboard editors read the installed widgets they can place. The runtime runs sandboxed in an opaque origin and the host bridge acts with the viewer's own session, so a widget reaches only the bound devices that viewer may reach.
- User-authored expression surfaces get a parser, never a script host. The utility tariff formula engine is a hand-written recursive-descent parser evaluated against a variable dictionary. The unsandboxed workflow scripting model is never exposed to a surface that ordinary household users reach.
- Client view mode is a rendering preference, never an authorization input, and no client gates an affordance on a role name (constraint).