netmaker/logic
Abhishek K 309e4795a1
NET-1950: Persist Server Settings in the DB (#3419)
* feat: api access tokens

* revoke all user tokens

* redefine access token api routes, add auto egress option to enrollment keys

* add server settings apis, add db table for settigs

* handle server settings updates

* switch to using settings from DB

* fix sever settings migration

* revet force migration for settings

* fix server settings database write

* fix revoked tokens to be unauthorized

* remove unused functions

* convert access token to sql schema

* switch access token to sql schema

* fix merge conflicts

* fix server settings types

* bypass basic auth setting for super admin

* add TODO comment

* publish peer update on settings update

* chore(go): import style changes from migration branch;

1. Singular file names for table schema.
2. No table name method.
3. Use .Model instead of .Table.
4. No unnecessary tagging.

* remove nat check on egress gateway request

* Revert "remove nat check on egress gateway request"

This reverts commit 0aff12a189.

* feat(go): add db middleware;

* feat(go): restore method;

* feat(go): add user access token schema;

* fix user auth api:

* re initalise oauth and email config

* set verbosity

* sync auto update settings with hosts

* sync auto update settings with hosts

* mask secret and convert jwt duration to minutes

* convert jwt duration to minutes

* notify peers after settings update

* compare with curr settings before updating

* send host update to devices on auto update

---------

Co-authored-by: Vishal Dalwadi <dalwadivishal26@gmail.com>
2025-04-30 02:34:10 +04:00
..
acls NET-1778: scale test code changes (#3203) 2024-12-10 10:15:31 +04:00
hostactions moved data structure to db 2023-03-03 14:23:51 -05:00
pro/netcache NET-1941: failover signaling optimized, new endpoint for metrics peer info (#3322) 2025-02-14 16:06:26 +04:00
acls.go check if node is getting failedovered 2025-04-22 12:58:47 +04:00
auth.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
clients.go fix extclient allowed Ips 2024-10-29 22:57:58 +04:00
dns.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
enrollmentkey.go NET-2000: Api access tokens (#3418) 2025-04-23 20:21:42 +04:00
enrollmentkey_test.go NET-2000: Api access tokens (#3418) 2025-04-23 20:21:42 +04:00
errors.go NET-1082: Scale Testing Fixes (#2894) 2024-04-11 21:18:57 +05:30
extpeers.go resolve merge conflicts 2025-03-28 16:14:07 +04:00
gateway.go fix create gateway req 2025-04-03 21:47:41 +04:00
host_test.go NET-447: Removed proxy related fields and code (#2459) 2023-07-26 11:22:49 +05:30
hosts.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
jwts.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
legacy.go added ability to remove legacy nodes 2023-03-07 11:02:51 -05:00
metrics.go [NET-546] Move ee code to ee package, unify ee status and terminology (#2538) 2023-09-01 07:42:05 +05:30
networks.go NET-2000: Api access tokens (#3418) 2025-04-23 20:21:42 +04:00
nodes.go set last checkin when registered 2025-03-29 02:10:30 +04:00
nodes_test.go NET-1288:add egress range check with netmaker network address (#2978) 2024-07-05 15:53:46 +05:30
peers.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
proc.go NET-1778: scale test code changes (#3203) 2024-12-10 10:15:31 +04:00
relay.go NET-1914: add gw apis, move relays into CE (#3309) 2025-01-28 11:28:31 +05:30
security.go remove query unescape usage 2024-09-29 16:00:38 +04:00
server.go NET-725: Failovers (#2685) 2023-11-29 20:10:07 +04:00
serverconf.go fix(NET-1175): use default trial end date 2024-05-03 12:52:55 +00:00
settings.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
status.go NET-1956: Async Node Status API (#3341) 2025-02-24 08:48:24 +03:00
tags.go Net 1990 (#3386) 2025-03-25 00:42:14 +04:00
telemetry.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
timer.go add trial license logic 2024-01-19 14:51:51 +05:30
traffic.go add trial license logic 2024-01-19 14:51:51 +05:30
user_mgmt.go NET-1950: Persist Server Settings in the DB (#3419) 2025-04-30 02:34:10 +04:00
users.go user roles and groups migration 2024-10-31 11:58:54 +04:00
util.go NET-2000: Api access tokens (#3418) 2025-04-23 20:21:42 +04:00
util_test.go random string 2023-05-02 13:28:00 -04:00
version.go chore: fix some comments (#2918) 2024-05-08 12:17:23 +05:30
version_test.go chore: fix some comments (#2918) 2024-05-08 12:17:23 +05:30
wireguard.go [NET-562] Persistent Keep Alive from node to host (#2604) 2023-10-06 10:09:19 +04:00
zombie.go remove pending delete nodes 2025-03-31 19:05:47 +04:00