* MF-1348 - Add go-kit transport level logging
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix merge
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remark
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix go test flags
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in things and http service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix SDK tests
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in certs and provision service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use httputil errors in consumers service
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* General renaming and add ErrMissingToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Rename httputil -> apiutil and use errors in users servive
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use apiutil errors in auth, bootstrap, readers, things and twins
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Replace errors.Contain by comparison
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateID
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify and rename ExtractAuthToken -> ExtractBearerToken
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix readers
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix auth key test and remarks
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Improve comment
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Simplify validateUUID check
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix typo
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* implement errors in bootstrap service
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove dead code
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* change errors messages
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* edit more errors messages
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* 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>
* Fix API docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Provide secured bootstrapping
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix test and mock methods signatures
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix typos
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add encrypte bootstrap test
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove duplicated docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use secret key to encrypt bootstrap request
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Use secret key for secure bootstrapping
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Move encryption to ConfigReader
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Remove ConfigReader from Service
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add reader tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update API docs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Unset key env variable
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add endpoint test for secure bootstrap
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add open tracing dependencies
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to users service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the http adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the ws adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add open tracing to the CoAP adapter
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update LoRa adapter in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update SDK tests in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update bootstrap service in accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update reader services with accordance with changes
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update .env and docker-compose file
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add jaeger and timeout env vars
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Fix broken test for can access by id endpoint
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update deps with proto empty package
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update metadata type in things service
Update things service so that metadata has map type. Update repo
implementation by adding sqlx lib.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add sqlx lib to bootstrap service
Add sqlx lib to bootstrap service and update metadata field type.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update metadata in redis streams consumer
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update tests for bootstrap service
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix mongo reader logging and driver version
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix mongo reader and writer
Fix mongo reader and writer by updating driver version.
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update SDK with new metadata format
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update LoRa adapter with new metadata format
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update users service in order to use sqlx
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Replace anonymous struct with map
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Update docs for LoRa adapter
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix LoRa application metadata format
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Fix metadata format in LoRa docs
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add metadata2 var to SDK things test
Signed-off-by: Aleksandar Novakovic <aleksandar.novakovic@mainflux.com>
* Add initial Bootstrap event producer
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add operation name to events
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add ES path for BS events
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add BS event sourcing tests
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add connections update events
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Extract event XADD to separeate method
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Add header comments
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix service docs typo
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update BS service README.md
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update Service method tests
Tests for handler methods are not added.
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>