36 Commits

Author SHA1 Message Date
Akshay Gaikwad
d88c82e0df fix: re-running admindb migration fails (#205)
Make all admindb migration queries re-entrance so re-running migration
would not fail.

Signed-off-by: Akshay Gaikwad <akgaikwad001@gmail.com>
2023-04-28 14:21:32 +05:30
Nirav Parikh
e203d15b8f fix: remove references to admindbuser user in admindb migrations (#200)
Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
Signed-off-by: Nirav Parikh <52062717+niravparikh05@users.noreply.github.com>
Co-authored-by: Akshay Gaikwad <akshay196@users.noreply.github.com>
2023-04-27 20:17:31 +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
Abhijit Mukherjee
0971def3b3 Feature: Add the ability to configure the SA account lifetime (#139)
added ability to conifigure SA account lifetime with validation

Signed-off-by: mabhi <abhijit.mukherjee@infracloud.io>
2023-02-17 15:07:55 +05:30
Nirav Parikh
7d04220d3a fixes for cli config download 2022-06-15 12:37:50 +05:30
Akshay Gaikwad
664beb4383 Replace rafay with paralus 2022-06-09 13:42:27 +05:30
Abin Simon
14750dc41a Merge pull request #149 from RafayLabs/even-more-fixes
Fix errors, unique filter, oidc
2022-05-27 13:57:50 +05:30
Abin Simon
c2c503a1aa Add proper unique constraint to project 2022-05-27 13:51:28 +05:30
Abin Simon
18269e0728 Update how unique is handled in provider 2022-05-27 13:51:28 +05:30
niravparikh05
0210f0f2d3 renamed column namespace_id to namespace 2022-05-27 12:23:22 +05:30
niravparikh05
8ab85e57c9 changes to support namespaces 2022-05-23 12:42:51 +05:30
Nirav Parikh
0d828f1272 Merge pull request #134 from RafayLabs/idp-groups-and-updating-same
Add IdP groups in Identities table
2022-05-17 19:09:43 +05:30
Akshay Gaikwad
f604768865 [OIdC Provider] Return client secret on GET requests
- Returns client secret on GET request, so that when UI made
modification to OIdC provider, it should be able to send back the
client secret to PUT request.
- Fix issuer url validation when udpate.
2022-05-12 19:15:10 +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
Akshay Gaikwad
eb0b7d3ef2 Provision to create new oidc provider with same name that of deleted
When we soft delete oidc provider entry which we are doing for delete
provider API endpoint, we cannot create new oidc provider entry with a
same name due to unique constraint violation on name. Applying unique
constraint to name,trash will allow to create new oidc provider entry
with a same name, but fail on deleting that entry because it violates
unique constraint. Hence this commit adds unique constraint
to (id,name) combined.
2022-05-06 11:31:48 +05:30
niravparikh05
c99c1c5a7e reverting changes for isGlobal in role resource 2022-04-14 18:36:55 +05:30
Nirav Parikh
a9e72810a5 Merge pull request #104 from RafayLabs/issue_fixes
issue fixes for cluster delete and adding bootstrap addr to agent config
2022-04-14 17:08:22 +05:30
Abin Simon
5d5b097770 Remove is_global column from resourcerole table 2022-04-14 16:55:48 +05:30
Abin Simon
d89136de65 Don't allow users to update builtin roles 2022-04-14 15:26:18 +05:30
niravparikh05
e7d436a232 issue fixes for cluster delete and adding bootstrap addr to agent config 2022-04-14 13:10:38 +05:30
Abin Simon
773d45a0b2 Drop account_id constraints as kratos hard deletes identities 2022-04-08 17:42:26 +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
nirav-rafay
639ff1da30 addressed review comments, changes for custom roles and sso users 2022-04-04 11:41:58 +05:30
Abin Simon
60199e3f4e Update sentry_account_permissions view 2022-03-29 15:09:19 +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
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
46cf76db9f issue fixes while testing getauthz and relay-agent-config gen format fix (#29)
* issue fixes while testing getauthz and relay-agent-config gen format fix
* addressed review comments and added idp table migrations
2022-02-25 17:36:37 +05:30
nirav-rafay
f4bd2a802d initial commit for sentry related changes (#16) 2022-02-22 11:41:48 +05:30
abin-rafay
464a1014db User management (#8)
multiple fixes and refactored to support from id to name, added resource roles, permissions script and improved test coverage
2022-02-03 11:04:01 +05:30
Akshay Gaikwad
9b831d56b7 Moved oidc provider triggers sql file to migrations 2022-02-01 13:39:46 +05:30
nirav-rafay
eefb66d885 initial commit for cluster management 2022-01-19 12:42:02 +05:30
Abin Simon
d2d214c7e3 Update account id constraints to use kratos db 2022-01-12 17:35:38 +05:30
Abin Simon
9e2d13876c Group creation now also maps proper accounts 2022-01-12 17:35:37 +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