TinyGateway How To?
How to Secure the connection to the BlueUp TinyGateways?
The security is often the main concern in customers projects. Thus it is essential to protect your devices from unauthorized third party accesses.
The BlueUp TinyGateways can be accessed in 3 different ways:
- Through Web Interface - the web interface is protected by a default blueup password. In the web interface the user can manage and change the default settings of the gateway and check the presence of gateway updates.
- Via HTTP APIs - with the exception of the
/api/system/pingcall, every API invocation requires an authorization header. If the "X-Authorization" header is not set, the device always returns the HTTP status code: 401 Unauthorized.
The value of theX-Authorizationkey is the SHA256 Hash of the device password. - Via MQTT Broker - if the Remote management is enabled the user can control the gateway using the MQTT to call the gateway APIs.
The most simple way to protect your device is to set a secure password for the gateway. In this way only people that are aware of the new password can access and manage the gateway.
Change the password from the web interface
Once entered in the web interface, in the upper-right corner, press
and select Change password. A popup dialog will appear where you can change the current password with a new password.

Change the password via HTTP APIs
With the exception of the call /api/system/ping, every API invocation requires an authorization header, where the value of the "X-Authorization" key is the SHA256 Hash of the device password.
To change the TinyGateway default password though the APIs the steps to follow are described below.
- Make a
POSTrequest to/api/system/config/passwordwith theX-Authorizationheader set to the SHA256 hash of the current password (initiallyac48c6b9af4312edad68c6535c223bfb7bf8c5f0dc54890fbe60fa34e4ae5ba3, that equalsblueup).
The JSON body will contain the new password encoded: Example: To set the password to mySecret, the value of the "psw" field will bebXlTZWNyZXQ6ZDBiZTczMzQyOTQzMmY3ZjAwZDQyNWUxYWIwMDM0MTJhZmE3NWQ0MWZlMjgwZDhiYjJlYjNlODJmZWZjNTZiNg==which is the Base64 encoding of the stringmySecret:d0be733429432f7f00d425e1ab003412afa75d41fe280d8bb2eb3e82fefc56b6. - Reboot the device with the
POSTrequest to/api/system/rebootand theX-Authorizationheader with the SHA256 hash of the current password.
After the reboot, the new configuration and the new password will be active.