diff --git a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json index cd110d0..5f933a7 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/group.swagger.json @@ -1138,7 +1138,7 @@ "items": { "$ref": "#/definitions/v3ProjectNamespaceRole" }, - "description": "Project, namespace, role associations for permission", + "description": "Project, namespace, role associations for group", "title": "ProjectNamespaceRoles" }, "users": { 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 08b40cf..7197ca2 100644 --- a/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json +++ b/components/usermgmt/gen/openapi/proto/rpc/v3/user.swagger.json @@ -1387,6 +1387,29 @@ "project" ] }, + "v3ProjectNamespaceRole": { + "type": "object", + "properties": { + "project": { + "type": "string", + "description": "Project", + "title": "Project" + }, + "namespace": { + "type": "string", + "format": "int64", + "description": "Namespace", + "title": "Namespace" + }, + "role": { + "type": "string", + "description": "Role", + "title": "Role" + } + }, + "description": "Project, role and namespace pairing for permission", + "title": "ProjectNamespaceRole" + }, "v3User": { "type": "object", "properties": { @@ -1501,6 +1524,14 @@ "description": "Groups the user belongs to", "title": "Group" }, + "projectnamespaceroles": { + "type": "array", + "items": { + "$ref": "#/definitions/v3ProjectNamespaceRole" + }, + "description": "Project, namespace, role associations for user", + "title": "ProjectNamespaceRoles" + }, "emailVerified": { "type": "boolean", "description": "Flag to show if the email of the user was verified", diff --git a/components/usermgmt/main.go b/components/usermgmt/main.go index f43013b..972c445 100644 --- a/components/usermgmt/main.go +++ b/components/usermgmt/main.go @@ -119,7 +119,7 @@ func setup() { bundebug.FromEnv("BUNDEBUG"), )) - us = service.NewUserService(kc) + us = service.NewUserService(kc, db) gs = service.NewGroupService(db) rs = service.NewRoleService(db) diff --git a/components/usermgmt/pkg/internal/models/accountresourcerole.go b/components/usermgmt/pkg/internal/models/accountresourcerole.go new file mode 100644 index 0000000..a132816 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/accountresourcerole.go @@ -0,0 +1,25 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type AccountResourcerole struct { + bun.BaseModel `bun:"table:authsrv_accountresourcerole,alias:accountresourcerole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Default bool `bun:"default,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go new file mode 100644 index 0000000..2ab610d --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectaccountnamespacerole.go @@ -0,0 +1,26 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ProjectAccountNamespaceRole struct { + bun.BaseModel `bun:"table:authsrv_projectaccountnamespacerole,alias:projectaccountnamespacerole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + NamesapceId int64 `bun:"namespace_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go new file mode 100644 index 0000000..451a916 --- /dev/null +++ b/components/usermgmt/pkg/internal/models/projectaccountresourcerole.go @@ -0,0 +1,26 @@ +package models + +import ( + "time" + + "github.com/google/uuid" + "github.com/uptrace/bun" +) + +type ProjectAccountResourcerole struct { + bun.BaseModel `bun:"table:authsrv_projectaccountrole,alias:projectaccountrole"` + + ID uuid.UUID `bun:"id,type:uuid,pk,default:uuid_generate_v4()"` + Name string `bun:"name,notnull"` + Description string `bun:"description,notnull"` + CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` + ModifiedAt time.Time `bun:"modified_at,notnull,default:current_timestamp"` + Trash bool `bun:"trash,notnull"` + Default bool `bun:"default,notnull"` + OrganizationId uuid.UUID `bun:"organization_id,type:uuid"` + PartnerId uuid.UUID `bun:"partner_id,type:uuid"` + RoleId uuid.UUID `bun:"role_id,type:uuid"` + AccountId uuid.UUID `bun:"account_id,type:uuid"` + ProjectId uuid.UUID `bun:"project_id,type:uuid"` + Active bool `bun:"active,notnull"` +} diff --git a/components/usermgmt/pkg/internal/models/projectgroupnamespace.go b/components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go similarity index 100% rename from components/usermgmt/pkg/internal/models/projectgroupnamespace.go rename to components/usermgmt/pkg/internal/models/projectgroupnamespacerole.go diff --git a/components/usermgmt/pkg/service/group.go b/components/usermgmt/pkg/service/group.go index 94ba0bb..9ab96dc 100644 --- a/components/usermgmt/pkg/service/group.go +++ b/components/usermgmt/pkg/service/group.go @@ -50,7 +50,7 @@ func NewGroupService(db *bun.DB) GroupService { } // Map roles to groups -func (s *groupService) userGroupRoleRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { +func (s *groupService) updateGroupRoleRelation(ctx context.Context, group *userv3.Group) (*userv3.Group, error) { groupId, _ := uuid.Parse(group.GetMetadata().GetId()) partnerId, _ := uuid.Parse(group.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(group.GetMetadata().GetOrganization()) @@ -234,7 +234,7 @@ func (s *groupService) Create(ctx context.Context, group *userv3.Group) (*userv3 return group, err } - group, err = s.userGroupRoleRelation(ctx, group) + group, err = s.updateGroupRoleRelation(ctx, group) if err != nil { group.Status = &v3.Status{ ConditionType: "Create", diff --git a/components/usermgmt/pkg/service/role.go b/components/usermgmt/pkg/service/role.go index 3f8b768..c847fc0 100644 --- a/components/usermgmt/pkg/service/role.go +++ b/components/usermgmt/pkg/service/role.go @@ -48,11 +48,11 @@ func NewRoleService(db *bun.DB) RoleService { } } +// TODO: This right now just lets us create roles, we will have to make sure the mapping happens func (s *roleService) Create(ctx context.Context, role *userv3.Role) (*userv3.Role, error) { partnerId, _ := uuid.Parse(role.GetMetadata().GetPartner()) organizationId, _ := uuid.Parse(role.GetMetadata().GetOrganization()) - // TODO: find out the interaction if project key is present in the role metadata // TODO: check if a role with the same 'name' already exists and fail if so // TODO: we should be specifying names instead of ids for partner and org // TODO: create vs apply difference like in kubectl?? diff --git a/components/usermgmt/pkg/service/user.go b/components/usermgmt/pkg/service/user.go index 4285ad9..6fd1f93 100644 --- a/components/usermgmt/pkg/service/user.go +++ b/components/usermgmt/pkg/service/user.go @@ -3,10 +3,16 @@ package service import ( "context" "fmt" + "time" + "github.com/google/uuid" kclient "github.com/ory/kratos-client-go" + bun "github.com/uptrace/bun" + "google.golang.org/protobuf/types/known/timestamppb" v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/models" + "github.com/RafaySystems/rcloud-base/components/usermgmt/pkg/internal/persistence/provider/pg" userrpcv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/rpc/v3" userv3 "github.com/RafaySystems/rcloud-base/components/usermgmt/proto/types/userpb/v3" ) @@ -34,11 +40,12 @@ type UserService interface { } type userService struct { - kc *kclient.APIClient + kc *kclient.APIClient + dao pg.EntityDAO } -func NewUserService(kc *kclient.APIClient) UserService { - return &userService{kc: kc} +func NewUserService(kc *kclient.APIClient, db *bun.DB) UserService { + return &userService{kc: kc, dao: pg.NewEntityDAO(db)} } // Convert from kratos.Identity to GVK format @@ -58,6 +65,98 @@ func identityToUser(id *kclient.Identity) *userv3.User { } } +// Map roles to accounts +func (s *userService) updateUserRoleRelation(ctx context.Context, user *userv3.User) (*userv3.User, error) { + accountId, _ := uuid.Parse(user.GetMetadata().GetId()) + partnerId, _ := uuid.Parse(user.GetMetadata().GetPartner()) + organizationId, _ := uuid.Parse(user.GetMetadata().GetOrganization()) + + // TODO: also parse out namesapce + projectNamespaceRoles := user.GetSpec().GetProjectnamespaceroles() + + // TODO: add transactions + var panrs []models.ProjectAccountNamespaceRole + var pars []models.ProjectAccountResourcerole + var ars []models.AccountResourcerole + for _, pnr := range projectNamespaceRoles { + projectId, perr := uuid.Parse(pnr.GetProject()) + namespaceId := pnr.GetNamespace() + roleId, err := uuid.Parse(pnr.GetRole()) + if err != nil { + return user, err + } + switch { + case namespaceId != 0: // TODO: namespaceId can be zero? + panr := models.ProjectAccountNamespaceRole{ + Name: user.GetMetadata().GetName(), + Description: user.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + AccountId: accountId, + ProjectId: projectId, + NamesapceId: namespaceId, + Active: true, + } + panrs = append(panrs, panr) + case perr == nil: // TODO: maybe a better check? + par := models.ProjectAccountResourcerole{ + Name: user.GetMetadata().GetName(), + Description: user.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Default: true, // TODO: what is this for? + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + AccountId: accountId, + ProjectId: projectId, + Active: true, + } + pars = append(pars, par) + default: + ar := models.AccountResourcerole{ + Name: user.GetMetadata().GetName(), + Description: user.GetMetadata().GetDescription(), + CreatedAt: time.Now(), + ModifiedAt: time.Now(), + Trash: false, + Default: true, // TODO: what is this for? + RoleId: roleId, + PartnerId: partnerId, + OrganizationId: organizationId, + AccountId: accountId, + Active: true, + } + ars = append(ars, ar) + } + } + if len(panrs) > 0 { + _, err := s.dao.Create(ctx, &panrs) + if err != nil { + return user, err + } + } + if len(pars) > 0 { + _, err := s.dao.Create(ctx, &pars) + if err != nil { + return user, err + } + } + if len(ars) > 0 { + _, err := s.dao.Create(ctx, &ars) + if err != nil { + return user, err + } + } + + return user, nil +} + func (s *userService) Create(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}) @@ -67,11 +166,23 @@ func (s *userService) Create(ctx context.Context, user *userv3.User) (*userv3.Us // TODO: forward exact error message from kratos (eg: json schema validation) return nil, err } + user.Metadata.Id = ir.Id rlb := kclient.NewAdminCreateSelfServiceRecoveryLinkBody(ir.Id) rl, _, err := s.kc.V0alpha2Api.AdminCreateSelfServiceRecoveryLink(ctx).AdminCreateSelfServiceRecoveryLinkBody(*rlb).Execute() if err != nil { return nil, err } + + user, err = s.updateUserRoleRelation(ctx, user) + if err != nil { + user.Status = &v3.Status{ + ConditionType: "Create", + ConditionStatus: v3.ConditionStatus_StatusFailed, + LastUpdated: timestamppb.Now(), + } + return user, err + } + fmt.Println("Recovery link:", rl.RecoveryLink) // TODO: email the recovery link to the user user.Metadata = &v3.Metadata{ Id: ir.Id, diff --git a/components/usermgmt/proto/types/userpb/v3/group.pb.go b/components/usermgmt/proto/types/userpb/v3/group.pb.go index 1cd49f0..f57131e 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/group.pb.go @@ -366,72 +366,72 @@ var file_proto_types_userpb_v3_group_proto_rawDesc = []byte{ 0x32, 0x32, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x70, 0x61, 0x69, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xdd, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, - 0x65, 0x63, 0x12, 0xb5, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, + 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd8, 0x02, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, + 0x65, 0x63, 0x12, 0xb0, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 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, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, - 0x65, 0x42, 0x50, 0x92, 0x41, 0x4d, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x34, 0x50, + 0x65, 0x42, 0x4b, 0x92, 0x41, 0x48, 0x2a, 0x15, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x32, 0x2f, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, - 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, - 0x55, 0x73, 0x65, 0x72, 0x73, 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, - 0x73, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, - 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, - 0x54, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x3a, 0x2f, 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, - 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, - 0x73, 0x74, 0x12, 0x5a, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, - 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x40, 0x01, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, - 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, - 0x29, 0x2a, 0x04, 0x4b, 0x69, 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, - 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, - 0x12, 0x79, 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, 0x34, 0x92, 0x41, 0x31, - 0x2a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, - 0x70, 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, 0x5f, 0x0a, 0x05, 0x69, - 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 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, 0x29, 0x92, 0x41, 0x26, 0x2a, - 0x05, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x73, 0x40, 0x01, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, - 0x1b, 0x0a, 0x19, 0x2a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 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, 0x0a, 0x47, 0x72, - 0x6f, 0x75, 0x70, 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, + 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x39, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x09, 0x42, 0x23, 0x92, 0x41, 0x20, 0x2a, 0x05, 0x55, 0x73, 0x65, 0x72, 0x73, + 0x32, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x20, + 0x66, 0x6f, 0x72, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, + 0x12, 0x2c, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0x92, 0x41, 0x15, 0x2a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x32, 0x0d, 0x54, 0x79, 0x70, 0x65, 0x20, + 0x6f, 0x66, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x3a, 0x2f, + 0x92, 0x41, 0x2c, 0x0a, 0x2a, 0x2a, 0x13, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x53, 0x70, 0x65, + 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x13, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0xa5, 0x03, 0x0a, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x5a, 0x0a, + 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x3a, 0x92, 0x41, 0x37, 0x2a, 0x0b, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x32, 0x26, 0x41, 0x50, 0x49, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, + 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x0a, 0x61, + 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x0a, 0x04, 0x6b, 0x69, 0x6e, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2c, 0x92, 0x41, 0x29, 0x2a, 0x04, 0x4b, 0x69, + 0x6e, 0x64, 0x32, 0x1f, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, + 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x40, 0x01, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x79, 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, 0x34, 0x92, 0x41, 0x31, 0x2a, 0x08, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x32, 0x23, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, + 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 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, 0x5f, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x04, 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, 0x29, 0x92, 0x41, 0x26, 0x2a, 0x05, 0x49, 0x74, 0x65, 0x6d, + 0x73, 0x32, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, + 0x72, 0x6f, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x40, 0x01, + 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x2a, 0x09, + 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x32, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x40, 0x01, 0x42, 0x80, 0x02, 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, 0x0a, 0x47, 0x72, 0x6f, 0x75, 0x70, 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 ( diff --git a/components/usermgmt/proto/types/userpb/v3/group.proto b/components/usermgmt/proto/types/userpb/v3/group.proto index 052e5f3..5a6c86d 100644 --- a/components/usermgmt/proto/types/userpb/v3/group.proto +++ b/components/usermgmt/proto/types/userpb/v3/group.proto @@ -79,7 +79,7 @@ message GroupSpec { repeated ProjectNamespaceRole projectnamespaceroles = 1 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "ProjectNamespaceRoles" - description : "Project, namespace, role associations for permission" + description : "Project, namespace, role associations for group" } ]; repeated string users = 2 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { diff --git a/components/usermgmt/proto/types/userpb/v3/user.pb.go b/components/usermgmt/proto/types/userpb/v3/user.pb.go index 4674fd6..df648a2 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.pb.go +++ b/components/usermgmt/proto/types/userpb/v3/user.pb.go @@ -137,10 +137,11 @@ type UserSpec struct { // 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"` + Groups []string `protobuf:"bytes,6,rep,name=groups,proto3" json:"groups,omitempty"` + Projectnamespaceroles []*ProjectNamespaceRole `protobuf:"bytes,7,rep,name=projectnamespaceroles,proto3" json:"projectnamespaceroles,omitempty"` + EmailVerified bool `protobuf:"varint,8,opt,name=emailVerified,proto3" json:"emailVerified,omitempty"` + PhoneVerified bool `protobuf:"varint,9,opt,name=phoneVerified,proto3" json:"phoneVerified,omitempty"` + TotpVerified bool `protobuf:"varint,10,opt,name=totpVerified,proto3" json:"totpVerified,omitempty"` } func (x *UserSpec) Reset() { @@ -217,6 +218,13 @@ func (x *UserSpec) GetGroups() []string { return nil } +func (x *UserSpec) GetProjectnamespaceroles() []*ProjectNamespaceRole { + if x != nil { + return x.Projectnamespaceroles + } + return nil +} + func (x *UserSpec) GetEmailVerified() bool { if x != nil { return x.EmailVerified @@ -364,7 +372,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, 0x8e, 0x06, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x53, 0x70, + 0x04, 0x73, 0x70, 0x65, 0x63, 0x22, 0xc0, 0x07, 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, @@ -386,79 +394,90 @@ var file_proto_types_userpb_v3_user_proto_rawDesc = []byte{ 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, 0x3e, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x42, 0x26, 0x92, 0x41, 0x23, 0x2a, 0x05, 0x47, + 0x70, 0x73, 0x18, 0x06, 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, - 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, + 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0xaf, 0x01, 0x0a, 0x15, 0x70, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 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, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x4a, 0x92, 0x41, 0x47, 0x2a, 0x15, 0x50, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x6f, + 0x6c, 0x65, 0x73, 0x32, 0x2e, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x72, 0x6f, 0x6c, 0x65, 0x20, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x75, + 0x73, 0x65, 0x72, 0x52, 0x15, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0d, 0x65, 0x6d, + 0x61, 0x69, 0x6c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x08, 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, 0x09, 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, 0x0a, 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, 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 ( @@ -475,24 +494,26 @@ func file_proto_types_userpb_v3_user_proto_rawDescGZIP() []byte { var file_proto_types_userpb_v3_user_proto_msgTypes = make([]protoimpl.MessageInfo, 3) var file_proto_types_userpb_v3_user_proto_goTypes = []interface{}{ - (*User)(nil), // 0: rafay.dev.types.user.v3.User - (*UserSpec)(nil), // 1: rafay.dev.types.user.v3.UserSpec - (*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 - (*v3.ListMetadata)(nil), // 5: rafay.dev.types.common.v3.ListMetadata + (*User)(nil), // 0: rafay.dev.types.user.v3.User + (*UserSpec)(nil), // 1: rafay.dev.types.user.v3.UserSpec + (*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 + (*ProjectNamespaceRole)(nil), // 5: rafay.dev.types.user.v3.ProjectNamespaceRole + (*v3.ListMetadata)(nil), // 6: 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.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 + 5, // 3: rafay.dev.types.user.v3.UserSpec.projectnamespaceroles:type_name -> rafay.dev.types.user.v3.ProjectNamespaceRole + 6, // 4: rafay.dev.types.user.v3.UserList.metadata:type_name -> rafay.dev.types.common.v3.ListMetadata + 0, // 5: rafay.dev.types.user.v3.UserList.items:type_name -> rafay.dev.types.user.v3.User + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] 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 0ecdb39..6cd9650 100644 --- a/components/usermgmt/proto/types/userpb/v3/user.proto +++ b/components/usermgmt/proto/types/userpb/v3/user.proto @@ -106,24 +106,29 @@ message UserSpec { // title : "Projects" // description : "Projects of the user" // } ]; - repeated string groups = 9 + repeated string groups = 6 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "Group" description : "Groups the user belongs to" } ]; - bool emailVerified = 11 + repeated rafay.dev.types.user.v3.ProjectNamespaceRole projectnamespaceroles = 7 + [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + title : "ProjectNamespaceRoles" + description : "Project, namespace, role associations for user" + } ]; + bool emailVerified = 8 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "EmailVerified" description : "Flag to show if the email of the user was verified" read_only : true } ]; - bool phoneVerified = 12 + bool phoneVerified = 9 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "PhoneVerified" description : "Flag to show if phone number of the user was verified" read_only : true } ]; - bool totpVerified = 13 + bool totpVerified = 10 [ (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { title : "TotpVerified" description : "Flag to show if the TOTP of the user was verified"