Commit graph

25 commits

Author SHA1 Message Date
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
abhishek9686
715ed23553 remove default value on dns domain 2024-12-18 23:07:37 +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
Max Ma
5c15f3d9eb
NET-1603: Manage DNS NM changes (#3124)
* add switch for manage dns

* manage DNS sync publish

* add dns sync api

* add manageDNS field in peerUpdate

* add default dns for extClent if manage dns enabled

* add DEFAULT_DOMAIN for internal DNS lookup

* move DNSSync to peerUpdate

* fix empty host in network issue

* sync up dns when custom dns add/delete

* fix custom DNS ip4/ipv6 validator issue
2024-10-29 13:53:45 +04:00
Sayan Mallick
c551c487ca
New Docs (#3034)
* New Docs

CSS update and Dockerfile to include docs folder

flash of unrendered text fix

markdown docs

ignore docs/docs.go

improving the docs generation

github actions for docs generation

go runner version fix

updated docs.yml

update repo action updated

updated actions and dns docs

dns complete

More docs update

Complete docs and updated workflow

Update documentation Tue Aug  6 11:17:42 UTC 2024

Update documentation Thu Aug  8 12:26:57 UTC 2024

clean up

clean up

Dockerfile clean up

Updated workflow

Updated workflow

Update docs.yml

Update docs.yml

* requested changes

* changed ingress gateway to remote access gateway
2024-08-15 11:55:01 +05:30
Abhishek K
7e3bf3baea
NET-812: Deprecate Setting /etc/hosts entries (#2733)
* deprecate setting etc host dns entries, set coredns entries at neccessary places

* remove dns mq topics

* only set dns when set on

* add extcleints dns entries to coredns

* fix static checks

* run coredns with host network mode

* add bind address to coredns container
2023-12-20 10:24:53 +04:00
Matthew R Kasun
876778a1cc
open api spec file (#2595)
* remove usergroup

* superadmin

* superadmin creation

* generate openapi spec file

* statticcheck

* review comments
2023-10-04 10:26:38 +04:00
Abhishek K
719e0c254d
NET-551: User Mgmt Re-Design (#2547)
* add superadmin role, apis to create superadmin user

* apis to attach and remove user from remote access gateways

* add api to list user's remote client has gateway clients

* remove code related user groups

* remove networks and groups from user model

* refactor user CRUD operations

* fix network permission test

* add superadmin to authorize func

* remove user network and groups from cli

* api to transfer superadmin role

* add api to list users on a ingress gw

* restrict user access to resources on server

* deny request from remote access client if extclient is already created

* fix user tests

* fix static checks

* fix static checks

* add limits to extclient create handler

* set username to superadmin on if masterkey is used

* allow creation of extclients using masterkey

* add migration func to assign superadmin role for existing admin user

* check for superadmin on migration if users are present

* allowe masterkey to extcleint apis

* check ownerid

* format error, on jwt token verification failure return unauthorized rather than forbidden

* user update fix

* move user remote functionality to ee

* fix update user api

* security patch

* initalise ee user handlers

* allow user to use master key to update any user

* use slog

* fix auth user test

* table headers

* remove user role, it's covered in middleware

* setuser defaults fix
2023-09-01 14:27:08 +05:30
walkerwmanuel
9e56135424 Added user sorting and fixed error 2023-04-03 14:36:38 -04:00
walkerwmanuel
09872e9ec5 added sort logic 2023-03-30 16:04:12 -04:00
Matthew R Kasun
b9accde5b2 ensure publish dns in go routine 2023-02-07 15:17:11 -05:00
Matthew R Kasun
dbad8ac463 publish dns update on custom dns deletion 2023-02-07 15:17:11 -05:00
Matthew R Kasun
4f7c038702 publish dns update on custom dns creation 2023-02-07 15:17:11 -05:00
0xdcarns
f66ba5277e re-enabled tests 2023-01-20 17:38:32 -05:00
Abhishek Kondur
9b1d8b1d89 remove parameters from mq peer msg 2023-01-10 10:49:15 +05:30
Matthew R. Kasun
8bfe255eab Merge remote-tracking branch 'origin/develop' into netclient_refactor_latest
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2023-01-04 14:16:12 -05:00
walkerwmanuel
6611941ca2 Replaced string methods with HTTP consts 2022-12-23 09:49:08 -05:00
Matthew R. Kasun
38cd4d7700 refactor join
also removes server node
suspect there may be issues with proxy
and UI interactions with nodes
2022-12-20 15:29:09 -05:00
afeiszli
b670755cce refactoring for ee 2022-09-14 13:26:31 -04:00
cameronts
661290c84d Update swagger docs 2022-09-10 21:51:59 -07:00
cameronts
cb23b871dd Added swagger for API docs. 2022-09-06 05:20:24 -07:00
Abhishek Kondur
87db489b1a GRA-414: added additional logs for dns controllers 2022-07-12 19:41:46 +04:00
Matthew R. Kasun
e5a59d7081 add bool to control update to node 2022-07-07 05:52:43 -04:00
0xdcarns
c0be77a7f3 added logic to propogate DNS updates on custom entry 2022-04-28 15:32:21 -04:00
0xdcarns
0c6c09caa9 organized http logic, renamed files 2021-12-07 12:46:55 -05:00