Releases: OS2iot/OS2iot-backend
v.1.3.0 - Package Updates, Security Improvements and Improvements to User Management
Notes on breaking changes and functionality updates
This release mainly focused on updating outdated npm packages for security reasons, bugfixing and a revamp to who can update users.
Feature changes
- Only a user administrator on the proper organization can see and update a users details
- Better error descriptions when using the KOMBIT sign up flow
- An additonal ADR algorithm has been added by Sensade
- User administrators can now change the email of a KOMBIT user
Breaking changes
KOMBIT integration
After updating the passport-saml package, the backend now requires the property "KOMBIT_CERTIFICATEPUBLICKEY" for the KOMBIT integration to function.
typeorm update
Typeorm has been updated to a new version. This has changed the way Typeorm is initialized, mainly:
ormconfig.js
has been deleted- Configuration previously found in
ormconfig.js
is moved tosrc/repositories/os2iot.repository.ts
What's Changed
- Introduce GitHub actions for push and PR by @AramAlsabti in #188
- Added "get adr algorithms" endpoint by @MStenkaer in #192
- Fix CVE–2021–44906 by @debricked in #187
- bug: set ssl from env by @AramAlsabti in #197
- Updated passport-saml package by @GufCab in #202
- Updated several outdated packages by @GufCab and @AramAlsabti
- Updated User Management flow by @GufCab
New Contributors
- @MStenkaer made their first contribution in #192
- @debricked made their first contribution in #187
Full Changelog: v1.2.0...v.1.3.0
v.1.2.0 - New User Management, MQTT DataTarget, Improved LoRaWAN Monitoring, General fixes
Important notes on migrations and deployment
New User Management
This release fundamentally changes how useraccess is managed in OS2iot. A database migration automatically maps the existing UserGroups/Permissions to the new models - but as these cannot be mapped exactly 1:1 you should check out the mapping before releasing and manually correct issues. The new structure is documented in:
https://os2iot.readthedocs.io/en/latest/software-architecture/software-architecture.html?highlight=Gateway%20administrator#user-permissions
Emails
As a new feature, the platform can and will now send emails to new users and User Administrators when applying for access to organizations. This requires the setup of new environment variables in the backend as described:
https://os2iot.readthedocs.io/en/latest/software-architecture/software-architecture.html?highlight=Gateway%20administrator#user-permissions
This requires setting up an SMTP server OS2iot can integrate with. Currently Username/Password is supported for the SMTP login.
Integration can be tested with tools like:
Ethereal
Gateway status
The backend now listens to the MQTT gateway status feed from Chirpstack and updates the database accordingly. The data is relatively limited, but if the Postgres database is very limited - make sure it can handle this new load.
What's Changed
- Add MQTT datatarget by @AramAlsabti in #164
- Revised user management and permissions by @AramAlsabti in #149
- Add controller for retrieving API key info by @AramAlsabti in #162
- Show signal strength by @AramAlsabti in #166
- Resettable API key for generic HTTP device by @AramAlsabti in #161
- Delete signal data more than a year old by @AramAlsabti in #167
- Add flow for hiding new welcome screen by @AramAlsabti in #172
- Fixed connection to SigFox by @GufCab in #165
- Emails for Kombit users by @augusthjerrild in #168
- Show overview of gateway status by @AramAlsabti in #170
- Fix applications sorting by @AramAlsabti in #176
- Limit user controller access to mostly user admins by @AramAlsabti in #175
- Simplify revised permission migration by @AramAlsabti in #177
- Revise text when requesting organizations by @AramAlsabti in #178
- Show gateway status for whole time period by @AramAlsabti in #179
- Delete iot device with transaction by @AramAlsabti in #180
- Reword e-mail. Prefix sender with "OS2iot" if missing by @AramAlsabti in #181
- Allow null numbers and validate them correctly by @AramAlsabti in #182
Bug fixes
- Connection to Sigfox now works again after changes in the Sigfox API
- Application sorting works properly everywhere
- Backend now handles validation of nullable numbers
- Fixed an issue where relations between DataTargets and Devices were not handled correctly leading to issues with devices being deleted in ChirpStack but not OS2iot
Full Changelog: v.1.1.1...v1.2.0
v.1.1.1 Metadata, documentation, bug fixes
What's Changed
- Visualize timestamp of latest X device messages by @AramAlsabti in #151
- Validate IoT device metadata upon submit by @AramAlsabti in #160
- Optional metadata fields when managing an application by @AramAlsabti in #152
- Bugfix: dependabot issues by @GufCab
- Bugfix: Sorting of applications and device model properties by @augusthjerrild
Migrations
A migration has been added for the application metadata. At the same time, the version of the TypeORM package was updated which changed around how TypeORM handles things a bit.
Changes introduced by the updating of the package are noted in the migration srxc/migrations/1646669134921-application-metadata.ts
Full Changelog: v.1.1.0...v.1.1.1
v.1.1.0 Migrations, multicast, API Keys
What's Changed
- OS2iot now supports ChirpStacks LoRaWAN multicast functionality. Multicast groups are defined under each application.
- Database is now bootstrapped using TypeORM Migrations instead of TypeORM Synchronization (See notes for existing migrations below)
- It is now possible to create API keys to interact with the OS2iot backend
- Fix roles in controllers where it was set on the whole class by @AramAlsabti in #139
- CVE-2019-18413. Patch for potential SQL injections by @AramAlsabti in #137
- Calls to chirpstack optimized to make the bulk creation of LoRaWAN devices faster and less error prone. Should also reduce the load on the Chirpstack API when loading long lists.
- FIWARE datatarget by @bkdkmd in #141
- Data Target "Marketplace" ready for adding new data target types in the future (@bkdkmd)
New Contributors
- @augusthjerrild made their first contribution in #132
- @bkdkmd, @rohit-vrrr and @prahvin made their first contribution in #141
Full Changelog: v.1.0.1...v.1.1.0
Breaking changes
Migrations
TypeORM migrations are now used to synchronize the database with the typescript entities instead of TypeORM Synchronize.
Migrations are applied before starting the NestJS application and are specified in package.json as prestart commands.
Longer startup time
Applying the migrations toward the database will make the startup time longer. If deployed using Kubernetes, be aware that the watchdog does not kill the pod prematurely.
Existing installations (important!)
When updating an existing database with the new backend/migrations, the database has to be prepared. An initial migration has been created that corresponds to the database state at release v.1.0.1. This has to be entered into the database in a "migrations" table.
This can be done with the following SQL script: (Release note updated with correct name for initial migration 5/4/22, [email protected])
CREATE TABLE migrations (
id SERIAL PRIMARY KEY,
timestamp BIGINT NOT NULL,
name varchar NOT NULL
);
INSERT INTO migrations (timestamp, name)
VALUES (1, 'Initial0000000000001')
v.1.0.1
Covers the first round of closed issues and pull requests. Compatible with frontend v.1.0.1
What's Changed
- Update default.controller.ts by @Joiversen in #117
- Added environment variable for Postgres SSL config by @MadsSvejstrup in #118
- Increased timeout for requests against ChirpStack application server by @GufCab in #124
- LoRaWAN devices will now be deleted when deleting their parent application by @GufCab in #123
- Pass copies of data to untrusted code instead of references by @MadsSvejstrup in #125
- Make Log Levels configurable globally through environment variables by @GufCab in #127
- Fetch latest message instead of all by @AramAlsabti in #126
New Contributors
- @Joiversen made their first contribution in #117
- @MadsSvejstrup made their first contribution in #118
- @GufCab made their first contribution in #124
- @AramAlsabti made their first contribution in #126
Full Changelog: v.1.0.0...v.1.0.1
v.1.0.0
First release of OS2iot backend
Full Changelog: https://github.com/OS2iot/OS2IoT-backend/commits/v.1.0.0