Commit Graph

30 Commits

Author SHA1 Message Date
Abin Simon
bebffe2c25 Changes to support audit log change in prompt 2022-05-20 15:02:18 +05:30
Abin Simon
0d6269bf4e Add groups to audit logs 2022-05-20 10:29:34 +05:30
Abin Simon
5b5d099abd Improve auth service 2022-05-10 09:28:42 +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
Abin Simon
9b7dc9a9a0 Use kratos public url in prompt 2022-04-26 13:29:07 +05:30
niravparikh05
db7be6e26e changes to support prompt 2022-04-25 17:24:08 +05:30
niravparikh05
9e8d767a9e fixes in middleware to set db and few other fixes 2022-04-22 12:13:23 +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
Akshay Gaikwad
9d15c3aa15 Remove Kratos scheme variable from auth
kratos Address var includes scheme, so no need to of separate variable
for a scheme.
2022-04-19 15:20:35 +05:30
niravparikh05
8883703328 changes to expose system and user grpc clients for prompt 2022-04-15 15:05:17 +05:30
Abin Simon
9190ac81f2 Make UserInfo not require authz 2022-04-13 12:07:51 +05:30
Abin Simon
610a7da953 Fix returning ordering in authenticate 2022-04-12 19:25:05 +05:30
Abin Simon
cf501a2dd8 Tiny little tidy up post authz fixes 2022-04-12 13:51:43 +05:30
sigmabaryon
fbae03741d Fix casbin permissions, add kratos changes 2022-04-12 11:26:52 +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
36bfda653b Add host, ua and ip to session data 2022-04-08 17:42:26 +05:30
nirav-rafay
7d38707a9e Merge pull request #86 from RafayLabs/query-options
Some stuff that has to do with permissions
2022-04-01 11:30:25 +05:30
Abin Simon
1ed5a3e876 Rework session handling to prevent cyclic import
imports github.com/RafayLabs/rcloud-base/internal/fixtures
imports github.com/RafayLabs/rcloud-base/pkg/service
imports github.com/RafayLabs/rcloud-base/pkg/auth/v3
imports github.com/RafayLabs/rcloud-base/pkg/service
2022-03-30 14:00:05 +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
229cf7c033 Pass down username from interceptor for entitlements 2022-03-29 15:09:19 +05:30
Abin Simon
c89741aefb Don't use reflect to get resource Metadata 2022-03-25 18:18:55 +05:30
Abin Simon
abb56481a3 Auth middleware for use in prompt 2022-03-25 18:18:55 +05:30
Abin Simon
f7ac37ab6f Initial support for authorization 2022-03-25 18:17:43 +05:30
Abin Simon
1dce43d607 Update role definition for casbin 2022-03-25 18:17:43 +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
274cfe7c4f Improve Auth module (#36)
* Expose NewSessionContext function

When auth middleware or interceptor is being mocked by other service
then they can take help of `session.NewSessionContext` to store mocked
session data to request context.

* Initialize _log in auth at creating

* Allow excluding URLs in Auth middleware
2022-03-07 16:40:03 +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