diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json index eca0fd7..8662c16 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -158,7 +158,7 @@ "200": { "description": "A successful response.", "schema": { - "$ref": "#/definitions/v3GetUsersResponse" + "$ref": "#/definitions/v3UserList" } }, "403": { @@ -179,14 +179,6 @@ } } }, - "parameters": [ - { - "name": "project", - "in": "query", - "required": false, - "type": "string" - } - ], "tags": [ "User" ] @@ -316,85 +308,23 @@ "default": "StatusNotSet", "title": "$title: ConditionStatus\n$description: status of a condition for a resource" }, - "v3GetUsersResponse": { + "v3ListMetadata": { "type": "object", "properties": { - "user": { - "type": "array", - "items": { - "$ref": "#/definitions/v3User" - } - } - } - }, - "v3Group": { - "type": "object", - "properties": { - "apiVersion": { + "count": { "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the group resource", - "title": "API Version" + "format": "int64" }, - "kind": { + "offset": { "type": "string", - "default": "Pipeline", - "description": "Kind of the group resource", - "title": "Kind" + "format": "int64" }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the group resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3GroupSpec", - "description": "Metadata of the group resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true + "limt": { + "type": "string", + "format": "int64" } }, - "description": "Group", - "title": "Group", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3GroupSpec": { - "type": "object", - "properties": { - "projectroles": { - "type": "array", - "items": { - "$ref": "#/definitions/v3ProjectRole" - }, - "description": "ProjectRole groups for permission", - "title": "ProjectRoles" - }, - "users": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of users for group", - "title": "Users" - }, - "type": { - "type": "string", - "description": "Type of group", - "title": "Type" - } - }, - "description": "Group specification", - "title": "Group Specification" + "title": "$title: ListMetadata\n$description: metadata for a list of resources\n$required: enabled" }, "v3Metadata": { "type": "object", @@ -456,188 +386,6 @@ "project" ] }, - "v3Project": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "system.k8smgmt.io/v3", - "description": "API Version of the project resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "Pipeline", - "description": "Kind of the project resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the project resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3ProjectSpec", - "description": "Metadata of the project resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Project", - "title": "Project", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3ProjectRole": { - "type": "object", - "properties": { - "project": { - "$ref": "#/definitions/v3Project", - "description": "Project", - "title": "Project" - }, - "role": { - "$ref": "#/definitions/v3Role", - "description": "Role", - "title": "Role" - } - }, - "description": "Project and role pairing for permission", - "title": "ProjectRole" - }, - "v3ProjectSpec": { - "type": "object", - "properties": { - "default": { - "type": "boolean", - "description": "flag to indicate if this is the default project in the organization", - "title": "Default" - } - }, - "description": "project specification", - "title": "Project Specification" - }, - "v3Role": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the Role resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "Role", - "description": "Kind of the role resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the role resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3RoleSpec", - "description": "Spec of the role resource", - "title": "Spec" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Role", - "title": "Role", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3RolePermission": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "default": "usermgmt.k8smgmt.io/v3", - "description": "API Version of the role permission resource", - "title": "API Version" - }, - "kind": { - "type": "string", - "default": "RolePermission", - "description": "Kind of the role permission resource", - "title": "Kind" - }, - "metadata": { - "$ref": "#/definitions/v3Metadata", - "description": "Metadata of the role permission resource", - "title": "Metadata" - }, - "spec": { - "$ref": "#/definitions/v3RolePermissionSpec", - "description": "Metadata of the role permission resource", - "title": "Metadata" - }, - "status": { - "$ref": "#/definitions/commonv3Status", - "description": "Status of the resource", - "title": "Status", - "readOnly": true - } - }, - "description": "Role Permission", - "title": "RolePermission", - "required": [ - "apiVersion", - "kind", - "metadata", - "spec" - ] - }, - "v3RolePermissionSpec": { - "type": "object", - "properties": { - "permissions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of permisions for role", - "title": "Permissions" - } - }, - "description": "RolePermisson specification", - "title": "RolePermission Specification" - }, - "v3RoleSpec": { - "type": "object", - "properties": { - "rolepermissions": { - "type": "array", - "items": { - "$ref": "#/definitions/v3RolePermission" - }, - "description": "Permissions for the role", - "title": "RolePermissions" - } - }, - "description": "Role specification", - "title": "Role Specification" - }, "v3User": { "type": "object", "properties": { @@ -679,6 +427,43 @@ "spec" ] }, + "v3UserList": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "default": "usermgmt.k8smgmt.io/v3", + "description": "API Version of the user list resource", + "title": "API Version", + "readOnly": true + }, + "kind": { + "type": "string", + "default": "UserList", + "description": "Kind of the user list resource", + "title": "Kind", + "readOnly": true + }, + "metadata": { + "$ref": "#/definitions/v3ListMetadata", + "description": "Metadata of the user list resource", + "title": "Metadata", + "readOnly": true + }, + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/v3User" + }, + "description": "List of the user resources", + "title": "Items", + "readOnly": true + } + }, + "description": "User list", + "title": "UserList", + "readOnly": true + }, "v3UserResponse": { "type": "object", "properties": { @@ -718,40 +503,14 @@ "description": "Password of the user", "title": "Password" }, - "totpRequired": { - "type": "string", - "description": "Flag to specify if TOTP is required", - "title": "TotpRequired" - }, - "totpSecret": { - "type": "string", - "description": "Secret for TOTP", - "title": "TotpSecret" - }, - "roles": { - "type": "array", - "items": { - "$ref": "#/definitions/v3Role" - }, - "description": "Roles of the user", - "title": "Roles" - }, "groups": { "type": "array", "items": { - "$ref": "#/definitions/v3Group" + "type": "string" }, - "description": "Groups of the user", + "description": "Groups the user belongs to", "title": "Group" }, - "projects": { - "type": "array", - "items": { - "$ref": "#/definitions/v3Project" - }, - "description": "Projects of the user", - "title": "Projects" - }, "emailVerified": { "type": "boolean", "description": "Flag to show if the email of the user was verified", diff --git a/components/usermgmt/go.mod b/components/usermgmt/go.mod index b9a18ef..c8606df 100644 --- a/components/usermgmt/go.mod +++ b/components/usermgmt/go.mod @@ -7,6 +7,7 @@ require ( github.com/RafaySystems/rcloud-base/components/common v0.0.0-unpublished github.com/gogo/protobuf v1.3.2 github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.2 + github.com/ory/kratos-client-go v0.8.2-alpha.1 github.com/spf13/viper v1.10.1 google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa google.golang.org/grpc v1.43.0 diff --git a/components/usermgmt/go.sum b/components/usermgmt/go.sum index 3633fd4..af5edd1 100644 --- a/components/usermgmt/go.sum +++ b/components/usermgmt/go.sum @@ -420,6 +420,8 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/ory/kratos-client-go v0.8.2-alpha.1 h1:YlKhGOSZjounlB9iY4xSWlqHbyLYkeLzlLk8ZL7/nEM= +github.com/ory/kratos-client-go v0.8.2-alpha.1/go.mod h1:dOQIsar76K07wMPJD/6aMhrWyY+sFGEagLDLso1CpsA= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= @@ -697,12 +699,14 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -925,6 +929,7 @@ google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7 google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index da9179c..2ce70e4 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -9,6 +9,7 @@ import ( "time" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + kclient "github.com/ory/kratos-client-go" "github.com/spf13/viper" "sigs.k8s.io/controller-runtime/pkg/manager/signals" @@ -25,12 +26,13 @@ import ( ) const ( - rpcPortEnv = "RPC_PORT" - apiPortEnv = "API_PORT" - debugPortEnv = "DEBUG_PORT" - kratosAddrEnv = "KRATOS_ADDR" - devEnv = "DEV" - configAddrENV = "CONFIG_ADDR" + rpcPortEnv = "RPC_PORT" + apiPortEnv = "API_PORT" + debugPortEnv = "DEBUG_PORT" + kratosSchemeEnv = "KRATOS_SCHEME" + kratosAddrEnv = "KRATOS_ADDR" + devEnv = "DEV" + configAddrENV = "CONFIG_ADDR" ) var ( @@ -38,26 +40,29 @@ var ( apiPort int debugPort int rpcRelayPeeringPort int + kratosScheme string kratosAddr string + kc *kclient.APIClient dev bool - // ps service.PartnerService - _log = logv2.GetLogger() - authPool authv3.AuthPool - configPool configrpc.ConfigPool - configAddr string + _log = logv2.GetLogger() + authPool authv3.AuthPool + configPool configrpc.ConfigPool + configAddr string ) func setup() { viper.SetDefault(rpcPortEnv, 10000) viper.SetDefault(apiPortEnv, 11000) viper.SetDefault(debugPortEnv, 12000) - viper.SetDefault(kratosAddr, "localhost:5443") + viper.SetDefault(kratosSchemeEnv, "http") + viper.SetDefault(kratosAddrEnv, "localhost:4433") viper.SetDefault(devEnv, true) viper.SetDefault(configAddrENV, "localhost:7000") viper.BindEnv(rpcPortEnv) viper.BindEnv(apiPortEnv) viper.BindEnv(debugPortEnv) + viper.BindEnv(kratosSchemeEnv) viper.BindEnv(kratosAddrEnv) viper.BindEnv(devEnv) viper.BindEnv(configAddrENV) @@ -65,15 +70,17 @@ func setup() { rpcPort = viper.GetInt(rpcPortEnv) apiPort = viper.GetInt(apiPortEnv) debugPort = viper.GetInt(debugPortEnv) + kratosScheme = viper.GetString(kratosSchemeEnv) kratosAddr = viper.GetString(kratosAddrEnv) dev = viper.GetBool(devEnv) configAddr = viper.GetString(configAddrENV) rpcRelayPeeringPort = rpcPort + 1 + kratosConfig := kclient.NewConfiguration() + kratosConfig.Servers[0].URL = kratosScheme + "://" + kratosAddr + kc = kclient.NewAPIClient(kratosConfig) - _log.Infow("usrmgmt setup") - - // ps = service.NewPartnerService(db) + _log.Infow("usrmgmt setup complete") } func run() { @@ -131,8 +138,6 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { defer wg.Done() // defer configPool.Close() - // userServer := rpcv3.NewUserServer(service.NewUserServer()) - l, err := net.Listen("tcp", fmt.Sprintf(":%d", rpcPort)) if err != nil { _log.Fatalw("unable to start rpc listener", "error", err) @@ -165,7 +170,7 @@ func runRPC(wg *sync.WaitGroup, ctx context.Context) { _log.Infow("context done") }() - rpcv3.RegisterUserServer(s, service.NewUserServer()) + rpcv3.RegisterUserServer(s, service.NewUserServer(kc)) _log.Infow("starting rpc server", "port", rpcPort) err = s.Serve(l) diff --git a/components/usermgmt/master.rest b/components/usermgmt/master.rest new file mode 100644 index 0000000..175a90c --- /dev/null +++ b/components/usermgmt/master.rest @@ -0,0 +1,20 @@ +:host = http://localhost:11000 +:userid = 4c92ca6d-8ff4-4930-bbeb-c19d22ffe71d + +# Create user +POST :host/auth/v3/users +{"spec": {"username": "newguy@notaprovider.com", "firstName": "John", "lastName": "Doe"}} +-> jq-set-var :userid .metadata.id + +# Get all users +GET :host/auth/v3/users + +# Get single user +GET :host/auth/v3/user/:userid + +# Update user info +PUT :host/auth/v3/user/:userid +{"spec": {"username": "changedemail@notaprovider.com", "firstName": "John", "lastName": "Doe"}} + +# Delete single user +DELETE :host/auth/v3/user/:userid \ No newline at end of file diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index b009b48..1991355 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -4,27 +4,85 @@ import ( "context" "fmt" - userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" + kclient "github.com/ory/kratos-client-go" + + v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" + userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) -type server struct{} - -func (s *server) CreateUser(context.Context, *userv3.User) (*userv3.User, error) { - fmt.Println("Called create user") - return nil, nil -} -func (s *server) GetUsers(context.Context, *userrpcv3.GetUsersRequest) (*userrpcv3.GetUsersResponse, error) { - return nil, nil -} -func (s *server) GetUser(context.Context, *userrpcv3.GetUserRequest) (*userv3.User, error) { return nil, nil } -func (s *server) UpdateUser(context.Context, *userrpcv3.PutUserRequest) (*userrpcv3.UserResponse, error) { - return nil, nil -} -func (s *server) DeleteUser(context.Context, *userrpcv3.DeleteUserRequest) (*userrpcv3.UserResponse, error) { - return nil, nil +type server struct { + kc *kclient.APIClient } -func NewUserServer() userrpcv3.UserServer { - return &server{} +func identityToUser(id *kclient.Identity) *userv3.User { + traits := id.Traits.(map[string]interface{}) + return &userv3.User{ + ApiVersion: "usermgmt.k8smgmt.io/v3", + Kind: "User", + Metadata: &v3.Metadata{ + Id: id.Id, + }, + Spec: &userv3.UserSpec{ + Username: traits["email"].(string), + FirstName: traits["first_name"].(string), + LastName: traits["last_name"].(string), + }, + } +} + +func (s *server) CreateUser(ctx context.Context, user *userv3.User) (*userv3.User, error) { + // TODO: restrict endpoint to admin + cib := kclient.NewAdminCreateIdentityBody("default", map[string]interface{}{"email": user.Spec.Username, "first_name": user.Spec.FirstName, "last_name": user.Spec.LastName}) + ir, hr, err := s.kc.V0alpha2Api.AdminCreateIdentity(ctx).AdminCreateIdentityBody(*cib).Execute() + if err != nil { + fmt.Println(hr) + // TODO: forward exact error message from kratos (eg: json schema validation) + return nil, err + } + rlb := kclient.NewAdminCreateSelfServiceRecoveryLinkBody(ir.Id) + rl, _, err := s.kc.V0alpha2Api.AdminCreateSelfServiceRecoveryLink(ctx).AdminCreateSelfServiceRecoveryLinkBody(*rlb).Execute() + fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user + return identityToUser(ir), nil +} +func (s *server) GetUsers(ctx context.Context, _ *userrpcv3.Empty) (*userv3.UserList, error) { + ir, _, err := s.kc.V0alpha2Api.AdminListIdentities(ctx).Execute() + if err != nil { + return nil, err + } + res := &userv3.UserList{} + for _, u := range ir { + res.Items = append(res.Items, identityToUser(&u)) + } + return res, nil +} +func (s *server) GetUser(ctx context.Context, req *userrpcv3.UserRequest) (*userv3.User, error) { + // TODO: should it be get by id or by email? Kratos can only fileter by id + ir, _, err := s.kc.V0alpha2Api.AdminGetIdentity(ctx, req.Userid).Execute() + if err != nil { + return nil, err + } + return identityToUser(ir), nil +} +func (s *server) UpdateUser(ctx context.Context, req *userrpcv3.PutUserRequest) (*userrpcv3.UserResponse, error) { + uib := kclient.NewAdminUpdateIdentityBody("active", map[string]interface{}{"email": req.User.Spec.Username, "first_name": req.User.Spec.FirstName, "last_name": req.User.Spec.LastName}) + _, hr, err := s.kc.V0alpha2Api.AdminUpdateIdentity(ctx, req.Userid).AdminUpdateIdentityBody(*uib).Execute() + if err != nil { + fmt.Println(hr) + // TODO: forward exact error message from kratos (eg: json schema validation) + return nil, err + } + return &userrpcv3.UserResponse{Status: "OK"}, nil +} +func (s *server) DeleteUser(ctx context.Context, req *userrpcv3.UserRequest) (*userrpcv3.UserResponse, error) { + // TODO: should it be get by id or by email? Kratos can only fileter by id + _, err := s.kc.V0alpha2Api.AdminDeleteIdentity(ctx, req.Userid).Execute() + if err != nil { + return nil, err + } + return &userrpcv3.UserResponse{Status: "OK"}, nil +} + +func NewUserServer(kc *kclient.APIClient) userrpcv3.UserServer { + return &server{kc: kc} } diff --git a/components/usermgmt/proto/rpc/v3/user.pb.go b/components/usermgmt/proto/rpc/v3/user.pb.go index 3ebf946..501a31d 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.go @@ -24,17 +24,15 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// Add option to filter by more org and group -type GetUsersRequest struct { +// TODO: Add option to filter users list +type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` } -func (x *GetUsersRequest) Reset() { - *x = GetUsersRequest{} +func (x *Empty) Reset() { + *x = Empty{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_user_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -42,13 +40,13 @@ func (x *GetUsersRequest) Reset() { } } -func (x *GetUsersRequest) String() string { +func (x *Empty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUsersRequest) ProtoMessage() {} +func (*Empty) ProtoMessage() {} -func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { +func (x *Empty) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_user_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -60,19 +58,12 @@ func (x *GetUsersRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead. -func (*GetUsersRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{0} } -func (x *GetUsersRequest) GetProject() string { - if x != nil { - return x.Project - } - return "" -} - -type GetUserRequest struct { +type UserRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -80,8 +71,8 @@ type GetUserRequest struct { Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` } -func (x *GetUserRequest) Reset() { - *x = GetUserRequest{} +func (x *UserRequest) Reset() { + *x = UserRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_rpc_v3_user_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -89,13 +80,13 @@ func (x *GetUserRequest) Reset() { } } -func (x *GetUserRequest) String() string { +func (x *UserRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetUserRequest) ProtoMessage() {} +func (*UserRequest) ProtoMessage() {} -func (x *GetUserRequest) ProtoReflect() protoreflect.Message { +func (x *UserRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_rpc_v3_user_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -107,59 +98,12 @@ func (x *GetUserRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead. -func (*GetUserRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UserRequest.ProtoReflect.Descriptor instead. +func (*UserRequest) Descriptor() ([]byte, []int) { return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{1} } -func (x *GetUserRequest) GetUserid() string { - if x != nil { - return x.Userid - } - return "" -} - -type DeleteUserRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` -} - -func (x *DeleteUserRequest) Reset() { - *x = DeleteUserRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteUserRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteUserRequest) ProtoMessage() {} - -func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead. -func (*DeleteUserRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{2} -} - -func (x *DeleteUserRequest) GetUserid() string { +func (x *UserRequest) GetUserid() string { if x != nil { return x.Userid } @@ -178,7 +122,7 @@ type PutUserRequest struct { func (x *PutUserRequest) Reset() { *x = PutUserRequest{} if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[3] + mi := &file_proto_rpc_v3_user_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -191,7 +135,7 @@ func (x *PutUserRequest) String() string { func (*PutUserRequest) ProtoMessage() {} func (x *PutUserRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[3] + mi := &file_proto_rpc_v3_user_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -204,7 +148,7 @@ func (x *PutUserRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutUserRequest.ProtoReflect.Descriptor instead. func (*PutUserRequest) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{3} + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{2} } func (x *PutUserRequest) GetUserid() string { @@ -221,53 +165,6 @@ func (x *PutUserRequest) GetUser() *v3.User { return nil } -type GetUsersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - User []*v3.User `protobuf:"bytes,1,rep,name=user,proto3" json:"user,omitempty"` -} - -func (x *GetUsersResponse) Reset() { - *x = GetUsersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetUsersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetUsersResponse) ProtoMessage() {} - -func (x *GetUsersResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead. -func (*GetUsersResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{4} -} - -func (x *GetUsersResponse) GetUser() []*v3.User { - if x != nil { - return x.User - } - return nil -} - type UserResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -280,7 +177,7 @@ type UserResponse struct { func (x *UserResponse) Reset() { *x = UserResponse{} if protoimpl.UnsafeEnabled { - mi := &file_proto_rpc_v3_user_proto_msgTypes[5] + mi := &file_proto_rpc_v3_user_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -293,7 +190,7 @@ func (x *UserResponse) String() string { func (*UserResponse) ProtoMessage() {} func (x *UserResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_rpc_v3_user_proto_msgTypes[5] + mi := &file_proto_rpc_v3_user_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -306,7 +203,7 @@ func (x *UserResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UserResponse.ProtoReflect.Descriptor instead. func (*UserResponse) Descriptor() ([]byte, []int) { - return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{5} + return file_proto_rpc_v3_user_proto_rawDescGZIP(), []int{3} } func (x *UserResponse) GetStatus() string { @@ -337,105 +234,94 @@ var file_proto_rpc_v3_user_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x2b, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x28, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x22, 0x2b, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, - 0x73, 0x65, 0x72, 0x69, 0x64, 0x22, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, - 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x22, 0x45, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, + 0x6f, 0x22, 0x07, 0x0a, 0x05, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x25, 0x0a, 0x0b, 0x55, 0x73, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, + 0x64, 0x22, 0x5b, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x04, 0x75, + 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, + 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, + 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x40, + 0x0a, 0x0c, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x32, 0xd3, 0x04, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, + 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, + 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, + 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, + 0x30, 0x31, 0x12, 0x2d, 0x0a, 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, + 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x64, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, + 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x5e, 0x0a, 0x08, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x17, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, + 0x73, 0x74, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x67, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, + 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x40, 0x0a, 0x0c, 0x55, 0x73, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xe7, 0x04, 0x0a, 0x04, - 0x55, 0x73, 0x65, 0x72, 0x12, 0x9e, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, - 0x65, 0x72, 0x1a, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, - 0x72, 0x22, 0x52, 0x92, 0x41, 0x36, 0x4a, 0x34, 0x0a, 0x03, 0x32, 0x30, 0x31, 0x12, 0x2d, 0x0a, - 0x2b, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, - 0x72, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x69, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, - 0x73, 0x12, 0x21, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, - 0x12, 0x0e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, - 0x12, 0x6a, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x47, - 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0a, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, - 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, - 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, - 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x1a, 0x16, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, - 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x75, 0x73, - 0x65, 0x72, 0x12, 0x71, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, - 0x12, 0x23, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x76, 0x33, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, - 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, - 0x65, 0x72, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, 0x61, - 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, 0x09, - 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, - 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, - 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x76, - 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, 0x10, - 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, 0x33, - 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, 0x63, - 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, - 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, - 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, 0x17, - 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, 0x79, - 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, - 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, 0x6c, - 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, - 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, - 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, 0x52, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x68, - 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, - 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, 0x0a, - 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, - 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, 0x73, - 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, 0x9a, - 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, - 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, 0x59, - 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, 0x09, - 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, 0x0a, - 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0x0a, - 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, 0xe2, - 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, 0xe3, - 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x72, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, + 0x69, 0x64, 0x7d, 0x12, 0x74, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, + 0x72, 0x12, 0x20, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x75, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x1a, 0x16, 0x2f, 0x61, 0x75, + 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, + 0x69, 0x64, 0x7d, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x6b, 0x0a, 0x0a, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, + 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, + 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, + 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x76, 0x33, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x7b, 0x75, + 0x73, 0x65, 0x72, 0x69, 0x64, 0x7d, 0x42, 0xca, 0x04, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x72, + 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x76, 0x33, 0x42, + 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4a, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, + 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, + 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x72, 0x70, 0x63, 0x2f, + 0x76, 0x33, 0x3b, 0x72, 0x70, 0x63, 0x76, 0x33, 0xa2, 0x02, 0x03, 0x52, 0x44, 0x52, 0xaa, 0x02, + 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x52, 0x70, 0x63, 0x2e, 0x56, + 0x33, 0xca, 0x02, 0x10, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x52, 0x70, + 0x63, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x1c, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, + 0x5c, 0x52, 0x70, 0x63, 0x5c, 0x56, 0x33, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x52, 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, + 0x3a, 0x3a, 0x52, 0x70, 0x63, 0x3a, 0x3a, 0x56, 0x33, 0x92, 0x41, 0xe2, 0x02, 0x12, 0x2b, 0x0a, + 0x17, 0x55, 0x73, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x61, 0x66, 0x61, + 0x79, 0x20, 0x44, 0x65, 0x76, 0x32, 0x03, 0x32, 0x2e, 0x30, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, + 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x79, 0x61, 0x6d, + 0x6c, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, + 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2f, 0x79, 0x61, 0x6d, 0x6c, 0x52, 0x50, 0x0a, 0x03, 0x34, 0x30, 0x33, 0x12, 0x49, 0x0a, 0x47, + 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, + 0x68, 0x61, 0x76, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x20, + 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x52, 0x3b, 0x0a, 0x03, 0x34, 0x30, 0x34, 0x12, 0x34, + 0x0a, 0x2a, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x64, 0x6f, 0x65, + 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2e, 0x12, 0x06, 0x0a, 0x04, + 0x9a, 0x02, 0x01, 0x07, 0x5a, 0x38, 0x0a, 0x25, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, + 0x41, 0x75, 0x74, 0x68, 0x12, 0x17, 0x08, 0x02, 0x1a, 0x11, 0x58, 0x2d, 0x52, 0x41, 0x46, 0x41, + 0x59, 0x2d, 0x41, 0x50, 0x49, 0x2d, 0x4b, 0x45, 0x59, 0x49, 0x44, 0x20, 0x02, 0x0a, 0x0f, 0x0a, + 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x02, 0x08, 0x01, 0x62, 0x1f, + 0x0a, 0x0e, 0x0a, 0x0a, 0x41, 0x70, 0x69, 0x4b, 0x65, 0x79, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, + 0x0a, 0x0d, 0x0a, 0x09, 0x42, 0x61, 0x73, 0x69, 0x63, 0x41, 0x75, 0x74, 0x68, 0x12, 0x00, 0xc8, + 0xe2, 0x1e, 0x01, 0xd0, 0xe2, 0x1e, 0x01, 0xe0, 0xe2, 0x1e, 0x01, 0xc0, 0xe3, 0x1e, 0x01, 0xc8, + 0xe3, 0x1e, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -450,34 +336,32 @@ func file_proto_rpc_v3_user_proto_rawDescGZIP() []byte { return file_proto_rpc_v3_user_proto_rawDescData } -var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_proto_rpc_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_proto_rpc_v3_user_proto_goTypes = []interface{}{ - (*GetUsersRequest)(nil), // 0: rafay.dev.rpc.v3.GetUsersRequest - (*GetUserRequest)(nil), // 1: rafay.dev.rpc.v3.GetUserRequest - (*DeleteUserRequest)(nil), // 2: rafay.dev.rpc.v3.DeleteUserRequest - (*PutUserRequest)(nil), // 3: rafay.dev.rpc.v3.PutUserRequest - (*GetUsersResponse)(nil), // 4: rafay.dev.rpc.v3.GetUsersResponse - (*UserResponse)(nil), // 5: rafay.dev.rpc.v3.UserResponse - (*v3.User)(nil), // 6: rafay.dev.types.user.v3.User + (*Empty)(nil), // 0: rafay.dev.rpc.v3.Empty + (*UserRequest)(nil), // 1: rafay.dev.rpc.v3.UserRequest + (*PutUserRequest)(nil), // 2: rafay.dev.rpc.v3.PutUserRequest + (*UserResponse)(nil), // 3: rafay.dev.rpc.v3.UserResponse + (*v3.User)(nil), // 4: rafay.dev.types.user.v3.User + (*v3.UserList)(nil), // 5: rafay.dev.types.user.v3.UserList } var file_proto_rpc_v3_user_proto_depIdxs = []int32{ - 6, // 0: rafay.dev.rpc.v3.PutUserRequest.user:type_name -> rafay.dev.types.user.v3.User - 6, // 1: rafay.dev.rpc.v3.GetUsersResponse.user:type_name -> rafay.dev.types.user.v3.User - 6, // 2: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User - 0, // 3: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.GetUsersRequest - 1, // 4: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.rpc.v3.GetUserRequest - 3, // 5: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.rpc.v3.PutUserRequest - 2, // 6: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.rpc.v3.DeleteUserRequest - 6, // 7: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User - 4, // 8: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.rpc.v3.GetUsersResponse - 6, // 9: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User - 5, // 10: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.rpc.v3.UserResponse - 5, // 11: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.UserResponse - 7, // [7:12] is the sub-list for method output_type - 2, // [2:7] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: rafay.dev.rpc.v3.PutUserRequest.user:type_name -> rafay.dev.types.user.v3.User + 4, // 1: rafay.dev.rpc.v3.User.CreateUser:input_type -> rafay.dev.types.user.v3.User + 0, // 2: rafay.dev.rpc.v3.User.GetUsers:input_type -> rafay.dev.rpc.v3.Empty + 1, // 3: rafay.dev.rpc.v3.User.GetUser:input_type -> rafay.dev.rpc.v3.UserRequest + 2, // 4: rafay.dev.rpc.v3.User.UpdateUser:input_type -> rafay.dev.rpc.v3.PutUserRequest + 1, // 5: rafay.dev.rpc.v3.User.DeleteUser:input_type -> rafay.dev.rpc.v3.UserRequest + 4, // 6: rafay.dev.rpc.v3.User.CreateUser:output_type -> rafay.dev.types.user.v3.User + 5, // 7: rafay.dev.rpc.v3.User.GetUsers:output_type -> rafay.dev.types.user.v3.UserList + 4, // 8: rafay.dev.rpc.v3.User.GetUser:output_type -> rafay.dev.types.user.v3.User + 3, // 9: rafay.dev.rpc.v3.User.UpdateUser:output_type -> rafay.dev.rpc.v3.UserResponse + 3, // 10: rafay.dev.rpc.v3.User.DeleteUser:output_type -> rafay.dev.rpc.v3.UserResponse + 6, // [6:11] is the sub-list for method output_type + 1, // [1:6] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_proto_rpc_v3_user_proto_init() } @@ -487,7 +371,7 @@ func file_proto_rpc_v3_user_proto_init() { } if !protoimpl.UnsafeEnabled { file_proto_rpc_v3_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersRequest); i { + switch v := v.(*Empty); i { case 0: return &v.state case 1: @@ -499,7 +383,7 @@ func file_proto_rpc_v3_user_proto_init() { } } file_proto_rpc_v3_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUserRequest); i { + switch v := v.(*UserRequest); i { case 0: return &v.state case 1: @@ -511,18 +395,6 @@ func file_proto_rpc_v3_user_proto_init() { } } file_proto_rpc_v3_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteUserRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PutUserRequest); i { case 0: return &v.state @@ -534,19 +406,7 @@ func file_proto_rpc_v3_user_proto_init() { return nil } } - file_proto_rpc_v3_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetUsersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_rpc_v3_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_proto_rpc_v3_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UserResponse); i { case 0: return &v.state @@ -565,7 +425,7 @@ func file_proto_rpc_v3_user_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_proto_rpc_v3_user_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/components/usermgmt/proto/rpc/v3/user.pb.gw.go b/components/usermgmt/proto/rpc/v3/user.pb.gw.go index 9985fea..3c62298 100644 --- a/components/usermgmt/proto/rpc/v3/user.pb.gw.go +++ b/components/usermgmt/proto/rpc/v3/user.pb.gw.go @@ -66,44 +66,26 @@ func local_request_User_CreateUser_0(ctx context.Context, marshaler runtime.Mars } -var ( - filter_User_GetUsers_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - func request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest + var protoReq Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.GetUsers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_User_GetUsers_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUsersRequest + var protoReq Empty var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_User_GetUsers_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.GetUsers(ctx, &protoReq) return msg, metadata, err } func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( @@ -129,7 +111,7 @@ func request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, cl } func local_request_User_GetUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( @@ -223,7 +205,7 @@ func local_request_User_UpdateUser_0(ctx context.Context, marshaler runtime.Mars } func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, client UserClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( @@ -249,7 +231,7 @@ func request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, } func local_request_User_DeleteUser_0(ctx context.Context, marshaler runtime.Marshaler, server UserServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteUserRequest + var protoReq UserRequest var metadata runtime.ServerMetadata var ( diff --git a/components/usermgmt/proto/rpc/v3/user.proto b/components/usermgmt/proto/rpc/v3/user.proto index f181039..948aaf5 100644 --- a/components/usermgmt/proto/rpc/v3/user.proto +++ b/components/usermgmt/proto/rpc/v3/user.proto @@ -64,15 +64,13 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { } }; -// Add option to filter by more org and group -message GetUsersRequest { string project = 1; } -message GetUserRequest { string userid = 1; } -message DeleteUserRequest { string userid = 1; } +// TODO: Add option to filter users list +message Empty {} +message UserRequest { string userid = 1; } message PutUserRequest { string userid = 1; rafay.dev.types.user.v3.User user = 2; } -message GetUsersResponse { repeated rafay.dev.types.user.v3.User user = 1; } message UserResponse { string status = 1; string message = 2; @@ -94,13 +92,13 @@ service User { }; }; - rpc GetUsers(GetUsersRequest) returns (GetUsersResponse) { + rpc GetUsers(Empty) returns (rafay.dev.types.user.v3.UserList) { option (google.api.http) = { get : "/auth/v3/users" }; }; - rpc GetUser(GetUserRequest) returns (rafay.dev.types.user.v3.User) { + rpc GetUser(UserRequest) returns (rafay.dev.types.user.v3.User) { option (google.api.http) = { get : "/auth/v3/user/{userid}" }; @@ -113,7 +111,7 @@ service User { }; }; - rpc DeleteUser(DeleteUserRequest) returns (UserResponse) { + rpc DeleteUser(UserRequest) returns (UserResponse) { option (google.api.http) = { delete : "/auth/v3/user/{userid}" }; diff --git a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go index 5fd6ffb..879604e 100644 --- a/components/usermgmt/proto/rpc/v3/user_grpc.pb.go +++ b/components/usermgmt/proto/rpc/v3/user_grpc.pb.go @@ -24,10 +24,10 @@ const _ = grpc.SupportPackageIsVersion7 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type UserClient interface { CreateUser(ctx context.Context, in *v3.User, opts ...grpc.CallOption) (*v3.User, error) - GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) - GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*v3.User, error) + GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v3.UserList, error) + GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*v3.User, error) UpdateUser(ctx context.Context, in *PutUserRequest, opts ...grpc.CallOption) (*UserResponse, error) - DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*UserResponse, error) + DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) } type userClient struct { @@ -47,8 +47,8 @@ func (c *userClient) CreateUser(ctx context.Context, in *v3.User, opts ...grpc.C return out, nil } -func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error) { - out := new(GetUsersResponse) +func (c *userClient) GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*v3.UserList, error) { + out := new(v3.UserList) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUsers", in, out, opts...) if err != nil { return nil, err @@ -56,7 +56,7 @@ func (c *userClient) GetUsers(ctx context.Context, in *GetUsersRequest, opts ... return out, nil } -func (c *userClient) GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*v3.User, error) { +func (c *userClient) GetUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*v3.User, error) { out := new(v3.User) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/GetUser", in, out, opts...) if err != nil { @@ -74,7 +74,7 @@ func (c *userClient) UpdateUser(ctx context.Context, in *PutUserRequest, opts .. return out, nil } -func (c *userClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*UserResponse, error) { +func (c *userClient) DeleteUser(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) { out := new(UserResponse) err := c.cc.Invoke(ctx, "/rafay.dev.rpc.v3.User/DeleteUser", in, out, opts...) if err != nil { @@ -88,10 +88,10 @@ func (c *userClient) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts // for forward compatibility type UserServer interface { CreateUser(context.Context, *v3.User) (*v3.User, error) - GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) - GetUser(context.Context, *GetUserRequest) (*v3.User, error) + GetUsers(context.Context, *Empty) (*v3.UserList, error) + GetUser(context.Context, *UserRequest) (*v3.User, error) UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) - DeleteUser(context.Context, *DeleteUserRequest) (*UserResponse, error) + DeleteUser(context.Context, *UserRequest) (*UserResponse, error) } // UnimplementedUserServer should be embedded to have forward compatible implementations. @@ -101,16 +101,16 @@ type UnimplementedUserServer struct { func (UnimplementedUserServer) CreateUser(context.Context, *v3.User) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateUser not implemented") } -func (UnimplementedUserServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error) { +func (UnimplementedUserServer) GetUsers(context.Context, *Empty) (*v3.UserList, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUsers not implemented") } -func (UnimplementedUserServer) GetUser(context.Context, *GetUserRequest) (*v3.User, error) { +func (UnimplementedUserServer) GetUser(context.Context, *UserRequest) (*v3.User, error) { return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented") } func (UnimplementedUserServer) UpdateUser(context.Context, *PutUserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented") } -func (UnimplementedUserServer) DeleteUser(context.Context, *DeleteUserRequest) (*UserResponse, error) { +func (UnimplementedUserServer) DeleteUser(context.Context, *UserRequest) (*UserResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented") } @@ -144,7 +144,7 @@ func _User_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(int } func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUsersRequest) + in := new(Empty) if err := dec(in); err != nil { return nil, err } @@ -156,13 +156,13 @@ func _User_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/rafay.dev.rpc.v3.User/GetUsers", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUsers(ctx, req.(*GetUsersRequest)) + return srv.(UserServer).GetUsers(ctx, req.(*Empty)) } return interceptor(ctx, in, info, handler) } func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetUserRequest) + in := new(UserRequest) if err := dec(in); err != nil { return nil, err } @@ -174,7 +174,7 @@ func _User_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/rafay.dev.rpc.v3.User/GetUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).GetUser(ctx, req.(*GetUserRequest)) + return srv.(UserServer).GetUser(ctx, req.(*UserRequest)) } return interceptor(ctx, in, info, handler) } @@ -198,7 +198,7 @@ func _User_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(int } func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteUserRequest) + in := new(UserRequest) if err := dec(in); err != nil { return nil, err } @@ -210,7 +210,7 @@ func _User_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(int FullMethod: "/rafay.dev.rpc.v3.User/DeleteUser", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(UserServer).DeleteUser(ctx, req.(*DeleteUserRequest)) + return srv.(UserServer).DeleteUser(ctx, req.(*UserRequest)) } return interceptor(ctx, in, info, handler) } diff --git a/components/usermgmt/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go index 7d67db2..40940df 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/user.pb.go @@ -8,7 +8,7 @@ package userv3 import ( v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" - v31 "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" + _ "github.com/RafaySystems/rcloud-base/components/adminsrv/proto/types/systempb/v3" _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -107,19 +107,40 @@ type UserSpec struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName,omitempty"` - LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` - Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` - TotpRequired string `protobuf:"bytes,6,opt,name=totpRequired,proto3" json:"totpRequired,omitempty"` - TotpSecret string `protobuf:"bytes,7,opt,name=totpSecret,proto3" json:"totpSecret,omitempty"` - Roles []*Role `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty"` - Groups []*Group `protobuf:"bytes,9,rep,name=groups,proto3" json:"groups,omitempty"` - Projects []*v31.Project `protobuf:"bytes,10,rep,name=projects,proto3" json:"projects,omitempty"` - EmailVerified bool `protobuf:"varint,11,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` - PhoneVerified bool `protobuf:"varint,12,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` - TotpVerified bool `protobuf:"varint,13,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` + FirstName string `protobuf:"bytes,1,opt,name=firstName,proto3" json:"firstName,omitempty"` + LastName string `protobuf:"bytes,2,opt,name=lastName,proto3" json:"lastName,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + Phone string `protobuf:"bytes,4,opt,name=phone,proto3" json:"phone,omitempty"` + Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"` + // string totpRequired = 6 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpRequired" + // description : "Flag to specify if TOTP is required" + // } ]; + // string totpSecret = 7 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpSecret" + // description : "Secret for TOTP" + // } ]; + // repeated rafay.dev.types.user.v3.Role roles = 8 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Roles" + // description : "Roles of the user" + // } ]; + // repeated rafay.dev.types.user.v3.Group groups = 9 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Group" + // description : "Groups of the user" + // } ]; + // repeated rafay.dev.types.system.v3.Project projects = 10 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Projects" + // description : "Projects of the user" + // } ]; + Groups []string `protobuf:"bytes,9,rep,name=groups,proto3" json:"groups,omitempty"` + EmailVerified bool `protobuf:"varint,11,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` + PhoneVerified bool `protobuf:"varint,12,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` + TotpVerified bool `protobuf:"varint,13,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` } func (x *UserSpec) Reset() { @@ -189,41 +210,13 @@ func (x *UserSpec) GetPassword() string { return "" } -func (x *UserSpec) GetTotpRequired() string { - if x != nil { - return x.TotpRequired - } - return "" -} - -func (x *UserSpec) GetTotpSecret() string { - if x != nil { - return x.TotpSecret - } - return "" -} - -func (x *UserSpec) GetRoles() []*Role { - if x != nil { - return x.Roles - } - return nil -} - -func (x *UserSpec) GetGroups() []*Group { +func (x *UserSpec) GetGroups() []string { if x != nil { return x.Groups } return nil } -func (x *UserSpec) GetProjects() []*v31.Project { - if x != nil { - return x.Projects - } - return nil -} - func (x *UserSpec) GetEmailVerified() bool { if x != nil { return x.EmailVerified @@ -371,7 +364,7 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 0x34, 0x0a, 0x32, 0x2a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x32, 0x04, 0x55, 0x73, 0x65, 0x72, 0xd2, 0x01, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0xd2, 0x01, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0xd2, 0x01, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xd2, 0x01, - 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xfd, 0x08, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0x8e, 0x06, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, 0x65, 0x63, 0x12, 0x44, 0x0a, 0x09, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x09, 0x46, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x16, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, @@ -392,103 +385,80 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0x14, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5a, 0x0a, 0x0c, 0x74, 0x6f, 0x74, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x36, - 0x92, 0x41, 0x33, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, - 0x64, 0x32, 0x23, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, - 0x66, 0x79, 0x20, 0x69, 0x66, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, - 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x69, 0x72, 0x65, 0x64, 0x12, 0x40, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x70, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0x92, 0x41, 0x1d, 0x2a, 0x0a, 0x54, - 0x6f, 0x74, 0x70, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x32, 0x0f, 0x53, 0x65, 0x63, 0x72, 0x65, - 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x70, - 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x52, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, - 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, - 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x1d, 0x92, 0x41, 0x1a, 0x2a, 0x05, 0x52, 0x6f, 0x6c, 0x65, 0x73, - 0x32, 0x11, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x56, 0x0a, 0x06, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x72, 0x61, 0x66, - 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, - 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x1e, 0x92, 0x41, 0x1b, 0x2a, - 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x32, 0x12, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x6f, - 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x12, 0x63, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x18, 0x0a, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, - 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x76, 0x33, - 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x08, 0x50, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x32, 0x14, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x52, 0x08, 0x70, - 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, 0x48, - 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, 0x77, - 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, 0x6f, 0x6e, 0x65, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, 0x4b, - 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, 0x77, - 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, - 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x70, 0x68, 0x6f, - 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0c, 0x74, 0x6f, - 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, - 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, - 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, 0x55, - 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, 0x41, 0x50, 0x49, - 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x3e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, + 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x05, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x32, 0x1a, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x20, 0x74, 0x68, 0x65, + 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x6f, + 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x48, 0x92, 0x41, 0x45, 0x2a, 0x0d, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x32, 0x32, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, + 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x71, 0x0a, 0x0d, 0x70, 0x68, 0x6f, 0x6e, + 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x42, + 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x0d, 0x50, 0x68, 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x32, 0x35, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, 0x6f, + 0x77, 0x20, 0x69, 0x66, 0x20, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, + 0x73, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0d, 0x70, 0x68, + 0x6f, 0x6e, 0x65, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x6a, 0x0a, 0x0c, 0x74, + 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, + 0x08, 0x42, 0x46, 0x92, 0x41, 0x43, 0x2a, 0x0c, 0x54, 0x6f, 0x74, 0x70, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x32, 0x31, 0x46, 0x6c, 0x61, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x68, + 0x6f, 0x77, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x4f, 0x54, 0x50, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x61, 0x73, 0x20, 0x76, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x40, 0x01, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x70, 0x56, + 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x2d, 0x92, 0x41, 0x2a, 0x0a, 0x28, 0x2a, 0x12, + 0x55, 0x73, 0x65, 0x72, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x32, 0x12, 0x55, 0x73, 0x65, 0x72, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x03, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, + 0x69, 0x73, 0x74, 0x12, 0x71, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x51, 0x92, 0x41, 0x4e, 0x2a, 0x0b, 0x41, 0x50, + 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x25, 0x41, 0x50, 0x49, 0x20, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, + 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x3a, 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, + 0x6d, 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, + 0x1e, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, - 0x16, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2e, 0x6b, 0x38, 0x73, 0x6d, 0x67, 0x6d, - 0x74, 0x2e, 0x69, 0x6f, 0x2f, 0x76, 0x33, 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x49, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x35, 0x92, 0x41, 0x32, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1e, - 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3a, 0x08, - 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, 0x41, 0x30, - 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x05, 0x69, 0x74, - 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, 0x61, - 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, 0x72, - 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, 0x49, - 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, - 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, 0x17, - 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, 0x73, 0x65, 0x72, - 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, - 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, - 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, 0x62, - 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, 0x54, - 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, - 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, - 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, 0x61, - 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x3a, - 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x12, 0x78, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x76, 0x33, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x42, 0x33, 0x92, 0x41, + 0x30, 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x22, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, + 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, + 0x01, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x05, 0x69, + 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x72, 0x61, 0x66, + 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x75, 0x73, 0x65, + 0x72, 0x2e, 0x76, 0x33, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x42, 0x28, 0x92, 0x41, 0x25, 0x2a, 0x05, + 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1c, 0x92, 0x41, 0x19, 0x0a, + 0x17, 0x2a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x09, 0x55, 0x73, 0x65, + 0x72, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0xff, 0x01, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, + 0x2e, 0x72, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x64, 0x65, 0x76, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, + 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x76, 0x33, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x54, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x52, 0x61, 0x66, 0x61, 0x79, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, 0x2f, 0x72, + 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, + 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x6d, 0x67, 0x6d, 0x74, 0x2f, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x70, + 0x62, 0x2f, 0x76, 0x33, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x76, 0x33, 0xa2, 0x02, 0x04, 0x52, 0x44, + 0x54, 0x55, 0xaa, 0x02, 0x17, 0x52, 0x61, 0x66, 0x61, 0x79, 0x2e, 0x44, 0x65, 0x76, 0x2e, 0x54, + 0x79, 0x70, 0x65, 0x73, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x2e, 0x56, 0x33, 0xca, 0x02, 0x17, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, + 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, 0xe2, 0x02, 0x23, 0x52, 0x61, 0x66, 0x61, 0x79, 0x5c, 0x44, + 0x65, 0x76, 0x5c, 0x54, 0x79, 0x70, 0x65, 0x73, 0x5c, 0x55, 0x73, 0x65, 0x72, 0x5c, 0x56, 0x33, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x52, + 0x61, 0x66, 0x61, 0x79, 0x3a, 0x3a, 0x44, 0x65, 0x76, 0x3a, 0x3a, 0x54, 0x79, 0x70, 0x65, 0x73, + 0x3a, 0x3a, 0x55, 0x73, 0x65, 0x72, 0x3a, 0x3a, 0x56, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -510,25 +480,19 @@ var file_proto_types_userpb_v3_user_proto_goTypes = []interface{}{ (*UserList)(nil), // 2: rafay.dev.types.user.v3.UserList (*v3.Metadata)(nil), // 3: rafay.dev.types.common.v3.Metadata (*v3.Status)(nil), // 4: rafay.dev.types.common.v3.Status - (*Role)(nil), // 5: rafay.dev.types.user.v3.Role - (*Group)(nil), // 6: rafay.dev.types.user.v3.Group - (*v31.Project)(nil), // 7: rafay.dev.types.system.v3.Project - (*v3.ListMetadata)(nil), // 8: rafay.dev.types.common.v3.ListMetadata + (*v3.ListMetadata)(nil), // 5: rafay.dev.types.common.v3.ListMetadata } var file_proto_types_userpb_v3_user_proto_depIdxs = []int32{ 3, // 0: rafay.dev.types.user.v3.User.metadata:type_name -> rafay.dev.types.common.v3.Metadata 1, // 1: rafay.dev.types.user.v3.User.spec:type_name -> rafay.dev.types.user.v3.UserSpec 4, // 2: rafay.dev.types.user.v3.User.status:type_name -> rafay.dev.types.common.v3.Status - 5, // 3: rafay.dev.types.user.v3.UserSpec.roles:type_name -> rafay.dev.types.user.v3.Role - 6, // 4: rafay.dev.types.user.v3.UserSpec.groups:type_name -> rafay.dev.types.user.v3.Group - 7, // 5: rafay.dev.types.user.v3.UserSpec.projects:type_name -> rafay.dev.types.system.v3.Project - 8, // 6: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata - 0, // 7: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 5, // 3: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 4: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User + 5, // [5:5] is the sub-list for method output_type + 5, // [5:5] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_proto_types_userpb_v3_user_proto_init() } diff --git a/components/usermgmt/proto/types/userpb/v3/user.proto b/components/usermgmt/proto/types/userpb/v3/user.proto index b5d354a..0ecdb39 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.proto +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -81,30 +81,35 @@ message UserSpec { title : "Password" description : "Password of the user" } ]; - string totpRequired = 6 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpRequired" - description : "Flag to specify if TOTP is required" - } ]; - string totpSecret = 7 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "TotpSecret" - description : "Secret for TOTP" - } ]; - repeated rafay.dev.types.user.v3.Role roles = 8 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Roles" - description : "Roles of the user" - } ]; - repeated rafay.dev.types.user.v3.Group groups = 9 + // string totpRequired = 6 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpRequired" + // description : "Flag to specify if TOTP is required" + // } ]; + // string totpSecret = 7 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "TotpSecret" + // description : "Secret for TOTP" + // } ]; + // repeated rafay.dev.types.user.v3.Role roles = 8 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Roles" + // description : "Roles of the user" + // } ]; + // repeated rafay.dev.types.user.v3.Group groups = 9 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Group" + // description : "Groups of the user" + // } ]; + // repeated rafay.dev.types.system.v3.Project projects = 10 + // [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + // title : "Projects" + // description : "Projects of the user" + // } ]; + repeated string groups = 9 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Group" - description : "Groups of the user" - } ]; - repeated rafay.dev.types.system.v3.Project projects = 10 - [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { - title : "Projects" - description : "Projects of the user" + description : "Groups the user belongs to" } ]; bool emailVerified = 11 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {