Commit Graph

420 Commits

Author SHA1 Message Date
Abhishek Kondur e149f8e582 Merge pull request #3930 from gravitl/master
Master
2026-03-23 14:50:13 +05:30
Abhishek Kondur 79c56b0c1c NM-273: Vnat pool assignments fix (#3926)
* NM-273: Vnat pool assignments fix

* NM-273: rename var

* NM-273: add 2 vCPUs indication for monitoring stack
2026-03-20 08:10:16 +05:30
Abhishek Kondur 2645abdd43 NM-278: skip autoupdate evaluation on join (#3922) 2026-03-19 07:58:36 +05:30
Vishal Dalwadi 930b1aaa74 fix(go): use upn for pending user azure-ad; (#3924) 2026-03-18 17:56:01 +05:30
Abhishek Kondur 292af315dd NM-271: Scalability Improvements (#3921)
* feat(go): add user schema;

* feat(go): migrate to user schema;

* feat(go): add audit fields;

* feat(go): remove unused fields from the network model;

* feat(go): add network schema;

* feat(go): migrate to network schema;

* refactor(go): add comment to clarify migration logic;

* fix(go): test failures;

* fix(go): test failures;

* feat(go): change membership table to store memberships at all scopes;

* feat(go): add schema for access grants;

* feat(go): remove nameservers from new networks table; ensure db passed for schema functions;

* feat(go): set max conns for sqlite to 1;

* fix(go): issues updating user account status;

* NM-236: streamline operations in HA mode

* NM-236: only master pod should subscribe to updates from clients

* refactor(go): remove converters and access grants;

* refactor(go): add json tags in schema models;

* refactor(go): rename file to migrate_v1_6_0.go;

* refactor(go): add user groups and user roles tables; use schema tables;

* refactor(go): inline get and list from schema package;

* refactor(go): inline get network and list users from schema package;

* fix(go): staticcheck issues;

* fix(go): remove test not in use; fix test case;

* fix(go): validate network;

* fix(go): resolve static checks;

* fix(go): new models errors;

* fix(go): test errors;

* fix(go): handle no records;

* fix(go): add validations for user object;

* fix(go): set correct extclient status;

* fix(go): test error;

* feat(go): make schema the base package;

* feat(go): add host schema;

* feat(go): use schema host everywhere;

* feat(go): inline get host, list hosts and delete host;

* feat(go): use non-ptr value;

* feat(go): use save to upsert all fields;

* feat(go): use save to upsert all fields;

* feat(go): save turn endpoint as string;

* feat(go): check for gorm error record not found;

* fix(go): test failures;

* fix(go): update all network fields;

* fix(go): update all network fields;

* feat(go): add paginated list networks api;

* feat(go): add paginated list users api;

* feat(go): add paginated list hosts api;

* feat(go): add pagination to list groups api;

* fix(go): comment;

* fix(go): implement marshal and unmarshal text for custom types;

* fix(go): implement marshal and unmarshal json for custom types;

* fix(go): just use the old model for unmarshalling;

* fix(go): implement marshal and unmarshal json for custom types;

* NM-271:Import swap: compress/gzip replaced with github.com/klauspost/compress/gzip (2-4x faster, wire-compatible output). Added sync import.
Two sync.Pool variables (gzipWriterPool, bufferPool): reuse gzip.Writer and bytes.Buffer across calls instead of allocating fresh ones per publish.
compressPayload rewritten: pulls writer + buffer from pools, resets them, compresses at gzip.BestSpeed (level 1), copies the result out of the pooled buffer, and returns both objects to the pools.

* feat(go): remove paginated list networks api;

* feat(go): use custom paginated response object;

* NM-271: Improve server scalability under high host count

- Replace stdlib compress/gzip with klauspost/compress at BestSpeed and
  pool gzip writers and buffers via sync.Pool to eliminate compression
  as the dominant CPU hotspot.

- Debounce peer update broadcasts with a 500ms resettable window capped
  at 3s max-wait, coalescing rapid-fire PublishPeerUpdate calls into a
  single broadcast cycle.

- Cache HostPeerInfo (batch-refreshed by debounce worker) and
  HostPeerUpdate (stored as side-effect of each publish) so the pull API
  and peer_info API serve from pre-computed maps instead of triggering
  expensive per-host computations under thundering herd conditions.

- Warm both caches synchronously at startup before the first publish
  cycle so early pull requests are served instantly.

- Bound concurrent MQTT publishes to 5 via semaphore to prevent
  broker TCP buffer overflows that caused broken pipe disconnects.

- Remove manual Disconnect+SetupMQTT from ConnectionLostHandler and
  rely on the paho client's built-in AutoReconnect; add a 5s retry
  wait in publish() to ride out brief reconnection windows.

* NM-271: Reduce server CPU contention under high concurrent load

- Cache ServerSettings with atomic.Value to eliminate repeated DB reads
  on every pull request (was 32+ goroutines blocked on read lock)
- Batch UpdateNodeCheckin writes in memory, flush every 30s to reduce
  per-checkin write lock contention (was 88+ goroutines blocked)
- Enable SQLite WAL mode + busy_timeout and remove global dbMutex;
  let SQLite handle concurrency natively (reads no longer block writes)
- Move ResetFailedOverPeer/ResetAutoRelayedPeer to async in pull()
  handler since results don't affect the cached response
- Skip no-op UpsertNode writes in failover/relay reset functions
  (early return when node has no failover/relay state)
- Remove CheckHostPorts from hostUpdateFallback hot path
- Switch to pure-Go SQLite driver (glebarez/sqlite), set CGO_ENABLED=0

* fix(go): ensure default values for page and per_page are used when not passed;

* fix(go): rename v1.6.0 to v1.5.1;

* fix(go): check for gorm.ErrRecordNotFound instead of database.IsEmptyRecord;

* fix(go): use host id, not pending host id;

* NM-271: Revert pure-Go SQLite and FIPS disable to verify impact

Revert to CGO-based mattn/go-sqlite3 driver and re-enable FIPS to
isolate whether these changes are still needed now that the global
dbMutex has been removed and WAL mode is enabled. Keep WAL mode
pragma with mattn-compatible DSN format.

* feat(go): add filters to paginated apis;

* feat(go): add filters to paginated apis;

* feat(go): remove check for max username length;

* feat(go): add filters to count as well;

* feat(go): use library to check email address validity;

* feat(go): ignore pagination if params not passed;

* fix(go): pagination issues;

* fix(go): check exists before using;

* fix(go): remove debug log;

* NM-271: rm debug logs

* NM-271: check if caching is enabled

* NM-271: add server sync mq topic for HA mode

* NM-271: fix build

* NM-271: push metrics in batch to exproter over api

* NM-271: use basic auth for exporter metrics api

* fix(go): use gorm err record not found;

* NM-271: Add monitoring stack on demand

* NM-271: -m arg for install script should only add monitoring stack

* fix(go): use gorm err record not found;

* NM-271: update docker compose file for prometheus

* NM-271: update docker compose file for prometheus

* fix(go): use user principal name when creating pending user;

* fix(go): use schema package for consts;

* NM-236: rm duplicate network hook

* NM-271: add server topic to reset idp hooks on master node

* fix(go): prevent disabling superadmin user;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): swap is admin and is superadmin;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): remove dead code block;

https://github.com/gravitl/netmaker/pull/3910#discussion_r2928837937

* fix(go): incorrect message when trying to disable self;

https://github.com/gravitl/netmaker/pull/3910#discussion_r2928837934

* NM-271: fix stale peers on reset_failovered pull and add HTTP timeout to metrics exporter

Run the failover/relay reset synchronously in the pull handler so the
response reflects post-reset topology instead of serving stale cached
peers. Add a 30s timeout to the metrics exporter HTTP client to prevent
PushAllMetricsToExporter from blocking the Keepalive loop.

* NM-271: fix gzip pool corruption, MQTT topic mismatch, stale settings cache, and reduce redundant DB fetches

- Only return gzip.Writer to pool after successful Close to prevent
  silently malformed MQTT payloads from a previously errored writer.
- Fix serversync subscription to exact topic match since syncType is
  now in the message payload, not the topic path.
- Prevent zero-value ServerSettings from being cached indefinitely
  when the DB record is missing or unmarshal fails on startup.
- Return fetched hosts/nodes from RefreshHostPeerInfoCache so
  warmPeerCaches reuses them instead of querying the DB twice.
- Compute fresh HostPeerUpdate on reset_failovered pull instead of
  serving stale cache, and store result back for subsequent requests.

* NM-271: fix gzip writer pool leak, log checkin flush errors, and fix master pod ordinal parsing

- Reset gzip.Writer to io.Discard before returning to pool so errored
  writers are never leaked or silently reused with corrupt state.
- Track and log failed DB inserts in FlushNodeCheckins so operators
  have visibility when check-in timestamps are lost.
- Parse StatefulSet pod ordinal as integer instead of using HasSuffix
  to prevent netmaker-10 from being misidentified as master pod.

* NM-271: simplify masterpod logic

* fix(go): use correct header;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): return after error response;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): use correct order of params;

