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.
This includes:
- Move entity_dao.go to common since it is generic database operation
interface for all the components.
- Added `GetX` method to EntityDAO interface. It get entity that matches
provided field and value both. It is useful in case where service
lookup for database entities not based on id, name.
Signed-off-by: Akshay Gaikwad <akshay.gaikwad@rafay.co>