Commit graph

62 commits

Author SHA1 Message Date
abhishek9686
b2361be29b track failover usage 2024-04-17 17:22:47 +05:30
Max Ma
961f8eab6e
NET-1119 (#2886)
* exclude IngressGW in failover

* resetfailoverpeer when adding IngressGw if failover enabled

* exclude InetGW in failover

* get egress ranges of failedover peer

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-04-12 18:22:03 +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
Max Ma
8404523c6d
fix relay ipv6 mask issue (#2889) 2024-04-11 17:38:13 +05:30
Max Ma
e0bde5b67f
Net 1088 (#2872)
* fix ipv6 only issue

* fix InetGw ipv6 issue

* refactor constants for NET1088

* fix extClient IPv6 empty issue
2024-04-09 11:50:07 +05:30
Abhishek K
b7c8b738d7
NET-1064: Improved Oauth SignUp message prompts (#2875)
* 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

* improve oauth message prompts

* handle trial enddate  error logs
2024-04-03 23:59:44 +05:30
Abhishek K
3152c678e0
Merge pull request #2869 from gravitl/master
Master
2024-03-22 09:53:42 +07:00
abhishek9686
19a2784b7f ignore bad gateway, retry later on license validation 2024-03-22 09:50:09 +07:00
Aceix
4871a0dd1c
fix(NET-1009): fix client connectivity metrics data (#2858) 2024-03-20 15:11:11 +07:00
Abhishek K
76a6ee7434
Merge pull request #2867 from gravitl/master
Master
2024-03-20 15:04:50 +07:00
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
abhishek9686
ddff30793d ignore error 2024-03-20 13:27:38 +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
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
a9ce842d1e
fix relayed node issue (#2826) 2024-02-21 13:41:26 +07:00
Aceix
100b778449
fix(NET-897): uniform client and node acls (#2803) 2024-02-13 20:25:27 +07:00
Abhishek K
2c29a70df1
NET-941: allows creation of gws without client node or egress ranges (#2822)
* allow creation of relay without relayed nodes

* allow creation of egress gw without egress ranges

* initalize empty egress ranges
2024-02-13 20:24:22 +07:00
Abhishek K
ecd769ea07
Merge pull request #2780 from gravitl/kwesi/net-709-add-metadata-field-to-gateway-node
feat(NET-709): add node metadata for remote gateways
2024-02-06 14:59:59 +05:30
abhishek9686
43e82a2936 make defaul host failover and remote access gw on joining new network 2024-02-05 11:18:28 +05:30
the_aceix
5882b86d40 feat(NET-709): add node metadata for remote gws 2024-01-26 10:06:36 +00:00
abhishek9686
5abca21b5e add ee tags 2024-01-25 07:17:13 +05:30
Abhishek K
1d1b9bb484
Merge pull request #2786 from gravitl/NET-898
NET-898: Pro Trial
2024-01-24 20:45:37 +05:30
abhishek9686
7a36b939e4 change trial period to 14 days 2024-01-24 19:09:33 +05:30
abhishek9686
c690eb18c2 mover failOver func to pro pkg 2024-01-24 00:29:21 +05:30
abhishek9686
70f3cbc98f comment fallback metrics update 2024-01-23 20:15:58 +05:30
abhishek9686
2a4d04ceb6 limit api handler if trail has ended 2024-01-23 10:02:46 +05:30
abhishek9686
1d250963aa add license logs 2024-01-23 09:34:49 +05:30
abhishek9686
32974e21d4 skip trial end date check on err 2024-01-23 09:21:19 +05:30
abhishek9686
487c3f51b0 addtional logs in script 2024-01-23 09:08:08 +05:30
abhishek9686
dbc48b1b2f check if trial table is empty 2024-01-22 13:25:30 +05:30
abhishek9686
7a39ef3e4e add trial end date to server status api 2024-01-20 01:30:09 +05:30
abhishek9686
e390398e8c conv key pair to bytes 2024-01-20 01:10:13 +05:30
abhishek9686
ffb979001f store trial as bytes 2024-01-20 00:30:46 +05:30
abhishek9686
34e61403c5 fix build 2024-01-19 19:13:02 +05:30
abhishek9686
040e700099 revamp pro trial invocation 2024-01-19 19:10:07 +05:30
abhishek9686
c674929b90 invoke trial from main 2024-01-19 17:57:30 +05:30
abhishek9686
6749fb4516 add trial license logic 2024-01-19 14:51:51 +05:30
Abhishek K
465f2bd5be
NET-896: Scale test bug fixes (#2764)
* send peer update in async

* update metrics on fallback

* return http json response
2024-01-15 23:17:36 +05:30
Abhishek K
5bf30b2c10
NET-877: Replace peers on Refreshkeys peer update (#2761)
* replace peers on key refresh

* add peer conf to metrics map only when allowed
2024-01-11 15:59:19 +05:30
Abhishek K
797f3a4533
Send deleted extclient mq update when disabled (#2760) 2024-01-10 14:57:29 +05:30
Abhishek K
8bfd791135
Net 822 (#2759)
* add extclient allowed ips to rac resp

* add gw peer public key

* fix static check

* add param for remote access client id

* don't decode body

* debug

* debug

* change user gws req to POST

* debug

* change api to GET

* send array for user gws if req came from mobile
2024-01-09 13:25:18 +05:30
Abhishek K
9fcefd7911
Net 822 (#2745)
* add extclient allowed ips to rac resp

* add gw peer public key

* fix static check

* add param for remote access client id

* don't decode body

* debug

* debug

* change user gws req to POST

* debug

* change api to GET
2023-12-20 13:17:34 +04:00
Abhishek K
7e3bf3baea
NET-812: Deprecate Setting /etc/hosts entries (#2733)
* deprecate setting etc host dns entries, set coredns entries at neccessary places

* remove dns mq topics

* only set dns when set on

* add extcleints dns entries to coredns

* fix static checks

* run coredns with host network mode

* add bind address to coredns container
2023-12-20 10:24:53 +04:00
Aceix
72f84c1355
feat(NET-810): add RAC support for admins (#2731)
admins and superadmins can access and connect to any ingress
different users cannot connect to the same ingress with the same remote device
2023-12-20 08:56:30 +04:00
Abhishek K
9f1b722c19
NET-822: Add extra data for RAC gws resp (#2732)
* add extclient allowed ips to rac resp

* add gw peer public key

* fix static check
2023-12-13 17:30:43 +04:00
Abhishek K
530dbdc65c
NET-710: Internet Gws Re-Design (#2718)
* add internet gateway to client gateway

* migration func to remove internet egress range from egress gateway

* add internet gateways ranges to firewall update

* add internet gw ranges to extcleint conf

* add ipv6 internet address

* remove failover field from ingress req

* only let normal to be created on PRO (#2716)

* feat(NET-805): send internet gw props to rac

* set inet gw field on node update api

* move internet gws to EE

---------

Co-authored-by: the_aceix <aceixsmartx@gmail.com>
2023-12-06 23:57:58 +04:00
Abhishek K
b78cc0a8a1
NET-725: Failovers (#2685)
* api to  to get host relayed from client

* add auto relay to api host

* add peer nat type

* set pro field on signal

* rm net check on relay me handler

* return success response

* re-establish failover logic

* set failOver ctx

* failOver with peer pub key

* failovered peer updates

* failover handlers, reset failovered peer on deletion

* rm unused funcs

* initialize failover handler on EE

* ignore failover node on signal

* failover changes

* set host id on signal

* extend signal model to include node ids

* add backwards compatibility

* add failover as node api

* set json response on failover handers

* add failover field to api node

* fix signal data check

* initialize failover peer map

* reset failovered status when relayed or deleted

* add failover info to api node

* reset network failover

* only proceed furtuer if failover exists in the network

* set failOver node defaults

* cannot set failover node as relayed

* debug log

* debug log

* debug changes

* debug changes

* debug changes

* revert debug changes

* don't add peers to idmap when removed

* reset failed Over

* fix static checks

* rm debug log

* add check for linux host
2023-11-29 20:10:07 +04:00
Abhishek Kondur
5fd0f3c965 disable clear cache hook 2023-11-23 08:53:41 +04:00
Abhishek Kondur
8a0f96fe9c skip license validation on timeout error 2023-11-23 08:40:10 +04:00