Commit graph

1186 commits

Author SHA1 Message Date
abhishek9686
33fafa83e6 add nameservers to dns settins 2025-02-28 21:49:53 +04:00
Abhishek K
48535f7ef1
NET-1956: Async Node Status API (#3341)
* add node status api

* upsate node status api to return map data

* resolve merge conflicts
2025-02-24 08:48:24 +03:00
Aceix
2fcdd865c8
fix: unlnk deleted networks and tags from enrollment keys (#3328) 2025-02-24 08:22:18 +03:00
Aceix
f46030e40f
fix: add user group struct to get user response (#3336)
* fix: add user group struct to user response

* fix: set auto-created network groups as default
2025-02-24 08:17:55 +03:00
Abhishek K
ee6bea117f
Merge branch 'develop' into master 2025-02-19 01:14:06 +04:00
abhishek9686
7dd4c048c3 add mutex around peer tags 2025-02-18 22:10:03 +04:00
Abhishek K
f028a6374d
Merge pull request #3332 from gravitl/master
Master
2025-02-17 18:10:19 +04:00
abhishek9686
252de61aa7 clone node tags 2025-02-17 17:55:53 +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
Abhishek K
fb02979697
Merge pull request #3330 from gravitl/master
Master
2025-02-14 09:41:34 +04:00
abhishek9686
bee1f4dda4 remove debug log, fix concurrent map write issue 2025-02-13 22:53:05 +04:00
Abhishek K
64bc351564
Merge pull request #3315 from gravitl/master
Master
2025-02-04 19:32:14 +04:00
abhishek9686
01e7ccf731 don't override acl rules for multi-net host 2025-02-04 15:34:03 +04:00
Abhishek K
e13bf2c0eb
NET-1923: Add Metric Port to server config (#3306)
* set default metrics port 8889

* set default metrics port 51821

* add metrics port to server config

* bind caddy only on tcp

* add var for pulling files

* add new line

* update peer update model

* check if port is not zero

* set replace peer to false on pull

* do not replace peers on failover sync

* remove debug log

* add old peer update fields for backwards compatibility

* add old json tag

* add debug log in caller trace func
2025-02-04 08:44:24 +04:00
Abhishek K
4431dc99a7
NET-1933: option to force destroy network (#3311)
* option to force destroy network

* fix network tests

* fix network defaults func

* fix network destroy action

* delete network if node count is zero

* push peer update network deletion

* send node update
2025-02-03 15:19:44 +04:00
Abhishek K
8297642b90
NET-1914: add gw apis, move relays into CE (#3309)
* add gw apis, move relays into CE

* set gw field on relay and ingress creation

* add gw handlers to relay and ingress apis

* if node is inetgw and gw add dns

* remove pro check on relays

* fetch node before updating
2025-01-28 11:28:31 +05:30
Abhishek K
c02ec193db
NET-1920: Add disconnected node status (#3300)
* create peer ack table

* add restricted status

* add disconnected status
2025-01-28 11:26:12 +05:30
Aceix
a899544104
refactor: allow friendlier tag names (#3304)
- update tag name validation to allow spaces and numbers
2025-01-22 15:00:13 +05:30
abhishek9686
715ed23553 remove default value on dns domain 2024-12-18 23:07:37 +04:00
abhishek9686
73eed6e583 add service type to default acl polices 2024-12-18 16:18:24 +04:00
Abhishek K
5a6088455a
Merge pull request #3258 from gravitl/NET-1784-latest
fix peer list on interface
2024-12-16 22:30:02 +04:00
abhishek9686
5177f5cbfd fix peer list on interface 2024-12-16 22:29:42 +04:00
abhishek9686
56f979bba9 fix peer list on interface 2024-12-16 22:26:09 +04:00
Abhishek K
fc8675bf9c
NET-1867: add default domain to all entries (#3252)
* add dns entry validation check

* append default domain if not append

* add dot for default domain

* fix dns tests
2024-12-16 12:18:32 +04:00
abhishek9686
0216c596cb add all networks rules 2024-12-15 10:41:59 +04:00
abhishek9686
98e313242b add allowed networks 2024-12-13 14:08:34 +04:00
abhishek9686
f14d916936 for any service set defaults 2024-12-12 02:32:36 +04:00
abhishek9686
effb7eb5d7 fix all resources rules 2024-12-12 02:30:32 +04:00
Abhishek K
7093373c77
NET-1784: Migrate All Policies (#3245)
* migrate all policies

* migrate all policies

* add acl policy type for any traffic

* use any service type for migration
2024-12-10 11:55:37 +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
Abhishek K
31c2311bef
NET-1782: Fetch Node Connection Status from metrics (#3237)
* add live status of node

* handle static node status

* add public IP field to server configuration

* get public Ip from config

* improve node status logic

* improvise status check

* use only checkin status on old nodes

---------

Co-authored-by: the_aceix <aceixsmartx@gmail.com>
2024-12-10 10:46:05 +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
Yabin Ma
87ef555542
NET1847:Add STUN settings (#3235)
* add setting to turn on/off STUN

* sync stun setting in peerUpdate

* sync stun servers setting in peerUpdate
2024-12-06 09:38:32 +04:00
Abhishek K
5cb49e3d45
Merge pull request #3231 from gravitl/NET-1842
NET-1842:initialize cache in startup
2024-12-04 12:33:05 +04:00
Yabin Ma
71162e401d
forbid duplicated ip in Edit node (#3206) 2024-12-03 13:18:02 +04:00
Max Ma
e8d3e80b08 initialize cache in startup 2024-11-29 11:35:34 +01:00
abhishek9686
64f730f6f0 list cache 2024-11-27 15:05:08 +04:00
abhishek9686
cbe660fbf2 get all nodes on startup 2024-11-27 15:01:26 +04:00
abhishek9686
cde56204fc load all nodes into cache 2024-11-27 14:56:24 +04:00
abhishek9686
698032a4dc load acls into cache 2024-11-27 12:57:48 +04:00
abhishek9686
7df8196aba initiliase acl cache 2024-11-27 12:28:08 +04:00
Abhishek K
0351434a4e
Merge pull request #3205 from gravitl/NET-1773-acls
NET-1773: block tag deletion if used by an acl policy
2024-11-18 15:07:21 +04:00
abhishek9686
604f8f5ef2 fix old acls migration 2024-11-15 21:07:40 +04:00
abhishek9686
8a948187bb block tag deletion if used by a acl policy 2024-11-15 15:39:36 +04:00
abhishek9686
c8048da70c limit ext names to 15 2024-11-14 13:43:36 +04:00
abhishek9686
edcb19f7eb set relayed peer endpoint to nil on relay 2024-11-10 20:28:33 +04:00
abhishek9686
dc03269771 set peer endpoint if host endpoint is nil 2024-11-10 19:14:45 +04:00
abhishek9686
87b790aaa6 set peer endpoint if host endpoint is nil 2024-11-10 18:59:52 +04:00
abhishek9686
15bfcada65 sort extclients 2024-11-10 16:38:14 +04:00
abhishek9686
ce93c9e0c1 add migrate fix on tags init 2024-11-08 10:55:43 +04:00