https://github.com/gravitl/netmaker/pull/3910#discussion_r2929593036

* fix(go): set default values for page and page size; use v2 instead of /list;

* NM-271: use host name

* Update mq/serversync.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* NM-271: fix duplicate serversynce case

* NM-271: streamline gw updates

* Update logic/auth.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* Update schema/user_roles.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): syntax error;

* fix(go): set default values when page and per_page are not passed or 0;

* fix(go): use uuid.parse instead of uuid.must parse;

* fix(go): review errors;

* fix(go): review errors;

* Update controllers/user.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* Update controllers/user.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* NM-163: fix errors:

* Update db/types/options.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): persist return user in event;

* Update db/types/options.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* NM-271: signal pull on ip changes

* NM-163: duplicate lines of code

* NM-163: fix(go): fix missing return and filter parsing in user controller

- Add missing return after error response in updateUserAccountStatus
  to prevent double-response and spurious ext-client side-effects
- Use switch statements in listUsers to skip unrecognized
  account_status and mfa_status filter values

* NM-271: signal pull req on node ip change

* fix(go): check for both min and max page size;

* NM-271: refresh node object before update

* fix(go): enclose transfer superadmin in transaction;

* fix(go): review errors;

* fix(go): remove free tier checks;

* fix(go): review fixes;

