30 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
Nirav Parikh
61644d8b11 chore(docs): updated changelog for v0.2.9 release (#381)
updated changelog for v0.2.9 release
updated uptrace bun dependency version to fix vulnerabilities
fix tests
Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
2025-05-23 16:43:26 +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
dependabot[bot]
b5137b489a chore(deps): Bump github.com/jackc/pgx/v4 from 4.13.0 to 4.18.2 (#326)
Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.13.0 to 4.18.2.
- [Changelog](https://github.com/jackc/pgx/blob/v4.18.2/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v4.13.0...v4.18.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-03 13:16:43 +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
Akshay Gaikwad
923803736b chore(deps): bump golang.org/x/net from v0.10.0 to v0.17.0
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-11-01 17:22:12 +05:30
Akshay Gaikwad
65938a6436 chore(deps): bump google.golang.org/grpc from v1.44.0 to v1.56.3
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-11-01 17:22:12 +05:30
dependabot[bot]
cc1a68a58f chore(deps): Bump github.com/crewjam/saml from 0.4.13 to 0.4.14
Bumps [github.com/crewjam/saml](https://github.com/crewjam/saml) from 0.4.13 to 0.4.14.
- [Commits](https://github.com/crewjam/saml/compare/v0.4.13...v0.4.14)

---
updated-dependencies:
- dependency-name: github.com/crewjam/saml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 12:19:58 +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
hiteshwani29
a30f80f426 fix: cluster list API send internal error for non-exist project
Signed-off-by: hiteshwani29 <hiteshwani29@gmail.com>
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-05-25 22:36:33 +05:30
Akshay Gaikwad
c4ac043b5e feat: Support more than one IdP groups mapping (#172)
Allow mapping more than one IdP groups to an OIdC identity. This
commit upgrades the kratos version (v0.11.0). Kratos v0.11.0 parses
all id token claims into `raw_claims`. The `raw_claims` can be used in
JsonNet mapper to map non-standard claims like `groups` to identity
traits.

Fixes #109

This also includes:
* Remove verbose bug debug logs
* Removes elasticsearch service from docker compose file

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-03-30 12:43:57 +05:30
Akshay Gaikwad
ffb78940e2 fix: cluster description ignored by server issue (#187)
Server was ignoring cluster description of a request. This commit is
persisting cluster description to db.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-03-30 12:26:26 +05:30
dependabot[bot]
aba1dd8147 chore(deps): Bump mellium.im/sasl from 0.2.1 to 0.3.1 (#161)
Bumps mellium.im/sasl from 0.2.1 to 0.3.1.

---
updated-dependencies:
- dependency-name: mellium.im/sasl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-26 13:52:59 +05:30
dependabot[bot]
fd38abed5d chore(deps): Bump github.com/crewjam/saml from 0.4.6 to 0.4.13 (#179)
Bumps [github.com/crewjam/saml](https://github.com/crewjam/saml) from 0.4.6 to 0.4.13.
- [Release notes](https://github.com/crewjam/saml/releases)
- [Commits](https://github.com/crewjam/saml/compare/v0.4.6...v0.4.13)

---
updated-dependencies:
- dependency-name: github.com/crewjam/saml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-26 13:51:37 +05:30
dependabot[bot]
340557db68 chore(deps): Bump github.com/prometheus/client_golang from 1.11.0 to 1.11.1 (#159)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 21:04:46 +05:30
Akshay Gaikwad
ce9202fbeb All dependabot open PRs (#176)
* Bump github.com/crewjam/saml from 0.4.6 to 0.4.9

Bumps [github.com/crewjam/saml](https://github.com/crewjam/saml) from 0.4.6 to 0.4.9.
- [Release notes](https://github.com/crewjam/saml/releases)
- [Commits](https://github.com/crewjam/saml/compare/v0.4.6...v0.4.9)

---
updated-dependencies:
- dependency-name: github.com/crewjam/saml
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump github.com/prometheus/client_golang from 1.11.0 to 1.11.1

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump mellium.im/sasl from 0.2.1 to 0.3.1

Bumps mellium.im/sasl from 0.2.1 to 0.3.1.

---
updated-dependencies:
- dependency-name: mellium.im/sasl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/text from 0.3.7 to 0.3.8

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.3.7...v0.3.8)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/crypto from 0.0.0-20220214200702-86341886e292 to 0.1.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20220214200702-86341886e292 to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump golang.org/x/net from 0.0.0-20220127200216-cd36cc0744dd to 0.7.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220127200216-cd36cc0744dd to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: run go mod tidy

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-23 10:50:46 +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
Akshay Gaikwad
b67fcacf87 Rename go module name and its usage 2022-06-08 17:21:22 +05:30
niravparikh05
f8be2a671c fixes for sso users listing, sso users kubectl issue, removed commented code 2022-06-02 11:31:18 +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
Abin Simon
de3e158c21 Update go packages for kratos
go get github.com/ory/kratos/x@v0.8.2-alpha.1
2022-04-08 17:42:26 +05:30
Abin Simon
fb4fa3781c Rename RafaySystems to RafayLabs 2022-03-24 12:42:59 +05:30
nirav-rafay
d469315bad changes for cli config download, apikey services and cli auth verify (#55) 2022-03-11 20:06:55 +05:30
akshay196-rafay
5429bf4493 Add Docker compose file (#49)
* Add DB_ADDR to env vars list
* Add Dockerfile and docker-compose
* Remove go.mod from _kratos dir and clean go.mod of root dir
* Run Kratos docker-compose quickstart from root dir
* Add gomigrate to docker-compose
* Bump docker-composen version to 3.7
* Add Kratos services in the single docker compose file
Removed Kratos quickstart files and merge all setup required for
rcloud-base in the kratos-compose.yml file located in the root of the
repo.
* Add elasticsearch in docker-compose
* Allow es to not be available in when in dev mode
* Change default ES endpoint

Co-authored-by: Abin Simon <abin.simon@rafay.co>
2022-03-11 17:28:16 +05:30
abin-rafay
0e9be5e589 Audit engine query endpoints (#43) 2022-03-08 16:44:41 +05:30
nirav-rafay
c66bdc25cd restructure rcloud-base as a single base controller (#37)
* restructure rcloud-base as a single base controller
* updated master.rest
* moved sentry from internal to pkg as it is used by relay
* removing unused rpc and it's dependencies
* Fix usermgmt tests
* Don't redefine variables in rest file
Co-authored-by: Abin Simon <abin.simon@rafay.co>
2022-03-03 17:59:06 +05:30
nirav-rafay
f4bd2a802d initial commit for sentry related changes (#16) 2022-02-22 11:41:48 +05:30
Abin Simon
dca468292d Revert bun version to 1.0.20
1.0.21 was returning `0` for the ids after insertion
2022-01-12 17:35:38 +05:30
nirav-rafay
adc5532cf6 changes for projects, organization and partner endpoints 2021-12-31 12:36:13 +05:30
nirav-rafay
fcc6f0be90 initial commit for adminsrv 2021-12-28 14:23:52 +05:30