Commit graph

98 commits

Author SHA1 Message Date
abhishek9686
137303a687 resolve merge conflicts 2025-03-28 16:14:07 +04:00
abhishek9686
c318c939f4 sort the acl rules 2025-03-27 23:54:38 +04:00
abhishek9686
d55baebac5 add metric route to ext client addrs 2025-03-27 15:59:33 +04:00
abhishek9686
45e5d52b19 fix status func calls 2025-03-25 12:01:46 +04:00
Abhishek K
4c26ae5197
Merge pull request #3391 from gravitl/master
Master
2025-03-25 11:51:06 +04:00
Abhishek K
4cc56fd3be
NET-1990: add peerkey to network egress routes model (#3379)
* add peerkey to network egress routes model

* add peerkey to network egress routes model

* filter out conflicting routes from node

* add support for egress HA on relay

* add support for egress HA on relay

* add support for egress HA on relay

* skip if curr node is relay node of the peer

* skip if curr node is relay node of the peer

* fix failover egress HA

* add network to egress route model

* clone before modifying
2025-03-24 15:33:39 +04:00
Abhishek K
3d765f9cf1
NET-1910: Acl controls for Egress Traffic (#3377)
* add support for egress ranges on acl policy

* add egress ranges to acl rules

* add egress ranges to acl policies

* Add egress ranges to acl rules

* add egress ranges to fw update

* fetch acl rules for egress networks

* apply egress policies for devices

* configure user policies for egresss routes

* fix gw tag name migration

* fix egress acl rules for static nodes

* add egress ranges for static nodes on ingress gw

* fileter acl IPs to be unique

* cleanup IOT logic from peer update

* make acl Rule Dst List

* cleanup egress ranges from acl policies

* create user group default acl policy for gateways

* remove remote access name ids

* rm egress ranges removal from acl policies

* simplify user permissions on nodes

* add additional nameservers to extclient dns

* remove debug logs

* fix static checks
2025-03-18 13:25:55 +04:00
Abhishek K
fb1052e6a5
change check to last checkin status (#3374) 2025-03-17 17:23:06 +04:00
Vishal Dalwadi
346f09ce39
NET-1986: Only report online hosts. (#3370)
* feat(go): only report online hosts.

* feat(go): only report online external clients.
2025-03-14 17:16:31 +04:00
abhishek9686
bb25739bd9 resolve merge conflicts 2025-03-06 22:41:56 +04:00
abhishek9686
8f370a74a9 fix ipv6 addr rules on gw node 2025-03-06 19:01:53 +04:00
abhishek9686
6e1b16a6ea fix ext-ext comms 2025-03-06 03:45:09 +04:00
abhishek9686
9a1c1c281b fix extclient comms to gws 2025-03-05 23:24:24 +04:00
abhishek9686
984db44c78 fix extclient comms to gws 2025-03-05 23:06:38 +04:00
abhishek9686
b45a926649 optimise static node rules, fix traffic flows for static nodes 2025-03-05 14:26:35 +04:00
abhishek9686
225bf37e02 resolve merge conflicts 2025-02-28 12:18:38 +04:00
abhishek9686
ce6ec25253 fix network ip allocation in HA 2025-02-27 16:26:15 +04:00
abhishek9686
46eea43397 add mutex for target nodes 2025-02-25 19:41:57 +04:00
abhishek9686
8536f0eeb9 extclients from policies 2025-02-18 16:39:19 +04:00
abhishek9686
ed1f48a4b4 remove node id from acls when deleted 2025-02-14 19:59:58 +04:00
Abhishek K
689b9b6b52
NET-1941: failover signaling optimized, new endpoint for metrics peer info (#3322)
* optimise acl cache with network map

* fix mutex clash

* fix acl mutex

* add new endpoint for metrics peer info

* fix static check

* add new endpoint for metrics peer info

* fix host peer info api params

* cache failover data

* add json tag

* avoid duplicate calls to failover

* add failover check ctx

* add failover check ctx

* fix failover debug log

* optimise failover operations

* remove debug logs

* rm unused model

* rm unused model
2025-02-14 16:06:26 +04:00
abhishek9686
bee1f4dda4 remove debug log, fix concurrent map write issue 2025-02-13 22:53:05 +04:00
abhishek9686
5177f5cbfd fix peer list on interface 2024-12-16 22:29:42 +04:00
Abhishek K
f124b10c35
NET-1784: Adv Acl Rules (#3239)
* define direction on acl req

* define protocol types and rule model

* get rules for node

* fetch acl rule for a node

* redine acl firewall model

* add json tags

* update port,protocol, and direction

* add json tags to acl options

* convert protocol to string

* simplify acl map

* add json tags to acl rules

* add networks to fw update

* add acls rules

* NET-1784: add allow all field

* add allow all field on fw udpate

* remove debug logs

* fix port and protocol types

* migrate default acl policies

* define constants for service types

* add adv options for user rules on ingress gw

* debug log

* allow whole network

* add static nodes to acl rules

* replace peers on acl updates

* initiliase rule map

* add user acl rules on target node

* revert acl check on extclient

* handle static node rules on ingress gw

* update multiple policies for users

* check allowed direction

* remove debug logs
2024-12-10 11:21:14 +04:00
Yabin Ma
5f21c8bb1d
NET-1778: scale test code changes (#3203)
* comment ACL call and add debug message

* add cache for network nodes

* fix load node to network cache issue

* add peerUpdate call 1 min limit

* add debug log for scale test

* release maps

* avoid default policy for node

* 1 min limit for peerUpdate trigger

* mq options

* Revert "mq options"

This reverts commit 10b93d0118.

* set peerUpdate run in sequence

* update for emqx 5.8.2

* remove batch peer update

* change the sleep to 10 millisec to avoid timeout

* add compress and change encrypt for peerUpdate message

* add mem profiling and automaxprocs

* add failover ctx mutex

* ignore request to failover peer

* remove code without called

* remove debug logs

* update emqx to v5.8.2

* change broker keepalive

* add OLD_ACL_SUPPORT setting

* add host version check for message encrypt

* remove debug message

* remove peerUpdate call control

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-12-10 10:15:31 +04:00
abhishek9686
c8048da70c limit ext names to 15 2024-11-14 13:43:36 +04:00
abhishek9686
15bfcada65 sort extclients 2024-11-10 16:38:14 +04:00
abhishek9686
cd669774c0 fix node addr mask 2024-10-30 10:21:34 +04:00
abhishek9686
ea46ea5378 fix extclient allowed Ips 2024-10-29 22:57:58 +04:00
abhishek9686
2ee3cefc18 Revert "chnage egress range type to string"
This reverts commit a0735e8203.
2024-10-29 13:00:28 +04:00
abhishek9686
a0735e8203 chnage egress range type to string 2024-10-29 12:59:24 +04:00
abhishek9686
8e5a3d02c3 set egress6 ranges 2024-10-29 12:56:11 +04:00
abhishek9686
dc24e359cb fix return error 2024-10-29 12:42:45 +04:00
abhishek9686
ebc3e90301 add extclient egress ranges 2024-10-29 12:41:40 +04:00
abhishek9686
5e62e7e749 check default user policy 2024-10-28 10:53:12 +04:00
abhishek9686
20302f7701 fix default policy check on static node network 2024-10-28 09:41:09 +04:00
abhishek9686
502a15ea14 ignore setting up rules when default poliy is enabled 2024-10-27 23:00:36 +04:00
abhishek9686
f51f655f00 send peer updates on user updates and ingress gw 2024-10-23 22:30:36 +04:00
abhishek9686
d4da1774ff check default user policy 2024-10-23 15:29:47 +04:00
abhishek9686
c0f107b302 remove userips usage, add allow all to fwupdate 2024-10-23 14:15:13 +04:00
abhishek9686
ffb75fa6c1 add allow rules for nodes 2024-10-23 13:19:16 +04:00
abhishek9686
6c52b68214 fix ingress firewall updates 2024-10-22 19:54:23 +04:00
abhishek9686
1c9b986f0e add static node ips in the ingress update 2024-10-21 19:48:13 +04:00
abhishek9686
3994183fe8 implement extclient to extclient acls 2024-10-21 16:49:30 +04:00
abhishek9686
7fa6580103 add ingress rules to peer update 2024-10-21 12:35:10 +04:00
abhishek9686
aea26dfdf6 check acl policy on ext client 2024-10-18 11:21:32 +04:00
abhishek9686
de7cabacba update tags on extclient update call 2024-10-17 19:55:58 +04:00
abhishek9686
b41353b415 add static nodes to api resp 2024-10-14 16:36:25 +04:00
abhishek9686
287bcd8abc static node init 2024-10-02 15:43:01 +04:00
Max Ma
46b8fd21c8
NET-1440: scale test changes (#3014)
* NET-1440 scale test changes

* fix UT error and add error info

* load metric data into cacha in startup

* remove debug info for metric

* add server telemetry and hasSuperAdmin to cache

* fix user UT case

* update sqlite connection string for performance

* update check-in TS in cache only if cache enabled

* update metric data in cache only if cache enabled and write to DB once in stop

* update server status in mq topic

* add failover existed to server status update

* only send mq messsage when there is server status change

* batch peerUpdate

* code changes for scale for review

* update UT case

* update mq client check

* mq connection code change

* revert server status update changes

* revert batch peerUpdate

* remove server status update info

* code changes based on review and setupmqtt in keepalive

* set the mq message order to false for PIN

* remove setupmqtt in keepalive

* recycle ip in node deletion

* update ip allocation logic

* remove ip addr cap

* remove ippool file

* update get extClient func

* remove ip from cache map when extClient is removed
2024-08-15 11:59:00 +05:30