* NM-271: streamline ip pool ops

* NM-271: fix tests, set max idle conns

* NM-271: fix(go): fix data races in settings cache and peer update worker

- Use pointer type in atomic.Value for serverSettingsCache to avoid
  replacing the variable non-atomically in InvalidateServerSettingsCache
- Swap peerUpdateReplace flag before draining the channel to prevent
  a concurrent replacePeers=true from being consumed by the wrong cycle

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>
2026-03-18 00:24:54 +05:30
Abhishek Kondur edda2868fc NM-163: Users, Groups, Roles, Networks and Hosts Table Migration (#3910)
* feat(go): add user schema;

* feat(go): migrate to user schema;

* feat(go): add audit fields;

* feat(go): remove unused fields from the network model;

* feat(go): add network schema;

* feat(go): migrate to network schema;

* refactor(go): add comment to clarify migration logic;

* fix(go): test failures;

* fix(go): test failures;

* feat(go): change membership table to store memberships at all scopes;

* feat(go): add schema for access grants;

* feat(go): remove nameservers from new networks table; ensure db passed for schema functions;

* feat(go): set max conns for sqlite to 1;

* fix(go): issues updating user account status;

* refactor(go): remove converters and access grants;

* refactor(go): add json tags in schema models;

* refactor(go): rename file to migrate_v1_6_0.go;

* refactor(go): add user groups and user roles tables; use schema tables;

* refactor(go): inline get and list from schema package;

* refactor(go): inline get network and list users from schema package;

* fix(go): staticcheck issues;

* fix(go): remove test not in use; fix test case;

* fix(go): validate network;

* fix(go): resolve static checks;

* fix(go): new models errors;

* fix(go): test errors;

* fix(go): handle no records;

* fix(go): add validations for user object;

* fix(go): set correct extclient status;

* fix(go): test error;

* feat(go): make schema the base package;

* feat(go): add host schema;

* feat(go): use schema host everywhere;

* feat(go): inline get host, list hosts and delete host;

* feat(go): use non-ptr value;

* feat(go): use save to upsert all fields;

* feat(go): use save to upsert all fields;

* feat(go): save turn endpoint as string;

* feat(go): check for gorm error record not found;

* fix(go): test failures;

* fix(go): update all network fields;

* fix(go): update all network fields;

* feat(go): add paginated list networks api;

* feat(go): add paginated list users api;

* feat(go): add paginated list hosts api;

* feat(go): add pagination to list groups api;

* fix(go): comment;

* fix(go): implement marshal and unmarshal text for custom types;

* fix(go): implement marshal and unmarshal json for custom types;

* fix(go): just use the old model for unmarshalling;

* fix(go): implement marshal and unmarshal json for custom types;

* feat(go): remove paginated list networks api;

* feat(go): use custom paginated response object;

* fix(go): ensure default values for page and per_page are used when not passed;

* fix(go): rename v1.6.0 to v1.5.1;

* fix(go): check for gorm.ErrRecordNotFound instead of database.IsEmptyRecord;

* fix(go): use host id, not pending host id;

* feat(go): add filters to paginated apis;

* feat(go): add filters to paginated apis;

* feat(go): remove check for max username length;

* feat(go): add filters to count as well;

* feat(go): use library to check email address validity;

* feat(go): ignore pagination if params not passed;

* fix(go): pagination issues;

* fix(go): check exists before using;

* fix(go): remove debug log;

* fix(go): use gorm err record not found;

* fix(go): use gorm err record not found;

* fix(go): use user principal name when creating pending user;

* fix(go): use schema package for consts;

* fix(go): prevent disabling superadmin user;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): swap is admin and is superadmin;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): remove dead code block;

