Commit Graph

978 Commits

Author SHA1 Message Date
Nikola Marčetić e22d1fbbb4
Fixed Aedes dependencies (#1036)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-02-13 14:37:16 +01:00
Darko Draskovic 51cd0524a1
MF-998 - Add Twins service to Makefile and docker-compose.yml (#1035)
* Add separate twins mongodb

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Move twins docker compose file to addons

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add depends_on to mainflux-twins container

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove hard-coded vals from .env

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add start explanation to README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Bump mongo image to latest version

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-02-12 18:34:48 +01:00
Manuel Imperiale 1c2c86b030
MF-1032 - Fix redis docker volume of opcua-adapter (#1033)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-02-07 17:13:37 +01:00
Mirko Teodorovic a1078e6999
NOISSUE - add nats conf (#1031)
* add nats conf

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* change max payload

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2020-02-06 18:44:29 +01:00
antonio-salieri b8138fac32
MF-442 - Add SSL encryption to the MongoDB, InfluxDB and Cassanda readers (#1024)
* Add possibility of running influxdb-reader http server with tls

Signed-off-by: Lazar Ivanovic <laza@opencores.org>

* Add possibility of running mongodb-reader http server with tls

Signed-off-by: Lazar Ivanovic <laza@opencores.org>

* Add possibility of running cassandra-reaeder http server with tls

Signed-off-by: Lazar Ivanovic <laza@opencores.org>

* Addressed pr comments

Signed-off-by: Lazar Ivanovic <laza@opencores.org>

Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2020-02-05 20:24:36 +01:00
Manuel Imperiale 2b7637fd75
NOISSUE - Add opc-ua type handling and unsubscription (#1029)
* NOISSUE - Add opc-ua type handling and unsubscription

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Create const for max childrens

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-02-05 17:16:45 +01:00
Darko Draskovic f785116a6f
NOISSUE - Add aggregate attribute-based search for twin retrieval (#1027)
* Add attribute map for twin retrieval

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Restructure attributes from map[string] to []

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove RAM attribute map and use mongo aggregation

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Update tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove attribute map service property

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-02-04 23:25:51 +01:00
Manuel Imperiale 3f6a0cd14b
NOISSUE - Fix metadata in add Things endpoint (#1028)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-02-04 12:33:28 +01:00
Aleksandar Novaković 269fe89a42
NOISSUE - Fix minimal password length (#1023)
* Fix minimum password length

Increase minimum password length to 8.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update tests with valid password length

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Update minimal pass length in the docs

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2020-01-29 18:54:34 +01:00
Jonathan Dreyer bdf1326933
MF-1020 - Change default password for CLI provision test (#1021)
Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>

Co-authored-by: Nikola Marčetić <n.marcetic86@gmail.com>
2020-01-29 12:31:15 +01:00
Manuel Imperiale a96db05cc0
NOISSUE - Add subtopic to opcua messages (#1022)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-01-28 23:30:55 +01:00
Manuel Imperiale 7b62f1ce8a NOISSUE - Add details to browsed OPC-UA nodes (#1019)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-01-27 12:25:16 +01:00
Darko Draskovic 575d1d6bbf NOISSUE Fix obsolete attribute persistance (#1018)
* Fix obsolete attribute update

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Inlined map key presence check

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-01-27 02:15:10 +01:00
Darko Draskovic 0d361f3df1 Fix twins update revision counter (#1011)
Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-01-22 15:58:24 +01:00
Nikola Marčetić 5714a6dfcb Fixed docs instructions in README (#1010)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-01-17 14:44:13 +01:00
Ivan Milošević decfae9c9d Fix copyright year (#1009)
Signed-off-by: Ivan Milošević <iva@blokovi.com>
2020-01-17 12:51:01 +01:00
Dušan Borovčanin c4fa27fd7e Fix issuing recovery key (#1007)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2020-01-16 18:43:06 +01:00
Nikola Marčetić 8475e87fe7
Removed gatling load-test (#1005)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-01-16 11:57:34 +01:00
Nikola Marčetić 0d3adfdc5c
Removed old k8s manifests (#1004)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2020-01-16 11:37:07 +01:00
Manuel Imperiale 160fda4d37 NOISSUE - Remove UI from docker-compose (#1001)
* NOISSUE - Remove UI from docker-compose

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm MF_UI_PORT envar

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-01-15 15:27:24 +01:00
Manuel Imperiale 4ba1717582
NOISSUE - Store successfull OPC-UA subscriptions (#999)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2020-01-10 17:56:03 +01:00
Darko Draskovic b3991b8497 MF-730 - Add digital twin service for things (#855)
* Add starter kit

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add http

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add cmd/main.go

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove reference to things from README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add starter kit

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add http

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add cmd/main.go

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove reference to things from README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix env vars in README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix env vars in README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename kit to mfxkit

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename kit to mfxkit

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add docker compose related files

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add docker compose related files

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Dockerfile to mfxkit

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Dockerfile to mfxkit

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twin service to docker-compose.yml

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twin service to docker-compose.yml

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mongo db connection

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mongo db connection

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add TwinRepository mockup

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix docker env vars

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix docker env vars

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twins repo mongodb routines

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twins repo mongodb routines

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mongo db docker test suite

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mongo db docker test suite

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add idp and toDBTwin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add idp and toDBTwin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add test cases to repo twin save test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add test cases to repo twin save test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add users grpc

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add users grpc

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add methods and tests for udpate and update key

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add methods and tests for udpate and update key

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add methods and tests for remove twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add methods and tests for remove twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add svc methods to loggin and metrics

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add svc methods to loggin and metrics

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add AddTwin endpoint

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add AddTwin endpoint

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add update endpoints

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add update endpoints

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add view and remove endpoints

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add view and remove endpoints

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twin repo mock

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add twin repo mock

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add owner arg to twins repo methods

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add owner arg to twins repo methods

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mock idp service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mock users service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add tests for service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add tests for service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt client to twins service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt client to twins service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add protocol to mqtt string var

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add protocol to mqtt string var

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add time and attributes related data to Twin struct

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add time and attributes related data to Twin struct

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt publish JSON serialized twin to service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt publish JSON serialized twin to service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add endpoint tests for save and update twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add endpoint tests for save and update twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add endpoint tests for update key and view thing

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add endpoint tests for update key and view thing

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix test error for view twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix test error for view twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add endpoint tests for remove twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add endpoint tests for remove twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add NATS client

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add NATS client

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add normalizer to nats

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add normalizer to nats

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor nats publish() and remove normalizer

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Refactor nats publish() and remove normalizer

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add ListThingsByChannel() and RetrieveByChannel()

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add ListThingsByChannel() and RetrieveByChannel()

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Twin struct directly in mongodb

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Twin struct directly in mongodb

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Change limit type to uint64

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Change limit type to uint64

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Compose nats subject from msg ch and subtopic

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Compose nats subject from msg ch and subtopic

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt notifs for thing creation and key update

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt notifs for thing creation and key update

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add RetrieveAll to twinRepository and ListTwins to service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add RetrieveAll to twinRepository and ListTwins to service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add tests for RetrieveAll and ListTwins

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add tests for RetrieveAll and ListTwins

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix Service interface error

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove test Ping endpoint

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt topic to service config

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove UpdateKey request and add fields to Twin related requests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Attributes and State add and view

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add ListTwins endpoint

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix service and database tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add ListTwinsByThing endpoint

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove twin directory

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add States and Definitions to Twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add defer publish to AddTwin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add refactored and deferred mqtt client publish to Service methods

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add paho subservice

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add paho client to nats

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add mqtt publish and state update

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add Publish wrapper

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Use paho Publish wrapper

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Save states in separate collection

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Replace []byte payload by []map[string]interface{}

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add offset to PageMetadata

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename TwinsPage to Page

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add StateRepository

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add StateRepository, mongodb StateRepository adapter and ListStates endpoint

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add RetrieveLast twin to states repository

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Parse def in nats to update state attrib

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add prepareState() helper

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Replace list things by id by view thing by id

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add state repo mock

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix service tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix mongo twins repo tests and remove owner from RetrieveByID params

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix mongo twins repo tests and remove owner from Remove params

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Replace ChannelID in Attribute by Channel

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix endpoint tests for add and update twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix endpoint tests for view and remove twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Use new auth service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix mocks auth and mongodb tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix licensing info

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix 'for for'

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Replace short dec by var for default vals and add string map for mqtt op info

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Use Record from mainflux/senml and rename broker to nats in main.go

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove Key from Twin

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove redundant id uniqueness check from mongodb

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add attrib name to attrib update info

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix typos and remove isZeroOfUnderlyingType() helper

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename paho to mqtt

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix env vars in main.go and README.md

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Move twins/api/twins to twins/api and rename twins- prefix to tw- in main.go

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove flows for manual testing and revert to master docker-compose.yml

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove publish from nats and fix tests by updating package names

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename users.go to authn.go

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix crud op names

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Change id to twinID

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Inline if err != nil and change <prefix>ID to <prefix>_id

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix metadata db search test

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Rename mqtt and nats related files to publisher and subscriber respectively

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Move save state logic from nats to service

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Fix endpoint tests

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove close check from main.go

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Complete deploy section

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add unit tests for states

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Remove debugging artefacts and unneeded comments to exported funcs

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>

* Add port num to defAuthnURL

Signed-off-by: Darko Draskovic <darko.draskovic@gmail.com>
2020-01-10 17:25:36 +01:00
Drasko DRASKOVIC 5834d364ad Fix Redis event naming (#996)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2020-01-09 14:18:23 +01:00
Manuel Imperiale f42f2095ba NOISSUE - Add a Browse endpoint in opcua-adapter (#988)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

Co-authored-by: Nikola Marčetić <n.marcetic86@gmail.com>
2019-12-23 17:30:44 +01:00
Drasko DRASKOVIC 60a90d84d5 NOISSUE - Add Redis ES Username/Pass for VerneMQ (#991)
* Add Redis DB and Pass options

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>

* Fix ENV var parsing

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>

* Update protobuf for VerneMQ

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>

* Fix regular expression for MQTT re-publish

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2019-12-23 00:17:39 +01:00
Nick Neisen 887bc2d9c0 MF-982 - Add error when connecting empty channels or things (#985)
* Add error when connecting empty channels or things

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Add more detailed test descriptions

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Add to test descriptions

Signed-off-by: nwneisen <nwneisen@gmail.com>

* fix channel ids

Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-12-17 19:53:45 +01:00
Nikola Marčetić 2080ee8afa Added changelog for 0.10.0 release (#984)
Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
2019-12-17 17:32:27 +01:00
Dušan Borovčanin 9c1743c080 Fix MQTT protobuf file name (#981)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-12-16 18:05:59 +01:00
Dušan Borovčanin 9f37927dec MF-932 - User API keys (#941)
* Add inital Auth implementation

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Extract IssuedAt on transport layer

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Add token type

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix Auth service URL in Things service

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Add User Keys revocation check

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Update tests

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove unused tracing methods

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix Key retrival and parsing

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove unused code

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Increase test coverage

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix compose files

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix typos

Simplify tests.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix typos and remove useless comments

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Rename Auth to Authn

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Rename database.go to tracin.go

A new name (`tracing.go`) describes better the purpose of the file.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Increase test coverage

Fix typo.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Increase test coverage

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove token from Users service

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix identify login keys

Rename token parsing method.

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Extract tokenizer to interface

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove pointer time

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use pointer for expiration time in response

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use uppercase N

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove unnecessary email check

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Cleanup unused code and env vars

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Rename tokenizer field

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Use slices and named fields in test cases

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Update AuthN keys naming

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove package-lock.json changes

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove Secret from issuing request

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-12-16 16:22:09 +01:00
Manuel Imperiale bdeb7711ce NOISSUE - Use opcua server timestamp in opcua-adapter messages (#980)
* NOISSUE - Use opcua server timestamp in opcua-adapter messages

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rename pubsub -> subscribe

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-12-16 16:06:37 +01:00
Dušan Borovčanin e960004b44
Simplify CI script (#979)
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-12-10 18:53:14 +01:00
Manuel Imperiale 76b68e10a8 NOISSUE - Add opcua-adapter conn route-map, use ServerURI and NodeID (#975)
* NOISSUE - Add opcua-adapter conn route-map, use ServerURI and NodeID

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* NOISSUE - Add dynamic subscription

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-12-09 23:16:18 +01:00
Drasko DRASKOVIC 5120a71595
Move docs to a separate repo (#976)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2019-12-04 13:31:23 +01:00
Dušan Borovčanin 8c4da85039 MF-950 - Runtime error in normalizer - CBOR SenML (#974)
* Add Transformer tests

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix readers and writers

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Fix README typo

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Tidy vendor

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>

* Remove link field from docs

Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-11-29 20:47:28 +01:00
Manuel Imperiale 237514ee33
NOISSUE - Support multiple types values in opcua-adapter (#973)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-28 18:08:43 +01:00
Aleksandar Novaković 263108cc85 Migrate from dep to go modules (#971)
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2019-11-27 15:29:34 +01:00
Manuel Imperiale 277342b8ca NOISSUE - Add Node IdentifierType config in opcua-adapter (#967)
* NOISSUE - Add Node IdentifierType config in opcua-adapter

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm Read from subscribeToOpcServers

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-26 20:07:04 +01:00
Manuel Imperiale 87dd91e328
NOISSUE - Remove messages limit in influxdb-reader (#968)
* NOISSUE - Remove messages limit in influxdb-reader

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm too large limit test

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-26 18:58:45 +01:00
Manuel Imperiale 6da650645f
NOISSUE - Fix opcua-adapter events warnings (#965)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-25 17:53:18 +01:00
Manuel Imperiale 8602185b74 NOISSUE - Fix opcua-adapter events decode (#951)
* NOISSUE - Enable multi OPC-UA Subscriptions

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* NOISSUE - Fix opcua-adapter events decode

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use a config file to subscribe to multiple nodes

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Add subscription config file

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use Mainflux errors package

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-25 14:14:57 +01:00
Drasko DRASKOVIC b8ac6ca2bf
Fix subtopic handling in VerneMQ (#962)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2019-11-24 18:21:00 +01:00
Nick Neisen 76908d7c8b MF-898 - Add bulk connect to CLI and SDK (#956)
* Add bulk connect to CLI and SDK

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add test for bulk connect

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Update docs

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add file example

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Add JSON example to CLI docs

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change some value datatypes back

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Use constants for file extensions

Signed-off-by: Nick Neisen <nwneisen@gmail.com>
2019-11-21 12:29:37 +01:00
Ivan Milošević 0ab627730f MF-538 - Improve logging and API errors (#866)
* user service - wraping errors

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* wrapping more errors
unwrap only wrapped errors

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Add internal database error
Wrap internal database error

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Wrap user not found error

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Wrapping errors in idp and hasher

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Use error.Is for testing errors in Identify test

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Get wraper from wrapped errors

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Switch order of wrapping errors
Remove dead code (comments)

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* assert true in tests

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Change comparing errors in tests (assert.True)

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Add errorRes structure to API responses in body in things service

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* resolve conflicts after rebasing

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Create errors package

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* implement new errors package

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Modify tests

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* return copyright comments

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* remove changes from .gitignore

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Move logging to encode errors
Comment exported vars and methods
Formatting

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Login function returns errors.Error

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Modify login tests to meet login returning errors.Error

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Error interface

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Change parameter in Wrapper to interface Error

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* implement new error interface

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Modify tests to use new Error interface

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Fix Login

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Remove unnecessary errir casting

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* new error interface implementation

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* check if Error is empty in registrationEndpoint

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Add Empty factory function
Use new Empty factory function
Use isEmpty method

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Lose else in encodeError

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Modify tests

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Remove *json.UnmarshalTypeError and *json.SyntaxError types from encodeError type switch

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Fix nil error value in jwtIdentityProvider

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Fix gprc to use new error package

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* rename receiver in errors package
grpc errors

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* remove debugging code

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Resolving conflicts after rebase

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Remove comment

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Remove Empty from custom error
Implement custom error on new methods

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* WIP tests

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* remove wrap from Error interface

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* password-change related tests
remove debug code

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* remove dead code

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Move all errors casting to errors package

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Fix comment in error package

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Change struct pointer to interface in package methods

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* resolving reviews

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* fix return in database.go

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Fix copyright header

Signed-off-by: Ivan Milošević <iva@blokovi.com>

* Fix comment in hasher

Signed-off-by: Ivan Milošević <iva@blokovi.com>
2019-11-20 14:43:41 +01:00
Manuel Imperiale 1b427f4396 NOISSUE - Fix Update User (#959)
* NOISSUE - Fix Update User

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm duplicated test

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-20 14:03:17 +01:00
Manuel Imperiale 52c4d4a824 NOISSUE - Fix make dockers (#957)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-20 09:24:58 +01:00
Nick Neisen ced90b21a4 Add dev_ back to make dockers_dev (#955)
Signed-off-by: Nick Neisen <nwneisen@gmail.com>
2019-11-19 17:21:13 +01:00
Manuel Imperiale ac3ff5221a NOISSUE - Remove Elm UI (#953)
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-19 09:31:41 +01:00
Mirko Teodorovic 5e35cbe06b NOISSUE - Fix docs (#952)
* fix missing timeout

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* upd tools readme.md

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* upd tools readme.md

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>

* add mising Referer header required for pass reset request

Signed-off-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
2019-11-16 16:20:29 +01:00
Nick Neisen 894e1b83ec MF-898 - Add bulk connections endpoint (#948)
* Change connect endpoint to use bulk connections

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Add documentation for bulk connect

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Update service and postgres for multiple channels

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Update bulk connect endpoint

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Fix missed test

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Improve test code coverage

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change methods to use shared data type

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Fix provisioning example

Signed-off-by: Nick Neisen <nwneisen@gmail.com>

* Change depreciation messages to specify v1.0.0

Signed-off-by: nwneisen <nwneisen@gmail.com>

* Switch singluar log to plural

Signed-off-by: nwneisen <nwneisen@gmail.com>
2019-11-15 18:44:31 +01:00
Manuel Imperiale afeec81a5e
MF-916 - Fix Things and Channels counters (#947)
* MF-916 - Fix Things and Channels counters

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Use NamedQueryContext to count rows

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Create single helper total() func

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Fix reviews

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Rm useless LOWER

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>

* Revert previous commit

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2019-11-13 15:26:57 +01:00