Commit graph

53 commits

Author SHA1 Message Date
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
Gabriel de Souza Seibel 291551b45c
Net 687 : fix license validation failure log (#2675)
* On license validation fail, parse and store the message of the response

* Return cached response body when necessary

* Have license validation return proper val,err

* Improve logs readability on lic val error
2023-11-17 22:07:22 +04:00
Gabriel de Souza Seibel 0a88fdebd9
[NET-687] On license validation fail, parse and store the message of the response (#2669)
* On license validation fail, parse and store the message of the response

* Return cached response body when necessary

* Have license validation return proper val,err
2023-11-17 18:56:51 +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 abd6a9317c
Don't consider license invalid on 503/504 (#2650) 2023-11-01 23:37:01 +04:00
Abhishek K 4876bdb62f
NET-674: clear extclients of an user when deleted, remove gw id from user gws when deleted (#2631)
* remove client gw from user when deleted

* clear extclient of a user if deleted

* check if ingress gw on user gws

* debug log

* log change

* pr comments
2023-10-17 23:22:17 +04:00
Gabriel de Souza Seibel 001442e75e
[NET-493] - Additional data fields to send to account management (#2583)
* Send relays and internet gws count to amb

* Unify usage funcs in logic pkg

* Fix ee build

* Revert "Unify usage funcs in logic pkg"

This reverts commit 28afc91f7e.

* Add more resource metrics on getUsage handler

* Use pro module's function to get server usage on lic val

* Move GetRelays to pro package
2023-10-06 10:22:58 +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
Aceix bfc61fa359
session management for remote access client (#2592)
* feat(NET-584): wip: session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): only enable if client is disabled

* feat(NET-584): check only for normal users

* feat(NET-584): fix condition
2023-10-02 08:57:58 +04:00
Matthew R Kasun 83f2f2ef28
publish node update on ifcace change (#2600) 2023-09-28 14:28:19 +04:00