mirror of
https://github.com/paralus/paralus.git
synced 2026-03-05 02:20:18 +00:00
Changes in this PR include - Authenticate gRPC requests - Initial file structure for authentication and authorization service - Use Auth middleware and interceptor service in usermgmt component - Authenticate HTTP request based on Kratos API token - Add Auth middleware to adminsrv component - Name the Grpc metadata fields - Maintain session data after authentication - Removed http middleware as it is not necessary - Exclude rpc methods from authentication - Handle error in auth interceptor - Revert to with cancel context - Log authentication failed requests and New function in authv3 - Initiate authContext struct in authv3 package using new public - function NewAuthContext.
User management
This module is responsible for manging users/groups/roles as well as being a frontend for the casbin internal service. All user/auth related requests go through here.
Development
Run kratos migrations
export DSN='postgres://postgres@localhost:5432/admindb?sslmode=disable'
kratos -c kratos.yaml migrate sql -e --yes
Start kratos
cd components/usermgmt/_kratos
kratos serve -c kratos.yml
Run usermgmt server
cd components/usermgmt/_kratos
go run main.go