Commit graph

553 commits

Author SHA1 Message Date
abhishek9686 54c540ef64 migration funcs 2024-06-23 09:10:35 +05:30
abhishek9686 56fdd6d98e replace auth checks, add network id to role model 2024-06-22 17:32:38 +05:30
abhishek9686 7d052e64e2 refer network controls form roles, add debug headers 2024-06-20 07:28:33 +05:30
abhishek9686 fb1eae729a change json tag 2024-06-17 15:56:11 +05:30
abhishek9686 9fb83fa89c allow multiple groups for an user 2024-06-17 11:24:38 +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
abhishek9686 78fc3ab508 refactor user role models 2024-06-06 00:34:28 +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 f10bce783b update legacy back to isStatic 2024-06-04 11:53:22 +02:00
Max Ma c7469c79d0 rename isstaticendpoint to isstatic 2024-06-03 10:37:19 +02:00
Aceix d9237da2f6
feat(NET-1207): show network info on RAC (#2949) 2024-06-03 10:25:07 +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 5eb87dc327 add additional scopes 2024-05-27 13:41:56 +05:30
abhishek9686 beaaefb871 user groups CRUD Apis 2024-05-27 01:28:17 +05:30
abhishek9686 0ed44422b3 define models for new user mgmt and groups 2024-05-24 15:10:09 +05:30
abhishek9686 33375bba0f define user roles 2024-05-22 08:51:55 +05:30
abhishek9686 7e0be14892 user mgmt models 2024-05-21 20:05:25 +05:30
the_aceix 78180c86be fix: add metadata field to create RAG 2024-05-17 10:45:32 +00:00
Max Ma 6dc881260f
NET-1224:add egressGW ip for setroutes (#2933)
* add egressGW ip for setroutes

* fix peer endpoint selection

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-05-14 19:56:24 +05:30
Abhishek K 4a355ee9f3
add gw listen port (#2931) 2024-05-09 13:00:21 +05:30
Aceix abf3f4f55d
feat(NET-1106): support additional RAG endpoint IPs (#2907) 2024-05-08 14:45:05 +05:30
Max Ma 7de252f996
add ipv6 address/network for egress (#2906) 2024-04-30 09:57:17 +05:30
Abhishek K 8b08ad1463
NET-1146: add node ipv6 addr to egress route (#2896)
* add node ipv6 addr to egress route

* fix egress route ipv6 address issue

* revert ipv6 peer addr change

---------

Co-authored-by: Max Ma <mayabin@gmail.com>
2024-04-16 19:22:14 +05:30
Max Ma 5740c3e009
Net 1115 (#2890)
* add endpointipv6 for host

* keep endpointipv6 unchanged when enable static endpoint

* handle ipv6 endpoint updates

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-04-11 17:37:45 +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 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 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
Aceix 39fbb45cfe
feat(NET-817): add postup/down scripts for clients (#2810) 2024-02-08 23:29:43 +05:30
the_aceix 5882b86d40 feat(NET-709): add node metadata for remote gws 2024-01-26 10:06:36 +00:00
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 718f739b7d
NET-891: Send deleted node peer update when expired (#2763)
* send deleted node peer update when expired

* set default expiration to 100 years

* pruge expired nodes

* send mq node delete update before deleting node

* initalise to new var

* revert expiration time interval
2024-01-12 16:01:40 +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
Aceix 033e203d91
fix(NET-786): enhance enrollment key validation (#2726) 2024-01-03 12:23:04 +05:30
Farukh Khan 1f9ef50df7
NET-655 (#2670)
* NET-655

* Updated HostPull structure to include EgressRoutes and FirewallUpdate models.

* added ServerVersion structure to hostpull model

* added ServerVersion structure to hostpull model

* removed ServerVersion structure

* removed ServerVersion structure

* added egressroute and fwupdate to hostpull handler

* add host update fallback handler

* set broker type on server cfg

* use actual host password to create emqx user

---------

Co-authored-by: Christopher Blaha <crispspiceguitar@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2023-12-21 10:43:06 +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 98c01c4325
NET-814: Deprecating TURN (#2723)
* deprecate turn

* process signals through mq
2023-12-13 22:46:57 +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
Aceix 8aa185d880
feat(NET-678): add saas support to nmctl (#2687)
* feat(NET-678): add saas support to nmctl

* fix(NET-678): fix context endpoint for sso
2023-12-13 14:04:09 +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 cf0b4cbd2b fix extclient route conv 2023-11-27 11:19:46 +04:00
Abhishek Kondur b6b71c951e add extclient extra allowedIPs and attach them to egress routes 2023-11-24 18:32:43 +04:00
Abhishek K a9a237cafc
check if new network is overlapping (#2655) 2023-11-08 17:43:20 +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
Abhishek K 916694b2cf
NET-664: Local Connections improvements (#2651)
* deprecate endpoint detection form config

* add peer network info to pull
2023-11-01 20:37:43 +04:00
Abhishek K 675c4ec34c
NET-641: Enable/Disable Auto Update From UI (#2622)
* add support to disable/enable autoupdate on a host

* setting to older version for QA to test
2023-10-19 08:59:36 +04:00