Commit graph

20 commits

Author SHA1 Message Date
Abhishek Kondur 81de838d93 return user details form db 2023-11-27 14:43:12 +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
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
Matthew R Kasun 6d6ba3aa7d random string
update algorithm
consolidate MakeRandomString, RandomString & GenerateCrytoString into
one function
2023-05-02 13:28:00 -04:00
Matthew R Kasun c2a4cb1145 update function name 2023-04-03 09:54:16 -04:00
Matthew R Kasun d82e3a9b9e add checks to user update processing 2023-03-30 15:10:17 -04:00
0xdcarns 63eac1e79c added host pull model, made API 2023-03-22 15:36:53 -04:00
Anish Mukherjee 175e371da9 use host id in jwt claims 2023-01-23 17:35:09 +05:30
walkerwmanuel 71d66b7f93 Refactored user functions to use refrences rather than values 2022-12-20 15:10:40 -05:00
kayos@tcp.direct c074d6e2ae
Fix: ignoring of returned error value 2022-12-07 00:28:06 -08: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
0xdcarns 88cd0a6497 initial commit 2022-09-13 15:25:56 -04:00
Matthew R. Kasun 4dbcd0a630 switch to jwt.RegisterdClaims 2022-06-27 10:47:28 -04:00
Matthew R. Kasun 7152f6ccd4 remove references to grpc/comms net 2022-04-21 15:53:44 -04:00
dcarns 5b6553153b
Merge pull request #780 from gravitl/v0.10.0
V0.10.0
2022-02-15 22:13:12 -05:00
0xdcarns 9bee126429 hotfix 2 2022-02-15 21:50:47 -05:00
0xdcarns 469618aa72 removed default master key and added warning log if not set 2022-02-15 10:12:37 -05:00
0xdcarns 789cb27d48 added jwt fix 2022-02-15 09:51:21 -05:00
0xdcarns 64e7791011 restructuring continued 2022-01-17 14:21:40 -05:00
0xdcarns 8f72ecbaa0 refactored logic 2021-10-26 12:50:34 -04:00
Renamed from functions/jwt.go (Browse further)