Commit Graph

91 Commits

Author SHA1 Message Date
Abhishek K
530dbdc65c NET-710: Internet Gws Re-Design (#2718)
* add internet gateway to client gateway

* migration func to remove internet egress range from egress gateway

* add internet gateways ranges to firewall update

* add internet gw ranges to extcleint conf

* add ipv6 internet address

* remove failover field from ingress req

* only let normal to be created on PRO (#2716)

* feat(NET-805): send internet gw props to rac

* set inet gw field on node update api

* move internet gws to EE

---------

Co-authored-by: the_aceix <aceixsmartx@gmail.com>
2023-12-06 23:57:58 +04:00
Abhishek K
b78cc0a8a1 NET-725: Failovers (#2685)
* api to  to get host relayed from client

* add auto relay to api host

* add peer nat type

* set pro field on signal

* rm net check on relay me handler

* return success response

* re-establish failover logic

* set failOver ctx

* failOver with peer pub key

* failovered peer updates

* failover handlers, reset failovered peer on deletion

* rm unused funcs

* initialize failover handler on EE

* ignore failover node on signal

* failover changes

* set host id on signal

* extend signal model to include node ids

* add backwards compatibility

* add failover as node api

* set json response on failover handers

* add failover field to api node

* fix signal data check

* initialize failover peer map

* reset failovered status when relayed or deleted

* add failover info to api node

* reset network failover

* only proceed furtuer if failover exists in the network

* set failOver node defaults

* cannot set failover node as relayed

* debug log

* debug log

* debug changes

* debug changes

* debug changes

* revert debug changes

* don't add peers to idmap when removed

* reset failed Over

* fix static checks

* rm debug log

* add check for linux host
2023-11-29 20:10:07 +04:00
Gabriel de Souza Seibel
001442e75e [NET-493] - Additional data fields to send to account management (#2583)
* Send relays and internet gws count to amb

* Unify usage funcs in logic pkg

* Fix ee build

* Revert "Unify usage funcs in logic pkg"

This reverts commit 28afc91f7e.

* Add more resource metrics on getUsage handler

* Use pro module's function to get server usage on lic val

* Move GetRelays to pro package
2023-10-06 10:22:58 +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
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
Matthew R Kasun
114db708d6 ignore network parameter passed to delete ingress endpoint (#2471) 2023-07-28 21:16:35 +05:30
Abhishek Kondur
4071bb2bac db cache nodes and hosts 2023-06-27 16:10:04 +05:30
Aceix
34c56d5ea1 Revert "prevent ingress creation on NATed host (#2395)" (#2422)
This reverts commit 20998dd613.
2023-06-27 12:30:25 +05:30
Abhishek K
6c2582651c Net-137: Node relays (#2401)
* revert relays

* initial relay commit

* get relayed allowed ips

* add more relay validation checks, peer logic cleanup

* rm relayed nodes from relay node when relayed node is deleted

* fix egress updates for relayed nodes

* rm unused func

* remove  debug logs

* avoid adding egress ranges on the relayed gw node

---------

Co-authored-by: Matthew R Kasun <mkasun@nusak.ca>
2023-06-19 12:26:14 -04:00
Matthew R Kasun
20998dd613 prevent ingress creation on NATed host (#2395) 2023-06-14 21:37:18 -04:00
Matthew R Kasun
78640f1342 Extclient NET-63x (#2286)
* model changes

* additional fields for extclient create

* add DNS to extclient config

* extclient name checks

* update extclient

* nmctl extclient

* final tweaks

* review comments

* add extclientdns to node on ingress creation

* fix to add ingress dns to api (#2296)

---------

Co-authored-by: Aceix <aceixsmartX@gmail.com>
2023-05-17 10:58:03 -04:00
Matthew R Kasun
0821d47b1a gateway name 2023-04-27 10:35:41 -04:00
Matthew R Kasun
075848e6fe check for firewall on egress creation 2023-04-27 10:32:58 -04:00
dcarns
e563671eba Merge pull request #2182 from gravitl/GRA-1205/internet-gateways
GRA-1205: internet gateways
2023-04-18 13:34:58 -04:00
Matthew R Kasun
3711c1ea28 don't fail deleting ingress if no extclients exist 2023-04-12 10:16:18 -04:00
0xdcarns
8410c32ad4 disallowed IPv6 2023-04-11 16:49:51 -04:00
Matthew R Kasun
59ea7f0004 don't fail deleting ingress if no extclients exist 2023-04-11 11:06:54 -04:00
0xdcarns
9d230d3540 initial commit 2023-04-06 12:27:33 -04:00
Abhishek Kondur
055ef54395 rm firewall check 2023-02-06 20:14:30 +04:00
Abhishek Kondur
66faa18fb9 skip internet gateways 2023-02-06 20:04:47 +04:00
Abhishek Kondur
b695f6e288 Merge branch 'develop' of https://github.com/gravitl/netmaker into GRA-1054/egress_route_manager 2023-02-06 20:01:33 +04:00
Abhishek Kondur
0505629fd1 egress model update,remove interface check 2023-02-04 09:54:56 +04:00
Matthew R Kasun
77cfae41ff remove postup/down 2023-02-02 11:16:54 -05:00
Abhishek Kondur
051f60343b reset ingress to older way 2023-01-25 15:35:45 +04:00
Matthew R. Kasun
eae92470c5 refactor of peerUpdate
contains some debugging logging
2022-12-23 13:41:17 -05:00
Matthew R. Kasun
bce2f8a45c fix compile errors 2022-12-22 06:42:33 -05:00
Matthew R. Kasun
770a293049 new constant for wireguard interface name 2022-12-21 03:31:37 -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
Matthew R. Kasun
c086e9499d rebase
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-12-19 15:15:35 -05:00
Abhishek Kondur
96598e0f1d remove commented code 2022-12-13 17:36:36 +05:30
Abhishek Kondur
759b9bc6cd rm ext cidr 2022-12-13 01:14:28 +05:30
Abhishek Kondur
07dd20734d extclients internal ips 2022-12-12 22:49:35 +05:30
Abhishek Kondur
d8075e69c6 add alias internal ip to ext clients 2022-12-08 19:48:47 +05:30
dcarns
42ffa2be32 Merge pull request #1672 from tt2468/bugfix_v0.16.1_ingress-egress-error
Fix netclient breaking when both ingress and egress modes are enabled
2022-11-04 10:00:39 -04:00
tt2468
b38061480e Add missing line ending in ingress postUp command
Adds a missing line ending in the postUp masquerade command. This missing line is sneaky, and only seems to pose an issue when both ingress and egress modes are enabled.
2022-10-18 22:56:42 -07:00
Matthew R. Kasun
e65d1cf600 maintain server listen port on failover/ingress deletion 2022-10-17 11:04:17 -04:00
Matthew R. Kasun
fa2ad00de9 add check to create egress as well 2022-10-05 13:49:15 -04:00
Matthew R. Kasun
643714799e ipv6 ingress not supported on server 2022-10-05 13:30:27 -04:00
Alex Feiszli
c46ddeddc7 Merge pull request #1607 from gravitl/bugfix_v0.16.1_ingress-egress
Bugfix v0.16.1 ingress egress
2022-10-03 09:06:25 -04:00
afeiszli
c8672818fe adding resets and single peer update on metrics disconnect detections 2022-09-29 14:49:44 -04:00
0xdcarns
f2606dd3cb addressed PR comments 2022-09-29 09:49:06 -04:00
0xdcarns
eb75a6829c added wipe failover cases and ceased node update on metrics update 2022-09-28 16:17:49 -04:00
0xdcarns
b95f3eb846 initial PoC completed 2022-09-28 14:59:21 -04:00
0xdcarns
75fc15ac4c commented out logic 2022-09-28 13:05:41 -04:00
afeiszli
78bacce528 add ability to reset failover 2022-09-27 14:42:14 -04:00
afeiszli
54258bcbac add ability to set failover nodes 2022-09-27 14:04:28 -04:00
Matthew R. Kasun
24f78b172e eliminate extra ; when creating ingress followed by egress 2022-09-26 14:05:51 -04:00
afeiszli
1723f57035 fixing flags and config 2022-09-20 11:50:15 -04:00
Matthew R. Kasun
f47d89ef62 remove unnecessary nft rule 2022-09-13 13:56:47 -04:00