- Created by Lubomir Micko, last modified by Kanako Higashi on Sep 24, 2020
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 26 Next »
Module summary
Receiver receives data from IoT devices (HTTP POST, MQTT server, Websockets server), eventually subscribes the data published by 3rd party (MQTT subscribe, Websockets subscribe). It provides authentication and message verification mechanims to ensure the data security and integrity.
There are several modes, in which the Receiver can operate (Endpoint types):
- MQTT server - module is running as MQTT broker, which allows devices to either subscribe or publish messages to it
- MQTT consumer - module subscribes to existing MQTT broker and receives messages from it
- HTTP POST consumer - module accepts HTTP POST request with data from devices
- UDP server - module accepts UDP datagrams with data from devices
- Telnet server/client - module is running as telnet server or telnet client
- Websockets server/client - module is running as Websockets server or client
- Custom - module is using custom implementation
See Receiver configuration to learn more about all configuration options.
Module lifecycle
Independent on the way how the data are received by the module, once the message is on the Receiver side, following process is applied:
- Message is received by the Receiver
- Authentication flow is performed
- Message format is determined (XML, JSON, bytes, ...)
- Message is transformed into normalized internal format
- Message rules are checked
- If passes message rules check, message is stored in internal memory and value is propagated to Audit module (as last received message)
- if not passed, message is rejected/ignored
Authentication
Clients can be authenticated using following methods:
- basic/digest - username/password based authentication
- client SSL certificate - client provides the SSL certificate in order to authenticate itself
- source IP - only requests from particular IP addresses are allowed
Message rules
Each message collected by the receiver is processed by the receiver's message processor, which evaluates message content rules defined in configuration (see receivers[].messageRules). There are 3 types of message rules:
- Content constraint - module checks, whether the message contains specific content
- Structure constraint - module checks, whether the message contains specific structure
- Device ID filter - module checks, whether the device ID is on whitelist or not
Messages are rejected, if they don't pass message rules. Otherwise Receiver stores them in it's internal storage.
Roles
This module supports following roles:
Module | Role | Permitted operations |
---|---|---|
Receiver | SENSOR | Allows to send data to collector (HTTP POST, MQTT_PUBLISH, ...) |
Receiver | VIEWER | GET /status, GET /data |
Receiver | EDITOR | GET /data, GET/status, DELETE /data |
Module states
This module can have one of following statuses:
Verticle | Status | Description |
---|---|---|
Receiver | UP | Module is up and running. It operates without any specific limitations. |
PAUSED | Module is paused and not receiving any data. Request to "GET /" ends with response code 405. |
API endpoints
This module provides following HTTP endpoints:
Path | Method | Description | URL Parameters | Example |
---|---|---|---|---|
/ | GET | Returns plain text with ECHO message (should be used in load balancer to detect UP/DOWN status) | https://localhost:8001/ | |
/status | GET | Returns JSON object that contains internal state of audit verticle (e.g. total count of sensors) | https://localhost:8001/status | |
/config | POST | Sets the configuration to the module. ADMIN role is required. |
| https://localhost:8001/config |
/reload | POST | Forces reloading configuration of module. ADMIN role is required. |
| https://localhost:8001/reload |
/data | GET | Returns JSON array that contains data stored in receiver's internal memory |
| https://localhost:8001/data |
/data | DELETE | Deletes specified data from receiver's internal memory. |
| https://localhost:8001/data |
/pause | GET | Sets status PAUSED for receiver verticle immediately. Returns response from "GET /status" endpoint (see above) | https://localhost:8001/pause | |
/resume | GET | Sets status UP for receiver verticle immediately. Returns response from "GET /status" endpoint (see above) | https://localhost:8001/resume | |
/logout | GET | Executes logout of currently logged in user | https://localhost:8001/logout |
On this page
- No labels