52 Commits

Author SHA1 Message Date
Chandan Krishna
f56c5a9fd8 Updated Kratos Client and Fixed SQL Migration issues (#403)
* created new migrations for null values

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* fixed not null constraint for sentry_bootstrap_infra

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* migrations not being applied

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* added default values to all not null columns

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* changes to kratos client api

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* fixed casbin entries not showing in database

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* .

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* fixed create / upsert mismatch

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* .

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* .

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* .

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* .

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* created one sql migration file

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* .

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* fixed CVE Vulnerability for golang and golang.org/x/oauth2

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* changed go version to 1.25.5

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* updated golangct-lint version to v2.6

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* golang-ci version

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* added version to golang-ci.yaml

Signed-off-by: zyncc <chandankrishna288@gmail.com>

* fixed golangci config

Signed-off-by: zyncc <chandankrishna288@gmail.com>

---------

Signed-off-by: zyncc <chandankrishna288@gmail.com>
2026-01-16 11:24:33 +05:30
Swastik Gour
7a4895a5b2 updated main.go script to reinitialize the permissions when the are e… (#366)
* updated main.go script to reinitialize the permissions when the are existing or there is any update

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added few corrections and added better error logging

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added the checks for checking the existence of different components

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* started adding the Upsert function

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added upsert to role.go

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added tests and auditing

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* updated packages

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* updated go version

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added minor changes

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* added correction to role_test.go

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* corrected test cases

Signed-off-by: swastik959 <Sswastik959@gmail.com>

---------

Signed-off-by: swastik959 <Sswastik959@gmail.com>
2025-03-20 16:15:38 +05:30
Nirav Parikh
dd563582d0 adding permissions for cli.config.read and code fix for non admin use… (#313)
* adding permissions for cli.config.read and code fix for non admin users cli config download

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

* includes changes for nix, go version 1.21 and addressed review comments

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

* fixed lints

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

---------

Signed-off-by: Nirav Parikh <nir.parikh05@gmail.com>
Signed-off-by: nirparikh05 <nir.parikh05@gmail.com>
2024-06-03 12:57:00 +05:30
Nirav Parikh
0cd2a35ab5 expose cluster status update rpc (#296)
* expose cluster status update rpc

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

* added cluster rpc to relay peering rpc server listener

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

---------

Signed-off-by: Nirav Parikh <nir.parikh05@gmail.com>
2024-02-28 10:41:10 +05:30
Nirav Parikh
1b7a9a1fa3 changes to view auditlogs by project role users (#247)
feat: changes to view audit logs by project and cluster role users
---------

Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
2023-09-21 11:34:56 +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
Abin Simon
c001b06551 Use better defaults for partner and org in initialize 2022-08-12 16:02:39 +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
Abin Simon
5d3625f15b Update descriptions for roles and other init items 2022-06-17 14:16:16 +05:30
Abin Simon
b571a83bd9 Cleanup rolepermission descriptions
find permissions -name '*.json' | while read -r file; do
    echo Processing $file
    sed -i 's|"description": "\([a-zA-Z]\)\([a-zA-Z\ ]*\)\.*",|"description": "\u\1\2",|' $file
done
2022-06-17 13:49:42 +05:30
Abin Simon
aea9d26b06 Update description for missing items 2022-06-17 13:40:50 +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
niravparikh05
ad193fbf98 removed desc from user traits 2022-05-27 15:15:58 +05:30
Nirav Parikh
c3320a8234 Merge pull request #145 from RafayLabs/ns-dev
Namespace related development changes
2022-05-27 12:30:42 +05:30
niravparikh05
0ae35d2024 added changes for namespaced dynamic roles and created at metadata field 2022-05-24 15:48:56 +05:30
Abin Simon
c576932eda Create /user/:username/forgotpassword endpoint 2022-05-24 12:08:37 +05:30
niravparikh05
8ab85e57c9 changes to support namespaces 2022-05-23 12:42:51 +05:30
niravparikh05
27b2b2f8d9 fixes to callback url and associate default org admin group to role 2022-05-03 13:08:23 +05:30
Akshay Gaikwad
6fda5831ee [synchronizer] Run once before start listening for database udpate
At a time of restarting Kratos pod, we noticed to update the Kratos
config we need modify something in IdP UI to trigger the
synchronizer. Instead this change will run synchronizer initially so
it will update Kratos config with database IdP entries if any.
2022-05-03 12:50:32 +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
Akshay Gaikwad
4331eed88c [synchronizer] Map provider name to id in kratos confing 2022-04-27 18:33:03 +05:30
Akshay Gaikwad
af09d570bf [synchronizer] Omit trash oidc providers in synchronizing 2022-04-27 16:47:03 +05:30
niravparikh05
101c005312 fixes for permissions and user group assoc 2022-04-26 19:56:36 +05:30
niravparikh05
9e8d767a9e fixes in middleware to set db and few other fixes 2022-04-22 12:13:23 +05:30
Nirav Parikh
371bbc1076 Merge pull request #107 from RafayLabs/synchronizer-dockerfile
Synchronizer dockerfile
2022-04-15 15:03:52 +05:30
Akshay Gaikwad
56546cf841 Modify synchronizer and move it to scripts dir 2022-04-14 17:57:44 +05:30
Abin Simon
d89136de65 Don't allow users to update builtin roles 2022-04-14 15:26:18 +05:30
niravparikh05
9be69840c7 adding default dev mode for initialization 2022-04-12 15:55:49 +05:30
sigmabaryon
fbae03741d Fix casbin permissions, add kratos changes 2022-04-12 11:26:52 +05:30
niravparikh05
1298874130 fixing formating issues 2022-04-11 17:31:51 +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
ead8b91ccc Fix initialize script for auditing 2022-04-08 18:04:53 +05:30
nirav-rafay
a0fd76e02e Merge pull request #92 from RafayLabs/issue83_fix
fix for casbin duplicate issue during init and removing all deletes from init
2022-04-08 15:15:49 +05:30
niravparikh05
565b5083fc existing if resource permissions already exists 2022-04-08 15:10:47 +05:30
niravparikh05
8397d88836 fix for casbin duplicate issue during init and removing all deletes from init 2022-04-07 17:57:37 +05:30
Akshay Gaikwad
f0008692e9 Remove kratos scheme env var from initialize script 2022-04-07 10:57:03 +05:30
Abin Simon
5306d6a2c6 Send recovery url back after user creation 2022-04-06 13:39:36 +05:30
nirav-rafay
639ff1da30 addressed review comments, changes for custom roles and sso users 2022-04-04 11:41:58 +05:30
Abin Simon
9627c5c87b Update db used by gorm in initialize 2022-03-24 17:22:48 +05:30
Abin Simon
fb4fa3781c Rename RafaySystems to RafayLabs 2022-03-24 12:42:59 +05:30
Akshay Gaikwad
d792e57105 Format all packages using go fmt 2022-03-21 12:28:27 +05:30
Abin Simon
8c0a61f0d8 Convert initialization from using dao to using util funcs 2022-03-17 14:51:26 +05:30
Abin Simon
701ab5c536 Switch to fetching all needed values via named cli args 2022-03-15 13:34:47 +05:30
Abin Simon
98ac0c4bbc Restructure initialization code 2022-03-14 18:12:20 +05:30
Abin Simon
bc19970395 Allow creation of initial org admin user 2022-03-14 12:34:20 +05:30
Abin Simon
3aedac3201 Fix scope for roles
This might not really be necessary but a good check
2022-03-14 12:34:18 +05:30
Abin Simon
8184c23a8f Initialize script to create org, partner and roles
We should probably have the role creation moved into adminsrv, but
since we are only creating new orgs like this as of now let us
continue with this.
2022-03-14 12:33:19 +05:30