Commit graph

83 commits

Author SHA1 Message Date
Aceix
100b778449
fix(NET-897): uniform client and node acls (#2803) 2024-02-13 20:25:27 +07:00
abhishek9686
43e82a2936 make defaul host failover and remote access gw on joining new network 2024-02-05 11:18:28 +05:30
Abhishek K
5bf30b2c10
NET-877: Replace peers on Refreshkeys peer update (#2761)
* replace peers on key refresh

* add peer conf to metrics map only when allowed
2024-01-11 15:59:19 +05:30
Abhishek K
797f3a4533
Send deleted extclient mq update when disabled (#2760) 2024-01-10 14:57:29 +05:30
Aceix
c8ae70bd69
fix(NET-760): check for private network range (#2722) 2023-12-13 14:02:57 +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
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
Farukh Khan
449f3f947b
Net 509 515 (#2496)
* NET-509

* External client config files with IPv6 endpoints now have the [] separating the address and port.

* NET-515

* Increased network name max length to 32

* NET-509-515

* Updated unit test for network name max length check.

* Updated extclient endpoint ip string manipulation to use sprintf

* Added proper error message for network name length more than max allowed.

* NET-515 small typo fix for error strings should not be capitalized
2023-08-08 23:17:22 +05:30
Tobias Cudnik
e286adda77
NET-291 PUT /api/networks/{networkname} (#2380)
* PUT /api/networks/{networkname}

* review
2023-06-08 17:22:35 -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
Matthew R Kasun
3e0d7720c8 return {} if no records found for acls/metrics 2023-05-04 16:50:03 -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
920590b651 fix build issue 2023-04-19 09:58:16 -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
Matthew R Kasun
34eb699752 deprecated ability to edit networks 2023-04-14 10:39:36 -04:00
Matthew R Kasun
63552891ee refactor key updates on host basis vice node 2023-04-13 15:02:14 -04:00
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
0xdcarns
0b7df753f7 removed references to AccessKey model 2023-03-13 16:02:44 -04:00
0xdcarns
6643c9a401 adapt createNetwork + default host addition 2023-02-13 15:17:13 -05:00
0xdcarns
81d9954f37 added logic to add default hosts to networks upon network creation 2023-02-10 13:45:57 -05:00
Matthew R Kasun
77cfae41ff remove postup/down 2023-02-02 11:16:54 -05:00
dcarns
94108e0007
Merge pull request #1962 from gravitl/GRA-1024/mq_dyn_sec_refactor
Gra 1024/mq dyn sec refactor
2023-01-23 15:00:33 -05:00
Abhishek Kondur
a33338fa99 remove adding,modifying roles 2023-01-22 17:57:49 +04:00
Matthew R Kasun
9edb541388 remove localrange 2023-01-20 05:42:05 -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
0xdcarns
8c92308ccf made mq functions a little easier to read and re-use 2022-12-28 12:10:03 -05:00
0xdcarns
875718d824 consolidated add default hosts to net function 2022-12-27 10:15:00 -05:00
0xdcarns
82479863f1 added default node association with networks 2022-12-23 16:14:45 -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
kayos@tcp.direct
e878e4820a
Fixes+Chores: avoid de-referencing nil ptrs + lint
- Avoid referencing conditions we know are false/true

 - Avoid using name of imported package as variable

 - Avoid broken (see list item 1) if else statement in `ipservice.go` by refactoring to switch statement

 - When assigning a pointer value to a variable along with an error, check that error before referencing that pointer. Thus avoiding de-referencing a nil and causing a panic.
  *** This item is the most important ***

 - Standard gofmt package sorting + linting; This includes fixing comment starts for go doc

 - Explicit non-handling of unhandled errors where appropriate (assigning errs to _ to reduce linter screaming)

 - Export ErrExpired in `netcache` package so that we can properly reference it using `errors.Is` instead of using `strings.Contains` against an `error.Error()` value
2022-12-06 20:11:20 -08:00
Anish Mukherjee
fb84ddc6f1 remove unused endpoints 2022-11-30 16:20:05 +05:30
0xdcarns
ea854a6b98 fixed admin issue and potential panics 2022-11-10 14:54:53 -05:00
Abhishek Kondur
677d9fcc8d added comments 2022-09-29 23:59:18 +05:30
Abhishek Kondur
a95468111d added roles,acls for clients 2022-09-29 22:54:41 +05:30
afeiszli
b670755cce refactoring for ee 2022-09-14 13:26:31 -04:00
0xdcarns
88cd0a6497 initial commit 2022-09-13 15:25:56 -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
cameronts
459e7956cd Add swagger base 2022-09-02 13:42:51 -07:00
Matthew R. Kasun
184e5a66d9 refactor server routing 2022-08-19 11:25:39 -04:00
Abhishek Kondur
63708e6e36 GRA-414: added additional logs for acl controllers 2022-07-13 14:53:37 +04:00
Abhishek Kondur
5ff30d3ca8 GRA-414: added additional logs for extclient controllers 2022-07-13 10:01:25 +04:00
Abhishek Kondur
5163f77e1f GRA-414: added additional logs for network controllers 2022-07-12 18:50:32 +04:00