371 Commits

Author SHA1 Message Date
Felix Gateru ba556e1e0d NOISSUE - Fix return role on user creation (#2551)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2024-11-26 09:39:52 +01:00
Felix Gateru b20b45023d NOISSUE - Update auth in journal service (#2527)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2024-11-25 13:02:27 +01:00
Felix Gateru 3a02788e3a MG-2507 - Update auth in readers service (#2514)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2024-11-10 10:59:46 -07:00
Nataly Musilah 87c390da4c MG-2426 - Replace generic Clients in Things service (#2476)
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
2024-11-04 11:46:40 +01:00
Dušan Borovčanin ef8631bd1f NOISSUE - Switch from mProxy to mGate (#2500)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-11-04 11:02:55 +01:00
Nataly Musilah 0019f71b46 MG-2426 - Replace generic Clients in Users service (#2436)
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Co-authored-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
Co-authored-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-10-30 19:19:31 +01:00
Steve Munene f88e11bdb2 NOISSUE - Remove domain from token (#2468)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
2024-10-25 14:41:51 +02:00
Dušan Borovčanin eb881690c7 MG-2443 - Move Auth to the middleware (#2444)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
Co-authored-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
2024-10-17 16:24:53 +02:00
Steve Munene e5765c6a9b MG-2359 - Replace Vault with Absmach certs (#2425)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Co-authored-by: b1ackd0t <28790446+rodneyosodo@users.noreply.github.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@abstractmachines.fr>
2024-10-14 15:51:15 +02:00
b1ackd0t 2098c85287 NOISSUE - Update redis, uuid and env dependecies (#2418)
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2024-09-13 14:57:34 +02:00
Sammy Kerata Oina fdaecf54e5 NOISSUE - Reject invitations (#2379)
Signed-off-by: Sammy Oina <sammyoina@gmail.com>
2024-09-12 14:45:22 +02:00
Felix Gateru 48c4a7e7d4 MG-2264 - Split Auth Client into Separate Clients for AuthN/AuthZ and Policy CRUD (#2392)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
2024-09-03 16:50:28 +02:00
JMboya 6a41ea10a3 MG-2365 - Fix JaegerURL in readme.md and cmd/<svc>/main.go (#2366)
Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
2024-08-02 16:28:26 +02:00
b1ackd0t 03065369a7 NOISSUE - Rename db prefix for Journal DB env (#2368)
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2024-08-01 14:26:57 +02:00
Felix Gateru 66fe5f1483 NOISSUE - Format MQTT over WS target URL (#2348)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
2024-07-18 18:11:45 +02:00
Dušan Borovčanin 5412bddfcf MG-2187 - Simplify Magistrala core repository (#2338)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-07-15 17:38:48 +02:00
b1ackd0t ee3716623c MG-1557 - Export jaeger, metrics, postgres and apiutil packages (#2262)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2024-06-28 12:45:20 +02:00
b1ackd0t 2fe2f850c2 MG-1529 - User Removal (#2122)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2024-06-28 11:13:04 +02:00
b1ackd0t 0794363a3c MG-1965 - Process Event Logs (#2057)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2024-06-27 16:38:20 +02:00
Felix Gateru be69946036 NOISSUE - Add domain events for Auth service (#2313)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
2024-06-25 12:52:06 +02:00
JMboya 95badeee62 MG-2025 - CLI Flag to print only curl output (#2242)
Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
2024-06-18 11:23:39 +02:00
b1ackd0t 487dcc643c MG-2235 - Check gRPC service is healthy during setup (#2245)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-06-12 11:46:42 +02:00
b1ackd0t d62982b4b6 NOISSUE - Add property based testing to HTTP Adapter (#2212)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-05-20 12:31:20 +02:00
b1ackd0t 19c1261e81 NOISSUE - Add property based testing to notifiers API (#2175)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-04-29 16:07:57 +02:00
b1ackd0t 54e322ee3e NOISSUE - Add property based testing to provision API (#2099)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-04-16 14:54:32 +02:00
b1ackd0t 33704abc0c NOISSUE - Add property based testing to things service (#2088)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2024-04-09 10:09:14 +02:00
Arvindh f733147517 NOISSUE - Add Domain URL to CLI and SDK configuration (#2118)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2024-03-20 17:01:07 +01:00
b1ackd0t 22a3c2962d NOISSUE - Remove OAuth2.0 tokens from Magistrala token (#2106)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2024-03-14 14:55:17 +01:00
b1ackd0t fbec74bd94 NOISSUE - Add Secret Validation on Registration (#2109)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-03-13 13:11:20 +01:00
b1ackd0t 0f05c10a38 MG-1887 - Add support for OAuth2.0 (#2103)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-03-01 10:51:34 +01:00
b1ackd0t adb03b4ed8 NOISSUE - Add Event Subscriber Config (#2054)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-02-26 16:42:08 +01:00
b1ackd0t 0ed79371a4 NOISSUE - Remove duplicate errors (#2086)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-02-21 14:31:11 +01:00
Arvindh ab4206cc93 NOISSUE - Vault operations with app role authentication (#2084)
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: arvindh123 <arvindh91@gmail.com>
2024-02-20 15:59:55 +01:00
Arvindh 4c206ec375 NOISSUE - Fix Bootstrap thing creation flow (#2083)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2024-02-19 16:03:21 +01:00
Arvindh 21c5813a96 NOISSUE - Fix provision configuration loading (#2078)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2024-02-19 13:20:47 +01:00
Felix Gateru 7a93e6a893 NOISSUE - Improve tests in Auth service (#262)
Signed-off-by: felix.gateru <felix.gateru@gmail.com>
2024-01-25 14:03:20 +01:00
Nataly Musilah 8c084b177e MG-234 - Improve Logging (#255)
Signed-off-by: Musilah <nataleigh.nk@gmail.co>
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
Co-authored-by: Musilah <nataleigh.nk@gmail.co>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@abstractmachines.fr>
2024-01-18 15:28:04 +01:00
b1ackd0t 95f31d70a2 NOISSUE - Use methods for accessing in generated code (#204)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-01-18 13:57:22 +01:00
b1ackd0t 22ecbc24ee NOISSUE - Refactor error handling and SDK error testing (#263)
Improve error handling and SDK error testing. The code now includes signal handling, error wrapping, checking for contained errors, and testing HTTP error responses. Additionally, assertions have been added to ensure the expected behavior is met.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-01-08 11:33:16 +01:00
Ian Ngethe Muchiri b13357666a NOISSUE - Update Magistrala's mProxy and SenML dependencies (#250)
* update senml from mainflux to absmach repo

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

* update api documentation for websocket and mqtt

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

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2024-01-03 12:12:44 +01:00
b1ackd0t 2944e8881e NOISSUE - Generate event sourcing mocks (#186)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-22 11:32:49 +01:00
Arvindh 648655036e NOISSUE - Implementation of Group removal (#161)
* add: group delete flow

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

* sync with master

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

* improved grpc error handling

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

* gofumpt -ed

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

* changed database unassign parent group id

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

* seperate event for delete group

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

* change group event name

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

* update channel remove events

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

* fix: channels event

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

* add: sdk, sdk_tet, cli

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

* fix: sdk mock

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

* mockery

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

* convert to inline case

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

* change in group delete flow

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

* change return error in delete

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

* add: openapi

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

* rename events: from channel delete to channel remove

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

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
2023-12-19 13:01:24 +01:00
b1ackd0t a07aabe783 NOISSUE - Add Invitation service (#126)
* feat(service): Add new "invitations" service

This commit adds a new service called "invitations" to the existing file. The service includes the necessary imports and initializes components for its functionality. It also includes configuration settings and a Docker Compose file. Additionally, instructions for deploying and using the service are provided, along with a function to create an HTTP handler.

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

* docs(api): invitation api

The commit adds documentation for an API that allows users to manage invitations. It includes information about the endpoints, parameters, data types, and components used in the API. The documentation also outlines the properties and specifications of the Invitation object. This commit provides a comprehensive overview of the API's functionality and structure.

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

* fix: accept invitation to take in domain

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

* refactor(invitations): rename domain to domainID

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

* Authorize on id(domain+user) rather than user

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

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-11 18:24:37 +01:00
Sammy Kerata Oina 6f0874c85a NOISSUE - Add Linters (#79)
* add linters

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

* fix linting errors

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

* fix linting

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

* add callhome alias

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

---------

Signed-off-by: SammyOina <sammyoina@gmail.com>
Signed-off-by: sammy <sammyoina@gmail.com>
2023-12-06 17:02:47 +01:00
b1ackd0t 8c05a17491 NOISSUE - Align Environment Variables in Docs (#114)
This commit adds various configurations and environment variables for different services in the codebase. These services include CoAP adapter, HTTP adapter, LoRa adapter, MQTT adapter, OPC-UA adapter, and WebSocket adapter.
The variables control settings such as log level, host and port, server certificates and keys, auth URLs, message broker URLs, Jaeger server URLs, telemetry settings, and instance IDs.
Additionally, instructions are provided for running the services outside of the Docker container. TLS encryption can be enabled by setting specific variables and providing PEM format files for certificates and keys. Default values are also provided for unset variables.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 15:13:01 +01:00
b1ackd0t c1e76e698d NOISSUE - Update Auth documentation (#110)
The commit introduces changes to the "auth/README.md" file. It updates the authentication keys, adds new key types, and introduces the concept of domains.
The documentation also includes information on the configuration settings for the authentication service, such as database and server details. It mentions that the service is distributed as a Docker container and provides instructions for running it outside of the container.
Furthermore, the commit mentions a configuration file for the "magistrala-auth" service and highlights specific changes made to environment variables in various files.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 13:11:28 +01:00
b1ackd0t 658fd373ba NOISSUE - Update Certs service configuration and docs (#112)
The commit modifies the configuration files and Docker Compose files related to the "certs" service. The changes include updating URLs, adjusting the log level, and modifying the SDK certs URL. This refactor ensures that the service operates with the correct settings and improves the overall functionality.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 12:26:43 +01:00
b1ackd0t 99b509d5dc NOISSUE - Update Bootstrap configuration documentation (#111)
Updated the documentation to include details about the configuration variables and environment settings for the bootstrap service. This includes information about database connections, SSL settings, authentication services, event sources, and other parameters. Also added deployment instructions and links to API documentation for further information.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 12:16:07 +01:00
b1ackd0t 0c68108ada NOISSUE -Make preshared Key an env var (#109)
Refactor initialization of SpiceDB client and schema to take in context
Update Docker environment variables and Docker Compose file
Update the Docker environment variables and the Docker Compose file to reflect the latest configuration requirements. This ensures that the application can run smoothly in the Docker environment.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 12:15:02 +01:00
b1ackd0t 94cfadc745 NOISSUE - Generate Invitation Key (#87)
* feat(auth): Add invitation key generation

This commit adds the functionality to generate an invitation key in the auth service. The `invitationKey` function is responsible for generating the key and issuing an access token. It sets the key type, expiration time, and subject based on the user's domain. The generated access token is returned as part of the response.

The `invitationKey` function is called in the `Issue` function when the key type is InvitationKey. This allows for the generation of invitation keys when needed.

This feature enhances the functionality of the auth service by enabling the generation of invitation keys for user invitations.

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

* fix(auth): fix invitation duration

The invitation duration in the auth service has been corrected to 7 days (7 * 24 * time.Hour) instead of 24 hours.

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

* feat(auth): configure invitation duration by env vars

Configure invitation duration by envionment variables. The default is `168h` which is 1 week.

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-01 11:46:51 +01:00