https://github.com/gravitl/netmaker/pull/3910#discussion_r2928837937

* fix(go): incorrect message when trying to disable self;

https://github.com/gravitl/netmaker/pull/3910#discussion_r2928837934

* fix(go): use correct header;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): return after error response;

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): use correct order of params;

https://github.com/gravitl/netmaker/pull/3910#discussion_r2929593036

* fix(go): set default values for page and page size; use v2 instead of /list;

* Update logic/auth.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* Update schema/user_roles.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): syntax error;

* fix(go): set default values when page and per_page are not passed or 0;

* fix(go): use uuid.parse instead of uuid.must parse;

* fix(go): review errors;

* fix(go): review errors;

* Update controllers/user.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* Update controllers/user.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* NM-163: fix errors:

* Update db/types/options.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* fix(go): persist return user in event;

* Update db/types/options.go

Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>

* NM-163: duplicate lines of code

* NM-163: fix(go): fix missing return and filter parsing in user controller

- Add missing return after error response in updateUserAccountStatus
  to prevent double-response and spurious ext-client side-effects
- Use switch statements in listUsers to skip unrecognized
  account_status and mfa_status filter values

* fix(go): check for both min and max page size;

* fix(go): enclose transfer superadmin in transaction;

* fix(go): review errors;

* fix(go): remove free tier checks;

* fix(go): review fixes;

