Commit graph

1083 commits

Author SHA1 Message Date
abhishek9686 31fc7efe5f fix middleware error nil check 2024-06-23 12:17:44 +05:30
abhishek9686 8af425b0bc add debug logs 2024-06-23 12:09:39 +05:30
abhishek9686 bfef87ebd6 fix get all nodes api 2024-06-23 11:59:43 +05:30
abhishek9686 5033aef702 comment middleware 2024-06-23 11:40:34 +05:30
abhishek9686 2a1d59b07b nodes handler 2024-06-23 08:38:46 +05:30
abhishek9686 56fdd6d98e replace auth checks, add network id to role model 2024-06-22 17:32:38 +05:30
abhishek9686 3f2716ce37 refer network controls form roles, add debug headers 2024-06-20 08:24:25 +05:30
abhishek9686 7d052e64e2 refer network controls form roles, add debug headers 2024-06-20 07:28:33 +05:30
abhishek9686 0ff57bcc81 Merge branch 'develop' of https://github.com/gravitl/netmaker into NET-1227 2024-06-19 14:46:09 +05:30
Christopher Blaha 7d001b81a7
update develop to v0.24.3 (#2977) 2024-06-18 07:23:20 +05:30
abhishek9686 3d58241e14 Merge branch 'develop' of https://github.com/gravitl/netmaker into NET-1227 2024-06-14 17:48:01 +05:30
Max Ma 6fa084006a
NET-1355:peerUpdate for default host after new network created (#2974)
* peerUpdate for default host after new network created

* remove mq check for peerUpdate
2024-06-12 17:33:26 +05:30
abhishek9686 6eaedc5fb0 setup user access middlerware controller 2024-06-11 07:32:10 +05:30
abhishek9686 d226deaf4d untracked 2024-06-10 19:02:51 +05:30
abhishek9686 bb44816800 refactor user groups models 2024-06-06 00:43:00 +05:30
Abhishek K 50d8da2dc2
Merge pull request #2958 from gravitl/NET-1268
NET-1268:seperate static port and static endpoint
2024-06-05 12:47:45 +05:30
Max Ma c7469c79d0 rename isstaticendpoint to isstatic 2024-06-03 10:37:19 +02:00
Max Ma 35a8528030
NET-1154:fix stale node issue on multinet when deleting host (#2940)
* fix stale node issue on multinet when deleting host

* fix stale node when deleting host or uninstall
2024-06-03 10:28:21 +04:00
abhishek9686 e735024145 setup middlleware permission checks 2024-05-28 15:28:07 +05:30
Max Ma 81a6c9cf8a seperate static port and static endpoint 2024-05-28 10:16:11 +02:00
abhishek9686 1cf6387f76 additional api checks 2024-05-27 01:39:15 +05:30
abhishek9686 beaaefb871 user groups CRUD Apis 2024-05-27 01:28:17 +05:30
abhishek9686 01c50b3457 user roles CRUD apis 2024-05-27 00:48:03 +05:30
abhishek9686 0ed44422b3 define models for new user mgmt and groups 2024-05-24 15:10:09 +05:30
Christopher Blaha ee6cdc604b
update develop to v0.24.2 (#2938) 2024-05-17 12:47:54 +05:30
Aceix faf50c8c3d
chore(NET-1245): remove check for private network address (#2934) 2024-05-14 19:54:00 +05:30
Aceix abf3f4f55d
feat(NET-1106): support additional RAG endpoint IPs (#2907) 2024-05-08 14:45:05 +05:30
Max Ma da11dc8a87
NET-1134:move oauth from CE build block to pro (#2919)
* move oauth from CE build block to pro

* move oauth code and api handler under pro

* move common func back to auth from pro/auth

* change log level to Info for information logs

* fix import issue
2024-05-08 12:44:39 +05:30
momantech 7e2b5b196a
chore: fix some comments (#2918) 2024-05-08 12:17:23 +05:30
Max Ma 1ad837ad72
NET-1164:PublishDeletedClientPeerUpdate when deleting user from RAGW (#2912)
* PublishDeletedClientPeerUpdate when deleting user from RAGW

* update ACLs after extClient is removed
2024-05-03 12:25:38 +05:30
Christopher Blaha 8b1294b5fb
update develop to v0.24.1 (#2904) 2024-04-26 09:06:40 +05:30
abhishek9686 b2361be29b track failover usage 2024-04-17 17:22:47 +05:30
abhishek9686 84fa3a1406 change err description 2024-04-17 15:41:22 +05:30
abhishek9686 00838cab52 add user id check on extclient 2024-04-17 15:31:34 +05:30
Abhishek K 66069fbc34
NET-1082: Scale Testing Fixes (#2894)
* add additional mutex lock on node acls func

* increase verbosity

* disable acls on cloud emqx

* add emqx creds creation to go routine

* add debug log of mq client id

* comment port check

* uncomment port check

* check for connection mq connection open

* use username for client id

* add write mutex on acl is allowed

* add mq connection lost handler on server

* spin off zombie init as go routine

* get whole api path from config

* Revert "get whole api path from config"

This reverts commit 392f5f4c5f.

* update extclient acls async

* add additional mutex lock on node acls func

(cherry picked from commit 5325f0e7d7)

* increase verbosity

(cherry picked from commit 705b3cf0bf)

* add emqx creds creation to go routine

(cherry picked from commit c8e65f4820)

* add debug log of mq client id

(cherry picked from commit 29c5d6ceca)

* comment port check

(cherry picked from commit db8d6d95ea)

* check for connection mq connection open

(cherry picked from commit 13b11033b0)

* use username for client id

(cherry picked from commit e90c7386de)

* add write mutex on acl is allowed

(cherry picked from commit 4cae1b0bb4)

* add mq connection lost handler on server

(cherry picked from commit c82918ad35)

* spin off zombie init as go routine

(cherry picked from commit 6d65c44c43)

* update extclient acls async

(cherry picked from commit 6557ef1ebe)

* additionl logs for oauth user flow

(cherry picked from commit 61703038ae)

* add more debug logs

(cherry picked from commit 5980beacd1)

* add more debug logs

(cherry picked from commit 4d001f0d27)

* add set auth secret

(cherry picked from commit f41cef5da5)

* fix fetch pass

(cherry picked from commit 825caf4b60)

* make sure auth secret is set only once

(cherry picked from commit ba33ed02aa)

* make sure auth secret is set only once

(cherry picked from commit 920ac4c507)

* comment usage of emqx acls

* replace  read lock with write lock on acls

* replace  read lock with write lock on acls

(cherry picked from commit 808d2135c8)

* use deadlock pkg for visibility

* add additional mutex locks

* remove race flag

* on mq re-connecting donot exit if failed

* on mq re-connecting donot exit if failed

* revert mutex package change

* set mq clean session

* remove debug log

* go mod tidy

* revert on prem emqx acls del
2024-04-11 21:18:57 +05:30
Christopher Blaha 0b2422b848
update to 0.24.0 (#2893) 2024-04-11 21:05:06 +05:30
Abhishek K dccb6b5da7
NET-1075: Endpoint detection server config (#2876)
* add config for endpoint detection

* add config to netmaker env file

* fix config value check for endpoint detection
2024-04-03 23:51:09 +05:30
Jonathan Roth 80e775d5b4
Fix ACL, host and node swagger API definitions (#2864)
* Fix get all hosts response swagger type

* Remove body parameter from GET ACL request

* Use ApiNode response in requests that return it

* Redact net.Address field from API Iface

This field doesn't get declared correctly in the swagger file, and seems to break clients

* Re-generate swagger

swagger generate spec -t ee -o swagger.yml
2024-04-03 15:07:20 +05:30
Abhishek K 0d4552db5e
NET-1064: Oauth User SignUp Approval Flow (#2874)
* add pending users api

* insert user to pending users on first time oauth login

* add pending user check on headless login

* fix conflicting apis

* no records error

* add allowed emails domains for oauth singup to config

* check if user is allowed to signup
2024-04-03 11:20:19 +05:30
Abhishek K c7e673fb9f
ACC-532: set mq clean session to true (#2865)
* set clean session

* delete emqx hosts creds api

* add emqx hosts del api to limited middleware controller

* add emqx hosts del api to limited middleware controller

* remove server creds from emqx
2024-03-20 15:03:41 +07:00
Jonathan Roth f370a2923c
Add missing enrollment key swagger parameters (#2767)
* Make swagger param private

* Add missing swagger params for create/update enrollment key

* Use same string in swagger doc path as the parameter

* Re-generate swagger

swagger generate spec -t ee -o swagger.yml
2024-03-12 08:30:44 +07:00
Christopher Blaha 83cb39db5a
update develop to 0.23.1 (#2835) 2024-03-05 18:08:54 +07:00
Abhishek K e846881bf2
Merge pull request #2843 from gravitl/ACC-468
ACC-468: EMQX Migration Helpers
2024-03-04 21:15:08 +07:00
abhishek9686 8ac864fec8 add update check for validate relay 2024-03-04 13:39:33 +07:00
abhishek9686 d69d0ed2e2 validate relay req for inet gws 2024-03-02 12:42:04 +07:00
abhishek9686 83cdc1abf6 migrate emqx 2024-03-01 14:26:07 +07:00
abhishek9686 8e240ff701 migrate emqx 2024-03-01 13:35:59 +07:00
Aceix b79a457ce2
fix: fix extclient creation and ACL migration (#2831) 2024-02-28 09:01:07 +07:00
Abhishek K 0638dcac49
NET-940: Inet Gws (#2828)
* internet gws apis

* add validate check for inet request

* add default gw changes to peer update

* update json tag

* add OS checks for inet gws

* add set defaul gw pro func

* allow disable and enable inet gw

* add inet handlers to pro

* add fields to api node

* add inet allowed ips

* add default gw to pull

* unset node inet details on deletion

* unset internet gw on network nodes

* unset inet gw fix

* unset inet gw fix

* send default gw ip

* fix inet node endpoint

* add default gw endpoint ip to pull resp

* validate after unset gws

* add inet client peer allowedips to inet node

* validate after unset gws

* fix allowed ips for inet peer and gw node

* fix allowed ips for inet peer and gw node

* fix allowed ips for inet peer and gw node

* fix allowed ips for inet peer and gw node

* fix inet gw and relayed conflict

* fix inet gw and relayed conflict

* fix update req

* fix update inet gw api

* when inet gw is peer ignore other allowedIps

* test relay

* revert test relay

* revert inet peer update changes

* channel internet traffic of relayed node to relay's inetgw

* channel internet traffic of relayed node to relay's inetgw

* channel internet traffic of relayed node to relay's inetgw

* add check for relayed node

* add inet info to peer update

* add inet info to peer update

* fix update node to persist inet info

* fix go tests

* egress ranges with inet gw fix

* egress ranges with inet gw fix

* disallow node acting using inet gw to act as inet gw

* add check to validate inet gw

* fix typos

* add firewall check

* set inetgw on ingress req on community

* set inetgw to false on community on ingress del
2024-02-28 08:46:51 +07:00
Abhishek K 2d8f67db11
ignore post cmd for qr code and if empty (#2825) 2024-02-19 19:53:45 +07:00