* Add golangci-linter to CI script
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add no-config flag
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* disable staticcheck
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* disable all except errcheck
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add more linters
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* add verbose flag for debug
decrease concurrency to 1
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* remove errcheck and verbose flag
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* enable just golint
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* fix lint errors
Signed-off-by: Ivan Milošević <iva@blokovi.com>
* NOISSUE - Fix bootstrap token naming and interfaces named args
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix CI bot
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Use owner for repository layer
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
* Fix reviews
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.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>
* Use ThingID to update certs
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Fix logging typo
Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
* Update API tests and service mock
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>
* Add authorization HTTP API to things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Add new tests and update existing ones
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update swagger documentation
Update swagger documentation for auth endpoints.
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update README docs for things service
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Update docker-compose and fix endpoint typo
Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
* Remove commented code
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>
* Split Content-Type header field on semicolon and evaluate all substrings
Signed-off-by: Tony Ward <tony@lucidtron.com>
* included strings library
Signed-off-by: Tony Ward <tony0ward@hotmail.com>
* simplify code, run gofmt
Signed-off-by: tony <tony0ward@hotmail.com>
Signed-off-by: tony <tony@lucidtron.com>
* allow Content-Type to only contain the required type
Signed-off-by: Tony Ward <tony@lucidtron.com>