Commit graph

203 commits

Author SHA1 Message Date
abhishek9686 35ddb97b98 always set endpoint detection to true 2024-04-15 11:06:03 +05:30
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 203cbeef8b
NET-958: remove usage of netmaker ip service (#2853)
* remove netmaker ip service

* remove debug log
2024-03-12 08:18:01 +07:00
abhishek9686 8a777205d5 if emqx, avoid sending mq creds from server to client 2024-01-26 11:15:18 +05:30
abhishek9686 fb0fead2f0 create emqx for server, get app creds from env 2024-01-26 10:24:29 +05:30
abhishek9686 155f2887b2 implement emqx interface methods for cloud and on-prem 2024-01-25 15:11:16 +05:30
abhishek9686 fff2239f02 set caching to true by defaulT 2024-01-11 12:00:48 +05:30
Farukh Khan 1f9ef50df7
NET-655 (#2670)
* NET-655

* Updated HostPull structure to include EgressRoutes and FirewallUpdate models.

* added ServerVersion structure to hostpull model

* added ServerVersion structure to hostpull model

* removed ServerVersion structure

* removed ServerVersion structure

* added egressroute and fwupdate to hostpull handler

* add host update fallback handler

* set broker type on server cfg

* use actual host password to create emqx user

---------

Co-authored-by: Christopher Blaha <crispspiceguitar@gmail.com>
Co-authored-by: Abhishek Kondur <abhi281342@gmail.com>
2023-12-21 10:43:06 +04:00
Abhishek K 98c01c4325
NET-814: Deprecating TURN (#2723)
* deprecate turn

* process signals through mq
2023-12-13 22:46:57 +04:00
Abhishek K 2c4a27c53b
NET-735: HA Support (#2701)
* cache enabled option, cache hosts data if only enabled

* cache nodes only when enabled

* cache extclients only when enabled

* cache acls only when enabled
2023-12-05 12:01:35 +04:00
Abhishek Kondur 2f76fa577a saas owner email 2023-11-27 20:27:10 +04:00
Abhishek Kondur 89e9a6f34e set superadmin to user if owner conf is set 2023-11-27 20:13:29 +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
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
Matthew R Kasun cd80c03fa2
remove stunlist (#2572) 2023-09-22 11:34:13 +02: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
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
Gabriel de Souza Seibel 8ce7da2ce9
[NET-494 / ACC-322] New free tier limits (#2495)
* Rename var

* Rename consts and use iota

* Use switch instead of repeated else if

* Rename limits related vars

* Introduce new free tier limits

* Measure new limits and report on license validation

* Separate usage and limits, have new ones

* Don't check for hosts and clients limits, but for machines instead

* Error on egress creation @ free tier w/ internet gateways

* Remove clients and hosts limit from code

* Rename var

* Rename consts and use iota

* Use switch instead of repeated else if

* Rename limits related vars

* Introduce new free tier limits

* Measure new limits and report on license validation

* Separate usage and limits, have new ones

* Don't check for hosts and clients limits, but for machines instead

* Error on egress creation @ free tier w/ internet gateways

* Remove clients and hosts limit from code
2023-08-08 23:17:49 +05:30
Gabriel de Souza Seibel de146321f0
[NET-477] Pick AMB URL dynamically (#2489)
* Introduce config for environment

* Introduce func to get environment

* Choose accounts api host from environment

* Test the ee package on workflows

* Use build tag ee for license_test.go
2023-08-08 15:59:38 +05:30
Gabriel de Souza Seibel 922e7dbf2c
[NET-404] Run in limited mode when ee checks fail (#2474)
* Add limited http handlers functionality to rest handler

* Export ee.errValidation (ee.ErrValidation)

* Export a fatal error handled by the hook manager

* Export a new status variable for unlicensed server

* Mark server as unlicensed when ee checks fail

* Handle license validation failures with a (re)boot in a limited state

* Revert "Export a fatal error handled by the hook manager"

This reverts commit 069c21974a8d36e889c73ad78023448d787d62a5.

* Revert "Export ee.errValidation (ee.ErrValidation)"

This reverts commit 59dbab8c79773ca5d879f28cbaf53f3dd4297b9b.

* Revert "Add limited http handlers functionality to rest handler"

This reverts commit e2f1f28facaca54713db76a588839cd2733cf673.

* Revert "Handle license validation failures with a (re)boot in a limited state"

This reverts commit 58cfbbaf522a1345aac1fa67964ebff0a6d60cd8.

* Revert "Mark server as unlicensed when ee checks fail"

This reverts commit 77c6dbdd3c9cfa6e7d6becedef6251e8617ae367.

* Handle license validation failures with a middleware

* Forbid responses if unlicensed ee and not in status api

* Remove unused func
2023-08-03 12:16:58 +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
Christopher Blaha dd7e553472
Nm quick ee instructions update (#2441)
* updated instructions and fix exp env vars

* Tenant ID for clarity

* and

* changed account id to tenant id

* struct field to tenant & references to field

* fix local variables
2023-07-13 08:23:34 +05:30
Abhishek K 230e062c84
GRA-1298: License check changes, free tier limits for saas (#2418)
* set free tier limits through config

* add host limit to config

* check for host limit on free tier

* fix license validation, replace node limit with hosts

* add hosts to telemetry data

* debug init

* validate license every 1hr

* hook manager, api to fetch server usage

* hook manager, server usage api

* encode json server usage api

* update ngork url

* update license validation endpoint

* avoid setting limits on eer

* adding hotfix

* correct users limits env var

* add comments to exported funcs

---------

Co-authored-by: afeiszli <alex.feiszli@gmail.com>
2023-06-28 20:33:06 +05:30
Tobias Cudnik 94ca72e370
NET-173 Sync EndpointDetection config (#2374)
* adding serverconfig logic and variable to hosts

* - sync EndpointDetection on peerupdate
- add EndpointDetection to env config

* - endpoint detection always comes from the server
- fixed ENDPOINT_DETECTION -> NETCLIENT_ENDPOINT_DETECTION

---------

Co-authored-by: afeiszli <alex.feiszli@gmail.com>
2023-06-13 16:33:53 -04:00
Abhishek Kondur 423abf0fe4 add use_turn option to config,check if server is using turn 2023-04-28 14:06:28 +05:30
Abhishek Kondur 9e0038f39c merge conflicts resolved 2023-04-25 11:12:22 +04:00
dcarns 3d82df3bc6
Merge pull request #2133 from gravitl/refactor_auto_update
Add host level auto update setting with default true
2023-04-19 09:40:56 -04:00
Abhishek Kondur 4f95e9f562 add basic auth to turn server apis, handle host registration on server 2023-04-17 15:33:05 +04:00
Abhishek Kondur a8e234efc9 avoid sending turn domain to client 2023-04-17 11:44:17 +04:00
Abhishek Kondur 5153c471d8 add turn port to server config 2023-04-06 11:30:53 +04:00
Abhishek Kondur f54ae9ae8f turnserver registration apis 2023-04-06 08:50:34 +04:00
Abhishek Kondur b8904d1f3c Merge branch 'develop' of https://github.com/gravitl/netmaker into GRA-1494 2023-04-04 18:32:55 +04:00
0xdcarns 1621c27c1d fixed hard coded dns key 2023-04-03 14:17:14 -04:00
Abhishek Kondur 91b4d237c8 add turn config to server config 2023-03-22 11:09:50 +04:00
Abhishek Kondur cafdfa70c1 turn server poc 2023-03-22 11:00:03 +04:00
Anish Mukherjee 96d7b67822 add auto update config to server yaml 2023-03-21 18:05:04 +05:30
Anish Mukherjee 1032eb86c5 rename to NETCLIENT_AUTO_UPDATE 2023-03-21 17:38:59 +05:30
Anish Mukherjee 4405038d67 add server setting for auto update 2023-03-20 18:10:52 +05:30
Matthew R Kasun b3cfbe7266 default proxy mode 2023-03-13 14:39:13 -04:00
afeiszli d3a35d00b9 resolving PR comments 2023-03-03 16:20:38 -05:00
afeiszli b6bea3b06c adding comments 2023-03-03 10:52:05 -05:00
afeiszli dba954c529 add stunlist string to serverconfig 2023-03-03 10:37:04 -05:00
afeiszli bf8a5bbc69 changing StunList to slice 2023-03-03 10:28:50 -05:00
afeiszli 4ff135e196 adding StunList 2023-03-01 17:10:36 -05:00
dcarns dbf6f1034b
Merge pull request #2058 from gravitl/feature_emqx
Add emqx boilerplate
2023-02-28 08:41:39 -05:00
Anish Mukherjee bf793a5412 add mqtts for secure check 2023-02-28 09:29:49 +05:30
Anish Mukherjee c57c892119 remove duplicate env var 2023-02-27 21:19:59 +05:30
Anish Mukherjee b803e64ee4 return broker endpoint 2023-02-27 17:52:36 +05:30
Anish Mukherjee 2700acc1d7 user BROKER_ENDPOINT and SERVER_BROKER_ENDPOINT 2023-02-23 17:48:37 +05:30