Commit graph

56 commits

Author SHA1 Message Date
Abhishek K 5b8711415b
check node is still valid on enrollment key to act as relay (#2832) 2024-02-29 00:08:45 +07:00
Abhishek K e685e3ca45
Merge pull request #2805 from gravitl/NET-908
NET-908: EMQX cloud Apis support
2024-02-06 14:59:18 +05:30
abhishek9686 98d9979e8b create failover and remoteaccess gw 2024-02-05 11:34:50 +05:30
abhishek9686 82de96d9a3 if emqx, avoid sending mq creds from server to client 2024-01-26 11:23:50 +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
Aceix 0c7286230f
fix(NET-887): prevent non-admin users from registering (#2778) 2024-01-25 13:21:13 +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 b69bf60160
NET-811: block normal user login from accessing dashboard (#2724)
* block normal user login from accessing dashboard

* header change

* allow from ui header

* allow from ui header

* check for user role after decoding

* block oauth login for normal user

* handle other oauth provider callback funcs for user login
2023-12-20 09:08:55 +04:00
Aceix 61ef6142ff
feat(NET-688): auto relaying via enrollment keys (#2647)
* feat(NET-688): auto relaying via enrollment keys

* feat(NET-688): address pr comments
2023-11-04 16:28: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
0xdcarns 18c9bcc58f adapted sso to host registration 2023-04-17 22:23:17 -04:00
0xdcarns 0b7df753f7 removed references to AccessKey model 2023-03-13 16:02:44 -04:00
Aceix 7f8ad1523e feat(GRA-763): add success and error SSO HTML templates 2023-01-05 10:12:06 +00:00
Matthew R. Kasun 1f00a5d890 fix build errors after merge conflict resolution 2023-01-04 14:22:11 -05:00
dcarns ae6a12b16b
Merge pull request #1887 from gravitl/feature_cli_sso
Add headless oauth login endpoint for CLI
2023-01-03 13:27:18 -05:00
dcarns 7fed64f640
Merge pull request #1892 from gravitl/hotfix_v0.17.1_netcache_sso
nil check on netcache for sso
2023-01-03 13:26:34 -05:00
0xdcarns defbc56d76 nil check on netcache for sso 2023-01-03 12:35:18 -05:00
Anish Mukherjee a34aeffaf5 use correct log messages 2023-01-03 17:51:38 +05:30
Anish Mukherjee fd21d960fc minor refactor 2023-01-02 16:06:14 +05:30
Anish Mukherjee 25e227d551 use correct length state keys 2023-01-02 15:42:50 +05:30
Anish Mukherjee 93fdf359b3 add callback for headless sso 2023-01-02 14:48:39 +05:30
Anish Mukherjee 289bb3e5ec add headless sso login 2023-01-02 13:18:40 +05:30
Anish Mukherjee 8ae9896ea3 make frontend_url optional for oauth configuration 2022-12-23 20:47:23 +05:30
Anish Mukherjee fe930c3ca8 remove callback error redirect 2022-12-23 19:14:30 +05:30
Anish Mukherjee 66efcf9eb3 move oauth error handler to auth package 2022-12-23 18:28:45 +05:30
Anish Mukherjee 1a442aa299 remove need of frontend url for error pages 2022-12-23 17:46:45 +05:30
walkerwmanuel 71d66b7f93 Refactored user functions to use refrences rather than values 2022-12-20 15:10:40 -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
afeiszli 8d19451244 remove log 2022-09-19 15:38:26 -04:00
afeiszli f63b88db73 fixing sso error handling 2022-09-19 15:37:00 -04:00
0xdcarns b1b497faa4 PR comments addressed 2022-09-15 10:23:19 -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
0xdcarns d2f00e0dc5 remove comment 2022-08-04 10:04:51 -04:00
0xdcarns de91533372 added better state management to make OAuth sign-ins HA 2022-08-04 10:03:39 -04:00
capric98 2fa31a6947 add oidc provider for auth 2022-06-25 23:47:00 +08:00
0xdcarns ed0f992142 changed context from deprecated no context 2022-05-27 09:21:14 -04:00
Matthew R. Kasun c8ec507484 add timeout to http.get 2022-05-13 06:04:27 -04:00
9to1url 1e77a9eca4 remove new line to fix warning: fmt.Fprintln arg list ends with redundant newline 2022-04-09 16:00:49 -04:00
0xdcarns 43b9e73eaa updated ioutil refs and composes 2022-01-06 15:05:38 -05:00
0xdcarns 76a75fb984 go mod tidy and conver azure tenant to env/conf var 2022-01-03 10:02:40 -05:00
afeiszli 932712619a remade server logs 2021-12-06 15:31:08 -05:00
0xdcarns 64d293a2b9 changed small bug with routes 2021-11-14 09:25:31 -05:00
0xdcarns a51d145e5e modified log 2021-10-28 11:09:49 -04:00
0xdcarns c402010659 changed oauth to use SERVER_HTTP_HOST or SERVER_HOST vars 2021-10-28 11:05:35 -04:00
0xdcarns d1f02d0911 added check for http,https redirect 2021-10-28 10:54:16 -04:00
0xdcarns 5322c44a99 fixed minor bug surrounding oauth error 2021-10-28 10:20:37 -04:00