Commit Graph

7499 Commits

Author SHA1 Message Date
abhishek9686 675f096d32 v1.5.1: fix auditor activity logs permissions 2026-04-02 15:18:09 +05:30
VishalDalwadi 96d680bfc8 fix(go): remove tags from nameservers; 2026-04-02 09:58:17 +05:30
VishalDalwadi e43ebb80e0 fix(go): migrate nameservers; 2026-04-01 23:44:07 +05:30
VishalDalwadi 74d309ead4 fix(go): migrate nameservers; 2026-04-01 22:53:46 +05:30
VishalDalwadi 1e5f7c537e fix(go): if secret is masked use configured secret; 2026-04-01 22:22:49 +05:30
VishalDalwadi 95771eda51 fix(go): allow get user if admin or self; 2026-04-01 21:17:01 +05:30
VishalDalwadi 729bec02b9 fix(go): cleanup acls in the same goroutine; 2026-04-01 17:52:03 +05:30
Abhishek Kondur 22995c1718 Merge pull request #3953 from gravitl/NM-288
v1.5.1: cleanup grps from posture checks on grp updates
2026-04-01 07:27:49 +05:30
abhishek9686 8fafa55f38 v1.5.1: cleanup grps from posture checks on grp updates 2026-04-01 07:26:42 +05:30
Abhishek Kondur 320140ff44 NM-288: move platform user check (#3952)
* fix(go): set persistent keep alive when registering host using sso;

* fix(go): run posture check violations on delete;

* fix(go): upsert node on approving pending host;

* fix(go): resolve concurrency issues during group delete cleanup;

* fix(go): update doc links;

* fix(go): add created and updated fields to host;

* fix(go): skip delete and update superadmin on sync users;

* fix(go): use conn directly for now;

* fix(go): remove acl for idp groups;

* fix(go): quote fields;

* fix(go): use filters with count;

* feat(go): add a search query;

* fix(go): cleanup acls;

* fix(go): review fixes;

* fix(go): remove additional loop;

* fix(go): fix

* v1.5.1: separate out idp sync and reset signals for HA

* v1.5.1: add grps with name for logging

* v1.5.1: clear posture check violations when all checks are deleted

* v1.5.1: set static when default host

* v1.5.1: fix db status check

* rm set max conns

* v1.5.1: reset auto assigned gw when disconnected

* fix(go): skip global network admin and user groups when splitting;

* v1.5.1: fix update node call from client

* fix(go): separate out migration from normal usage;

* fix(go): skip default groups;

* fix(go): create policies for existing groups on network create;

* fix(go): skip fatal log on clickhouse conn;

* fix(go): add posture check cleanup;

* NM-288: populate relevant name for acl types for UI

* NM-288: populate grp names for posture check apis

* NM-228: add network grps api

* NM-288: add network users api

* now check each group's NetworkRoles for either the specific network ID or schema.AllNetworks (all_networks)

* NM-288: check and unassign auto gw when node is disconnected from cli

* NM-288: optimise network users api call

* NM-288: block auto assign when set to use inet gw

* NM-288: pass all network scoped get apis for platform users

* NM-288: fix orphan nodes on bulk host deletion and refactor node cleanup

- Extract cleanupNodeReferences() from DeleteNode to handle best-effort
  cleanup of relay, internet gw, failover, nameserver, ACL, and egress refs
- DisassociateAllNodesFromHost now calls cleanupNodeReferences + DeleteNodeByID
  directly, bypassing redundant host-association updates that could fail and
  leave nodes orphaned
- Track failed node deletions instead of unconditionally clearing host.Nodes;
  return error if any nodes couldn't be deleted to prevent host removal
- Fix DeleteNode returning error even when node was successfully deleted in
  the host-not-found path

* NM-288: cleanupNodeReferences(node) now only runs in the hard-delete path (when purge=true or alreadyDeleted=true), so it won't execute twice — once on soft-delete and again when the zombie manager hard-deletes.

* NM-288: add orphan deletion log

* DisassociateAllNodesFromHost now always returns nil, logging warnings for any partial failures (upsert errors or undeletable nodes). This allows RemoveHost to always proceed to h.Delete()

* NM-288: move the platform user check in the middleware

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
2026-04-01 06:43:53 +05:30
Abhishek Kondur bd2f9e3f5c Merge branch 'release-v1.5.1' into NM-288 2026-04-01 06:43:16 +05:30
abhishek9686 79efb347cf NM-288: move the platform user check in the middleware 2026-04-01 06:41:59 +05:30
Abhishek Kondur f8a0cfd744 v1.5.1: release notes (#3950)
* v1.5.1: release notes

* v1.5.1: release notes

* v1.5.1: release notes

* v1.5.1: release notes

* v1.5.1: release notes

* v1.5.1: update version tag

* v1.5.1: update version tag
v1.5.1
2026-03-31 20:01:57 +05:30
Abhishek Kondur b97fbc69db NM-288: fix orphan nodes on bulk host deletion and refactor node cleanup (#3948)
* fix(go): set persistent keep alive when registering host using sso;

* fix(go): run posture check violations on delete;

* fix(go): upsert node on approving pending host;

* fix(go): resolve concurrency issues during group delete cleanup;

* fix(go): update doc links;

* fix(go): add created and updated fields to host;

* fix(go): skip delete and update superadmin on sync users;

* fix(go): use conn directly for now;

* fix(go): remove acl for idp groups;

* fix(go): quote fields;

* fix(go): use filters with count;

* feat(go): add a search query;

* fix(go): cleanup acls;

* fix(go): review fixes;

* fix(go): remove additional loop;

* fix(go): fix

* v1.5.1: separate out idp sync and reset signals for HA

* v1.5.1: add grps with name for logging

* v1.5.1: clear posture check violations when all checks are deleted

* v1.5.1: set static when default host

* v1.5.1: fix db status check

* rm set max conns

* v1.5.1: reset auto assigned gw when disconnected

* fix(go): skip global network admin and user groups when splitting;

* v1.5.1: fix update node call from client

* fix(go): separate out migration from normal usage;

* fix(go): skip default groups;

* fix(go): create policies for existing groups on network create;

* fix(go): skip fatal log on clickhouse conn;

* fix(go): add posture check cleanup;

* NM-288: populate relevant name for acl types for UI

* NM-288: populate grp names for posture check apis

* NM-228: add network grps api

* NM-288: add network users api

* now check each group's NetworkRoles for either the specific network ID or schema.AllNetworks (all_networks)

* NM-288: check and unassign auto gw when node is disconnected from cli

* NM-288: optimise network users api call

* NM-288: block auto assign when set to use inet gw

* NM-288: pass all network scoped get apis for platform users

* NM-288: fix orphan nodes on bulk host deletion and refactor node cleanup

- Extract cleanupNodeReferences() from DeleteNode to handle best-effort
  cleanup of relay, internet gw, failover, nameserver, ACL, and egress refs
- DisassociateAllNodesFromHost now calls cleanupNodeReferences + DeleteNodeByID
  directly, bypassing redundant host-association updates that could fail and
  leave nodes orphaned
- Track failed node deletions instead of unconditionally clearing host.Nodes;
  return error if any nodes couldn't be deleted to prevent host removal
- Fix DeleteNode returning error even when node was successfully deleted in
  the host-not-found path

* NM-288: cleanupNodeReferences(node) now only runs in the hard-delete path (when purge=true or alreadyDeleted=true), so it won't execute twice — once on soft-delete and again when the zombie manager hard-deletes.

* NM-288: add orphan deletion log

* DisassociateAllNodesFromHost now always returns nil, logging warnings for any partial failures (upsert errors or undeletable nodes). This allows RemoveHost to always proceed to h.Delete()

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
2026-03-31 17:08:49 +05:30
Vishal Dalwadi aebf809f02 fix(go): prevent create gateway for node with auto assign gateway enabled; (#3949) 2026-03-31 14:42:46 +05:30
abhishek9686 688f1c33a4 DisassociateAllNodesFromHost now always returns nil, logging warnings for any partial failures (upsert errors or undeletable nodes). This allows RemoveHost to always proceed to h.Delete() 2026-03-31 10:06:47 +05:30
abhishek9686 c53249187e NM-288: add orphan deletion log 2026-03-31 09:34:58 +05:30
abhishek9686 d6b3470a80 NM-288: cleanupNodeReferences(node) now only runs in the hard-delete path (when purge=true or alreadyDeleted=true), so it won't execute twice — once on soft-delete and again when the zombie manager hard-deletes. 2026-03-31 09:26:43 +05:30
abhishek9686 89ebf5be2a NM-288: fix orphan nodes on bulk host deletion and refactor node cleanup
- Extract cleanupNodeReferences() from DeleteNode to handle best-effort
  cleanup of relay, internet gw, failover, nameserver, ACL, and egress refs
- DisassociateAllNodesFromHost now calls cleanupNodeReferences + DeleteNodeByID
  directly, bypassing redundant host-association updates that could fail and
  leave nodes orphaned
- Track failed node deletions instead of unconditionally clearing host.Nodes;
  return error if any nodes couldn't be deleted to prevent host removal
- Fix DeleteNode returning error even when node was successfully deleted in
  the host-not-found path
2026-03-31 08:46:20 +05:30
abhishek9686 9514a3f3ea Merge branch 'develop' of https://github.com/gravitl/netmaker into NM-288 2026-03-31 08:16:02 +05:30
Abhishek Kondur 01cf8d9c62 NM-288: pass all network scoped get apis for platform users (#3945)
* fix(go): set persistent keep alive when registering host using sso;

* fix(go): run posture check violations on delete;

* fix(go): upsert node on approving pending host;

* fix(go): resolve concurrency issues during group delete cleanup;

* fix(go): update doc links;

* fix(go): add created and updated fields to host;

* fix(go): skip delete and update superadmin on sync users;

* fix(go): use conn directly for now;

* fix(go): remove acl for idp groups;

* fix(go): quote fields;

* fix(go): use filters with count;

* feat(go): add a search query;

* fix(go): cleanup acls;

* fix(go): review fixes;

* fix(go): remove additional loop;

* fix(go): fix

* v1.5.1: separate out idp sync and reset signals for HA

* v1.5.1: add grps with name for logging

* v1.5.1: clear posture check violations when all checks are deleted

* v1.5.1: set static when default host

* v1.5.1: fix db status check

* rm set max conns

* v1.5.1: reset auto assigned gw when disconnected

* fix(go): skip global network admin and user groups when splitting;

* v1.5.1: fix update node call from client

* fix(go): separate out migration from normal usage;

* fix(go): skip default groups;

* fix(go): create policies for existing groups on network create;

* fix(go): skip fatal log on clickhouse conn;

* fix(go): add posture check cleanup;

* NM-288: populate relevant name for acl types for UI

* NM-288: populate grp names for posture check apis

* NM-228: add network grps api

* NM-288: add network users api

* now check each group's NetworkRoles for either the specific network ID or schema.AllNetworks (all_networks)

* NM-288: check and unassign auto gw when node is disconnected from cli

* NM-288: optimise network users api call

* NM-288: block auto assign when set to use inet gw

* NM-288: pass all network scoped get apis for platform users

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
2026-03-31 08:08:13 +05:30
abhishek9686 c721ce4886 NM-288: pass all network scoped get apis for platform users 2026-03-30 22:13:31 +05:30
abhishek9686 2fb9239a2d Merge branch 'develop' of https://github.com/gravitl/netmaker into NM-288 2026-03-30 22:12:51 +05:30
Vishal Dalwadi c9fe773379 fix(go): remove node from enrollment key relay on delete and unset gw; (#3943) 2026-03-30 19:01:45 +05:30
Abhishek Kondur b1f348e71d NM-288: populate relevant name for acl types for UI (#3941)
* fix(go): set persistent keep alive when registering host using sso;

* fix(go): run posture check violations on delete;

* fix(go): upsert node on approving pending host;

* fix(go): resolve concurrency issues during group delete cleanup;

* fix(go): update doc links;

* fix(go): add created and updated fields to host;

* fix(go): skip delete and update superadmin on sync users;

* fix(go): use conn directly for now;

* fix(go): remove acl for idp groups;

* fix(go): quote fields;

* fix(go): use filters with count;

* feat(go): add a search query;

* fix(go): cleanup acls;

* fix(go): review fixes;

* fix(go): remove additional loop;

* fix(go): fix

* v1.5.1: separate out idp sync and reset signals for HA

* v1.5.1: add grps with name for logging

* v1.5.1: clear posture check violations when all checks are deleted

* v1.5.1: set static when default host

* v1.5.1: fix db status check

* rm set max conns

* v1.5.1: reset auto assigned gw when disconnected

* fix(go): skip global network admin and user groups when splitting;

* v1.5.1: fix update node call from client

* fix(go): separate out migration from normal usage;

* fix(go): skip default groups;

* fix(go): create policies for existing groups on network create;

* fix(go): skip fatal log on clickhouse conn;

* fix(go): add posture check cleanup;

* NM-288: populate relevant name for acl types for UI

* NM-288: populate grp names for posture check apis

* NM-228: add network grps api

* NM-288: add network users api

* now check each group's NetworkRoles for either the specific network ID or schema.AllNetworks (all_networks)

* NM-288: check and unassign auto gw when node is disconnected from cli

* NM-288: optimise network users api call

* NM-288: block auto assign when set to use inet gw

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
2026-03-30 19:01:26 +05:30
abhishek9686 4fe4381875 NM-288: block auto assign when set to use inet gw 2026-03-30 16:41:07 +05:30
abhishek9686 9925de4dd7 NM-288: optimise network users api call 2026-03-30 15:37:46 +05:30
abhishek9686 42fdda9c9a NM-288: check and unassign auto gw when node is disconnected from cli 2026-03-30 15:36:03 +05:30
abhishek9686 e0d9e15e7d now check each group's NetworkRoles for either the specific network ID or schema.AllNetworks (all_networks) 2026-03-30 10:23:20 +05:30
abhishek9686 76e64200f1 now check each group's NetworkRoles for either the specific network ID or schema.AllNetworks (all_networks) 2026-03-30 10:22:49 +05:30
Abhishek Kondur 29a5a3760b Merge branch 'develop' into NM-288 2026-03-28 01:09:24 +05:30
Abhishek Kondur 12cc967ba1 Fixes/v1.5.1 (#3938)
* fix(go): set persistent keep alive when registering host using sso;

* fix(go): run posture check violations on delete;

* fix(go): upsert node on approving pending host;

* fix(go): resolve concurrency issues during group delete cleanup;

* fix(go): update doc links;

* fix(go): add created and updated fields to host;

* fix(go): skip delete and update superadmin on sync users;

* fix(go): use conn directly for now;

* fix(go): remove acl for idp groups;

* fix(go): quote fields;

* fix(go): use filters with count;

* feat(go): add a search query;

* fix(go): cleanup acls;

* fix(go): review fixes;

* fix(go): remove additional loop;

* fix(go): fix

* v1.5.1: separate out idp sync and reset signals for HA

* v1.5.1: add grps with name for logging

* v1.5.1: clear posture check violations when all checks are deleted

* v1.5.1: set static when default host

* v1.5.1: fix db status check

* rm set max conns

* v1.5.1: reset auto assigned gw when disconnected

* fix(go): skip global network admin and user groups when splitting;

* v1.5.1: fix update node call from client

* fix(go): separate out migration from normal usage;

* fix(go): skip default groups;

* fix(go): create policies for existing groups on network create;

* fix(go): skip fatal log on clickhouse conn;

* fix(go): add posture check cleanup;

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
2026-03-28 01:08:59 +05:30
abhishek9686 9f3894c1ed NM-288: add network users api 2026-03-28 01:06:31 +05:30
abhishek9686 813d7841bf NM-228: add network grps api 2026-03-27 19:14:08 +05:30
abhishek9686 7d2d7daf3a NM-288: populate grp names for posture check apis 2026-03-27 18:59:08 +05:30
abhishek9686 6437429a34 NM-288: populate relevant name for acl types for UI 2026-03-27 18:20:05 +05:30
VishalDalwadi fe8281d4f4 fix(go): add posture check cleanup; 2026-03-27 16:45:43 +05:30
VishalDalwadi 6ad14093d2 fix(go): skip fatal log on clickhouse conn; 2026-03-27 15:49:27 +05:30
VishalDalwadi 87849ff443 Merge branch 'fixes/v1.5.1' of https://github.com/gravitl/netmaker into fixes/v1.5.1 2026-03-27 13:55:28 +05:30
VishalDalwadi ab9feec1d2 fix(go): create policies for existing groups on network create; 2026-03-27 13:43:06 +05:30
VishalDalwadi 5b7bde1fd9 fix(go): skip default groups; 2026-03-27 12:52:59 +05:30
VishalDalwadi fb2786d47d fix(go): separate out migration from normal usage; 2026-03-27 12:33:07 +05:30
abhishek9686 5d8135d07d v1.5.1: fix update node call from client 2026-03-27 12:03:58 +05:30
VishalDalwadi a1e7603fe0 fix(go): skip global network admin and user groups when splitting; 2026-03-27 11:39:53 +05:30
abhishek9686 fe9878053f v1.5.1: reset auto assigned gw when disconnected 2026-03-27 11:38:40 +05:30
abhishek9686 5bbc301ae0 rm set max conns 2026-03-27 09:45:59 +05:30
abhishek9686 ea4f1eb9e1 v1.5.1: fix db status check 2026-03-27 09:32:44 +05:30
abhishek9686 11751f5217 v1.5.1: set static when default host 2026-03-26 23:13:18 +05:30
abhishek9686 9988287942 v1.5.1: clear posture check violations when all checks are deleted 2026-03-26 23:12:55 +05:30
abhishek9686 316f82d4f6 v1.5.1: add grps with name for logging 2026-03-26 22:51:46 +05:30