Commit graph

158 commits

Author SHA1 Message Date
Abhishek K
1924da2956
Net 1227 v1 (#3063)
* generalise smtp config

* copy over smtp vars

* env new line

* fix master key api access

* comment user tests

* fix network and user invite for master key access

* remove email sender type
2024-08-22 13:03:49 +05:30
Abhishek K
aa64e50374
Net 1227 (#3060)
* generalise smtp config

* copy over smtp vars

* env new line
2024-08-22 08:36:38 +05:30
Abhishek K
2e8d95e80e
NET-1227: User Mgmt V2 (#3055)
* user mgmt models

* define user roles

* define models for new user mgmt and groups

* oauth debug log

* initialize user role after db conn

* print oauth token in debug log

* user roles CRUD apis

* user groups CRUD Apis

* additional api checks

* add additional scopes

* add additional scopes url

* add additional scopes url

* rm additional scopes url

* setup middlleware permission checks

* integrate permission check into middleware

* integrate permission check into middleware

* check for headers for subjects

* refactor user role models

* refactor user groups models

* add new user to pending user via RAC login

* untracked

* allow multiple groups for an user

* change json tag

* add debug headers

* refer network controls form roles, add debug headers

* refer network controls form roles, add debug headers

* replace auth checks, add network id to role model

* nodes handler

* migration funcs

* invoke sync users migration func

* add debug logs

* comment middleware

* fix get all nodes api

* add debug logs

* fix middleware error nil check

* add new func to get username from jwt

* fix jwt parsing

* abort on error

* allow multiple network roles

* allow multiple network roles

* add migration func

* return err if jwt parsing fails

* set global check to true when accessing user apis

* set netid for acls api calls

* set netid for acls api calls

* update role and groups routes

* add validation checks

* add invite flow apis and magic links

* add invited user via oauth signup automatically

* create invited user on oauth signup, with groups in the invite

* add group validation for user invite

* update create user handler with new role mgmt

* add validation checks

* create user invites tables

* add error logging for email invite

* fix invite singup url

* debug log

* get query params from url

* get query params from url

* add query escape

* debug log

* debug log

* fix user signup via invite api

* set admin field for backward compatbility

* use new role id for user apis

* deprecate use of old admin fields

* deprecate usage of old user fields

* add user role as service user if empty

* setup email sender

* delete invite after user singup

* add plaform user role

* redirect on invite verification link

* fix invite redirect

* temporary redirect

* fix invite redirect

* point invite link to frontend

* fix query params lookup

* add resend support, configure email interface types

* fix groups and user creation

* validate user groups, add check for metrics api in middleware

* add invite url to invite model

* migrate rac apis to new user mgmt

* handle network nodes

* add platform user to default role

* fix user role migration

* add default on rag creation and cleanup after deletion

* fix rac apis

* change to invite code param

* filter nodes and hosts based on user network access

* extend create user group req to accomodate users

* filter network based on user access

* format oauth error

* move user roles and groups

* fix get user v1 api

* move user mgmt func to pro

* add user auth type to user model

* fix roles init

* remove platform role from group object

* list only platform roles

* add network roles to invite req

* create default groups and roles

* fix middleware for global access

* create default role

* fix nodes filter with global network roles

* block selfupdate of groups and network roles

* delete netID if net roles are empty

* validate user roles nd groups on update

* set extclient permission scope when rag vpn access is set

* allow deletion of roles and groups

* replace _ with - in role naming convention

* fix failover middleware mgmt

* format oauth templates

* fetch route temaplate

* return err if user wrong login type

* check user groups on rac apis

* fix rac apis

* fix resp msg

* add validation checks for admin invite

* return oauth type

* format group err msg

* fix html tag

* clean up default groups

* create default rag role

* add UI name to roles

* remove default net group from user when deleted

* reorder migration funcs

* fix duplicacy of hosts

* check old field for migration

* from pro to ce make all secondary users admins

* from pro to ce make all secondary users admins

* revert: from pro to ce make all secondary users admins

* make sure downgrades work

* fix pending users approval

* fix duplicate hosts

* fix duplicate hosts entries

* fix cache reference issue

* feat: configure FRONTEND_URL during installation

* disable user vpn access when network roles are modified

* rm vpn acces when roles or groups are deleted

* add http to frontend url

* revert crypto version

* downgrade crytpo version

* add platform id check on user invites

---------

Co-authored-by: the_aceix <aceixsmartx@gmail.com>
2024-08-20 17:08:56 +05:30
Max Ma
1b86e80299
NET-1180: fix install issue for latest debian and centos distributions (#2921)
* fix install issue for Ubunut Fedora Centos Debian latest version

* fix install issue for rocky alma amazon suse latest version

* fix install issue for redhat latest version and misc dpkg command issues

* remove suse and add supported OS message

* change wireguard-tools package name and remove FreeBSD etc in the list

* add yum repo pacakge for centos8&7

* add sleep for nm-quick.sh to avoid failure
2024-05-08 12:15:09 +05:30
pwilson77
bd2cd00f9e fix: update nm-quick script to use create_remote_access_gateway 2024-04-30 16:09:49 +00:00
Abhishek K
dccb6b5da7
NET-1075: Endpoint detection server config (#2876)
* add config for endpoint detection

* add config to netmaker env file

* fix config value check for endpoint detection
2024-04-03 23:51:09 +05:30
Abhishek K
0d4552db5e
NET-1064: Oauth User SignUp Approval Flow (#2874)
* add pending users api

* insert user to pending users on first time oauth login

* add pending user check on headless login

* fix conflicting apis

* no records error

* add allowed emails domains for oauth singup to config

* check if user is allowed to signup
2024-04-03 11:20:19 +05:30
Abhishek K
3784efaa9b
Merge pull request #2863 from gravitl/master
master
2024-03-17 08:00:41 +07:00
the_aceix
ddb7879396 feat(NET-1034): add trial data to telemetry 2024-03-13 16:33:28 +00:00
Abhishek K
24c784a10c
NET-962: add semver check (#2854)
* add semver check

* indentation on if
2024-03-12 08:14:05 +07:00
abhishek9686
e220143ff3 make default host failover on install 2024-01-25 23:35:01 +05:30
abhishek9686
0e6881d42a fix pro setup link 2024-01-24 21:11:50 +05:30
abhishek9686
f35087bb04 fix pro setup link 2024-01-24 21:01:54 +05:30
abhishek9686
330c230ed7 fix upgrade and downgrade 2024-01-24 18:28:25 +05:30
abhishek9686
0298532920 fix upgrade and downgrade 2024-01-24 18:18:46 +05:30
abhishek9686
dc6ffe10d3 fix upgrade and downgrade 2024-01-24 18:14:40 +05:30
abhishek9686
69dd212a0f fix upgrade and downgrade 2024-01-24 18:08:10 +05:30
abhishek9686
2164797896 copy build tag 2024-01-24 18:02:26 +05:30
abhishek9686
4a0ec26217 get override files on upgrade 2024-01-24 17:51:15 +05:30
abhishek9686
f535722888 avoid pull new config on upgrade and downgrade 2024-01-24 17:25:55 +05:30
abhishek9686
c67571e0d0 on upgrade and downgrade of tier perisist image tag 2024-01-24 15:46:30 +05:30
abhishek9686
17a63928b6 image tag for testing 2024-01-23 16:41:28 +05:30
abhishek9686
1a17f4ea4d script fixes 2024-01-23 16:16:28 +05:30
abhishek9686
1e90772d9b rm overide file if present 2024-01-23 11:50:57 +05:30
abhishek9686
c2eb66243b rm overeride file if present 2024-01-23 11:47:57 +05:30
abhishek9686
b7e900f4bc turn of exporter only on upgrade 2024-01-23 11:44:51 +05:30
abhishek9686
a57c6691f8 turn of exporter only on upgrade 2024-01-23 11:42:29 +05:30
abhishek9686
13caec205b get pro override compose only on upgrade 2024-01-23 11:37:59 +05:30
abhishek9686
487c3f51b0 addtional logs in script 2024-01-23 09:08:08 +05:30
abhishek9686
96c6495585 check if netclient exists 2024-01-23 08:02:03 +05:30
abhishek9686
ce34a3f4cb more info log 2024-01-23 01:02:32 +05:30
abhishek9686
c16ea48bb4 fix script args 2024-01-23 00:55:55 +05:30
abhishek9686
dc953c73a8 fix script args 2024-01-23 00:53:02 +05:30
abhishek9686
cf9febba03 fix script args 2024-01-23 00:48:16 +05:30
abhishek9686
49c64ef95b save config only if values are not empty 2024-01-23 00:41:32 +05:30
abhishek9686
49641dff5a fix script args 2024-01-23 00:26:40 +05:30
abhishek9686
5b335fb762 add upgrade and downgrade options 2024-01-23 00:18:04 +05:30
abhishek9686
5b7d1709e5 remvove license input on pro in script 2024-01-19 15:07:14 +05:30
abhishek9686
abe7f4cf52 upgrade flag 2024-01-18 21:45:55 +05:30
abhishek9686
4dd9d35c81 cleanup script 2024-01-18 21:20:53 +05:30
abhishek9686
058338f372 tag enrollment key 2024-01-17 09:20:32 +05:30
Abhishek K
98c01c4325
NET-814: Deprecating TURN (#2723)
* deprecate turn

* process signals through mq
2023-12-13 22:46:57 +04:00
Abhishek K
916694b2cf
NET-664: Local Connections improvements (#2651)
* deprecate endpoint detection form config

* add peer network info to pull
2023-11-01 20:37:43 +04:00
Abhishek K
2662063c02
NET-686: bring up grafana,promethues containers for pro installation (#2637)
* bring up promethues and grafana containers

* rm nm-certs ref
2023-10-24 20:51:24 +04:00
Matthew R Kasun
35673d6aba
let caddy do certificate management (#2611)
* let caddy do certificate management

* rm certs dir
2023-10-06 10:13:49 +04:00
Aceix
bfc61fa359
session management for remote access client (#2592)
* feat(NET-584): wip: session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): only enable if client is disabled

* feat(NET-584): check only for normal users

* feat(NET-584): fix condition
2023-10-02 08:57:58 +04:00
Gabriel de Souza Seibel
1a1ba1ccf4
[NET-546] Move ee code to ee package, unify ee status and terminology (#2538)
* Move ee code to ee package and unify ee status to IsPro

* Consolidate naming for paid/professional/enterprise version as "pro". Notes:

- Changes image tags
- Changes build tags
- Changes package names
- Doesn't change links to docs that mention "ee"
- Doesn't change parameters sent to PostHog that mention "ee"

* Revert docker image tag being -pro, back to -ee

* Revert go build tag being pro, back to ee

* Add build tags for some ee content

* [2] Revert go build tag being pro, back to ee

* Fix test workflow

* Add a json tag to be backwards compatible with frontend "IsEE" check

* Add a json tag for the serverconfig struct for IsEE

* Ammend json tag to Is_EE

* fix ee tags

---------

Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2023-09-01 07:42:05 +05:30
bornav
7476da3368
[Feature]: nm-quick script tackling arm TODO support (#2488)
* domain flag for auto installs

* use static servers with custom domain (#2421)

* send delete peer update always

* fix add/remove host api calls

* keep mq updates in a single go func

* move branch test logic to devops (#2443)

* handle IOT OS

* save server name to env (#2460)

* ensure branch test servers available after test runs (#2467)

* save server name to env

* free server always; add PR to discord messages

* use correct method to delete droplets (#2468)

* quick fix for the launcher

* removed exit when triggering not supported exit and removed the TODO comments related to this issue

---------

Co-authored-by: Matthew R Kasun <mkasun@nusak.ca>
Co-authored-by: Alex Feiszli <31018251+afeiszli@users.noreply.github.com>
Co-authored-by: Christopher Blaha <crispspiceguitar@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
Co-authored-by: Abhishek K <32607604+abhishek9686@users.noreply.github.com>
2023-08-08 15:59:55 +05:30
Abhishek K
645bc4c126
NET-447: Removed proxy related fields and code (#2459)
* remove related fields and code

* remover metrics collection from server code

* fw update struct

* add ext client flag to metrics data

* simply nat types

* rm proxy update from cli
2023-07-26 11:22:49 +05:30
Farukh Khan
a40271d0e8
nm-quick netmaker edition upgrade fix (#2440)
nm-quick netmaker edition upgrade fix.
2023-07-13 08:24:25 +05:30