Authentication and access¶
On this page: the identities in Lutra (people, boxes, external devices), how each authenticates, how partners are kept apart, and the order of checks on every request.
People¶
- People sign in through Amazon Cognito with a second factor (authenticator app code or passkey). The REST API accepts the resulting JSON Web Token (JWT) on every request.
- The partner (tenant) a person belongs to comes from the token and cannot be changed by the user. Role, scope and pool selection come from the person's membership record.
- No membership means no access.
Roles and what they may do: Roles.
Lutra boxes¶
- Each box has its own key pair and an X.509 certificate; it connects to AWS IoT Core with mutual TLS.
- The device policy only allows the box its own topics (
lutra/v1/{thingName}/...) and its own device shadow. - Certificates can be revoked per box.
- Commands to a box are additionally signed by the Lutra command service with a key in AWS KMS; the box checks the signature with a public key built into the firmware. Access to MQTT alone is therefore not enough to send a box a command. See Remote commands and settings.
To be confirmed
Production provisioning (key generated in the device's protected hardware, certificate through a signing request, pairing code written at production) and hardware security features (secure boot, flash encryption) are designed. Enabling them on field boxes is decided per board and not yet done.
External devices¶
- One certificate per device, from a key made on the device itself and a signing request pasted in the portal.
- The certificate only allows connecting as itself and publishing to its own telemetry topic. It cannot subscribe or receive anything.
See External devices.
Separation between partners¶
- Every database key starts with the partner (tenant). For every request the API works with temporary rights that only allow keys of that tenant. A mistake in a query therefore results in a refusal, never in data of another partner.
- Separation between clients of the same partner (for example an owner who may only see their own pools, or a technician with a selection) is enforced in the API.
Order of checks¶
For every request:
- Is the action known?
- Lutra admin: read along only, with a stated reason.
- Does the tenant in the token match the requested data?
- Does the role allow this action?
- Technician with a selection: is the pool in the selection? Owner: is it the owner's own pool?
Then the request runs with tenant-bound rights, and every write is written to the audit log.
Related pages¶
Last reviewed: 2026-11-24. Applies to Lutra Lite 0.4.1.