Commit graph

877 commits

Author SHA1 Message Date
Abhishek Kondur
b64cef3447 fix merge conflicts 2023-06-28 22:12:30 +05:30
Abhishek K
38454ece79
IOT-66: Single Peer update for IOT client (#2424)
* send peer update to IOT client only when it is relayed

* move node check

* send relay del update for iot client

* fix relay delete logic for iot

* set relay node to true for iot peer update

* add node addrs to peer update

* revert tag
2023-06-28 22:08:49 +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
Abhishek Kondur
243cc74490 remove endpoint detection from host model 2023-06-27 22:36:24 +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
Gabriel de Souza Seibel
11933fc07e
Don't expose user hashed password (#2419) 2023-06-26 10:53:00 +05:30
Aceix
9787ce6ae8
fix(NET-312): increase log levels for verbose logs (#2403) 2023-06-20 16:28:40 +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
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 K
78e26c4673
add nodes to pull response (#2371) 2023-06-06 22:16:21 -04:00
Tobias Cudnik
723375b334
NET-152 enrollment keys for non admins (#2346)
* return 401 instead of 403

* fixed http.StatusForbidden

* Tagged build version (temp)

* Unauthorized_Err when applicable

* untagged version

* fixed PUT /api/users/networks/user1

* - expired token redirs to login
- added `/api/enrollment_keys` for non-admins
- unit test for enrollment keys for non-admins

* handle user perms in `/hosts`

* removed debug

* misc

* - support masteradmin
- return hosts with partial access

* added `ismaster` to middleware
2023-05-31 13:11:54 +05:30
Abhishek K
47edf65b1f
NET-186: Wg public listen port (#2344)
* fetch public listen of wg if present

* check if wg pub listen port has been changed on host update

* wg public port to host api model for visibility

* rm comment
2023-05-31 08:21:02 +05:30
Tobias Cudnik
3a4363c890
NET-163: Return 403 instead of 401 (#2326)
* return 401 instead of 403

* fixed http.StatusForbidden

* Tagged build version (temp)

* Unauthorized_Err when applicable

* untagged version
2023-05-25 09:40:39 -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
33249f37ac if -- else to determine type 2023-05-08 06:42:16 -04:00
Matthew R Kasun
3567811aab add type to enrollement key 2023-05-05 11:03:59 -04:00
Alex Feiszli
9f0127578f
Merge pull request #2254 from gravitl/NET-32
random string
2023-05-02 17:01:36 -04:00
Alex Feiszli
a77e2ca2ff
Merge pull request #2243 from gravitl/GRA-1494
GRA-1494: Server side changes for turn
2023-05-02 17:01:05 -04:00
Matthew R Kasun
6d6ba3aa7d random string
update algorithm
consolidate MakeRandomString, RandomString & GenerateCrytoString into
one function
2023-05-02 13:28:00 -04:00
Abhishek Kondur
64c0c861f4 check for use turn config 2023-04-28 14:14:24 +05:30
Abhishek Kondur
423abf0fe4 add use_turn option to config,check if server is using turn 2023-04-28 14:06:28 +05:30
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
Abhishek Kondur
9e0038f39c merge conflicts resolved 2023-04-25 11:12:22 +04:00
Matthew R Kasun
de111181bf restore sortNetworks 2023-04-19 14:06:39 -04:00
Matthew R Kasun
57723b7aae merge conflicts 2023-04-19 13:18:03 -04:00
Matthew R Kasun
c510846444
Merge branch 'develop' into GRA-1529-key-update 2023-04-19 13:16:09 -04:00
dcarns
700147e3ca
Merge pull request #2171 from walkerwmanuel/GRA-1336-sort-before-sending
GRA-1336: sort before sending
2023-04-19 13:08:08 -04:00
Matthew R Kasun
754ab44a48 Merge remote-tracking branch 'origin/develop' into GRA-1529-key-update 2023-04-19 09:48:04 -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
433b61417b merge conflicts resolved 2023-04-19 13:23:06 +04:00
Abhishek Kondur
b4cfaafbec register host with turn on creation 2023-04-19 08:04:49 +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
dcarns
d190046272
Merge pull request #2214 from gravitl/GRA-1385/sso-registration
GRA-1385: adapted sso to host registration
2023-04-18 09:30:35 -04:00
0xdcarns
18c9bcc58f adapted sso to host registration 2023-04-17 22:23:17 -04:00
Matthew R Kasun
cd89b4abef remove old peer when publickey updated 2023-04-17 18:20:09 -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
d4ceabd4b3 register host through server, add basic auth to turn apis 2023-04-17 11:21:28 +04:00
Matthew R Kasun
63552891ee refactor key updates on host basis vice node 2023-04-13 15:02:14 -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
Abhishek Kondur
559880f11d add nat type to peer conf 2023-04-10 11:20:51 +04:00
0xdcarns
0e4e98e9db Merge branch 'develop' into GRA-1505/ingress 2023-04-06 12:27:56 -04:00
0xdcarns
9d230d3540 initial commit 2023-04-06 12:27:33 -04:00
dcarns
dd77f09fd9
Merge pull request #2177 from gravitl/GRA-1351/lengthy-delay-fix
GRA-1351: fix delay in updates around client CRUD
2023-04-06 11:49:58 -04:00
Abhishek Kondur
f54ae9ae8f turnserver registration apis 2023-04-06 08:50:34 +04:00
0xdcarns
c67403585d move ingress/egress check outside of peers calc 2023-04-05 12:31:51 -04:00
0xdcarns
b31b1cba7e keep keys if not changed 2023-04-05 12:06:15 -04:00