Commit Graph

243 Commits

Author SHA1 Message Date
b1ackd0t 8b185d205b
MF - 1758 - Sync With Benchmark Testing (#1912)
* feat(docker): add trace ration and max conn

This adds a new environment variable `MF_JAEGER_TRACE_RATIO` to the `docker/.env` file. The variable is used to set the ratio of requests traced.

Additionally, this commit also adds a new environment variable `MF_POSTGRES_MAX_CONNECTIONS` for configuring the maximum number of connections for the Postgres database.

These changes are made to enhance the configuration and scalability of the core services.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Remove comment to trace ratio

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Reduce postgres max connection to 100

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-10-24 18:59:49 +02:00
b1ackd0t 43a263d7da
NOISSUE - Introduce NATS Jetstream as Default ES (#1907)
* Refactor message broker implementation

This commit refactors the Nats message broker implementation to include pubsub options. These changes include:

- Adding `Option` func that takes in the URL and prefix
- Implement `WithStream` option which can create a different stream for nats stream
- Implement `WithExchange` option which can create a different exchaange for rabbitmq channel
- Implement `WithPrefix` option which allows to you change the publisher prefix

These changes improve the organization and readability of the codebase.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Use redis URL to configure username, password and db

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Make event store configurable on dev deployment

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix adds options to messaging `PubSub` interface

Adding options to PubSub interface allows the use of messaging
package to do es.

The changes in this commit ensure that the code handles errors
properly and provides more informative error messages when
encountering unexpected types.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add NATS event publisher implementation

This commit adds the implementation of the NATS event publisher.

The NATS event publisher is responsible for publishing events
to a NATS messaging system. It uses the `messaging`
package to interact with the messaging system.

The implementation includes the following features:

- Publishing events to NATS using the `Publish` method.
- Marshaling events to JSON before publishing.
- Setting the message subject and headers based on the event.
- Handling errors during publishing.

This implementation is built with the `!rabbitmq` build tag,
which means it will only be compiled if the `rabbitmq` build tag
is not present.

The NATS event publisher is part of the Mainflux events package
and provides support for the Mainflux NATS events source service functionality.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add RabbitMQ event publisher implementation

This commit adds the implementation of the RabbitMQ event publisher.

The RabbitMQ event publisher is responsible for publishing events
to a RabbitMQ messaging system. It uses the `messaging`
package to interact with the messaging system.

The implementation includes the following features:

- Publishing events to RabbitMQ using the `Publish` method.
- Marshaling events to JSON before publishing.
- Setting the message subject and headers based on the event.
- Handling errors during publishing.

This implementation is built with the `rabbitmq` build tag,
which means it will only be compiled if the `rabbitmq` build tag
is present.

The RabbitMQ event publisher is part of the Mainflux events package
and provides support for the Mainflux RabbitMQ events source service functionality.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add configurable implementation for events store

This commit adds a new file `brokers_*.go` which contains the implementation for the different event store. The file includes functions for creating a new publisher and subscriber using different es store.

This commit also includes an `init` function that logs a message indicating that the binary was built using the respective package as the events store.

The purpose of this commit is to add support for alternative events store.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix build flags

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Refactor Makefile and Semaphore configuration

The Makefile has been refactored to include the `MF_ES_STORE_TYPE` tag in the `go build` command. Additionally, the Semaphore configuration has been updated to include a new task for compiling with Redis as the broker type.

This commit addresses the need to compile the codebase with Redis as the event store type and includes the necessary changes in the Makefile and Semaphore configuration.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Reduced due to memory on testing

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix tests for es

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix grammar

Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix linting

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* feat(docker): update environment variables for message broker

The commit updates the environment variable `MF_ES_STORE_TYPE` in the `docker/.env` file. The variable is changed from `${MF_MQTT_BROKER_TYPE}` to `${MF_MESSAGE_BROKER_TYPE}` to accurately reflect the type of message broker being used. This change ensures that the correct message broker is configured for the Event Store.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* feat: Update docker environment variables

- Removed the unused MF_ES_URL variable in the .env file
- Updated the MF_ES_STORE_TYPE and MF_ES_STORE_URL variables in the .env file to match the MF_MESSAGE_BROKER_TYPE and MF_NATS_URL variables respectively

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix after rebase

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add godocs for option parameters for brokers

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* pass by value exchange and prefix names

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename option functions

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* move variables to constants

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* fix: option example comment

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
2023-10-24 17:22:53 +02:00
b1ackd0t 059b954047
NOISSUE - Refactor Redis URI (#1898)
* Replace Nats with Nats Jestream For PubSub

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor Redis client connection

Use a single Redis URI to connect to Redis where the URI contains
host, port, database and possibly username and password.

This is to simplify environment variable configuration.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-23 17:25:57 +02:00
b1ackd0t 6bc931eb2a
NOISSUE - Fix Readers Tests (#1933)
* Add things auth and auth

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(auth): add environment variable prefix for authorization gRPC client

This commit adds the environment variable prefix `MF_THINGS_AUTH_G` for the authorization gRPC client in the `internal/clients/grpc/auth/client.go` file. The prefix is used to configure the gRPC client for authorization.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(auth): add mock implementation

This commit adds a new file `auth.go` to the `mocks` package. The file contains a mock implementation of the `mainflux.AuthzServiceClient` interface. This mock implementation is used for testing purposes and allows for easier unit testing of code that depends on the `AuthzServiceClient` interface.

The `auth.go` file includes the necessary imports and initializes a new struct that embeds the `mock.Mock` struct from the `github.com/stretchr/testify/mock` package. This struct provides methods for setting expectations and returning predefined responses during tests.

This addition will improve the testability of the codebase and facilitate the testing of components that rely on the `AuthzServiceClient` interface.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(readers): add user authentication to listMessagesEndpoint

This commit adds user authentication to the listMessagesEndpoint function in the readers package. The function now takes an additional parameter, uauth, which is an instance of the mainflux.AuthServiceClient. This change allows the endpoint to verify the user's authentication before returning the list of messages.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-23 15:36:42 +02:00
b1ackd0t 790f8a6abf
NOISSUE - Make MQTT Broker Configurable (#1904)
* Minor changes on mqtt publisher using nats

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Remove vernemq dependencies

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Restore VerneMQ config files

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix Makefile to support custom Docker profiles

The Makefile has been updated to support custom Docker profiles.
Previously, the Makefile only supported the default profiles for the
message broker and MQTT broker. Now, the Makefile allows for custom
profiles to be specified using environment variables. If the
MF_BROKER_TYPE or MF_MQTT_BROKER_TYPE variables are not set, the
default values "nats" and "nats" will be used, respectively. This
change enables more flexibility in configuring the Docker environment
for the project.

The `run` target has also been modified to use the correct broker
configuration file based on the MF_BROKER_TYPE variable. The sed
command in the `run` target now replaces the placeholder in the
docker/docker-compose.yml file with the appropriate broker
configuration file.

This commit improves the Makefile to support custom Docker profiles
and ensures the correct broker configuration file is used when
running the project.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix queue binding issue in RabbitMQ pubsub

The commit fixes an issue in the RabbitMQ pubsub implementation where the queue binding was not correctly set up. Instead of using the topic as the queue name, the commit now uses a unique client ID generated by combining the topic and subscriber ID. This ensures that each subscriber has its own dedicated queue. The commit also updates the queue binding to use the correct queue name.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor Docker config editing in Makefile

The commit refactors the `edit_docker_config` function in the Makefile to improve readability and maintainability. The changes include:

- Removing unnecessary conditionals related to the `rabbitmq` broker

These changes ensure that the Docker configuration is correctly updated based on the specified MQTT broker type.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix failing tests on RabbitMQ

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor MQTT_BROKER comment in docker-compose.yml

The MQTT_BROKER comment in the docker-compose.yml file has been updated to provide a more accurate description of its functionality. The comment now states that the MQTT_BROKER handles MQTT communication between MQTT adapters and the message broker, instead of Mainflux services. This change improves clarity and aligns with the actual purpose of the MQTT_BROKER.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Rename `MF_BROKER` to `MF_MESSAGE_BROKER`

The Makefile and Semaphore configuration files have been refactored to update the variable names related to the message broker type.

These changes ensure consistency and clarity in the codebase by using more descriptive variable names related to the message broker type.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix Docker profile configuration for nats_rabbitmq

Update the Docker profile configuration for nats_rabbitmq by replacing the NATS URL in the .env file with the correct value.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Rename MF_BROKER_URL to MF_MESSAGE_BROKER_URL

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix MQTT QoS level in pubsub.go

The MQTT QoS level in the pubsub.go file was set to 1, which is the
default level. However, since NATS supports up to QoS 1, I updated the
QoS level comment to reflect this.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor NewPublisher to accept QoS parameter

The NewPublisher function in the pkg/messaging/mqtt/publisher.go file has been refactored to accept a new parameter, qos, which represents the Quality of Service level for MQTT message publishing. This change allows for more flexibility in configuring the MQTT publisher.

The NewPublisher function now has the following signature:

```go
func NewPublisher(address string, qos uint8, timeout time.Duration) (messaging.Publisher, error)
```

This change ensures that the MQTT publisher can be created with the desired QoS level, enhancing the reliability and delivery guarantees of the published messages.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix test assertions in pubsub_test.go

The test assertions in the pubsub_test.go file were incorrect. This commit fixes the assertions to properly compare the expected and received message values.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Test configurable MQTT broker

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-10-19 21:01:09 +02:00
b1ackd0t 67276c14eb
NOISSUE - Update Auth ENV Vars in Docker-Compose (#1937)
* feat(docker): update auth env vars in compose

Update docker/addons/*/docker-compose.yml with appropriate auth environment variables

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(config): update remotes URLs

Updated the URLs for the remotes in the config file to reflect the correct endpoints.

- Updated bootstrap_url to "http://localhost:9013"
- Updated certs_url to "http://localhost:9019"
- Updated http_adapter_url to "http://localhost/http:9016"
- Updated reader_url to "http://localhost"

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-18 22:36:41 +02:00
b1ackd0t 824156fbf0
NOISSUE - Use Nats JetStream As Internal Message Bus (#1893)
* Replace Nats with Nats Jestream For PubSub

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Stream Description

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Subscribe using wildcard

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add consumers description

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove unused queue variable

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add extra configs to stream

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Use inline error handling

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix connection leak in NATS publisher

The publisher struct in pkg/messaging/nats/publisher.go was modified to include a new `conn` field of type `*broker.Conn`. This change was made to fix a connection leak issue in the NATS publisher.

The `NewPublisher` function was updated to assign the `conn` parameter to the new `conn` field in the publisher struct.

Additionally, the `Close` method in the publisher struct was modified to close the `conn` connection.

This commit fixes the connection leak issue in the NATS publisher and ensures that connections are properly closed.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* feat(messaging): Add support for durable consumers

This commit adds support for durable consumers to NATS JS in the messaging package.

To support this functionality, the `strings` package has been imported in the `pubsub.go` file to check the topic.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat : remove internal logic to keep subscribers

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(messaging): add function to format consumer name

This commit adds a new function to the `pubsub` package in the `messaging` module. The function is called `formatConsumerName` and is used to generate a consumer name for NATS messaging. The function takes two parameters, `topic` and `id`, and returns a formatted consumer name. The consumer name is generated by concatenating the `topic` and `id` parameters, with some restrictions on the characters that can be used. This function will be useful for creating durable subscriptions in NATS messaging.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-18 17:00:38 +02:00
b1ackd0t 687505c833
NOISSUE - Remove Development Mode on Certs Creation (#1908)
* Fix certificate creation in development mode

This commit removes certificate creation in development mode. Previously, the `MF_CERTS_VAULT_HOST` environment variable was not being properly checked, resulting in incorrect behavior when issuing certificates. This commit ensures that the correct mode is set based on the value of `MF_CERTS_VAULT_HOST`.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Fix certificate revocation in README.md

The README.md file has been updated to clarify the process of revoking certificates. The previous instructions were incorrect, and the correct method is now provided. The certificates can be revoked using the `certs` service by providing the `thing_id` of the thing for which the certificate was issued.

```
curl -s -S -X DELETE http://localhost:9019/certs/revoke -H "Authorization: Bearer $TOK" -H 'Content-Type: application/json' -d '{"thing_id":"c30b8842-507c-4bcd-973c-74008cef3be5"}'
```

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2023-10-18 11:48:47 +02:00
Arvindh cd82cc5a43
NOISSUE: Listing of shared things with users & Update SDK (#1923)
* NOISSUE - Fix Bugs (#20)

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add Connect Disconnect endpoints (#23)

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix list of things in a channel and Add connect disconnect endpoint

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix list of things in a channel and Add connect disconnect endpoint

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add: Things share with users (#25)

* fix list of things in a channel and Add connect disconnect endpoint

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: things share with other users

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add: Listing of things, channels, groups, users  (#26)

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add: List of user groups & removed repeating code in groups (#29)

* removed repeating code in list groups

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: list of user group

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: otel handler operator name for endpoints

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* add: listing of shared things and users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: listing of shared things and users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: new SDK

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: new SDK

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: comment

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: sdk function names

Signed-off-by: Arvindh <arvindh91@gmail.com>

* update: api spec

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: channels connect request

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: listing of clients and groups

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: CLI

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: array len comparision

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: nginx

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2023-10-17 15:38:06 +02:00
b1ackd0t 6726bc7744
NOISSUE - Update Go Version on Docker and CI (#1925)
* feat(docker): update base image version to golang:1.21-alpine

The Dockerfile has been updated to use the latest version of the base image, golang:1.21-alpine, instead of golang:1.19-alpine. This update ensures that the application is built using the most recent version of the Go programming language.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* fix(ci): update Go version in Semaphore configuration

The Go version in the Semaphore configuration file was updated from 1.20 to 1.21.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-16 11:46:07 +02:00
Dušan Borovčanin 3d3aa525a6
NOISSUE - Switch to Google Zanzibar Access control approach (#1919)
* Return Auth service

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update Compose to run with SpiceDB and Auth svc

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update auth gRPC API

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Remove Users' policies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Move Groups to internal

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Use shared groups in Users

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Remove unused code

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Use pkg Groups in Things

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Remove Things groups

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Make imports consistent

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update Groups networking

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Remove things groups-specific API

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Move Things Clients to the root

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Move Clients to Users root

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Temporarily remove tracing

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Fix imports

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Add buffer config for gRPC

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update auth type for Things

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Use Auth for login

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Add temporary solution for refresh token

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update Tokenizer interface

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Updade tokens issuing

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Fix token issuing

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update JWT validator and refactor Tokenizer

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Rename access timeout

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Rename login to authenticate

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update Identify to use SubjectID

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Add Auth to Groups

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Use the Auth service for Groups

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update auth schema

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Fix Auth for Groups

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Add auth for addons (#14)

Signed-off-by: Arvindh <arvindh91@gmail.com>

Speparate Login and Refresh tokens

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Merge authN and authZ requests for things

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Add connect and disconnect

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update sharing

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Fix policies addition and removal

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Update relation with roels

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Add gRPC to Things

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Assign and Unassign members to group and Listing of Group members (#15)

* add auth for addons

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add assign and unassign to group

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add group incomplete repo implementation

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>

Move coap mqtt and ws policies to spicedb (#16)

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

Remove old policies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

NOISSUE - Things authorize to return thingID (#18)

This commit modifies the authorize endpoint to the grpc endpoint to return thingID. The authorize endpoint allows adapters to get the publisher of the message.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

Add Groups to users service (#17)

* add assign and unassign to group

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add group incomplete repo implementation

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users stable 1

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users stable 2

Signed-off-by: Arvindh <arvindh91@gmail.com>

* groups for users & things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Amend signature

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix merge error

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Fix es code (#21)

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Fix Bugs (#20)

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Test e2e (#19)

* fix: connect method

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* fix: e2e

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* fix changes in sdk and e2e

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(docker): remove unnecessary port mapping

Remove the port mapping for MQTT broker in the docker-compose.yml file.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Enable group listing

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(responses): update ChannelsPage struct

The ChannelsPage struct in the responses.go file has been updated. The "Channels" field has been renamed to "Groups" to provide more accurate naming. This change ensures consistency and clarity in the codebase.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(things): add UpdateClientSecret method

Add the UpdateClientSecret method to the things service. This method allows updating the client secret for a specific client identified by the provided token, id, and key parameters.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Use smaller buffers for gRPC

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Clean up tests (#22)

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add Connect Disconnect endpoints (#23)

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix bugs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix list of things in a channel and Add connect disconnect endpoint

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix list of things in a channel and Add connect disconnect endpoint

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add: Things share with users (#25)

* fix list of things in a channel and Add connect disconnect endpoint

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: things share with other users

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Rename gRPC Services (#24)

* Rename things and users auth service

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* docs: add authorization docs for gRPC services

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Rename things and users grpc services

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Remove mainflux.env package

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add: Listing of things, channels, groups, users  (#26)

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: listing of channels, users, groups, things

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Clean Up Users (#27)

* feat(groups): rename redis package to events

- Renamed the `redis` package to `events` in the `internal/groups` directory.
- Updated the file paths and names accordingly.
- This change reflects the more accurate purpose of the package and improves code organization.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(auth): Modify identity method

Change request and response of identity method

Add accessToken and refreshToken to Token response

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* clean up users, remove dead code

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(users): add unit tests for user service

This commit adds unit tests for the user service in the `users` package. The tests cover various scenarios and ensure the correct behavior of the service.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add: List of user groups & removed repeating code in groups (#29)

* removed repeating code in list groups

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: list of user group

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: otel handler operator name for endpoints

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Clean Up Things Service (#28)

* Rework things service

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* add tests

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Clean Up Auth Service (#30)

* clean up auth service

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* feat(auth): remove unused import

Remove the unused import of `emptypb` in `auth.pb.go`. This import is not being used in the codebase and can be safely removed.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Update API docs (#31)

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove TODO comments and cleanup the code

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependenices

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: b1ackd0t <28790446+rodneyosodo@users.noreply.github.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
2023-10-15 22:02:13 +02:00
AHmed Khatab 59bcb72f52
Update postgres-reader's docker-compose.yml enviorment varaible (#1914)
Changes to be committed:
	modified:   docker/addons/postgres-reader/docker-compose.yml

Signed-off-by: Khatab <a@khatab.me>
2023-10-05 07:36:06 +02:00
b1ackd0t 28f4965d26
NOISSUE - Add Event Sourcing Package (#1897)
* Add event sourcing package

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Move producer to es package

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Use redis URL to configure username, password and db

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Change the redis subscriber interface

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Clean up publisher inaterface

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Update redis version

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Add tests

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Rename factory functions of events store

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Rename redis package to events package

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Remove unnecessary alias on redis event store

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Minor cosmetic changes

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Remove stream length from factory function

Set the default stream length to 1e9 in the events package. This is
because the stream length is not a required parameter in the factory
function. This commit also removes the stream length from the factory
function.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Remove group Name on subscribing

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor package consumer to reflect changes in service name

The package consumer in the bootstrap/events/consumer/doc.go file has been modified to reflect the changes in the service name. The service name has been updated from "Things" to "Bootstrap". This change ensures that the package accurately represents the events consumer for the Bootstrap service.

This commit modifies the package consumer in the bootstrap/events/consumer/doc.go file to update the service name from "Things" to "Bootstrap". This change ensures that the package accurately represents the events consumer for the Bootstrap service.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor main to remove go routines

Remove go routines from main when subscribing to events. This is because
the event handlers are already running in their own go routines.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Move cache to seperate package

This commit moves the cache package to a seperate package. This is
because the cache package is not the same as events package. The cache
package is used to store the data in memory while the events package is
used to send events to the event bus.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Make startPublishingRoutine private

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2023-09-20 12:12:17 +02:00
b1ackd0t 2252438956
NOISSUE - Enable JetStream on NATS (#1885)
* Enable Jestream on Nats

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update verbosity

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-08-25 15:45:08 +02:00
Arvindh fde435060c
NOISSUE - Implementation of gRPC mTLS (#1848)
Rebase with master and squash commits
add: rootCA and clientCA in grpc server
add: rootCA and client certificate in grpc client
add: docker-compose for grpc-mtls and make target for mtls cert generation
fix: typo in makefile
fix: loadCertFile function in internal/clients/grpc/connect.go
fix: env.parser test
remove: commented lines
add: make commands
update: make commands and grpc clients
fix: typo in makefile
fix: loadCertFile function in internal/clients/grpc/connect.go
remove: commented lines
update: make commands and grpc clients
update: make commands and docker-compose
add: end of line
fix: typos in makefile
add: end of line
fix: typos in makefile
revert: grafana port in .env
change: loadCertFile function
change: certficate logic
change: env name and update in compose file
fix: makefile
remove: tls env var
change: ioutil to os for ReadFile
change loadfile
remove: test which is no needed
fix: docker project name
single docker-compose file
single docker-compose file
single docker-compose file
fix space and new lines
fix makefile
add: GRPC_TLS varaible and imporved logging in gRPC Client
fix mtls and tls env vars
fix mtls and tls env vars
grpc_mtls
fix docker-compose
fix makefile
fix const name to go idomatic

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
2023-08-16 19:11:33 +02:00
b1ackd0t 23a665b54a
MF-1510 - Add Event Sourcing To Users Service (#1835)
* Add Event Sourcing on Users Service

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Modify Events Sourced From Things Service

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename Cache

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove SharedBy From Events

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Use Combined Publisher

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Format Docker Compose File

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename Events

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-08-02 12:09:56 +02:00
Ian Ngethe Muchiri c8710efce0
NOISSUE-Add resetPassword to the SDK (#1872)
* Add resetPassword to the SDK

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add space to sdk comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add tab space to comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update .env file

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add referer header to sdk request

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update .env file

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update adding headers to processRequest

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove code repetition

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add comment to content-Type

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update header initialization

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update docker-compose file

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add cli functionality

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add host as a tag

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update hostURL flag

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove hostURL duplication

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update inline

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add space in comments

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add space in comment

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update description of reset password request

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2023-08-01 17:03:18 +02:00
b1ackd0t 3e7bac493c
NOISSUE - Sync Env Veriables With Docker Deployment (#1841)
* Initial Commit: Sync Env Veriables With Docker Deployment

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Sync Env Vars With Master

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Altprefix

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename HttpPort to HTTPPort

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix envPrefixDB After Rebase

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Server Parse

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Provision For TLS on CoAP

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Exit After Defer

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Unused Function

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Document Undocumentated Env Variables

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2023-07-31 14:38:35 +02:00
b1ackd0t 7cccba91c9
NOISSUE - Reformat Things and Users Policies Endpoint (#1831)
* Reformat Policies Enpoint to Take Sub Obj

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Redirect to `policies`

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Make Delete Endpoint not to Contain Body

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove gRPC unused functions

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Redirect

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update CLI

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Use Switch Statement

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Uncomment Commented Parts

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Empty Line

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Unused gRPC Req and Resp

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Listing of Policies

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename Authorize Functions For Users and Things Service

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Authorize To CLI

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-28 14:39:13 +02:00
b1ackd0t 1192325a2e
Initial Commit: Add Tracing To Certs Service (#1850)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-12 11:48:29 +02:00
b1ackd0t 979a4b74d3
MF-1183 - Add Event Sourcing To Twins Service (#1852)
* Initial Commit: Add Event Sourcing To Twins Service

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add SaveStates to Have Context

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-12 11:22:46 +02:00
b1ackd0t 7ffc14b279
COPY SSL Certs From Alpine (#1839)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-10 14:20:44 +02:00
Ian Ngethe Muchiri 892015a60f
NOISSUE - Add instance ID (#1776)
* update or to sync with clients branch

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* Add empty lines

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update inline constant

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* rebase pr to sync with master branch

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update pr to sync with updated master #1849

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2023-07-07 11:14:55 +02:00
b1ackd0t 604949e073
NOISSUE - Add Tracing To Bootstrap Service (#1849)
* Initial Commit: Remove JaegerURL from grpc Client Config

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Initial Commit: Add Tracing To Bootstrap Service

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-07 09:59:50 +02:00
Dušan Borovčanin 412593ae94
NOISSUE - Update dependencies (#1838)
* Update dependencies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependencies

Fix Timescale Reader bug.

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Revert influxdb-reader changes

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependencies to latest supported versions

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

---------

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2023-07-06 20:44:12 +02:00
b1ackd0t b9838fbeff
Initial Commit: Fix Password Regex From Env Variables (#1843)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-07-06 18:53:58 +02:00
b1ackd0t 60e9d17a61
Initial Commit: Remove Auth Service (#1845)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2023-07-06 17:53:17 +02:00
b1ackd0t aef5a57e1f
Fix SEND_TELEMETRY env var (#1819)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-06-15 15:05:11 +02:00
Dušan Borovčanin 55e09c1921
MF-1506 - Group-based Access Control (#1716)
* Move Things and Users to Clients

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Update Add and Delete Policies (#1792)

* Remove Policy Action Ranks

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Rebase Issues

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix CI Test Errors

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Adding Check on Subject For Clients

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Check Client Exists

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Check When Sharing Clients

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Only Add User to Group When Sharing Things

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove clientType

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Minor Fix on ShareClient and Fix Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Policies Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Clean Up Things Authorization

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Tests on RetrieveAll

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Test ShareThing

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Merge Conflicts

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Remove Adding Policies. Only Use Ownership

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Check If Subject is same as Object

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Move Back To Union As Sometimes Policy is Empty and Fails to Evaluate on Ownership

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Entity Type For Failing Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix BUG in policy evaluation

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Comments Regarding checkAdmin

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Tests On Rebase

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Combine Authorize For Things and Users

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Tests On Rebase

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Error on Things SVC `unsupported protocol scheme`

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix Bug on Things Authorization Cache (#1810)

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Use Password instead of username in MQTT handler

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Simplify MQTT authorization

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix MQTT tests

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Add More Functions to SDK (#1811)

* Add More Functions to SDK

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Examples to GoDoc

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Update Unassign Interface

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Pass Subject as ID and Not Token on List Channels By Thing

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Bootstrap Errors For Element Check

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add empty line Before Return

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Reorder URLS in things mux

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Listing Things Policies

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Share Thing

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Examples to CLI Docs

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Update Identity To Update Another User

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Identify an Update Policies on Things

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Update Things Policies

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix GoDocs on Disconnect

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Change Authorize To Use AccessRequest

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* For Evaluate Policy Use AccessRequest (#1814)

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Add SDK Tests (#1812)

* Add Things Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Channel Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Certs Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Consumer Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Enrich Group Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Tests For Health

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Tests For Tokens

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename SDK for Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Policies Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Linter

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix Tests

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Make Variable Defination Inline

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Make Cache Key Duration Configurable (#1815)

* Make Cache Key Duration Configurable

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename ENV Var

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Update GoDocs (#1816)

* Add GoDocs

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add Missing GoDoc Files

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Enable godot

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add License Information

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* NOISSUE - Add Call Home Client to Mainflux services (#1751)

* Move Things and Users to Clients

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>

* collect and send data package

Signed-off-by: SammyOina <sammyoina@gmail.com>

* create telemetry migrations

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add telemetry endpoints

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add transport

Signed-off-by: SammyOina <sammyoina@gmail.com>

* create service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove homing server

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add call home to adapters

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add last seen

Signed-off-by: SammyOina <sammyoina@gmail.com>

* rename logger

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove homing client

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use unmerged repo

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use renamed module

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update call home version

Signed-off-by: SammyOina <sammyoina@gmail.com>

* edit documentation

Signed-off-by: SammyOina <sammyoina@gmail.com>

* align table

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use alias for call home client

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update callhome

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update call home pkg

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update call home

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix modules

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use mf build version

Signed-off-by: SammyOina <sammyoina@gmail.com>

* use mf build version

Signed-off-by: SammyOina <sammyoina@gmail.com>

* restore default

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add call home for users and things

Signed-off-by: SammyOina <sammyoina@gmail.com>

* enable opting on call home

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove full stops

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update callhome client

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add call home to all services

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix build

Signed-off-by: SammyOina <sammyoina@gmail.com>

* restore sdk tests

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove unnecessary changes

Signed-off-by: SammyOina <sammyoina@gmail.com>

* restore health_test.go

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

---------

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: SammyOina <sammyoina@gmail.com>
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
2023-06-14 12:40:37 +02:00
Sammy Kerata Oina 029140a4b0
NOISSUE - Add latency metrics to dashboard (#1773)
* display latency metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove instant values from display

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove averages from quantiles

Signed-off-by: SammyOina <sammyoina@gmail.com>

* rename legend

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add units to latency metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2023-05-28 23:08:40 +02:00
Sammy Kerata Oina 1a77d384bb
MF-786 - Tracing over NATS using opentracing standard (#1739)
* send and receive span context

Signed-off-by: SammyOina <sammyoina@gmail.com>

* initilize tracer in cmd

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add span context to mainflux message

Signed-off-by: SammyOina <sammyoina@gmail.com>

* propagate span context from adapters

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix failing build

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix failing build

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix linting error

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add tracing middleware to coap service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add tracing middleware to http service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add tracing middleware to mqtt service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add tracing middleware to broker

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add tracing middleware to ws service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add tracing to services

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix naming convention of functions

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix failing build

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove tracer from mqtt svc

Signed-off-by: SammyOina <sammyoina@gmail.com>

* format code and removed unused code

Signed-off-by: SammyOina <sammyoina@gmail.com>

* rename tracing files

Signed-off-by: SammyOina <sammyoina@gmail.com>

* - rename nats tracer
- intialize tracing at the broker

Signed-off-by: SammyOina <sammyoina@gmail.com>

* check for nil spans

Signed-off-by: SammyOina <sammyoina@gmail.com>

* propagate spans to consumers writers

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove unused variable

Signed-off-by: SammyOina <sammyoina@gmail.com>

* propagate traces to notifiers

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove comments

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove span from message

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove span from message

Signed-off-by: SammyOina <sammyoina@gmail.com>

* trace over rabbitmq and mqtt

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix failing build

Signed-off-by: SammyOina <sammyoina@gmail.com>

* trace subscribe and unsuscribe ops

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add create span method

Signed-off-by: SammyOina <sammyoina@gmail.com>

* pass context from main

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add span tags

Signed-off-by: SammyOina <sammyoina@gmail.com>

* restore coap transport.go

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add context to ops

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add cancel to tracing

Signed-off-by: SammyOina <sammyoina@gmail.com>

* refactor handler

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add comments to exported functions
return interfaces

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove channel span tag

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add pub sub tracer

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add pub sub tracer

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove prefixes from operations

Signed-off-by: SammyOina <sammyoina@gmail.com>

* perpetuate context from root
remove protocol from span tag

Signed-off-by: SammyOina <sammyoina@gmail.com>

* reorder functions

Signed-off-by: SammyOina <sammyoina@gmail.com>

* create span function

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add suffixes
add pubsub tags

Signed-off-by: SammyOina <sammyoina@gmail.com>

* move from if to switch

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add jaeger url to docker compose

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove snake case variables
add comments to exported functions

Signed-off-by: SammyOina <sammyoina@gmail.com>

* check for empty sub topics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove tracing on consumers

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove duplicate tracers

Signed-off-by: SammyOina <sammyoina@gmail.com>

* clean up unused variables

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove empty lines

Signed-off-by: SammyOina <sammyoina@gmail.com>

* write better comments

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update readme jaeger url

Signed-off-by: SammyOina <sammyoina@gmail.com>

* initialize tracing midlleware on main
update readme jaeger urls

Signed-off-by: SammyOina <sammyoina@gmail.com>

* reorder arguments for tracing middleware

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add context to subscribe

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
2023-04-20 21:39:33 +02:00
Aryan Godara 23bc094ec3
NOISSUE - Blocking and Async Consumer Interface (#1742)
* Add Async Consumer Support

Author: aryan <aryangodara03@gmail.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* update consumer_async, fix flush interval

Signed-off-by: aryan <aryangodara03@gmail.com>

* update influxdb from 1.4.0 to 2.12.3

Signed-off-by: aryan <aryangodara03@gmail.com>

* separate tests and update logging and metrics middlewares

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix typos and comments

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix interfaces and tests

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix interface and add docs

Signed-off-by: aryan <aryangodara03@gmail.com>

* update Consumer interface godoc

Signed-off-by: aryan <aryangodara03@gmail.com>

* update influx-writer logger

Signed-off-by: aryan <aryangodara03@gmail.com>

---------

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: aryan <aryangodara03@gmail.com>
Co-authored-by: dusanb94 <dusan.borovcanin@mainflux.com>
2023-04-20 18:20:53 +02:00
Sammy Kerata Oina 0e3e716c48
NOISSUE - Add prometheus and grafana for metrics (#1753)
* add prometheus and grafana for metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add grafana tag
move prometheus metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add empty lines

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add example dashboard

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix scraping path

Signed-off-by: SammyOina <sammyoina@gmail.com>

* add things metric to dashboard

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change execution path

Signed-off-by: SammyOina <sammyoina@gmail.com>

* fix typo and switch from yaml to yml

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update dashboard

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update example dashboard

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update dashboard

Signed-off-by: SammyOina <sammyoina@gmail.com>

* remove thresholds from gauges

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
2023-04-14 12:58:11 +02:00
Sammy Kerata Oina 83ff4e12ea
MF-512 - Change service default ports (#1737)
* Change service Default ports

Updated ports:
- auth http 9000
- auth grpc 7000
- provision http 9001
- things http 9002
- things auth http 9003
- things auth grpc 7001
- twins http 9004
- users http 9005
- bootstrap http 9006
- cassandra-reader http 9007
- cassandra-writer http 9008
- influxdb-reader http 9009
- influxdb-writer http 9010
- lora http 9011
- mongodb reader http 9012
- mongodb writer http 9013
- postgres-reader http 9014
- postgrs-writer http 9015
- smpp-notifier http 9016
- smtp-notifier http 9017
- timescale-reader http 9018
- timescale-writer http 9019

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change default service ports on env and sh

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change things url default port

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change default ports order by importance
- auth http 9000
- auth grpc 7000
- things http 9001
- things auth http 9002
- things auth grpc 7001
- users http 9003
- cassandra-reader http 9004
- cassandra-writer http 9005
- influxdb-reader http 9006
- influxdb-writer http 9007
- mongodb reader http 9008
- mongodb writer http 9009
- postgres-reader http 9010
- postgres-writer http 9011
- timescale-reader http 9012
- timescale-writer http 9013
- bootstrap http 9014
- smpp-notifier http 9015
- smtp-notifier http 9016
- provision http 9017
- lora http 9018
- twins http 9019

Signed-off-by: SammyOina <sammyoina@gmail.com>

* lower port number in auth service

Signed-off-by: SammyOina <sammyoina@gmail.com>

* change things and users port
- things 9000
- things auth 9001
- things auth grpc 7000
- users 9002

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update documentaton to new port numbers

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update test and metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* update host on metrics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* resolving conflics

Signed-off-by: SammyOina <sammyoina@gmail.com>

* set http adapter port to :80

Signed-off-by: SammyOina <sammyoina@gmail.com>

* reassign http port on metrics to :80

Signed-off-by: SammyOina <sammyoina@gmail.com>

* reassign http adapter port

Signed-off-by: SammyOina <sammyoina@gmail.com>

* set http adapter port to 8008

Signed-off-by: SammyOina <sammyoina@gmail.com>

* document http adapter default port

Signed-off-by: SammyOina <sammyoina@gmail.com>

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
2023-03-23 21:55:11 +01:00
Aryan Godara 986edacfc7
MF-1584 - Upgrade InfluxDB from 1.x to 2.x (#1709)
* Upgrade InfluxDB from 1.x to 2.x

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influx DB configuration updated

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Connection to InfluxDBv2

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Token cannot be created

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Connected to InfluxDB2

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Connected to InfluxDB2

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* InfluxDB v2 Consumer Implementation

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* quickfix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb-Writer Unit Tests Update

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Consumer Update

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* InfluxDB Writer Tests Implemented

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* InfluxDB Connection Check

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolving Remarks

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved consumer-test remark

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* consumer-test slow working version

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* reader changes

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Consumer tests time issue fixed

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Eof warning fixed

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Makefile Fixed

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Readers Initial Setup

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* consumer json fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb Reader Parsers

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb Reader Parsers

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb Reader Parsers

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Bugfix and resolves comments.

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* one test fails

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* solved last page read

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* writers future time problem fixed

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* weird

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* weird

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Tests Passes

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolve Semaphore Issues

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* UUID comment on consumer tests resolved

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Inclusive from and Exclusive to

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Inclusive from and Exclusive to

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* 1 second limits

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* 1 second limits

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* fixed json time

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* fixed CI error

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved request

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved request

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved requests

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* removed blank line

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved comment

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* deleted unnecessary string builder

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* initial commit

Signed-off-by: aryan <aryangodara03@gmail.com>

* change influxdb docker image version.

Signed-off-by: aryan <aryangodara03@gmail.com>

* go mod and vendor fixing

Signed-off-by: aryan <aryangodara03@gmail.com>

* Upgrade InfluxDB from 1.x to 2.x

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influx DB configuration updated

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Connection to InfluxDBv2

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Token cannot be created

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Connected to InfluxDB2

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Connected to InfluxDB2

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* InfluxDB v2 Consumer Implementation

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* quickfix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb-Writer Unit Tests Update

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Consumer Update

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* InfluxDB Writer Tests Implemented

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* InfluxDB Connection Check

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolving Remarks

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved consumer-test remark

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* consumer-test slow working version

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* reader changes

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Consumer tests time issue fixed

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolved Reviews

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Readers Initial Setup

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* consumer json fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* readers simple version fix

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb Reader Parsers

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb Reader Parsers

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Influxdb Reader Parsers

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Bugfix and resolves comments.

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* one test fails

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* solved last page read

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* writers future time problem fixed

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* weird

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* weird

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Tests Passes

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Resolve Semaphore Issues

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* UUID comment on consumer tests resolved

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Inclusive from and Exclusive to

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* Inclusive from and Exclusive to

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* 1 second limits

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* 1 second limits

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved review

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* fixed json time

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* fixed CI error

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved request

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved request

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved requests

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* removed blank line

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* resolved comment

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* deleted unnecessary string builder

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>

* initial commit

Signed-off-by: aryan <aryangodara03@gmail.com>

* change influxdb docker image version.

Signed-off-by: aryan <aryangodara03@gmail.com>

* go mod and vendor fixing

Signed-off-by: aryan <aryangodara03@gmail.com>

* go mod fixing

Signed-off-by: aryan <aryangodara03@gmail.com>

* make tests pass locally, fix errors

Signed-off-by: aryan <aryangodara03@gmail.com>

* rem unsused variables/consts

Signed-off-by: aryan <aryangodara03@gmail.com>

* go mod tidy vendor

Signed-off-by: aryan <aryangodara03@gmail.com>

* add env var and data types

Signed-off-by: aryan <aryangodara03@gmail.com>

* update influxdb version to latest (2.3 to 2.12)

Signed-off-by: aryan <aryangodara03@gmail.com>

* change time precision for message tests

Signed-off-by: aryan <aryangodara03@gmail.com>

* renamed influxdb2 to influxdata

Signed-off-by: aryan <aryangodara03@gmail.com>

* address remarks on PR

Signed-off-by: aryan <aryangodara03@gmail.com>

* update influxbd according to latest mf commit

Signed-off-by: aryan <aryangodara03@gmail.com>

* temp commit, rem before pushing

Signed-off-by: aryan <aryangodara03@gmail.com>

* update main files and cassandra-reader messages_tests

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix name of logger while importing

Signed-off-by: aryan <aryangodara03@gmail.com>

* remove unnecessary print lines

Signed-off-by: aryan <aryangodara03@gmail.com>

* correct env var name

Signed-off-by: aryan <aryangodara03@gmail.com>

* change to async consume

Signed-off-by: aryan <aryangodara03@gmail.com>

* add option to switch bw sync and async

Signed-off-by: aryan <aryangodara03@gmail.com>

* test for both async and sync

Signed-off-by: aryan <aryangodara03@gmail.com>

* update consumer and add writeAPIs to config

Signed-off-by: aryan <aryangodara03@gmail.com>

* revert back to sync consuming

Signed-off-by: aryan <aryangodara03@gmail.com>

* temp fix for default timeout value

Signed-off-by: aryan <aryangodara03@gmail.com>

* set default timeout in config.

Signed-off-by: aryan <aryangodara03@gmail.com>

* remove unwanted env vars, add required ones.

Signed-off-by: aryan <aryangodara03@gmail.com>

* rem unused username password from config

Signed-off-by: aryan <aryangodara03@gmail.com>

* update readme, env vars, and remove grafana

Signed-off-by: aryan <aryangodara03@gmail.com>

* update readme

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix typo

Signed-off-by: aryan <aryangodara03@gmail.com>

* update readme description.

Signed-off-by: aryan <aryangodara03@gmail.com>

* fix more typos.

Signed-off-by: aryan <aryangodara03@gmail.com>

* add link to official docs to readme.

Signed-off-by: aryan <aryangodara03@gmail.com>

---------

Signed-off-by: fatih <fatihdurmaz@sabanciuniv.edu>
Signed-off-by: aryan <aryangodara03@gmail.com>
Co-authored-by: fatih <fatihdurmaz@sabanciuniv.edu>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2023-03-16 02:36:14 +01:00
Arvindh d00d13dabb
MF-1556 - Move the most used functions in main.go to internal package (#1601)
* MF-1525 - Add graceful stop for HTTP and GRPC servers (#1548)

* Add : errgroup to cmd/auth

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Handle graceful stop for auth service
Remove : errgroups from auth service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Wait till server shutdown

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Change : instead of waitgroup changed to errgroups

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change : KillSignalHandler return type to error

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Empty Commit

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Context to http server shutdown
Rename : varaible from proto to protocol

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change : to default log level

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Sign-off

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: graceful stop of http and grpc server

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix: typos and caps

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: Signed-off

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename: Func KillSignalHandler to SignalHandler
Add: SIGABRT

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix: auth service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: timeout for grpc gracefulstop
Fix: typos

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: .vscode folder to git ignore

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change: variable name to stopWaitTime

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: .vscode folder

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: .vscode from .gitignore

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : logger to handlers

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : New line at end of .gitignore file

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix : variable naming
Add : graceful stop for timescale

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Remove : unsued NATS library from import

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move: "https" and "https" to moved to const var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move: "http" and "https" to moved to const var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* update:  branch with master

Signed-off-by: Arvindh <arvindh91@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: httpserver and grpcsever

Signed-off-by: Arvindh <arvindh91@gmail.com>

* MF-1588 - Update Subscriber interface (#1598)

* Initial commit

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update subscriber interface

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* check subscription map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Check topic id after topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* reword description

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Setup empty queue

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Switch statements

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Simplify

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt subscriber

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Protect subscription map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Set client id

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change delete method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* move http and grpc server functions

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move Keto and Jaeger

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add metrics and auth

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* MF - 1590 - Fix fetching list of users with a zero limit (#1594)

* Add max and min limit size

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* NOISSUE - Retrieve client key on cert issuing (#1607)

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

* fix bug (#1604)

Signed-off-by: zhangchuanfeng <654300242@qq.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename service name

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Change metrics method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename package name

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* 🚚 Rename Keto and Jaeger functions

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify grpc service

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* 🚚 rename apiutil to initutil

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

*  coap server

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* 🚚 rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* 🚚 Rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* ♻️ rename packages

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* ♻️ remove mf prefix

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* 🚚 rename server error

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove dead code

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* MF - 1416 - Queue Abstraction for Mainflux & RabbitMQ Support (#1562)

* MF-1263 - Move repeating errors to the separate package (#1540)

* MF-1263 - Mv duplicated errors to pkg/errors

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

* Revert test build flags

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

* Fix merge

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

* Fix comment

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Fix auth members list response (#1555)

* NOISSUE - Fix auth members list response

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

* Move group type next to page details

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

* Rm membersRes

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

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538)

* MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz

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

* ErrExternalKey typo

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

* Rename ErrUnauthorizedAcces -> ErrAuthentication

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

* Fix bootstrap error

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

* Fix status code in openapi

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

* Fix test description

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

* Fix test description

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

* Fix test description

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

* Add errors cases

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

* Fix status codes

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

* Add gRPC stutus code

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

* Fix tests description

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

* Fix openapi and encodeError

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

* Fix grpc message

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

* Fix test descriptions

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

* Revert sdk error

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

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1059 - Add TLS support for email (#1560)

* Use gomail package for sending emails

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove print err

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Add vendor

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Rename email structure
remove logger

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* typo in var name

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* rename var

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove MF_EMAIL_SECRET

Signed-off-by: Ivan Milosevic <iva@blokovi.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Refactor MQTT subscriber (#1561)

* correct suscriber interface validator + refactore token error handling

Signed-off-by: tzzed <zerouali.t@gmail.com>

* apply review suggestion

Signed-off-by: tzzed <zerouali.t@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1257 - Access messages from readers endpoint with user access token (#1470)

* remove owner id

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

* add user auth for db reader

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

* add user auth for db reader

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

* enable mongodb reader for user token reading

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

* use uuid check for auth switch between thing key and user tok

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

* enable user token reading

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

* revert to correct version

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

* fix endpoint test, add additional tests

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

* remove logs,dead code

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

* fix logging messages

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

* remove auth interface, add authorization header type

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

* update api doc

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

* remove unused package

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

* some refactor of cases for authorization switch

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

* correct description in openapi

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

* fix endpoint test to match auth service change

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

* some rename

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

* initialize auth url

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

* add env variables for auth service

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

* fix spelling

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

* Things prefix and no prefix for Thing authorization, Bearer for user

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

* update readme file

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

* fix default things grpc port

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

* enable user reading for timescaledb

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

* remove not used error

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

* improve errors

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

* refactor authorize

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

* add chanID check

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

* inline some error checking

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

* fixing errors

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

* fixing errors

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

* improve test case description

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

* remove test code

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

* dont inline

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

* refactor a bit encodeError

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

* remove unused error

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

* remove unused error

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

* fix things auth grpc url

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

* rename variables for header prefix

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit for tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Bump up tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add more tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add go routines

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit for tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Bump up tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add more tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add go routines

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix with wait groups

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* unsubscribe to stop delivering messages

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove exclusivity

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1551 - Fix Cobra usage commands and clean unnecessary struct types (#1558)

* MF-1551 - Fix Cobra usage commands and clean unnecessary struct types

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

* Use linux syntax for cmd usage description

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

* Fix typo

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

* Fix cmd.Use

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Separate Keto hosts for read and write (#1563)

* Separate keto hosts for read and write

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* update readme with new envars

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* rename read connection name

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update dependencies (#1564)

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1240 - Return to service transport layer only service errors (#1559)

* MF-1240 - Return to service transport layer only service errors

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

* Remove unecessary errors

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

* Rm duplicated errors and fix transport

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

* Revert http endpoint_test

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

* Fix conflict

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Implement cancel mechanisms

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Queuename as parameter

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Queuename as parameter

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1469 - Indicate proper authentication scheme in Authorization header (#1523)

* MF-1469 - Indicate proper authentication scheme in Authorization header

Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>

* Fixing the remarks on the last push

Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>

* Remove Bearer prefix in all services and fix tests

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

* Fix remarks

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

Co-authored-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Add nats wrapper for COAP (#1569)

* Add nats wrapper for COAP

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Pass pubsub as argument

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Defer close connection

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Defer close connection

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Rename endpoint to topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1348 - Add transport errors logging (#1544)

* 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>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1567 - Use Bearer, Thing or Basic scheme in Authorization header (#1568)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1565 - Document Bearer, Thing and Basic Authorization header (#1566)

* MF-1565 - Document Bearer Authorization header

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

* Fix auth, bootstrap, http and readers openapi

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

* Fix openapi

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

* Add enc key for bootstrap

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

* Fix typo

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

* Use global security

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

* Fix bearer formats

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

* Polish descriptions

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

* Fix boostrap and typo

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

Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1575 Add 'Name' field to ListMembers response in things svc (#1576)

Signed-off-by: Ivan Balboteo <ivan@submer.com>

Co-authored-by: Ivan Balboteo <ivan@submer.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1580 - Influxdb Writer changes format of update-time to string (#1581)

* - MF-1580
- Modified consumers/writers/influxdb/fields.go
- influxdb-writer used to update data type of update-time to string
- Commented line 12 of consumers/writers/influxdb/fields.go to resolve
  uneccessary data type conversion issue

Signed-off-by: Hasan Tariq <hasantariqashraf@gmail.com>

* - MF-1580
- Removed strconv package from consumers/writers/influxdb/fields.go since it is no longer needed
- Removed line 12 from consumers/writers/influxdb/fields.go
- Replaced retrun value of updateTime with msg.UpdateTime (line 16 in
  fields.go)

Signed-off-by: Hasan Tariq <hasantariqashraf@gmail.com>

* Fix InflxuDB readers

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Co-authored-by: Hasan Tariq <hasant@plcgroup.com>
Co-authored-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Unify MF_INFLUX_READER_DB_HOST and MF_INFLUX_WRITER_DB_HOST envars (#1585)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Fix CoAP adapter (#1572)

* Revert "NOISSUE - Add nats wrapper for COAP (#1569)"

This reverts commit cc5d5195ab.

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix CoAP adapter

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update CoAP observation cancel

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix observe

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix GET handling

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Revert authorization

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Use constants instead of magic numbers

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove an empty line

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Extract special observe value to constant

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1582 - Fix lora-adapter MQTT client (#1583)

* MF-1582 - Fix lora-adapter MQTT clien

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

* Add timeout config to the mqtt subscriber

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

* Rm comment

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

* Add sub timeout

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Update changelog and readme for release 0.13.0 (#1592)

* Update release example

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update changelog and examples for 0.13.0 release

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update VerneMQ release (#1593)

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Update changelog for release 0.13.0 (#1595)

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* unexport constants

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change routingkey

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove wait groups

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* protecting map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add publisher to pubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change proto library

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix typos

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Reduce pubsub tests based on implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove channel cancel

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Export constant

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Move invariant statements out of loop for cassandra-writer (#1596)

Signed-off-by: fuzhy <fuzhy1997@outlook.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Embedding publisher into pubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Naming publisher

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Fix Nginx entrypoint script (#1597)

* Fix Nginx entrypoint script

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependencies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix NginX entrypoint

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Revert Makefile changes

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1525 - Add graceful stop for HTTP and GRPC servers (#1548)

* Add : errgroup to cmd/auth

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Handle graceful stop for auth service
Remove : errgroups from auth service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Wait till server shutdown

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Change : instead of waitgroup changed to errgroups

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change : KillSignalHandler return type to error

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Empty Commit

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Context to http server shutdown
Rename : varaible from proto to protocol

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change : to default log level

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Sign-off

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: graceful stop of http and grpc server

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix: typos and caps

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: Signed-off

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename: Func KillSignalHandler to SignalHandler
Add: SIGABRT

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix: auth service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: timeout for grpc gracefulstop
Fix: typos

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: .vscode folder to git ignore

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change: variable name to stopWaitTime

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: .vscode folder

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: .vscode from .gitignore

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : logger to handlers

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : New line at end of .gitignore file

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix : variable naming
Add : graceful stop for timescale

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Remove : unsued NATS library from import

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move: "https" and "https" to moved to const var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move: "http" and "https" to moved to const var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* update:  branch with master

Signed-off-by: Arvindh <arvindh91@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1588 - Update Subscriber interface (#1598)

* Initial commit

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update subscriber interface

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* check subscription map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Check topic id after topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* reword description

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Setup empty queue

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Switch statements

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Simplify

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt subscriber

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Protect subscription map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Set client id

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change delete method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update rabbitmq subscriber interface

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* using publisher composition

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change contenttype

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* rename topic for publish and subscribe

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change errors to lower case

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change errors to lower case

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* export errors

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF - 1590 - Fix fetching list of users with a zero limit (#1594)

* Add max and min limit size

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Retrieve client key on cert issuing (#1607)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* fix bug (#1604)

Signed-off-by: zhangchuanfeng <654300242@qq.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* queue per subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* queue per subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change routing method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Direct method with one exchange to many queues, one consumer per queue

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ♻️ Not casting data

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ✏️ Fix typo

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ♻️ remove passed queue name

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* 🔥 removing echange kind

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Combine tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Refactor unsubscribe method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix merge conflict

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

*  sub and unsub to dummy topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* generate client id from topic and ID

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Rename topicID to clientID

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* update tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Reuse clientID

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix typos

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Seperate testpublish and testpubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Manuel Imperiale <manuel.Imperiale@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Ivan Milošević <iva@blokovi.com>
Co-authored-by: __touk__ <zerouali.t@gmail.com>
Co-authored-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Co-authored-by: stefankovacevic123 <jen2tri@gmail.com>
Co-authored-by: ibalboteo <ivanbalboteo@gmail.com>
Co-authored-by: Ivan Balboteo <ivan@submer.com>
Co-authored-by: Hasan98-git <67228396+Hasan98-git@users.noreply.github.com>
Co-authored-by: Hasan Tariq <hasant@plcgroup.com>
Co-authored-by: fuzhy <fuzhy1997@outlook.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
Co-authored-by: 张传峰 <59160162+zhang-chuanfeng@users.noreply.github.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* NOISSUE - Fix Groups SDK (#1609)

* Fix Groups SDK

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix CLI

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* NOISSUE - Fix CI script (#1613)

* Fix CI script

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix linter errors

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add timeout to linter

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* NOISSUE - Make application/json content-type valid in http-adapter (#1606)

* NOISSUE - Make application/json content-type valid in http-adapter

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

* Add test

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

* Add CBOR content-type

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

* Fix naming

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

* Fix naming

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

* Fix CI

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

* Fix CI flag

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

* Fix CI install

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

* Upgrade grpc version

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

* Fix typo

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

* rm cli

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Specify size of channel

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* NOISSUE - fix pull request template typo (#1616)

* Fix typo

Signed-off-by: Filip Bugarski <filipbugarski@gmail.com>

* Change link

Signed-off-by: fbugarski <filipbugarski@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: load configuration function

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change: load config from env with pkg caarlos0/env

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change: mfdatabase to internaldb

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: httpserver and grpcsever

Signed-off-by: Arvindh <arvindh91@gmail.com>

move http and grpc server functions

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Move Keto and Jaeger

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Add metrics and auth

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Rename service name

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Change metrics method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Rename package name

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

🚚 Rename Keto and Jaeger functions

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

unify grpc service

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

🚚 rename apiutil to initutil

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

 coap server

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

🚚 rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

🚚 Rename

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

♻️ rename packages

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

♻️ remove mf prefix

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

🚚 rename server error

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

remove dead code

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

NOISSUE - Fix CI script (#1613)

* Fix CI script

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix linter errors

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add timeout to linter

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Specify size of channel

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>

Add: load configuration function

Signed-off-by: Arvindh <arvindh91@gmail.com>

change: load config from env with pkg caarlos0/env

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change: mfdatabase to internaldb

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: merge resolve error

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: merge resolve error

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: merge resolve error

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: unused variables

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: address variable in servers

Signed-off-by: Arvindh <arvindh91@gmail.com>

* move: postgres connect to internal

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: client wrapper for most used

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: client wrapper for env

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify : auth, bootstrap, cassandra reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify : bootstrap code

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify : cassandra writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: struct tag to envDefault

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: grpc prefix

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: env parser

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: alt prefix

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: env default tag

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: auth grpc config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* changes: internal approch and service start

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: http adapter service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: unused code in http adapter"

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: config environment variable tags

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: timescale writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: timescale reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: thing main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: smtp-notifier

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: smpp-notifier

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: postgres reader and writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify: twins

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify certs main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify certs main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify coap main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify lora main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix fatalf

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify mqtt main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify mqtt main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify ocpua adapter main.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix case

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify ws_adapter

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify ws_adapter

Signed-off-by: Arvindh <arvindh91@gmail.com>

* unify ws_adapter

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add : comment and spacing

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: lint errors

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: lint errors

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: main.go config load

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: main.go config load

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: auth main.go keto config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: package internal/sqlxt

Signed-off-by: Arvindh <arvindh91@gmail.com>

* code format : internal/client/grpc/connect.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: inline code

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: code format

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: inline and code format

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: moved to single block

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: moved to single block

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: export function comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: export function comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: export function comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: export function comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: export function comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remane: newtracer.go to tracer.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* renamee: authClient.go and thingsClient.go to client.go

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove space

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: jaeger default value

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: cassander config default values

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename file

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: postgres client config default values

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add setup with default config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: mongo client config default values

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add: postgres default db name in services

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for auth

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for bootstrap

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for cassandra-reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for cassandra-writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for certs

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for coap

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for http-adapter

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for influx-reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for influx-writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for lora

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for mongodb-reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for mongodb-writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for mqtt

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for opcua

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for postgres-reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for postgres-writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for smpp-notifier

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for smtp-notifier

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for things

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for timescale-reader

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for timescale-writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for twins

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for users

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: environment variable default for ws

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: unused variables

Signed-off-by: Arvindh <arvindh91@gmail.com>

* empty commit

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: redis env variables

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: adapter ports and postgres db name

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: adapter ports

Signed-off-by: Arvindh <arvindh91@gmail.com>

* comments aligned

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename cassandra session variable

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename influxdb and influx to influxDB

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename EsConsumername to ESConsumerName

Signed-off-by: Arvindh <arvindh91@gmail.com>

* made comments consistant

Signed-off-by: Arvindh <arvindh91@gmail.com>

* made comments consistant & remove empty lines

Signed-off-by: Arvindh <arvindh91@gmail.com>

* made comments consistant & renmae function

Signed-off-by: Arvindh <arvindh91@gmail.com>

* made comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* comments added

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix bootstrap

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix empty env var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove : unused variable

Signed-off-by: Arvindh <arvindh91@gmail.com>

* update: env parser library

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: mongodb reader and writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix: cassandra reader and writer

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename: directory

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename: variable

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: unused librar

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Format code and remove unused comments

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix tests

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Move test URL construction out of the loop

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* remove end dot in single line comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* empty

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: zhangchuanfeng <654300242@qq.com>
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: fbugarski <filipbugarski@gmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Co-authored-by: b1ackd0t <blackd0t@protonmail.com>
Co-authored-by: Manuel Imperiale <manuel.Imperiale@gmail.com>
Co-authored-by: 张传峰 <59160162+zhang-chuanfeng@users.noreply.github.com>
Co-authored-by: Ivan Milošević <iva@blokovi.com>
Co-authored-by: __touk__ <zerouali.t@gmail.com>
Co-authored-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
Co-authored-by: stefankovacevic123 <jen2tri@gmail.com>
Co-authored-by: ibalboteo <ivanbalboteo@gmail.com>
Co-authored-by: Ivan Balboteo <ivan@submer.com>
Co-authored-by: Hasan98-git <67228396+Hasan98-git@users.noreply.github.com>
Co-authored-by: Hasan Tariq <hasant@plcgroup.com>
Co-authored-by: fuzhy <fuzhy1997@outlook.com>
Co-authored-by: Filip Bugarski <filipbugarski@gmail.com>
2023-02-03 17:36:18 +01:00
b1ackd0t 2e118ce36b
NOISSUE - Update Nginx Docker Image (#1706)
* initial commit

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* update tests

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* initial commit

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* update tests

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* add empty line

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* update certs

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove serial file

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* fix check password from certs

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* change from include to endswith

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

---------

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>
Co-authored-by: rodneyosodo <socials@rodneyosodo.com>
2023-01-29 01:58:28 +01:00
b1ackd0t d008ae5d97
NOISSUE - Add cert revocation to SDK (#1693)
* initial commit

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* fix certificate revoking

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* change from mapstructure to json

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* add comments to serial modification

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* fix typo

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* update vault docker version

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* write env variables

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* change env path

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* return revocation time

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* revert to intermediate CA

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove deadcode

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* make revoke cert output readable

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove keybits and keytype

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove dead code

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* make inline

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* add empty line

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove commented code

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove keyBits

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

* remove keyBits

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>

Signed-off-by: rodneyosodo <socials@rodneyosodo.com>
Co-authored-by: rodneyosodo <socials@rodneyosodo.com>
2023-01-13 14:33:00 +01:00
Dušan Borovčanin f438d24c41
MF-1681 - Failed to reconnect to NATS (#1686)
* Make NATS reconnect never give up

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Extract maxReconnects to a constant

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-12-21 14:08:02 +01:00
Dušan Borovčanin a48fb944c6
MF-1667 - Postgres lib update (#1680)
* Replace SQL lib in Things and Users

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update Bootstrap DB lib

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Rename pqErr to pgErr

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update Auth db lib

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update DB lib in consumers

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update DB lib for Readers

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update Certs DB lib

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove "lib/pq" from dependencies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update vendor

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update Go version for base image in Dockerfile

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove unused Provision Dockerfile

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Move error codes to init.go files

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add missing comment

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Use Error Codes lib

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update Go version in CI script

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update mod file

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-12-13 15:34:01 +01:00
b1ackd0t 78b025c473
Fix ws broker url (#1659)
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
2022-09-29 01:08:15 +02:00
b1ackd0t 237826e253
MF-1648 - Add Default MF_BROKER_URL in env file (#1650)
* Initial commit

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove nats and rabbitmq url

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove broker url construction in makefile

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove nats and rabbitmq url

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove broker url construction in makefile

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove if else statement in Makefile

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2022-09-21 15:30:06 +02:00
Aryan Godara 8a4cc12cd3
MF-1623 - Bring back WebSocket Adapter (#1625)
Signed-off-by: aryan <aryangodara03@gmail.com>
2022-09-16 14:07:12 +02:00
Manuel Imperiale e1992a694a
NOISSUE - Replace MF_SDK_BASE_URL envar by MF_THINGS_URL (#1632)
* NOISSUE - Replace MF_SDK_BASE_URL envar by MF_THINGS_URL

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

* fix url

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

* Rm unused var

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2022-08-08 15:12:35 +02:00
Dušan Borovčanin 42c003b556
Fix setup in .env file (#1634)
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-08-04 13:22:13 +02:00
b1ackd0t 5c495238a6
NOISSUE - RabbitMQ build and deployment (#1570)
* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit for tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Bump up tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add more tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add go routines

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit for tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Bump up tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add more tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add go routines

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix with wait groups

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* unsubscribe to stop delivering messages

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove exclusivity

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Implement cancel mechanisms

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Queuename as parameter

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Queuename as parameter

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove broker type

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Configure broker with makefile

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Check if we have changed MESSAGE_BROKER_FILE~

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Set nats automatically

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Catching null and invalid broker type

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove unused fmt

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Nats

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* unexport constants

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change routingkey

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove wait groups

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* protecting map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add publisher to pubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change proto library

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix typos

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Reduce pubsub tests based on implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove channel cancel

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Export constant

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Embedding publisher into pubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Naming publisher

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update rabbitmq subscriber interface

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* using publisher composition

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change contenttype

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* rename topic for publish and subscribe

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change errors to lower case

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change errors to lower case

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* export errors

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* queue per subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* queue per subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Merge branch 'master' into RabbitMQ-deployment

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* rename nats to broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change routing method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Direct method with one exchange to many queues, one consumer per queue

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1263 - Move repeating errors to the separate package (#1540)

* MF-1263 - Mv duplicated errors to pkg/errors

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

* Revert test build flags

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

* Fix merge

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

* Fix comment

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Fix auth members list response (#1555)

* NOISSUE - Fix auth members list response

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

* Move group type next to page details

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

* Rm membersRes

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

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz (#1538)

* MF-1261 - Use StatusUnauthorized for authn and StatusForbidden for authz

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

* ErrExternalKey typo

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

* Rename ErrUnauthorizedAcces -> ErrAuthentication

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

* Fix bootstrap error

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

* Fix status code in openapi

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

* Fix test description

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

* Fix test description

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

* Fix test description

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

* Add errors cases

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

* Fix status codes

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

* Add gRPC stutus code

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

* Fix tests description

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

* Fix openapi and encodeError

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

* Fix grpc message

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

* Fix test descriptions

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

* Revert sdk error

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

* Fix typo

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1059 - Add TLS support for email (#1560)

* Use gomail package for sending emails

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove print err

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Add vendor

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* Rename email structure
remove logger

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* typo in var name

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* rename var

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* remove MF_EMAIL_SECRET

Signed-off-by: Ivan Milosevic <iva@blokovi.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Refactor MQTT subscriber (#1561)

* correct suscriber interface validator + refactore token error handling

Signed-off-by: tzzed <zerouali.t@gmail.com>

* apply review suggestion

Signed-off-by: tzzed <zerouali.t@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1257 - Access messages from readers endpoint with user access token (#1470)

* remove owner id

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

* add user auth for db reader

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

* add user auth for db reader

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

* enable mongodb reader for user token reading

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

* use uuid check for auth switch between thing key and user tok

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

* enable user token reading

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

* revert to correct version

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

* fix endpoint test, add additional tests

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

* remove logs,dead code

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

* fix logging messages

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

* remove auth interface, add authorization header type

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

* update api doc

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

* remove unused package

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

* some refactor of cases for authorization switch

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

* correct description in openapi

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

* fix endpoint test to match auth service change

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

* some rename

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

* initialize auth url

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

* add env variables for auth service

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

* fix spelling

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

* Things prefix and no prefix for Thing authorization, Bearer for user

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

* update readme file

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

* fix default things grpc port

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

* enable user reading for timescaledb

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

* remove not used error

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

* improve errors

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

* refactor authorize

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

* add chanID check

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

* inline some error checking

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

* fixing errors

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

* fixing errors

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

* improve test case description

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

* remove test code

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

* dont inline

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

* refactor a bit encodeError

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

* remove unused error

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

* remove unused error

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

* fix things auth grpc url

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

* rename variables for header prefix

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit for tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Bump up tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add more tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add go routines

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit of adding rabbitmq broker

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Initial commit for tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Bump up tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add more tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add go routines

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix with wait groups

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* unsubscribe to stop delivering messages

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove exclusivity

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1551 - Fix Cobra usage commands and clean unnecessary struct types (#1558)

* MF-1551 - Fix Cobra usage commands and clean unnecessary struct types

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

* Use linux syntax for cmd usage description

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

* Fix typo

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

* Fix cmd.Use

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Separate Keto hosts for read and write (#1563)

* Separate keto hosts for read and write

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* update readme with new envars

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

* rename read connection name

Signed-off-by: Ivan Milosevic <iva@blokovi.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update dependencies (#1564)

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1240 - Return to service transport layer only service errors (#1559)

* MF-1240 - Return to service transport layer only service errors

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

* Remove unecessary errors

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

* Rm duplicated errors and fix transport

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

* Revert http endpoint_test

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

* Fix conflict

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

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Implement cancel mechanisms

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Queuename as parameter

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Queuename as parameter

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1469 - Indicate proper authentication scheme in Authorization header (#1523)

* MF-1469 - Indicate proper authentication scheme in Authorization header

Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>

* Fixing the remarks on the last push

Signed-off-by: Stefan Kovacevic <jen2tri@gmail.com>

* Remove Bearer prefix in all services and fix tests

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

* Fix remarks

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

Co-authored-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Add nats wrapper for COAP (#1569)

* Add nats wrapper for COAP

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Pass pubsub as argument

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Defer close connection

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Defer close connection

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Rename endpoint to topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1348 - Add transport errors logging (#1544)

* 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>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1567 - Use Bearer, Thing or Basic scheme in Authorization header (#1568)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1565 - Document Bearer, Thing and Basic Authorization header (#1566)

* MF-1565 - Document Bearer Authorization header

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

* Fix auth, bootstrap, http and readers openapi

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

* Fix openapi

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

* Add enc key for bootstrap

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

* Fix typo

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

* Use global security

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

* Fix bearer formats

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

* Polish descriptions

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

* Fix boostrap and typo

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

Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1575 Add 'Name' field to ListMembers response in things svc (#1576)

Signed-off-by: Ivan Balboteo <ivan@submer.com>

Co-authored-by: Ivan Balboteo <ivan@submer.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1580 - Influxdb Writer changes format of update-time to string (#1581)

* - MF-1580
- Modified consumers/writers/influxdb/fields.go
- influxdb-writer used to update data type of update-time to string
- Commented line 12 of consumers/writers/influxdb/fields.go to resolve
  uneccessary data type conversion issue

Signed-off-by: Hasan Tariq <hasantariqashraf@gmail.com>

* - MF-1580
- Removed strconv package from consumers/writers/influxdb/fields.go since it is no longer needed
- Removed line 12 from consumers/writers/influxdb/fields.go
- Replaced retrun value of updateTime with msg.UpdateTime (line 16 in
  fields.go)

Signed-off-by: Hasan Tariq <hasantariqashraf@gmail.com>

* Fix InflxuDB readers

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

Co-authored-by: Hasan Tariq <hasant@plcgroup.com>
Co-authored-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Unify MF_INFLUX_READER_DB_HOST and MF_INFLUX_WRITER_DB_HOST envars (#1585)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Fix CoAP adapter (#1572)

* Revert "NOISSUE - Add nats wrapper for COAP (#1569)"

This reverts commit cc5d5195ab.

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix CoAP adapter

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update CoAP observation cancel

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix observe

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix GET handling

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Revert authorization

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Use constants instead of magic numbers

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Remove an empty line

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Extract special observe value to constant

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1582 - Fix lora-adapter MQTT client (#1583)

* MF-1582 - Fix lora-adapter MQTT clien

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

* Add timeout config to the mqtt subscriber

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

* Rm comment

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

* Add sub timeout

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Update changelog and readme for release 0.13.0 (#1592)

* Update release example

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update changelog and examples for 0.13.0 release

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update VerneMQ release (#1593)

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Update changelog for release 0.13.0 (#1595)

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* unexport constants

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change routingkey

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove wait groups

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* protecting map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add publisher to pubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change proto library

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix typos

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Reduce pubsub tests based on implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Remove channel cancel

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Export constant

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Move invariant statements out of loop for cassandra-writer (#1596)

Signed-off-by: fuzhy <fuzhy1997@outlook.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Embedding publisher into pubsub

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Naming publisher

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Fix Nginx entrypoint script (#1597)

* Fix Nginx entrypoint script

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependencies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix NginX entrypoint

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Revert Makefile changes

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1525 - Add graceful stop for HTTP and GRPC servers (#1548)

* Add : errgroup to cmd/auth

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Handle graceful stop for auth service
Remove : errgroups from auth service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Wait till server shutdown

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Change : instead of waitgroup changed to errgroups

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change : KillSignalHandler return type to error

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Empty Commit

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Context to http server shutdown
Rename : varaible from proto to protocol

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change : to default log level

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : Sign-off

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: graceful stop of http and grpc server

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix: typos and caps

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: Signed-off

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Rename: Func KillSignalHandler to SignalHandler
Add: SIGABRT

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix: auth service

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: timeout for grpc gracefulstop
Fix: typos

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add: .vscode folder to git ignore

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change: variable name to stopWaitTime

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: .vscode folder

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove: .vscode from .gitignore

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : logger to handlers

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Add : New line at end of .gitignore file

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Fix : variable naming
Add : graceful stop for timescale

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Remove : unsued NATS library from import

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move: "https" and "https" to moved to const var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* Move: "http" and "https" to moved to const var

Signed-off-by: Arvindh <arvindh91@gmail.com>

* update:  branch with master

Signed-off-by: Arvindh <arvindh91@gmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF-1588 - Update Subscriber interface (#1598)

* Initial commit

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update subscriber interface

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Add tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* check subscription map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Check topic id after topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* reword description

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Setup empty queue

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Switch statements

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Simplify

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt subscriber

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Protect subscription map

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Set client id

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change delete method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Update rabbitmq subscriber interface

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* using publisher composition

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change contenttype

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* rename topic for publish and subscribe

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change errors to lower case

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change errors to lower case

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* export errors

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* MF - 1590 - Fix fetching list of users with a zero limit (#1594)

* Add max and min limit size

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Format

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* NOISSUE - Retrieve client key on cert issuing (#1607)

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* fix bug (#1604)

Signed-off-by: zhangchuanfeng <654300242@qq.com>
Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* queue per subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* queue per subscription

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change routing method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Direct method with one exchange to many queues, one consumer per queue

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ♻️ Not casting data

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ✏️ Fix typo

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ♻️ remove passed queue name

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* 🔥 removing echange kind

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Combine tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Refactor unsubscribe method

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix merge conflict

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

*  sub and unsub to dummy topic

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* generate client id from topic and ID

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Rename topicID to clientID

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* update tests

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* merge changes

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ♻️ rename constant and variable declaration

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* rename to brokers

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* ♻️ Rename brokers

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change mqtt implementation

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Rename broker to brokers

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* include nats port

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* move to build tags

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* move to build tags

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* add nats build tag to test

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* \n at the end of file

Signed-off-by: GitHub <noreply@github.com>

* Add init function

Signed-off-by: GitHub <noreply@github.com>

* Add init function

Signed-off-by: GitHub <noreply@github.com>

* broker url automatically

Signed-off-by: GitHub <noreply@github.com>

* make nats as the default broker

Signed-off-by: GitHub <noreply@github.com>

* Updated publisher and subscriber interface

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Add error to close

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Change image version and let user define URI

Signed-off-by: GitHub <noreply@github.com>

* make broker url configurable

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* add compile check

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* rabbitmq check

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* default broker to nats

Signed-off-by: GitHub <noreply@github.com>

* change broker url in docker compose

Signed-off-by: GitHub <noreply@github.com>

* Fix ci

Signed-off-by: GitHub <noreply@github.com>

* fix makefile

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix env var and ci

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix ci

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

* Fix consts

Signed-off-by: 0x6f736f646f <blackd0t@protonmail.com>

Co-authored-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
Co-authored-by: Manuel Imperiale <manuel.Imperiale@gmail.com>
Co-authored-by: Ivan Milošević <iva@blokovi.com>
Co-authored-by: __touk__ <zerouali.t@gmail.com>
Co-authored-by: Mirko Teodorovic <mirko.teodorovic@gmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
Co-authored-by: stefankovacevic123 <jen2tri@gmail.com>
Co-authored-by: ibalboteo <ivanbalboteo@gmail.com>
Co-authored-by: Ivan Balboteo <ivan@submer.com>
Co-authored-by: Hasan98-git <67228396+Hasan98-git@users.noreply.github.com>
Co-authored-by: Hasan Tariq <hasant@plcgroup.com>
Co-authored-by: fuzhy <fuzhy1997@outlook.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
Co-authored-by: 张传峰 <59160162+zhang-chuanfeng@users.noreply.github.com>
2022-06-21 17:40:20 +02:00
张传峰 163c1b2fb7
fix bug (#1604)
Signed-off-by: zhangchuanfeng <654300242@qq.com>
2022-05-11 09:35:29 +02:00
Dušan Borovčanin 195b78303f
NOISSUE - Fix Nginx entrypoint script (#1597)
* Fix Nginx entrypoint script

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Update dependencies

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Fix NginX entrypoint

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>

* Revert Makefile changes

Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-04-26 18:41:22 +02:00
Dušan Borovčanin ad80cf868b
Update VerneMQ release (#1593)
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2022-04-15 15:25:39 +02:00
Manuel Imperiale 48d6a95a21
MF-1582 - Fix lora-adapter MQTT client (#1583)
* MF-1582 - Fix lora-adapter MQTT clien

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

* Add timeout config to the mqtt subscriber

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

* Rm comment

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

* Add sub timeout

Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
2022-04-11 13:52:20 +02:00