Commit graph

29 commits

Author SHA1 Message Date
abhishek9686 82de96d9a3 if emqx, avoid sending mq creds from server to client 2024-01-26 11:23:50 +05:30
abhishek9686 fb0fead2f0 create emqx for server, get app creds from env 2024-01-26 10:24:29 +05:30
abhishek9686 155f2887b2 implement emqx interface methods for cloud and on-prem 2024-01-25 15:11:16 +05:30
Aceix 033e203d91
fix(NET-786): enhance enrollment key validation (#2726) 2024-01-03 12:23:04 +05:30
Abhishek K 98c01c4325
NET-814: Deprecating TURN (#2723)
* deprecate turn

* process signals through mq
2023-12-13 22:46:57 +04:00
Aceix 61ef6142ff
feat(NET-688): auto relaying via enrollment keys (#2647)
* feat(NET-688): auto relaying via enrollment keys

* feat(NET-688): address pr comments
2023-11-04 16:28:57 +04:00
Gabriel de Souza Seibel cb4b99ffcb
[NET-562] Persistent Keep Alive from node to host (#2604)
* Move PKA field from models node to host level

* Move PKA field from api models node to host level

* Adapt logic package to node->host PKA

* Adapt migration-related code to node->host PKA

* Adapt cli code to node->host PKA

* Change host PKA default to 20s

* On IfaceDelta, check for PKA on host

* On handleHostRegister, set default PKA

* Use a default PKA

* Use int64 for api host pka

* Reorder imports

* Don't use host pka in iface delta

* Fix ConvertAPIHostToNMHost

* Add swagger doc for host PKA field

* Fix swagger.yml

* Set default PKA only for new hosts

* Remove TODO comment

* Remove redundant check

* Have api-host pka be specified in seconds
2023-10-06 10:09:19 +04:00
Matthew R Kasun 876778a1cc
open api spec file (#2595)
* remove usergroup

* superadmin

* superadmin creation

* generate openapi spec file

* statticcheck

* review comments
2023-10-04 10:26:38 +04:00
Abhishek K 3f1211795c
NET-383: Set Additional Host Fields From Client Side (#2566)
* update static,mtu from client side host update

* update host fields if host exists already on registration
2023-10-02 19:36:31 +04:00
Abhishek K 719e0c254d
NET-551: User Mgmt Re-Design (#2547)
* add superadmin role, apis to create superadmin user

* apis to attach and remove user from remote access gateways

* add api to list user's remote client has gateway clients

* remove code related user groups

* remove networks and groups from user model

* refactor user CRUD operations

* fix network permission test

* add superadmin to authorize func

* remove user network and groups from cli

* api to transfer superadmin role

* add api to list users on a ingress gw

* restrict user access to resources on server

* deny request from remote access client if extclient is already created

* fix user tests

* fix static checks

* fix static checks

* add limits to extclient create handler

* set username to superadmin on if masterkey is used

* allow creation of extclients using masterkey

* add migration func to assign superadmin role for existing admin user

* check for superadmin on migration if users are present

* allowe masterkey to extcleint apis

* check ownerid

* format error, on jwt token verification failure return unauthorized rather than forbidden

* user update fix

* move user remote functionality to ee

* fix update user api

* security patch

* initalise ee user handlers

* allow user to use master key to update any user

* use slog

* fix auth user test

* table headers

* remove user role, it's covered in middleware

* setuser defaults fix
2023-09-01 14:27:08 +05:30
Tobias Cudnik 723375b334
NET-152 enrollment keys for non admins (#2346)
* return 401 instead of 403

* fixed http.StatusForbidden

* Tagged build version (temp)

* Unauthorized_Err when applicable

* untagged version

* fixed PUT /api/users/networks/user1

* - expired token redirs to login
- added `/api/enrollment_keys` for non-admins
- unit test for enrollment keys for non-admins

* handle user perms in `/hosts`

* removed debug

* misc

* - support masteradmin
- return hosts with partial access

* added `ismaster` to middleware
2023-05-31 13:11:54 +05:30
Abhishek Kondur 423abf0fe4 add use_turn option to config,check if server is using turn 2023-04-28 14:06:28 +05:30
Abhishek Kondur 9f5239ec79 re-register host with turn 2023-04-26 13:12:16 +04:00
0xdcarns 18c9bcc58f adapted sso to host registration 2023-04-17 22:23:17 -04:00
Anish Mukherjee 8a9f569c4f add emqx acls 2023-03-21 17:47:57 +05:30
afeiszli 0bbf1dbe54 hotfixing logging and model issues found during IoT testing 2023-03-16 13:41:56 -04:00
0xdcarns ee9df20b05 changed register response, simplified host port check dereference 2023-03-10 11:43:26 -05:00
0xdcarns 9a7407f635 updated logic to add new nodes 2023-02-27 19:18:41 -05:00
0xdcarns 977c9c8c19 send peer update after request + fix pass update issue 2023-02-27 12:32:07 -05:00
0xdcarns 0335e258ad added TODO comment and allowed using enrollment key more than once 2023-02-24 12:08:32 -05:00
0xdcarns 541e232ad7 update comments 2023-02-17 12:09:18 -05:00
0xdcarns 9103efa88f added request ack on register 2023-02-17 11:54:25 -05:00
0xdcarns 6b30cef968 handled node additions in more elegant manner 2023-02-17 11:32:02 -05:00
0xdcarns 08248e1b35 added log 2023-02-16 19:34:25 -05:00
0xdcarns 6e1db0bb3f removed admin security check 2023-02-16 16:42:08 -05:00
0xdcarns d8c7ab980e fixed nil pointer from dereference in loop 2023-02-16 15:41:23 -05:00
0xdcarns 9078608bd1 fix initial map allocation 2023-02-16 15:13:40 -05:00
0xdcarns 607198d563 added host registration endpoint 2023-02-16 14:27:57 -05:00
0xdcarns 71ce2caabd added tokenization + detokenization 2023-02-15 16:32:16 -05:00