Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
refactor: idp provider (#4834)
Danny Xufa5ca3fa6009
diff --git a/backend/api/v1/auth_service.go b/backend/api/v1/auth_service.goindex 23b5d13734..cbf3c341d7 100644--- a/backend/api/v1/auth_service.go+++ b/backend/api/v1/auth_service.go@@ -29,10 +29,6 @@ import (v1pb "github.com/bytebase/bytebase/proto/generated-go/v1")-var (- emptyIdentityProvider = ""-)-// AuthService implements the auth service.type AuthService struct {v1pb.UnimplementedAuthServiceServer@@ -236,9 +232,6 @@ func (s *AuthService) UpdateUser(ctx context.Context, request *v1pb.UpdateUserRecase "user.title":patch.Name = &request.User.Titlecase "user.password":- if user.IdentityProviderResourceID != nil {- return nil, status.Errorf(codes.PermissionDenied, "SSO user cannot modify password")- }passwordHash, err := bcrypt.GenerateFromPassword([]byte(request.User.Password), bcrypt.DefaultCost)if err != nil {return nil, status.Errorf(codes.Internal, "failed to generate password hash, error: %v", err)@@ -351,9 +344,6 @@ func convertToUser(user *store.UserMessage) *v1pb.User {UserType: userType,UserRole: role,}- if user.IdentityProviderResourceID != nil {- convertedUser.IdentityProvider = fmt.Sprintf("%s%s", identityProviderNamePrefix, *user.IdentityProviderResourceID)- }return convertedUser}@@ -374,9 +364,9 @@ func (s *AuthService) Login(ctx context.Context, request *v1pb.LoginRequest) (*vvar loginUser *store.UserMessagevar err errorif request.IdpName == "" {- loginUser, err = s.getUserWithLoginRequestOfBytebase(ctx, request)+ loginUser, err = s.getAndVerifyUser(ctx, request)} else {- loginUser, err = s.getUserWithLoginRequestOfIdentityProvider(ctx, request)+ loginUser, err = s.getOrCreateUserWithIDP(ctx, request)}if err != nil {return nil, err@@ -428,11 +418,10 @@ func (*AuthService) Logout(ctx context.Context, _ *v1pb.LogoutRequest) (*emptypbreturn &emptypb.Empty{}, nil}-func (s *AuthService) getUserWithLoginRequestOfBytebase(ctx context.Context, request *v1pb.LoginRequest) (*store.UserMessage, error) {+func (s *AuthService) getAndVerifyUser(ctx context.Context, request *v1pb.LoginRequest) (*store.UserMessage, error) {user, err := s.store.GetUser(ctx, &store.FindUserMessage{- Email: &request.Email,- ShowDeleted: true,- IdentityProviderResourceID: &emptyIdentityProvider,+ Email: &request.Email,+ ShowDeleted: true,})if err != nil {return nil, status.Errorf(codes.Internal, "failed to get user by email %q: %v", request.Email, err)@@ -446,34 +435,33 @@ func (s *AuthService) getUserWithLoginRequestOfBytebase(ctx context.Context, req// Compare the stored hashed password, with the hashed version of the password that was received.if err := bcrypt.CompareHashAndPassword([]byte(user.PasswordHash), []byte(request.Password)); err != nil {// If the two passwords don't match, return a 401 status.- return nil, status.Errorf(codes.InvalidArgument, "incorrect password")+ return nil, status.Errorf(codes.Unauthenticated, "incorrect password")}return user, nil}-func (s *AuthService) getUserWithLoginRequestOfIdentityProvider(ctx context.Context, request *v1pb.LoginRequest) (*store.UserMessage, error) {- identityProviderID, err := getIdentityProviderID(request.IdpName)+func (s *AuthService) getOrCreateUserWithIDP(ctx context.Context, request *v1pb.LoginRequest) (*store.UserMessage, error) {+ idpID, err := getIdentityProviderID(request.IdpName)if err != nil {return nil, status.Errorf(codes.InvalidArgument, "failed to get identity provider ID: %v", err)}-- identityProvider, err := s.store.GetIdentityProvider(ctx, &store.FindIdentityProviderMessage{- ResourceID: &identityProviderID,+ idp, err := s.store.GetIdentityProvider(ctx, &store.FindIdentityProviderMessage{+ ResourceID: &idpID,})if err != nil {return nil, status.Errorf(codes.Internal, "failed to get identity provider: %v", err)}- if identityProvider == nil {+ if idp == nil {return nil, status.Errorf(codes.NotFound, "identity provider not found")}var userInfo *storepb.IdentityProviderUserInfo- if identityProvider.Type == storepb.IdentityProviderType_OAUTH2 {+ if idp.Type == storepb.IdentityProviderType_OAUTH2 {oauth2Context := request.Context.GetOauth2Context()if oauth2Context == nil {return nil, status.Errorf(codes.InvalidArgument, "missing OAuth2 context")}- oauth2IdentityProvider, err := oauth2.NewIdentityProvider(identityProvider.Config.GetOauth2Config())+ oauth2IdentityProvider, err := oauth2.NewIdentityProvider(idp.Config.GetOauth2Config())if err != nil {return nil, status.Errorf(codes.Internal, "failed to create new OAuth2 identity provider: %v", err)}@@ -486,7 +474,7 @@ func (s *AuthService) getUserWithLoginRequestOfIdentityProvider(ctx context.Contif err != nil {return nil, status.Errorf(codes.Internal, "failed to get user info: %v", err)}- } else if identityProvider.Type == storepb.IdentityProviderType_OIDC {+ } else if idp.Type == storepb.IdentityProviderType_OIDC {oauth2Context := request.Context.GetOauth2Context()if oauth2Context == nil {return nil, status.Errorf(codes.InvalidArgument, "missing OAuth2 context")@@ -495,10 +483,10 @@ func (s *AuthService) getUserWithLoginRequestOfIdentityProvider(ctx context.Contidp, err := oidc.NewIdentityProvider(ctx,oidc.IdentityProviderConfig{- Issuer: identityProvider.Config.GetOidcConfig().Issuer,- ClientID: identityProvider.Config.GetOidcConfig().ClientId,- ClientSecret: identityProvider.Config.GetOidcConfig().ClientSecret,- FieldMapping: identityProvider.Config.GetOidcConfig().FieldMapping,+ Issuer: idp.Config.GetOidcConfig().Issuer,+ ClientID: idp.Config.GetOidcConfig().ClientId,+ ClientSecret: idp.Config.GetOidcConfig().ClientSecret,+ FieldMapping: idp.Config.GetOidcConfig().FieldMapping,},)if err != nil {@@ -516,25 +504,26 @@ func (s *AuthService) getUserWithLoginRequestOfIdentityProvider(ctx context.Contreturn nil, status.Errorf(codes.Internal, "failed to get user info: %v", err)}} else {- return nil, status.Errorf(codes.InvalidArgument, "identity provider type %s not supported", identityProvider.Type.String())+ return nil, status.Errorf(codes.InvalidArgument, "identity provider type %s not supported", idp.Type.String())}if userInfo == nil {return nil, status.Errorf(codes.NotFound, "identity provider user info not found")}- // The userinfo's email comes from identity provider, we cannot ensure it's lowercase.- formatedEmail := strings.ToLower(userInfo.Email)- if formatedEmail == "" {+ // The userinfo's email comes from identity provider, it has to be converted to lower-case.+ // TODO(boojack): instead of deciding the email magically, let's have the users to configure it in IDP config since emails may not be the primary.+ email := strings.ToLower(userInfo.Email)+ if email == "" {// If the email is empty, we should concatenate the identifier and// the IdP's domain as the user's email.- formatedEmail = strings.ToLower(fmt.Sprintf("%s@%s", userInfo.Identifier, identityProvider.Domain))+ email = strings.ToLower(fmt.Sprintf("%s@%s", userInfo.Identifier, idp.Domain))}users, err := s.store.ListUsers(ctx, &store.FindUserMessage{- Email: &formatedEmail,+ Email: &email,ShowDeleted: true,})if err != nil {- return nil, status.Errorf(codes.Internal, "failed to list users by email %s: %v", formatedEmail, err)+ return nil, status.Errorf(codes.Internal, "failed to list users by email %s: %v", email, err)}var user *store.UserMessage@@ -550,7 +539,7 @@ func (s *AuthService) getUserWithLoginRequestOfIdentityProvider(ctx context.Cont}newUser, err := s.store.CreateUser(ctx, &store.UserMessage{Name: userInfo.DisplayName,- Email: formatedEmail,+ Email: email,Type: api.EndUser,PasswordHash: string(passwordHash),}, api.SystemBotID)diff --git a/backend/store/principal.go b/backend/store/principal.goindex bdc11dc2d0..e229158c6d 100644--- a/backend/store/principal.go+++ b/backend/store/principal.go@@ -3,16 +3,13 @@ package storeimport ("context""database/sql"- "encoding/json""fmt""strings""github.com/pkg/errors"- "google.golang.org/protobuf/encoding/protojson""github.com/bytebase/bytebase/backend/common"api "github.com/bytebase/bytebase/backend/legacyapi"- storepb "github.com/bytebase/bytebase/proto/generated-go/store")// GetPrincipalList gets a list of Principal instances.@@ -67,9 +64,6 @@ func composePrincipal(user *UserMessage) (*api.Principal, error) {if principal.ID == api.SystemBotID {principal.Role = api.Owner}- if user.IdentityProviderResourceID != nil {- principal.IdentityProviderName = *user.IdentityProviderResourceID- }return principal, nil}@@ -80,35 +74,27 @@ type FindUserMessage struct {Role *api.RoleShowDeleted boolType *api.PrincipalType- // IdentityProviderResourceID is the name of the identity provider related with the user.- // If set with empty string, then only those users that are not from the idp will be found.- IdentityProviderResourceID *string- // Available only if the IdentityProviderResourceID is not nil.- IdentityProviderUserIdentifier string}// UpdateUserMessage is the message to update a user.type UpdateUserMessage struct {- Email *string- Name *string- PasswordHash *string- Role *api.Role- IdentityProviderUserInfo *storepb.IdentityProviderUserInfo- Delete *bool+ Email *string+ Name *string+ PasswordHash *string+ Role *api.Role+ Delete *bool}// UserMessage is the message for an user.type UserMessage struct {ID int// Email must be lower case.- Email string- Name string- Type api.PrincipalType- PasswordHash string- IdentityProviderResourceID *string- IdentityProviderUserInfo *storepb.IdentityProviderUserInfo- Role api.Role- MemberDeleted bool+ Email string+ Name string+ Type api.PrincipalType+ PasswordHash string+ Role api.Role+ MemberDeleted bool}// GetUser gets an user.@@ -190,10 +176,8 @@ func (s *Store) GetUserByID(ctx context.Context, id int) (*UserMessage, error) {return user, nil}-func (s *Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage) ([]*UserMessage, error) {+func (*Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage) ([]*UserMessage, error) {where, args := []string{"TRUE"}, []interface{}{}- // Do not to select those archived IdP user.- where, args = append(where, fmt.Sprintf("(principal.idp_id IS NULL OR idp.row_status = $%d)", len(args)+1)), append(args, api.Normal)if v := find.ID; v != nil {where, args = append(where, fmt.Sprintf("principal.id = $%d", len(args)+1)), append(args, *v)}@@ -209,21 +193,6 @@ func (s *Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage)if !find.ShowDeleted {where, args = append(where, fmt.Sprintf("member.row_status = $%d", len(args)+1)), append(args, api.Normal)}- if find.IdentityProviderResourceID != nil {- if *find.IdentityProviderResourceID == "" {- where = append(where, "principal.idp_id IS NULL")- } else {- // Get identity provider's UID with resource id.- identityProvider, err := s.GetIdentityProvider(ctx, &FindIdentityProviderMessage{- ResourceID: find.IdentityProviderResourceID,- })- if err != nil {- return nil, err- }- where, args = append(where, fmt.Sprintf("principal.idp_id = $%d", len(args)+1)), append(args, identityProvider.UID)- where = append(where, fmt.Sprintf("principal.idp_user_info->>'identifier' = '%s'", find.IdentityProviderUserIdentifier))- }- }var userMessages []*UserMessagerows, err := tx.QueryContext(ctx, `@@ -233,13 +202,10 @@ func (s *Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage)principal.name,principal.type,principal.password_hash,- principal.idp_user_info,member.role,- member.row_status AS row_status,- idp.resource_id AS idp_resource_id+ member.row_status AS row_statusFROM principalLEFT JOIN member ON principal.id = member.principal_id- LEFT JOIN idp ON principal.idp_id = idp.idWHERE `+strings.Join(where, " AND "),args...,)@@ -249,18 +215,15 @@ func (s *Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage)defer rows.Close()for rows.Next() {var userMessage UserMessage- var role, rowStatus, idpResourceID sql.NullString- var idpUserInfo string+ var role, rowStatus sql.NullStringif err := rows.Scan(&userMessage.ID,&userMessage.Email,&userMessage.Name,&userMessage.Type,&userMessage.PasswordHash,- &idpUserInfo,&role,&rowStatus,- &idpResourceID,); err != nil {return nil, FormatError(err)}@@ -276,14 +239,6 @@ func (s *Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage)} else if userMessage.ID != api.SystemBotID {userMessage.MemberDeleted = true}- if idpResourceID.Valid {- userMessage.IdentityProviderResourceID = &idpResourceID.String- var identityProviderUserInfo storepb.IdentityProviderUserInfo- if err := json.Unmarshal([]byte(idpUserInfo), &identityProviderUserInfo); err != nil {- return nil, err- }- userMessage.IdentityProviderUserInfo = &identityProviderUserInfo- }userMessages = append(userMessages, &userMessage)}return userMessages, nil@@ -291,8 +246,11 @@ func (s *Store) listUserImpl(ctx context.Context, tx *Tx, find *FindUserMessage)// CreateUser creates an user.func (s *Store) CreateUser(ctx context.Context, create *UserMessage, creatorID int) (*UserMessage, error) {+ // Double check the passing-in emails.// We use lower-case for emails.- create.Email = strings.ToLower(create.Email)+ if create.Email != strings.ToLower(create.Email) {+ return nil, errors.Errorf("emails must be lower-case when they are passed into store")+ }tx, err := s.db.BeginTx(ctx, nil)if err != nil {@@ -302,21 +260,6 @@ func (s *Store) CreateUser(ctx context.Context, create *UserMessage, creatorID iset := []string{"creator_id", "updater_id", "email", "name", "type", "password_hash"}args := []interface{}{creatorID, creatorID, create.Email, create.Name, create.Type, create.PasswordHash}- // Set idp fields into principal only when the related id is not null.- if create.IdentityProviderResourceID != nil {- identityProvider, err := s.GetIdentityProvider(ctx, &FindIdentityProviderMessage{- ResourceID: create.IdentityProviderResourceID,- })- if err != nil {- return nil, errors.Wrapf(err, "failed to find identity provider with resource id %s", *create.IdentityProviderResourceID)- }- set, args = append(set, "idp_id"), append(args, identityProvider.UID)- userInfoBytes, err := protojson.Marshal(create.IdentityProviderUserInfo)- if err != nil {- return nil, err- }- set, args = append(set, "idp_user_info"), append(args, string(userInfoBytes))- }placeholder := []string{}for index := range set {placeholder = append(placeholder, fmt.Sprintf("$%d", index+1))@@ -372,14 +315,12 @@ func (s *Store) CreateUser(ctx context.Context, create *UserMessage, creatorID i}user := &UserMessage{- ID: userID,- Email: create.Email,- Name: create.Name,- Type: create.Type,- PasswordHash: create.PasswordHash,- Role: role,- IdentityProviderResourceID: create.IdentityProviderResourceID,- IdentityProviderUserInfo: create.IdentityProviderUserInfo,+ ID: userID,+ Email: create.Email,+ Name: create.Name,+ Type: create.Type,+ PasswordHash: create.PasswordHash,+ Role: role,}s.userIDCache.Store(user.ID, user)return user, nil@@ -401,13 +342,6 @@ func (s *Store) UpdateUser(ctx context.Context, userID int, patch *UpdateUserMesif v := patch.PasswordHash; v != nil {principalSet, principalArgs = append(principalSet, fmt.Sprintf("password_hash = $%d", len(principalArgs)+1)), append(principalArgs, *v)}- if v := patch.IdentityProviderUserInfo; v != nil {- userInfoBytes, err := protojson.Marshal(v)- if err != nil {- return nil, err- }- principalSet, principalArgs = append(principalSet, fmt.Sprintf("idp_user_info = $%d", len(principalArgs)+1)), append(principalArgs, string(userInfoBytes))- }principalArgs = append(principalArgs, userID)memberSet, memberArgs := []string{"updater_id = $1"}, []interface{}{fmt.Sprintf("%d", updaterID)}@@ -430,13 +364,11 @@ func (s *Store) UpdateUser(ctx context.Context, userID int, patch *UpdateUserMesdefer tx.Rollback()user := &UserMessage{}- var idpID sql.NullInt32- var idpUserInfo stringif err := tx.QueryRowContext(ctx, fmt.Sprintf(`UPDATE principalSET `+strings.Join(principalSet, ", ")+`WHERE id = $%d- RETURNING id, email, name, type, password_hash, idp_id, idp_user_info+ RETURNING id, email, name, type, password_hash`, len(principalArgs)),principalArgs...,).Scan(@@ -445,29 +377,12 @@ func (s *Store) UpdateUser(ctx context.Context, userID int, patch *UpdateUserMes&user.Name,&user.Type,&user.PasswordHash,- &idpID,- &idpUserInfo,); err != nil {if err == sql.ErrNoRows {return nil, nil}return nil, FormatError(err)}- if idpID.Valid {- value := int(idpID.Int32)- idp, err := s.GetIdentityProvider(ctx, &FindIdentityProviderMessage{- UID: &value,- })- if err != nil {- return nil, FormatError(err)- }- user.IdentityProviderResourceID = &idp.ResourceID- var identityProviderUserInfo storepb.IdentityProviderUserInfo- if err := json.Unmarshal([]byte(idpUserInfo), &identityProviderUserInfo); err != nil {- return nil, err- }- user.IdentityProviderUserInfo = &identityProviderUserInfo- }var rowStatus stringif err := tx.QueryRowContext(ctx, fmt.Sprintf(`diff --git a/frontend/src/types/proto/v1/auth_service.ts b/frontend/src/types/proto/v1/auth_service.tsindex 1a05d79cd9..510674c063 100644--- a/frontend/src/types/proto/v1/auth_service.ts+++ b/frontend/src/types/proto/v1/auth_service.ts@@ -211,7 +211,6 @@ export interface User {email: string;title: string;password: string;- identityProvider: string;userType: UserType;/** The user role will not be respected in the create user request, because the role is controlled by workspace owner. */userRole: UserRole;@@ -920,7 +919,7 @@ export const LogoutRequest = {};function createBaseUser(): User {- return { name: "", state: 0, email: "", title: "", password: "", identityProvider: "", userType: 0, userRole: 0 };+ return { name: "", state: 0, email: "", title: "", password: "", userType: 0, userRole: 0 };}export const User = {@@ -940,14 +939,11 @@ export const User = {if (message.password !== "") {writer.uint32(42).string(message.password);}- if (message.identityProvider !== "") {- writer.uint32(50).string(message.identityProvider);- }if (message.userType !== 0) {- writer.uint32(56).int32(message.userType);+ writer.uint32(48).int32(message.userType);}if (message.userRole !== 0) {- writer.uint32(64).int32(message.userRole);+ writer.uint32(56).int32(message.userRole);}return writer;},@@ -975,12 +971,9 @@ export const User = {message.password = reader.string();break;case 6:- message.identityProvider = reader.string();- break;- case 7:message.userType = reader.int32() as any;break;- case 8:+ case 7:message.userRole = reader.int32() as any;break;default:@@ -998,7 +991,6 @@ export const User = {email: isSet(object.email) ? String(object.email) : "",title: isSet(object.title) ? String(object.title) : "",password: isSet(object.password) ? String(object.password) : "",- identityProvider: isSet(object.identityProvider) ? String(object.identityProvider) : "",userType: isSet(object.userType) ? userTypeFromJSON(object.userType) : 0,userRole: isSet(object.userRole) ? userRoleFromJSON(object.userRole) : 0,};@@ -1011,7 +1003,6 @@ export const User = {message.email !== undefined && (obj.email = message.email);message.title !== undefined && (obj.title = message.title);message.password !== undefined && (obj.password = message.password);- message.identityProvider !== undefined && (obj.identityProvider = message.identityProvider);message.userType !== undefined && (obj.userType = userTypeToJSON(message.userType));message.userRole !== undefined && (obj.userRole = userRoleToJSON(message.userRole));return obj;@@ -1024,7 +1015,6 @@ export const User = {message.email = object.email ?? "";message.title = object.title ?? "";message.password = object.password ?? "";- message.identityProvider = object.identityProvider ?? "";message.userType = object.userType ?? 0;message.userRole = object.userRole ?? 0;return message;diff --git a/proto/generated-go/v1/auth_service.pb.go b/proto/generated-go/v1/auth_service.pb.goindex ac7a721c22..d88d5dd43f 100644--- a/proto/generated-go/v1/auth_service.pb.go+++ b/proto/generated-go/v1/auth_service.pb.go@@ -855,15 +855,14 @@ type User struct {// The name of the user.// Format: users/{user}. {user} is a system-generated unique ID.- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`- State State `protobuf:"varint,2,opt,name=state,proto3,enum=bytebase.v1.State" json:"state,omitempty"`- Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`- Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`- Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`- IdentityProvider string `protobuf:"bytes,6,opt,name=identity_provider,json=identityProvider,proto3" json:"identity_provider,omitempty"`- UserType UserType `protobuf:"varint,7,opt,name=user_type,json=userType,proto3,enum=bytebase.v1.UserType" json:"user_type,omitempty"`+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ State State `protobuf:"varint,2,opt,name=state,proto3,enum=bytebase.v1.State" json:"state,omitempty"`+ Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`+ Title string `protobuf:"bytes,4,opt,name=title,proto3" json:"title,omitempty"`+ Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`+ UserType UserType `protobuf:"varint,6,opt,name=user_type,json=userType,proto3,enum=bytebase.v1.UserType" json:"user_type,omitempty"`// The user role will not be respected in the create user request, because the role is controlled by workspace owner.- UserRole UserRole `protobuf:"varint,8,opt,name=user_role,json=userRole,proto3,enum=bytebase.v1.UserRole" json:"user_role,omitempty"`+ UserRole UserRole `protobuf:"varint,7,opt,name=user_role,json=userRole,proto3,enum=bytebase.v1.UserRole" json:"user_role,omitempty"`}func (x *User) Reset() {@@ -933,13 +932,6 @@ func (x *User) GetPassword() string {return ""}-func (x *User) GetIdentityProvider() string {- if x != nil {- return x.IdentityProvider- }- return ""-}-func (x *User) GetUserType() UserType {if x != nil {return x.UserType@@ -1039,7 +1031,7 @@ var file_v1_auth_service_proto_rawDesc = []byte{0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f,0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e,0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x22, 0xb3, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61,+ 0x74, 0x22, 0x80, 0x02, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x04, 0x6e, 0x61,0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x04,0x6e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20,0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,@@ -1048,80 +1040,77 @@ var file_v1_auth_service_proto_rawDesc = []byte{0x6d, 0x61, 0x69, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x04, 0x20,0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x08, 0x70, 0x61,0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41,- 0x01, 0x04, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x31, 0x0a, 0x11,- 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,- 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x03, 0x52, 0x10, 0x69,- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12,- 0x32, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01,- 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54,- 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65,- 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x08, 0x75,- 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x2a, 0x54, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54,- 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45,- 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08,- 0x0a, 0x04, 0x55, 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x59, 0x53, 0x54,- 0x45, 0x4d, 0x5f, 0x42, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56,- 0x49, 0x43, 0x45, 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x03, 0x2a, 0x48, 0x0a,- 0x08, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45,- 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,- 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12,- 0x07, 0x0a, 0x03, 0x44, 0x42, 0x41, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x56, 0x45,- 0x4c, 0x4f, 0x50, 0x45, 0x52, 0x10, 0x03, 0x32, 0xba, 0x06, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68,- 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73,- 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,- 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73,- 0x65, 0x72, 0x22, 0x21, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,- 0x14, 0x12, 0x12, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65,- 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x66, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,- 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,- 0x74, 0x1a, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,- 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,- 0x65, 0x22, 0x1a, 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93,- 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x5f, 0x0a,- 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,- 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1e,- 0xda, 0x41, 0x04, 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x75,- 0x73, 0x65, 0x72, 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x79,- 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62,- 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,- 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62,+ 0x01, 0x04, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x32, 0x0a, 0x09,+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32,+ 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73,+ 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,+ 0x12, 0x32, 0x0a, 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x07, 0x20,+ 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,+ 0x52, 0x6f, 0x6c, 0x65, 0x2a, 0x54, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,+ 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x55,+ 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x59, 0x53, 0x54, 0x45, 0x4d, 0x5f,+ 0x42, 0x4f, 0x54, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45,+ 0x5f, 0x41, 0x43, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x03, 0x2a, 0x48, 0x0a, 0x08, 0x55, 0x73,+ 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x52,+ 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,+ 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03,+ 0x44, 0x42, 0x41, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x56, 0x45, 0x4c, 0x4f, 0x50,+ 0x45, 0x52, 0x10, 0x03, 0x32, 0xba, 0x06, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72,+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x5c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12,+ 0x1b, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65,+ 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62,0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22,- 0x38, 0xda, 0x41, 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f,- 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72,- 0x32, 0x17, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x67, 0x0a, 0x0a, 0x44, 0x65, 0x6c,- 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,- 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,- 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22,- 0x21, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12,+ 0x21, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12,0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f,- 0x2a, 0x7d, 0x12, 0x6b, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73,- 0x65, 0x72, 0x12, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,- 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a,- 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,- 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12,- 0x59, 0x0a, 0x05, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,- 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f,- 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x58, 0x0a, 0x06, 0x4c, 0x6f,- 0x67, 0x6f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,- 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14,- 0x3a, 0x01, 0x2a, 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f,- 0x67, 0x6f, 0x75, 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,- 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x2a, 0x7d, 0x12, 0x66, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12,+ 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,+ 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e,+ 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73,+ 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a,+ 0xda, 0x41, 0x06, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0b, 0x12,+ 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x5f, 0x0a, 0x0a, 0x43, 0x72,+ 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x1e, 0xda, 0x41, 0x04,+ 0x75, 0x73, 0x65, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x11, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72,+ 0x22, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x79, 0x0a, 0x0a, 0x55,+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73,+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x38, 0xda, 0x41,+ 0x10, 0x75, 0x73, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,+ 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32, 0x17, 0x2f,+ 0x76, 0x31, 0x2f, 0x7b, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73,+ 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x67, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,+ 0x55, 0x73, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0xda, 0x41,+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x76, 0x31,+ 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x6b, 0x0a, 0x0c, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,+ 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e,+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,+ 0x74, 0x1a, 0x11, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x55, 0x73, 0x65, 0x72, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22,+ 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x75, 0x73, 0x65, 0x72, 0x73,+ 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x59, 0x0a, 0x05,+ 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c,+ 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3,+ 0xe4, 0x93, 0x02, 0x13, 0x3a, 0x01, 0x2a, 0x22, 0x0e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74,+ 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x69, 0x6e, 0x12, 0x58, 0x0a, 0x06, 0x4c, 0x6f, 0x67, 0x6f, 0x75,+ 0x74, 0x12, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e,+ 0x4c, 0x6f, 0x67, 0x6f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e,+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,+ 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x01, 0x2a,+ 0x22, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x6c, 0x6f, 0x67, 0x6f, 0x75,+ 0x74, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67,+ 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (diff --git a/proto/v1/auth_service.proto b/proto/v1/auth_service.protoindex f2ae7e1bc4..b603151440 100644--- a/proto/v1/auth_service.proto+++ b/proto/v1/auth_service.proto@@ -185,12 +185,10 @@ message User {string password = 5 [(google.api.field_behavior) = INPUT_ONLY];- string identity_provider = 6 [(google.api.field_behavior) = OUTPUT_ONLY];;-- UserType user_type = 7;+ UserType user_type = 6;// The user role will not be respected in the create user request, because the role is controlled by workspace owner.- UserRole user_role = 8;+ UserRole user_role = 7;}enum UserType {