---------

Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Vishal Dalwadi <51291657+VishalDalwadi@users.noreply.github.com>
Co-authored-by: tenki-reviewer[bot] <262613592+tenki-reviewer[bot]@users.noreply.github.com>
2026-03-17 19:36:52 +05:30
Vishal Dalwadi 0babc4a690 feat(go): prevent access for sync-ed idp groups by default; (#3898) 2026-03-16 09:15:22 +05:30
Vishal Dalwadi dd96135e78 fix(go): reset okta-specific settings on remove idp integration; (#3912) 2026-03-13 12:11:47 +05:30
VishalDalwadi 64ef61f711 fix(go): use database name from config; 2026-03-05 11:44:49 +05:30
Abhishek Kondur 6552ae8167 Merge branch 'release-v1.5.0' into NM-258 2026-03-03 13:29:41 +04:00
abhishek9686 8e53267dd0 NM-259: update saas nmui links 2026-03-02 15:15:09 +04:00
abhishek9686 49edfaf94e v1.5.0: update jit approval link on saas 2026-03-02 15:10:49 +04:00
Abhishek Kondur b5e6ca3e4c Merge pull request #3878 from gravitl/NM-256-v1.5.0-patch
v1.5.0: DB optimisations, Add Postgresql connection pool limits, add SSO cache cleanup hook
2026-02-27 13:51:16 +04:00
VishalDalwadi 24bcea4d5a fix(go): remove query unescape; 2026-02-26 22:20:24 +05:30
VishalDalwadi 0a76d6ce75 feat(go): add check for whether domain is ad domain; 2026-02-24 20:14:40 +05:30
abhishek9686 5309aa70d4 NM-258: fix host authrize func, check for token validity 2026-02-24 00:51:15 +04:00
VishalDalwadi 582d9b97da feat(go): pass nameservers to netdesk; 2026-02-23 14:00:47 +04:00
VishalDalwadi 31e804b47a feat(go): pass nameservers to netdesk; 2026-02-23 13:57:03 +04:00
abhishek9686 ad3af6ee7c NM-256: fix DB performance degradation with large user base and Entra IDP
- Replace full table scan in FetchRecord with indexed single-key lookup
      (SELECT WHERE key = ?) for PostgreSQL, SQLite, and RQLite backends
    - Add in-memory user cache (gated behind CACHING_ENABLED) to eliminate
      DB round-trips on the auth hot path (GetUser called per API request)
    - Configure PostgreSQL connection pool limits (max open/idle conns,
      conn lifetime) to prevent connection churn under load
    - Add periodic cleanup of expired SSO state entries to prevent
      unbounded table growth
    - Route GitHub OAuth user rename through standard logic functions
      to keep user cache consistent
2026-02-23 13:56:50 +04:00
abhishek9686 cc0982e456 v1.5.0: remove duration field 2026-02-18 16:00:54 +04:00
abhishek9686 1f340641cb v1.5.0: allow network admins to approve/deny jit reqs 2026-02-18 15:59:19 +04:00
abhishek9686 b7ab4d23d7 v1.5.0: add revoked by to email template 2026-02-18 14:59:21 +04:00
abhishek9686 02804e1678 v1.5.0: show approved by in the email 2026-02-18 14:33:25 +04:00
abhishek9686 86324bcb65 v1.5.0: jit denied email 2026-02-18 13:50:08 +04:00
abhishek9686 ce2b38e981 v1.5.0: fix jit email duplication 2026-02-18 00:43:32 +04:00
Abhishek Kondur 2f9c7a43ab Merge pull request #3864 from gravitl/patch/icons
Set correct icon links
2026-02-13 00:28:42 +04:00
abhishek9686 65ca370ec0 Merge branch 'release-v1.5.0' of https://github.com/gravitl/netmaker into v1.5.0-fixes 2026-02-12 18:00:35 +04:00
abhishek9686 13fda5afa8 remove default feature flags 2026-02-12 17:30:44 +04:00
abhishek9686 787a00b96d v1.5.0: fix user activity permissions, fix removing nodes from egress models 2026-02-12 17:21:05 +04:00
VishalDalwadi 61680d19dc fix(go): set correct links; 2026-02-12 14:59:28 +05:30
Abhishek Kondur 9b4f9a4a50 NM-240: update api swagger docs (#3861)
* NM-240: update api swagger docs

* NM-240: remove api doc for debug api

* NM-240: generate swagger

* NM-240: remove deprecated and unused apis, update jit models

* NM-240: deprecate ununsed apis from api docs
2026-02-11 10:03:28 +04:00
Abhishek Kondur e475c1d57d NM-209: allow darwin clients to use inetgw, update email templates to use logo in png format (#3860)
* NM-209: allow darwin clients to use inetgw

* update email templates to use logo in png format

* NM-209: fix email logo

* NM-209: add spacing
2026-02-11 01:39:32 +04:00
Abhishek Kondur b935e3795a NM-228: add middleware checks for activity logs, remove all users get… (#3853)
* NM-228: add middleware checks for activity logs, remove all users get access platform users

* NM-228: fix middleware checks for platform users

* NM-228: add middleware check for user activity
2026-02-10 21:13:55 +04:00
Vishal Dalwadi 768fcc938d Fixes: V1.5.0 Don't store default domain in dns record (#3849)
* fix(go): send match domains and search domains for igws;

* fix(go): use correct datatypes for coordinates;

* fix(go): don't store default domain in dns record;

* feat(go): remove back to login button;

* feat(go): update images;
2026-02-09 14:50:08 +04:00
Vishal Dalwadi 743c3924b0 feat(go): let users control match all nameservers; (#3851) 2026-02-09 14:49:44 +04:00
Abhishek Kondur c3778a3e17 NM-213: add pagination to jit list reqs (#3832) 2026-02-05 21:48:19 +04:00
Vishal Dalwadi 21239a5ccd Merge pull request #3842 from gravitl/fixes-v1.5.0
Fixes: V1.5.0
2026-02-05 14:56:00 +04:00
abhishek9686 82d3cf133c v1.4.0: resolve merge conflicts 2026-02-04 13:10:32 +04:00
Vishal Dalwadi f723fc5202 NM-214: Expect GeoInfo to come from Netclient (#3833)
* feat(go): expect geoinfo from netclient;

* feat(go): add geoinfo util;
2026-02-02 14:14:49 +04:00
Seena Fallah 635d47ec3d swagger: make swagger file validated (#3711)
* swagger: make swagger file validated

add missing params and add the validation in ci.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* network: return json on success network deletion

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* swagger: fix pro controllers annotations

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2026-01-31 12:19:19 +04:00
Abhishek Kondur c2423bf20b NM-213: JIT Network Access (#3830)
* NM-213: JIT access

* NM-213: handle expiry duration in epoch

* NM-213: avoid jit checks for admins

* NM-213: add jit expiry field to extclient

* NM-213: format jit emails

* NM-213: format jit email templates

* NM-213: update jit expiry on existing clients

* NM-213: update jit expiry on existing clients
2026-01-31 11:45:16 +04:00
dependabot[bot] a9c9ad9807 Build(deps): bump google.golang.org/api from 0.253.0 to 0.258.0 (#3801)
* Build(deps): bump google.golang.org/api from 0.253.0 to 0.258.0

Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.253.0 to 0.258.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.253.0...v0.258.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-version: 0.258.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix(go): static check failing;

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: VishalDalwadi <dalwadivishal26@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2026-01-29 14:42:36 +04:00
Abhishek Kondur a51649a1df NM-205: Overlapping egress ranges (#3820)
* NM-205: init virtual NAT for egress ranges

* NM-205: add virtual NAT to egress peer update model

* NM-205: add virtual nat to allowed ips if present

* NM-205: fix create api, update nat fields

* NM-205: fix virtual nat range assignment

* NM-210: use virtual ranges for allowed ips for egress ips

* NM-205: allows update of nat settings

* NM-205: fix migration of egress virtual ranges

* NM-205: fix update operations

* NM-205: if domain range is set,overiride nat setting to direct

* NM-205: validate NAT pool fields on net update, add nat mode egress metric range struct

* NM-205: fix nat egress range

* NM-205: add virtual egress ranges to extclient allowed Ips

* NM-205: add overlapping egress ranges

* NM-205: match egress cidr for virtual nat if less than prefix length

* NM-205: match egress cidr for virtual nat if less than prefix length

* NM-205: force update overlapping egress feature flag

* NM-205: disable virtual nat for ipv6

* NM-205: simplify egress update ops

* NM-205: fix tests

* NM-205: NAT pool update with prefix length validation

* NM-205: send virtual egress ranges for non egress nodes

* NM-205: assign virtual NAT on creation
2026-01-29 14:36:52 +04:00
Vishal Dalwadi d476e79278 NM-220: Flow Logs Improvements (#3812)
* feat(go): add name to src and dst info;

* feat(go): populate names to share with netclient;

* feat(go): add hostname to flow event;
2026-01-28 09:05:51 +04:00
Vishal Dalwadi d8515f2ea9 feat(go): expect deployment mode on license validation; return deployment mode when reporting tenant status; (#3809) 2026-01-26 15:10:31 +04:00
Vishal Dalwadi c2fcd5d1f0 feat(go): set app name header from query param; (#3821) 2026-01-26 15:08:07 +04:00
Vishal Dalwadi 7673fa5508 Merge pull request #3822 from gravitl/fix/netdesk-disabled-user-login
Fix: Netmaker Desktop Disable User Login
2026-01-26 15:07:42 +04:00
VishalDalwadi e4328ab546 feat(go): add global nameservers only if no match all nameserver configured; 2026-01-22 21:23:07 +05:30
Vishal Dalwadi 2062da5081 fix: construct a and-or clause instead of an and-and clause; (#3796) 2025-12-22 16:16:55 +04:00
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