Commit Graph
59 Commits
Author SHA1 Message Date
甜瓜 da418fd3d5 fix: incorrect number of wg.add (#203)
The work-group numbers is unequal to number of go routines spin-up by main function. It's a bug that affects the graceful shutdown. This commit fixed the number of work-group being added.

Signed-off-by: 甜瓜 <42953016+tyut22316@users.noreply.github.com>
2023-04-23 10:19:31 +05:30
Akshay Gaikwad 1f64d80729 Auto-generate password and force reset (#124)
* Upgrade kratos service to v0.10.1

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Upgrade kratos-client-go to v0.10.1

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* generate password feature for kratos admin creation

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Add forceReset property in user spec

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* added forcereset in the init script

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>

* Resolve conflicts

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* Stdout default admin password in initialize script

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>

* setting password for new user and sending default password in create user response

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>

* added new endpoint to service force reset flag update after resetting complete outside authz

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>

* removed unnecessary overhead in the forcereset endpoint and updated user type proto to remove unused fields

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
2023-01-27 18:32:11 +05:30
Nirav Parikhandmabhi f4a8a69c7d Delete relay agent from target cluster while cluster deletion (#120)
* updated reconciler to handle delete events

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>

* fix to ensure relay agent is deleted from taget cluster

Signed-off-by: Nirav Parikh <nir.parikh05@gmail.com>

* updated changelog

Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
Signed-off-by: Nirav Parikh <nir.parikh05@gmail.com>
Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
Co-authored-by: mabhi <abhijit.mukherjee@infracloud.io>
2022-12-29 13:15:08 +05:30
Abhijit Mukherjee cd55d2d1da record user.login event by kratos hooks (#111)
* record user.login event by kratos hooks

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>

* added test case for create login auditlog

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>

* updated change log

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
2022-12-26 11:55:19 +05:30
Nirav Parikh 319f778e7e added test cases 2022-11-22 19:01:26 +05:30
Nirav Parikh 6465afed9b initial commit for changes to support database as backend for audit logs 2022-11-16 19:05:38 +05:30
Nirav Parikh 0ea54255de changes to cluster lister, group creation date and default relay version 2022-09-27 20:06:47 +05:30
vivekhiwarkar 6bf6e80a9b Fixing buf lint issue 2022-08-25 18:26:34 +05:30
Abin Simon 308fc6c33d Add audit log for kubeconfig download 2022-08-24 15:26:49 +05:30
Akshay Gaikwad f3a02470bd Add DSN env variable to Initialize script
This include:
- Added DSN variable in initialize script.
- Fixes a dbDSN mistake in main.go file. And set default value to
dbDSN variable.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2022-08-09 10:04:22 +05:30
Vivek Hiwarkar 06ec05ce42 Allow DSN env variable for database connection (#52) 2022-08-08 16:42:14 +05:30
Akshay Gaikwad 7d4001589a Fix default Kratos public and admin urls
This resolved forbidden issue on userinfo endpoint.
2022-06-16 15:15:40 +05:30
Nirav Parikh 7d04220d3a fixes for cli config download 2022-06-15 12:37:50 +05:30
Akshay Gaikwad f8f20535d1 Update images to dockerhub registry 2022-06-13 10:56:09 +05:30
Nirav Parikh da6f02bbbc Merge pull request #164 from paralus/rename-to-paralus
Rename code to paralus
2022-06-10 13:36:06 +05:30
Abin Simon 5274a5861c Add audit log for kubeconfig revoke 2022-06-10 09:04:26 +05:30
Abin Simon 4a38e1ee9a Drop unecessary logging now that dev flag is remvoved for auth 2022-06-10 09:04:26 +05:30
Akshay Gaikwad 664beb4383 Replace rafay with paralus 2022-06-09 13:42:27 +05:30
Akshay Gaikwad 0ee494cc97 Rename rcloud, Rafay references 2022-06-08 18:41:32 +05:30
Akshay Gaikwad b67fcacf87 Rename go module name and its usage 2022-06-08 17:21:22 +05:30
Akshay Gaikwad 5206ce8d27 Set dev to false by default
- Set dev to false by default.
- Add auth even when dev is true.
2022-06-08 12:05:53 +05:30
niravparikh05 8ab85e57c9 changes to support namespaces 2022-05-23 12:42:51 +05:30
Abin Simon 6e2d7bb7b1 Update audit default prefix 2022-05-20 10:29:34 +05:30
Abin Simon ed93614e97 Enable grpc reflection if using dev 2022-05-20 10:29:34 +05:30
Abin Simon 0d6269bf4e Add groups to audit logs 2022-05-20 10:29:34 +05:30
Akshay Gaikwad 5e7fc110b2 Add IdP groups in Identities table
The idp_groups is list of groups IdP user belongs to that is returning
in the OIdC providers token response. The flow of Idp Group mapping is
as follows:
    OIdC Provider (OP) return custom claim with groups in a token when
    authentication event
        |
    The value of custom claim is mapped to `idp_groups` of identity
    traint using JsonNet mapper.
        |
    On inserting/updating/deleting `identities` table, Postgresql
    sends a pg_notification with
    `PG_OPERATION,IDENTITY_ID,IDENTITY_TRAIN` as a payload.
       |
    The `pkg/service/user.UserService.UpdateIdpUserGroupPolicy` update
    the casbin policies for each notification based on payload received.
2022-05-12 12:32:30 +05:30
Abin Simon 34ff1f6e32 Add auth service 2022-05-09 10:13:05 +05:30
niravparikh05 13e78d6b07 fixes for cli auth 2022-04-28 21:35:42 +05:30
niravparikh05 e9b9b2b7f4 fixes for oidc config and groups list 2022-04-27 21:39:24 +05:30
Abin Simon 426368014b Enable audit info server for use in relay-tail 2022-04-26 15:29:26 +05:30
Abin Simon 686955a4b4 Fix audit log format 2022-04-26 10:26:15 +05:30
niravparikh05 db7be6e26e changes to support prompt 2022-04-25 17:24:08 +05:30
Nirav Parikh a9cd4e842e multiple kratos clients for session validation and identity creation (#114)
* multiple kratos clients for session validation and identity creation

* fixed review comments

* switching few logs to debug
2022-04-21 11:52:20 +05:30
niravparikh05 e7d436a232 issue fixes for cluster delete and adding bootstrap addr to agent config 2022-04-14 13:10:38 +05:30
Nirav Parikh a6268da716 Merge pull request #101 from RafayLabs/authz-next
Tiny tweaks to authz
2022-04-13 12:13:18 +05:30
Abin Simon 9190ac81f2 Make UserInfo not require authz 2022-04-13 12:07:51 +05:30
niravparikh05 2be1a80d92 removing leader election 2022-04-12 15:44:43 +05:30
niravparikh05 e45547a453 changes to support dev mode testing 2022-04-12 12:37:34 +05:30
nirav-rafay 2ea4e264e5 Merge branch 'main' into system-audit 2022-04-11 17:29:55 +05:30
niravparikh05 ea79bbb13d retrying for kratos to be up during init and possible fix for leaderelection issue 2022-04-11 17:18:45 +05:30
Abin Simon 0ebb1a1339 Add audit log write
https://blog.sandipb.net/2018/05/03/using-zap-creating-custom-loggers/
2022-04-08 17:42:26 +05:30
niravparikh05 d626f402bb default dev mode 2022-04-06 15:30:33 +05:30
niravparikh05 aac445114d excluding bootstrap registration from authn 2022-04-06 15:27:51 +05:30
nirav-rafay 639ff1da30 addressed review comments, changes for custom roles and sso users 2022-04-04 11:41:58 +05:30
nirav-rafay ce9063e990 rebasing with fixes for ui 2022-04-01 12:03:42 +05:30
Akshay Gaikwad 5de4ba9765 Add two constructors for authContext
This includes:
- SetupAuthContext:  Setups authContext with new authContext fields.
- NewAuthContext: Create AuthContext with using authContext fields
from caller function.
2022-03-30 13:00:35 +05:30
Akshay Gaikwad c972e26d93 Update Auth constructor function and middleware
Auth constructor should handle creation of Kratos, database,
ApiKeyService itself for benefit to other dependent modules/repos. The
Prompt module does not need db instance hence it should not pass db
parameter when initializing Auth context and middleware.

Signed-off-by: Akshay Gaikwad <akshay.gaikwad@rafay.co>
2022-03-30 12:16:42 +05:30
Abin Simon fb4fa3781c Rename RafaySystems to RafayLabs 2022-03-24 12:42:59 +05:30
Abin Simon 78a0b0c625 Rearrage some files to cleanup file structure 2022-03-24 12:40:45 +05:30
nirav-rafay dbfc2b3928 Merge pull request #39 from RafaySystems/casbin-url-mappings
Add support for mapping permission names to urls when creating the roles
2022-03-21 12:09:13 +05:30