Commit graph

729 commits

Author SHA1 Message Date
VishalDalwadi
7338ec3f43 feat(go): add ip detection interval setting; 2026-01-06 22:27:16 +05:30
Abhishek Kondur
0c9ed2542b
NM-202: fix egress domain routing (#3793)
* NM-195: add key tags info to posture check on join

* NM-195: add network user grps to posture check

* NM-195: add posture checks to middleware

* fix: return error when group network roles are set for specific networks and all networks;

* add all posture check to rsrc permission check func

* NM-202: fix egress domain routing

* fix: add username filter;

* feat: add fallback nameserver support;

* fix: add validation for pro as well;

* fix: skip fallback domains for user gws;

* fix: don't set domains for fallback dns servers;

* fix: validation fixes;

* fix: empty match domains for fallback nameservers;

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
2025-12-22 10:10:40 +04:00
Abhishek Kondur
a29cbb0f31
NM-160: Network User IP map API for operator (#3795)
* add user network ip mapping api

* fix user network ip api
2025-12-20 09:36:13 +04:00
Abhishek Kondur
ea75901f8f
NM-195: cleanup deleted tags and user groups from posturechecks, add nameserver to middleware (#3794)
* NM-195: add key tags info to posture check on join

* NM-195: add network user grps to posture check

* NM-195: add posture checks to middleware

* add all posture check to rsrc permission check func

* NM-195: cleanup deleted tags and user groups from posturechecks

* NM-195: add Nameserver to middleware
2025-12-19 17:36:39 +04:00
Abhishek Kondur
79dd46c8df
NM-195: Add posture check to middleware (#3791)
* NM-195: add key tags info to posture check on join

* NM-195: add network user grps to posture check

* NM-195: add posture checks to middleware

* add all posture check to rsrc permission check func
2025-12-19 09:51:32 +04:00
Abhishek Kondur
45d9314163
NM-197: Assign and Unassign Gw apis (#3790)
* NM-197: Assign and Unassign Gw apis

* NM-197: fix static checks

* NM-197: fix assign api

* NM-197: add relayed node validity check on gw node
2025-12-18 15:37:19 +04:00
Abhishek Kondur
3e3d8c60a0
NM-195: Add posture check feature flag (#3780)
* NM-195: fix posture check for untagged resources

* NM-195: reduce default cleanup interval

* NM-195: reduce default cleanup interval

* Add posture checks to feature flag
2025-12-16 15:58:18 +04:00
Vishal Dalwadi
a4981ffd26
NM-168: Network Flow Logs (#3754)
* feat(go): define flow events;

* feat(go): improve structure;

* feat(go): improve structure;

* feat(go): remove old flow definitions;

* feat(sql): add clickhouse init scripts;

* feat(sql): add protobuf spec;

* fix(sql): store ip as string;

* feat(go): move proto def to grpc dir;

* feat(go): use node instead of host as type; optimize protobuf defs;

* feat(go): add clickhouse db support; add endpoint to query flows;

* fix(go): fix clickhouse config;

* fix(go): use error response structure to report error;

* feat(go): pass flow logging status to netclient;

* feat(go): add peer ip identity map to host peer info;

* feat(go): remove prefix from participant obj fields;

* feat(go): add flow logs enabled field to host;

* feat(go): add filtering to get flow api;

* feat(go): fix record struct;

* feat(go): add exporter url to server config;

* feat(go): add exporter url to server config;

* feat(go): enable flow logs by default;

* feat(go): update nm-quick.sh;

* feat(go): update nm-quick.sh;

* feat(go): update nm-quick.sh;

* feat(go): update nm-quick.sh;

* feat(go): add db initialization logic;

* feat(go): filter by network id;

* fix(go): connection issue;

* fix(go): connection issue;

* fix(go): golang builder version;

* feat(go): add server settings for flow logs;

* feat(go): initialize clickhouse in pro; check for retention;

* feat(go): add exporter feature flags;

* feat(go): add grpc behind caddy;

* feat(go): expose ports correctly;

* fix(go): grpc caddyfile config;

* fix(go): publish exporter feature flags on license validation;

* fix(go): set server name for netmaker exporter;

* fix(go): set server name for netmaker exporter;

* fix(go): check for nil cancel func;

* fix(go): add flow logs field to api host;

* fix(go): add flow logs field to api host;

* fix(go): remove port from grpc setting;

* chore(go): tabs;

* feat(go): introduce egress range participant type;.

* feat(go): rename egress range to egress route for uniform language;

* feat(go): rename egress range to egress route for uniform language;

* feat: add peer addr identity map to host peer update;

* feat: add address identity map to host peer update;

* feat: add address identity map to host peer update;

* feat: set correct from and to args;

* feat: add support for filtering by node;

* feat: use corresponding base image;

* feat: update dockerfile base image version;

* fix: disable flow logs for all host when global settings are changed;
2025-12-12 14:12:00 +04:00
Abhishek Kondur
4177348f12
NM-166: add user groups to posture checks (#3766)
* NM-166: add device posture checks apis and logic

* NM-166: add severity level to posture check and api to fetch all available attributes

* NM-166: register posture check schema

* add periodic posture check evaluation of nodes

* NM-166: add os family and kernel version to host model for linux

* add posture check violations on host registration, api to fetch node violations

* NM-166: trigger posture checks on posture checks updates

* NM-166: add version clean func

* NM-166: add allowed values for posture check attributes to api

* NM-166: format violation messages

* NM-166: fix static check

* NM-166: fix static check

* NM-166: add OS info to update extclient api

* NM-166: add sysinfo funcs

* set if only new values are not empty

* format client location

* fix posture violation for static nodes

* skip non user nodes from posture checks

* NM-166: check posture checks by tags

* NM-166: set host location before posture check

* validate posture checks by OR condition

* run posture check violation on node update

* NM-166: allow join on unviolated networks

* NM-166: update response message when posture checks are violated

* NM-166: fix static check

* NM-166: add mutex for posture check runs

* NM-166: add OS family fields to api host model

* NM-166: run posture eval for gateway ops

* NM-166: add user groups to posture checks

* NM-166: add default all user grp

* NM-166: fix posture check eval for users

* NM-166: handle user nodes in the posture checks

* NM-166: fix posture check for new config

* NM-166: skip auto update check on users and show violation on disbaled static nodes

* NM-166: add min verison check for attr

* NM-166: fix static check

* NM-166: add default admin groups
2025-12-11 12:19:30 +04:00
Abhishek Kondur
3bab218a2b
NM-175: add ipv4/ipv6 to peer info (#3763)
* add ipv4 and ipv6 addr to peer info

* NM-175: add extclient addr4 and addr6

* add user info to peerinfo
2025-12-05 18:10:09 +04:00
Abhishek Kondur
eed32cd2d6
Merge pull request #3735 from gravitl/NM-166
NM-166: Device Posture Checks
2025-12-05 10:33:11 +04:00
Abhishek Kondur
94f3716fdf
Merge pull request #3744 from gravitl/NM-167
NM-167: Auto delete Offline Nodes
2025-12-05 09:52:53 +04:00
abhishek9686
1944a9a8b2 disable failover field 2025-11-07 11:52:43 +04:00
Abhishek K
8fc59cd869
NM-159: Add Gws HA and device approvals to feature flags (#3722)
* force update host dns field if node is acting as inet gw

* add old acl support checks

* move auto relay migration to pro pkg

* add check to avoid unsetting relayed node

* simplify auto assign gw logic

* send auto assign update on un relay

* set checking time to latest on updates

* fix HA auto Relay logic

* add relay node metrics to peer signal

* move auto relay peer check

* publish host peer update

* check and unset unrelayed auto peers

* use relay node mutex to avoid rac condition

* reset autorelayed peers on auto assign gw

* add device approval, gws HA to feature flags
2025-11-06 21:19:15 +04:00
Abhishek K
c643a50b67
NM-159: simplify auto assign gw logic (#3719)
* force update host dns field if node is acting as inet gw

* add old acl support checks

* move auto relay migration to pro pkg

* add check to avoid unsetting relayed node

* simplify auto assign gw logic

* send auto assign update on un relay

* set checking time to latest on updates

* fix HA auto Relay logic

* add relay node metrics to peer signal

* move auto relay peer check

* publish host peer update

* check and unset unrelayed auto peers

* use relay node mutex to avoid rac condition

* reset autorelayed peers on auto assign gw
2025-11-06 14:54:09 +04:00
Vishal Dalwadi
fc20b38851
Merge pull request #3718 from gravitl/fix/v1.2.0
Fixes v1.2.0
2025-11-06 13:55:52 +04:00
Abhishek K
23d48cad93
NM-159: peer connection interval, check old acl status (#3714)
* force update host dns field if node is acting as inet gw

* add old acl support checks
2025-11-04 11:57:54 +04:00
Vishal Dalwadi
b1e4d1158b
Release Fixes: v1.2.0 (#3713)
* feat(go): allow put and post requests to self;

* feat(go): add old objects to delete events;

* feat(go): add search domains to UserRemoteGws;
2025-11-04 11:46:16 +04:00
Vishal Dalwadi
94770a911d
Merge pull request #3707 from gravitl/NM-158
NM-158: Search Domain Support
2025-11-03 10:54:28 +04:00
abhishek9686
26f36efdef NM-159: fix acl old version deprecation, add peer connection interval to server settings 2025-11-02 23:50:42 +04:00
Abhishek K
0582b28129
NM-80: Logic to Deprecate Legacy Acls if unused (#3662)
* check and deprecate old acls

* add egress ranges by access to users

* add egress ranges by access to users

* merge v1.1

* resolve merge conflict
2025-10-28 09:53:42 +04:00
Abhishek K
74fef9fbc6
NM-122: Auto Relay, auto assignment of Gw (#3697)
* add auto realy handlers and logic funcs

* add pro func connectors

* Add auto relayed peer ips on peer update, set auto relay on gw creation

* add network id to signal, add autorelay nodes to peerudpate

* add autorelay peer update logic

* add nodes to peer update

* revert node model change

* reset auto relayed peers on the relay node on reset, add auto relay nodes to pull

* add logic api to update auto relay node

* add autoassigngw field to node, add logic to swith relay node in relayme udpate api

* add gw nodes to pull

* intilaise gw map

* HA relay functionality

* add autoassign gw option to enrollment key

* publish intant action to auto assign gw

* fix static checks

* unset relay if auto assign removed

* add host node model to auto relay info

* add host node model to auto relay info

* only use hostNode model for gws info

* handle autoassigned gw peer in the update

* handle autoassigned gw peer in the update

* handle peer updates for autoassigned gw peer

* unset auto assigned peer if relayed or failedovered
2025-10-28 09:53:31 +04:00
Abhishek K
c5b48db2a1
NM-125: Egress HA by Latency, Allow Tags to be selected as routing peers (#3698)
* enable egress routing peers with tags

* remove tag from egress when deleted

* fix egress tag functionality

* filter duplicate egress ips

* set default stun server if unset

* add version to status api

* sync deleted node udpate host deletion
2025-10-25 23:49:21 +04:00
Vishal Dalwadi
c4313a4b77
feat(go): add auditor role; (#3684) 2025-10-24 09:56:40 +04:00
Vishal Dalwadi
71fa5013d0
NM-145: Cost Per Network (#3685)
* feat(go): report per network usage as well;

* feat(go): move usage model and logic out of ee;
2025-10-24 09:53:33 +04:00
Vishal Dalwadi
69815449bd
NM-120: Netmaker Desktop DNS Improvements (#3690)
* feat(go): return extclient on create;

* feat(go): return success on delete;

* feat(go): set manage dns on user remote gw;
2025-10-24 09:46:01 +04:00
Abhishek K
49e28e3385
NM-137: Add addtional mq actions to host api (#3671)
* add host node update action

* add peer signal action to fallback api

* add replace peers to host pull

* add delete host action to fallback api

* update base go builder image

* update go builder tag

* check host port to avoid conflicts behind NAT

* fix connect/disconnect on api

* send pull signal on disconnect from UI

* fix panic on host join via user auth

* reset failover on disconnect
2025-10-07 13:16:31 +04:00
VishalDalwadi
74fd81999f feat(go): add egress ha feature flag; 2025-09-29 11:56:58 +05:30
Abhishek K
d1b82aa977
add egress ips by access to user configs (#3659) 2025-09-20 14:50:51 +05:30
Abhishek K
9e0196126f
NM-79: Domain Based Egress Routing (#3607)
* add support for egress domain routing

* add domain info to egress range

* fix egress domain update

* send peer update domain resolution update

* add egress domain update in the peer update

* use range field for domain check

* add egress domain to host pull

* add egress domain model to egress host update

* add egress domain model to egress host update

* update egress domain model on acls

* add check of range if domain is set

* sync egress domains to dns system

* add egress domain to match domain list, fix egress nat rule for domains

* fix all rsrcs comms

* fix static checks

* fix egress acls on CE

* check for all resources access on a node

* simplify egress acl rules

* merged ce and pro acl rule func

* fix uni direction acl rule for static nodes

* allow relayed nodes traffic

* resolve merge conflicts

* remove anywhere dst rule on user node acls

* fix: broadcast  user groups update for acl changes

* add egress domain ans routes to nodes

* add egress ranges to DST

* add all egress ranges for all resources

* fix DNS routing acls rules
2025-09-11 15:24:17 +05:30
abhishek9686
7688bc3ebc resolve merge conflicts 2025-08-29 11:37:27 +05:30
Abhishek K
b1f0843d27
NM-76: add network user api (#3605)
* add network user api

* add remove network user api
2025-08-25 10:21:52 +05:30
Vishal Dalwadi
8e717fb01b
feat(go): add color code to user group; (#3606) 2025-08-25 10:21:27 +05:30
Vishal Dalwadi
85e4877803
Merge pull request #3576 from gravitl/NM-38
NM-38: User Config Fixes
2025-08-12 14:07:45 +05:30
abhishek9686
773693568c resolve merge conflicts 2025-08-12 11:30:44 +05:30
Abhishek K
a8a0dd066c
NM-44: Device Approvals for Network Join (#3579)
* add pending hosts apis, migration logic for network auto join field

* fix pending hosts logic on join

* delete pending hosts on host delete

* ignore pedning device request if host in the network already

* add peer update on host approval
2025-08-12 09:16:51 +05:30
Vishal Dalwadi
d5cc14ce49
Patch: Okta IDP Integration (#3586)
* feat(go): add support for okta.

* feat(go): update docs link.

* feat(go): handle okta.

* feat(go): handle okta.
2025-08-07 23:05:58 +05:30
Vishal Dalwadi
025eebe7f2 fix(go): add okta to idp sync test. 2025-07-31 21:36:59 +05:30
Vishal Dalwadi
99f1be4aba Merge branch 'develop' into NM-49
# Conflicts:
#	pro/auth/sync.go
2025-07-30 19:21:59 +05:30
Abhishek K
f075eebedb
Merge pull request #3557 from gravitl/NM-24
NM-24: IDP UX improvements
2025-07-29 19:54:48 +05:30
Vishal Dalwadi
b778243c2c fix(go): go build errors; 2025-07-28 22:15:25 +05:30
Vishal Dalwadi
472bf3dbbf Merge branch 'develop' into NM-24 2025-07-28 22:06:22 +05:30
Vishal Dalwadi
ea074f46c9 Merge branch 'develop' into NM-49 2025-07-28 22:03:44 +05:30
Vishal Dalwadi
f8f4812851 Merge branch 'develop' into NM-37 2025-07-28 22:02:40 +05:30
Abhishek K
3a173bb4b2
Merge pull request #3568 from gravitl/master
Master
2025-07-28 18:17:17 +05:30
Vishal Dalwadi
0fea8af3e1
Merge branch 'develop' into NM-37 2025-07-28 15:23:03 +05:30
Vishal Dalwadi
7965110ee1 Merge branch 'develop' into NM-49
# Conflicts:
#	models/settings.go
2025-07-28 11:26:02 +05:30
Vishal Dalwadi
6367efc882
NET-2077: Add support for Feature Flags. (#3528)
* feat(go): add support for feature flags;

* feat(go): store feature flags in code;

* feat(go): report base domain on license validation;

* feat(go): remove nm base domain required binding;

* feat(go): add a flag for oauth support;
2025-07-27 08:39:17 +05:30
Vishal Dalwadi
31ed8c5262
Netmaker Desktop Session Duration (#3543)
* feat(go): allow different session durations for client apps;

* feat(go): assume call is from netdesk app if header absent;

* feat(go): allow header;

* feat(go): set client jwt validity duration on migration.
2025-07-27 08:29:14 +05:30
Vishal Dalwadi
8b23e9d6ae feat(go): add support for okta oauth; 2025-07-25 14:36:27 +05:30