Keragi Keragi Keragi
Solutions

Reference

On this page

Device access modes: client, gateway and bridge

Last updated: 2026-11-21

Device access is not one mode; it is three trade-offs:

  1. Device as a client participant: holds its own identity/keys and can take part in E2EE for its conversations.
  2. WASM gateway resource: device → gateway → messaging; the gateway runs on the server and cannot decrypt E2EE.
  3. Local edge bridge: device → local bridge (client) → conversation; the bridge host is a trusted endpoint that decrypts client-side before controlling devices.

Comparison

Dimension Client participant WASM gateway Local bridge
Identity Device/subaccount approximation Gateway resource Bridge host (trusted endpoint)
E2EE Can join its conversations Cannot decrypt Can decrypt before control
Data path Device ↔ server Device ↔ gateway ↔ server Device ↔ bridge ↔ conversation
Compute/storage Needs secure storage and compute Device needs only HTTP/MQTT Needs a trusted host
Exposure Device connects to server Gateway centralises access Bridge host is the trust boundary
Fit Devices with secure storage Sensors/HTTP/MQTT devices Serial/GPIO, on-site actuators

How to choose

Mode 1: client participant

  • The device holds its own identity/keys and joins conversations it can decrypt.
  • A managed subaccount can approximate it; first-class device identity/attestation and scoped delegation are planned and can be evaluated per project.
  • Requires secure storage, credential rotation, firmware security and compute assessment.
  • Fits gateway/edge devices with secure storage, not low-cost MCUs.

Mode 2: WASM gateway

  • The device connects over HTTP/MQTT; the gateway writes messages/channels.
  • The gateway runs on the server, only holds ciphertext and cannot decrypt E2EE.
  • Fits sensors, alert reporting and low-risk commands; the default path is not encrypted.
  • The gateway needs auth, rate limits, idempotency and logs; device credentials are the integrator’s responsibility.

Mode 3: local bridge

  • The device connects over serial/GPIO/fieldbus; the bridge acts as a client, decrypts and controls the device.
  • The bridge host is a trusted endpoint and must be protected accordingly (patches, least privilege, disk encryption, access control).
  • Fits on-site actuators, serial/GPIO devices and cases that need encrypted messages.
  • A compromised/offline bridge affects control safety; local fail-safe behavior and manual takeover are mandatory.

Safety and failure boundaries

  • Actuators require fail-safe behavior, emergency stop, timeout reset, authorization and manual takeover.
  • Keep critical control logic local; do not depend on a cloud message arriving before a safety action.
  • Manage device credentials per device, with rotation and audit; never reuse an administrator account.
  • Do not expose management to the internet; use TLS or a controlled network between device and gateway/bridge.
  • Do not use for life support, medical, nuclear, aviation, emergency or industrial-safety applications without certification.

Next steps

Frequently asked questions

Can the three modes be mixed?

Yes. A common pattern: low-risk sensors through a gateway, serial/GPIO actuators through a local bridge, and devices with secure storage as client participants.

Why can't a gateway read E2EE?

The gateway runs on the server and only holds ciphertext; it handles plaintext/bot channels, or content forwarded by a client-side bridge.

Which mode is most secure?

There is no absolute winner. Client participants remove a hop but need secure storage; a local bridge is a trusted endpoint and needs strong protection; a gateway has a smaller device footprint but cannot read encrypted messages.

Does a device need a public IP?

Usually not. Devices/gateways connect outbound to the server or local bridge; do not expose management interfaces to the public internet.

How do we integrate without an official SDK?

Follow the reference architecture: device protocols/firmware are the integrator’s responsibility; gateways/bridges call platform interfaces; device credentials are managed per device.