From f37fcd952c319c74a15ed796c4c38b3a0db132bd Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Tue, 28 Jul 2020 19:03:39 +0200 Subject: [PATCH 1/2] SAAS-174 Update dependencies --- Gopkg.lock | 12 +- Gopkg.toml | 4 +- .../saas/gen/auth/external/auth_api.pb.go | 165 ++++++++-- .../auth/external/auth_api.validator.pb.go | 9 + .../percona/pmm/api/serverpb/server.pb.go | 295 ++++++++++++------ .../percona/pmm/api/serverpb/server.pb.gw.go | 78 +++++ .../pmm/api/serverpb/server.validator.pb.go | 9 + 7 files changed, 448 insertions(+), 124 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index 27be210564..f2e0533778 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -373,8 +373,8 @@ version = "v0.3.0" [[projects]] - branch = "main" - digest = "1:086700c7fb8dda563672e1fa55813fffc554207d420eb07dc904702bb657b2f8" + branch = "SAAS-174-password-reset" + digest = "1:2714d746450774d9f17a10da1263f85eddb6f6c0489b7e3d0bfaebf59c5454d2" name = "github.com/percona-platform/saas" packages = [ "gen/auth/external", @@ -385,7 +385,7 @@ "pkg/starlark", ] pruneopts = "NUT" - revision = "32e145816e310c554d8bbfcebbe82ff2b640a371" + revision = "7c439ef12064566f5e39cf4ae6d0b5d20c85658e" [[projects]] digest = "1:16379f2653feea4834bd3700b27e2e0058d7bb7b1a708ac2904c92b9a7939581" @@ -396,8 +396,8 @@ version = "v0.7.2" [[projects]] - branch = "PMM-2.0" - digest = "1:868e091ba3675c51dc9aceb41f5090c4f93119fbd1eb32f3c8e1f25d7e27d17f" + branch = "SAAS-174-password-reset" + digest = "1:7af057d51ff381601cbc5df562f11beba3210bc9b1ca59d4c2e39781de2dacbd" name = "github.com/percona/pmm" packages = [ "api/agentpb", @@ -418,7 +418,7 @@ "version", ] pruneopts = "NUT" - revision = "c538a89c38d8ab0fcaebd2c1ff02c581106f7bca" + revision = "608eee5a2eef3c33a7051f08535d8c8d6b92cc30" [[projects]] digest = "1:dbee7dc52291bb149388085eeb20561d4cb3c2044e0fa6ffa8d342c6b305f4bf" diff --git a/Gopkg.toml b/Gopkg.toml index edcdfd25b4..e81591258f 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -16,11 +16,11 @@ required = [ [[constraint]] name = "github.com/percona/pmm" - branch = "PMM-2.0" + branch = "SAAS-174-password-reset" [[constraint]] name = "github.com/percona-platform/saas" - branch = "main" + branch = "SAAS-174-password-reset" # to prevent unexpected downgrades; see https://github.com/percona/exporter_shared/releases/tag/v0.6.0 [[constraint]] diff --git a/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.pb.go b/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.pb.go index 7ec0534e66..37abc94cc5 100644 --- a/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.pb.go +++ b/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.pb.go @@ -276,6 +276,77 @@ func (m *RefreshSessionResponse) GetExpireTime() *timestamp.Timestamp { return nil } +type ResetPasswordRequest struct { + // User email. + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResetPasswordRequest) Reset() { *m = ResetPasswordRequest{} } +func (m *ResetPasswordRequest) String() string { return proto.CompactTextString(m) } +func (*ResetPasswordRequest) ProtoMessage() {} +func (*ResetPasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7e0315b5819ba925, []int{6} +} + +func (m *ResetPasswordRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResetPasswordRequest.Unmarshal(m, b) +} +func (m *ResetPasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResetPasswordRequest.Marshal(b, m, deterministic) +} +func (m *ResetPasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResetPasswordRequest.Merge(m, src) +} +func (m *ResetPasswordRequest) XXX_Size() int { + return xxx_messageInfo_ResetPasswordRequest.Size(m) +} +func (m *ResetPasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResetPasswordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResetPasswordRequest proto.InternalMessageInfo + +func (m *ResetPasswordRequest) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +type ResetPasswordResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResetPasswordResponse) Reset() { *m = ResetPasswordResponse{} } +func (m *ResetPasswordResponse) String() string { return proto.CompactTextString(m) } +func (*ResetPasswordResponse) ProtoMessage() {} +func (*ResetPasswordResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7e0315b5819ba925, []int{7} +} + +func (m *ResetPasswordResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResetPasswordResponse.Unmarshal(m, b) +} +func (m *ResetPasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResetPasswordResponse.Marshal(b, m, deterministic) +} +func (m *ResetPasswordResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResetPasswordResponse.Merge(m, src) +} +func (m *ResetPasswordResponse) XXX_Size() int { + return xxx_messageInfo_ResetPasswordResponse.Size(m) +} +func (m *ResetPasswordResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ResetPasswordResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ResetPasswordResponse proto.InternalMessageInfo + func init() { proto.RegisterType((*SignUpRequest)(nil), "percona.platform.auth.external.v1beta1.SignUpRequest") proto.RegisterType((*SignUpResponse)(nil), "percona.platform.auth.external.v1beta1.SignUpResponse") @@ -283,6 +354,8 @@ func init() { proto.RegisterType((*SignInResponse)(nil), "percona.platform.auth.external.v1beta1.SignInResponse") proto.RegisterType((*RefreshSessionRequest)(nil), "percona.platform.auth.external.v1beta1.RefreshSessionRequest") proto.RegisterType((*RefreshSessionResponse)(nil), "percona.platform.auth.external.v1beta1.RefreshSessionResponse") + proto.RegisterType((*ResetPasswordRequest)(nil), "percona.platform.auth.external.v1beta1.ResetPasswordRequest") + proto.RegisterType((*ResetPasswordResponse)(nil), "percona.platform.auth.external.v1beta1.ResetPasswordResponse") } func init() { @@ -290,32 +363,34 @@ func init() { } var fileDescriptor_7e0315b5819ba925 = []byte{ - // 392 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x92, 0x41, 0x6b, 0xdb, 0x30, - 0x1c, 0xc5, 0x71, 0xc6, 0xb2, 0x45, 0x61, 0xd9, 0x26, 0xd8, 0x16, 0x4c, 0x46, 0x8a, 0x0f, 0xa5, - 0x97, 0xc8, 0x24, 0xa5, 0xb9, 0x94, 0x16, 0x92, 0x9b, 0x6f, 0xad, 0xd3, 0x40, 0xe9, 0x25, 0xc8, - 0xb1, 0x62, 0x8b, 0xda, 0x96, 0x2a, 0xc9, 0x71, 0xbe, 0x44, 0xe9, 0x47, 0x2c, 0xf4, 0x93, 0x14, - 0x5b, 0x76, 0x68, 0x42, 0x0f, 0x71, 0xe9, 0xcd, 0xfa, 0xfb, 0xe9, 0xfd, 0xa4, 0xf7, 0x04, 0x7a, - 0x38, 0x55, 0xa1, 0x4d, 0x36, 0x8a, 0x88, 0x04, 0x47, 0x76, 0xbe, 0x5a, 0x60, 0x4e, 0x11, 0x17, - 0x4c, 0x31, 0x78, 0xcc, 0x89, 0x58, 0xb2, 0x04, 0x23, 0x1e, 0x61, 0xb5, 0x62, 0x22, 0x46, 0xb9, - 0x00, 0x55, 0x72, 0xb4, 0x1e, 0x7a, 0x44, 0xe1, 0xa1, 0x39, 0x0e, 0xa8, 0x0a, 0x53, 0x0f, 0x2d, - 0x59, 0x6c, 0xc7, 0x19, 0x55, 0xf7, 0x2c, 0xb3, 0x03, 0x36, 0x28, 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4e, 0x78, 0x86, 0x0e, 0x7b, 0x2d, 0x68, 0xa7, 0x51, 0x73, 0x5c, 0x77, 0x5b, 0x79, - 0x83, 0x12, 0xec, 0x24, 0xf5, 0xc0, 0xdb, 0x96, 0xeb, 0x81, 0xdf, 0x34, 0xf9, 0x64, 0x80, 0xce, - 0x6e, 0xaa, 0xf0, 0xe2, 0x50, 0xab, 0x77, 0x6b, 0x32, 0x2f, 0x3f, 0xba, 0x5d, 0x9f, 0x68, 0xfa, - 0xfb, 0xee, 0x67, 0x25, 0x2d, 0x95, 0x5e, 0xb3, 0xa8, 0xf0, 0xf4, 0x35, 0x00, 0x00, 0xff, 0xff, - 0x65, 0x9f, 0x8d, 0x1c, 0xe0, 0x03, 0x00, 0x00, + // 431 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x52, 0x4d, 0x6f, 0xd4, 0x30, + 0x10, 0x55, 0x2a, 0x58, 0xe8, 0x54, 0x2d, 0x60, 0xf1, 0x51, 0x45, 0x45, 0x45, 0x39, 0x20, 0x2e, + 0x75, 0xd4, 0x02, 0xbd, 0x40, 0x91, 0xda, 0x5b, 0x6e, 0x25, 0xa5, 0x12, 0xe2, 0xb2, 0x72, 0x9a, + 0xd9, 0xc4, 0x22, 0x89, 0x8d, 0xed, 0x34, 0xfd, 0x11, 0x48, 0xfc, 0x01, 0xfe, 0x1b, 0x12, 0xbf, + 0x04, 0x25, 0x76, 0x56, 0x64, 0xe1, 0x90, 0xac, 0x7a, 0x8b, 0x27, 0x6f, 0xde, 0x9b, 0x79, 0xf3, + 0x60, 0x8f, 0xd5, 0x26, 0x0f, 0xf1, 0xc6, 0xa0, 0xaa, 0x58, 0x11, 0xb6, 0xaf, 0x39, 0x93, 0x9c, + 0x4a, 0x25, 0x8c, 0x20, 0x2f, 0x25, 0xaa, 0x2b, 0x51, 0x31, 0x2a, 0x0b, 0x66, 0x16, 0x42, 0x95,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0x85, 0x3a, 0xbf, 0xb0, 0x84, 0x6e, 0x91, 0xe0, 0x12, 0x9e, 0xae, 0xfe, + 0x70, 0xe3, 0xac, 0xe8, 0x79, 0x93, 0xf4, 0xde, 0xc0, 0xe3, 0x18, 0x35, 0x9a, 0x73, 0xb7, 0xee, + 0x28, 0xdf, 0xec, 0x94, 0x83, 0x2e, 0x3b, 0xcb, 0xd1, 0xcf, 0x3b, 0x70, 0xef, 0xb4, 0x36, 0xf9, + 0xe9, 0x79, 0x44, 0x1a, 0x98, 0xd9, 0xeb, 0x90, 0xb7, 0x74, 0x5c, 0xf8, 0xe8, 0x20, 0x20, 0xfe, + 0xf1, 0xd4, 0x36, 0x67, 0x88, 0x13, 0x8e, 0xaa, 0x69, 0xc2, 0xcb, 0xd0, 0x4c, 0x13, 0xfe, 0x2b, + 0x18, 0x3f, 0x3c, 0xd8, 0x19, 0x1e, 0x89, 0x9c, 0x8c, 0xa5, 0xfa, 0xef, 0xd5, 0xfd, 0x0f, 0xeb, + 0xb6, 0xbb, 0x89, 0xbe, 0x7b, 0xb0, 0x3d, 0xb8, 0x14, 0x79, 0x3f, 0x9e, 0xf1, 0xdf, 0x58, 0xf8, + 0x27, 0x6b, 0x76, 0xdb, 0x71, 0xce, 0x1e, 0x7d, 0x79, 0xd0, 0x23, 0x1d, 0x30, 0x99, 0x75, 0x01, + 0x7d, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0xa5, 0x80, 0x60, 0x37, 0xbe, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -336,6 +411,8 @@ type AuthAPIClient interface { SignIn(ctx context.Context, in *SignInRequest, opts ...grpc.CallOption) (*SignInResponse, error) // RefreshSession refreshes session timeout. RefreshSession(ctx context.Context, in *RefreshSessionRequest, opts ...grpc.CallOption) (*RefreshSessionResponse, error) + // ResetPassword initiates user's password reset procedure. + ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) } type authAPIClient struct { @@ -373,6 +450,15 @@ func (c *authAPIClient) RefreshSession(ctx context.Context, in *RefreshSessionRe return out, nil } +func (c *authAPIClient) ResetPassword(ctx context.Context, in *ResetPasswordRequest, opts ...grpc.CallOption) (*ResetPasswordResponse, error) { + out := new(ResetPasswordResponse) + err := c.cc.Invoke(ctx, "/percona.platform.auth.external.v1beta1.AuthAPI/ResetPassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AuthAPIServer is the server API for AuthAPI service. type AuthAPIServer interface { // SignUp creates new user with given email and password. @@ -381,6 +467,8 @@ type AuthAPIServer interface { SignIn(context.Context, *SignInRequest) (*SignInResponse, error) // RefreshSession refreshes session timeout. RefreshSession(context.Context, *RefreshSessionRequest) (*RefreshSessionResponse, error) + // ResetPassword initiates user's password reset procedure. + ResetPassword(context.Context, *ResetPasswordRequest) (*ResetPasswordResponse, error) } // UnimplementedAuthAPIServer can be embedded to have forward compatible implementations. @@ -396,6 +484,9 @@ func (*UnimplementedAuthAPIServer) SignIn(ctx context.Context, req *SignInReques func (*UnimplementedAuthAPIServer) RefreshSession(ctx context.Context, req *RefreshSessionRequest) (*RefreshSessionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RefreshSession not implemented") } +func (*UnimplementedAuthAPIServer) ResetPassword(ctx context.Context, req *ResetPasswordRequest) (*ResetPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented") +} func RegisterAuthAPIServer(s *grpc.Server, srv AuthAPIServer) { s.RegisterService(&_AuthAPI_serviceDesc, srv) @@ -455,6 +546,24 @@ func _AuthAPI_RefreshSession_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } +func _AuthAPI_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResetPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthAPIServer).ResetPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/percona.platform.auth.external.v1beta1.AuthAPI/ResetPassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthAPIServer).ResetPassword(ctx, req.(*ResetPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _AuthAPI_serviceDesc = grpc.ServiceDesc{ ServiceName: "percona.platform.auth.external.v1beta1.AuthAPI", HandlerType: (*AuthAPIServer)(nil), @@ -471,6 +580,10 @@ var _AuthAPI_serviceDesc = grpc.ServiceDesc{ MethodName: "RefreshSession", Handler: _AuthAPI_RefreshSession_Handler, }, + { + MethodName: "ResetPassword", + Handler: _AuthAPI_ResetPassword_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth/external/auth_api.proto", diff --git a/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.validator.pb.go b/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.validator.pb.go index ca3121fea5..0e0466a48f 100644 --- a/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.validator.pb.go +++ b/vendor/github.com/percona-platform/saas/gen/auth/external/auth_api.validator.pb.go @@ -58,3 +58,12 @@ func (this *RefreshSessionResponse) Validate() error { } return nil } +func (this *ResetPasswordRequest) Validate() error { + if this.Email == "" { + return github_com_mwitkow_go_proto_validators.FieldError("Email", fmt.Errorf(`value '%v' must not be an empty string`, this.Email)) + } + return nil +} +func (this *ResetPasswordResponse) Validate() error { + return nil +} diff --git a/vendor/github.com/percona/pmm/api/serverpb/server.pb.go b/vendor/github.com/percona/pmm/api/serverpb/server.pb.go index 67e91e8276..40585e14ba 100644 --- a/vendor/github.com/percona/pmm/api/serverpb/server.pb.go +++ b/vendor/github.com/percona/pmm/api/serverpb/server.pb.go @@ -1236,6 +1236,77 @@ func (m *PlatformSignInResponse) XXX_DiscardUnknown() { var xxx_messageInfo_PlatformSignInResponse proto.InternalMessageInfo +type PlatformResetPasswordRequest struct { + // Existing Percona Platform user's email. + Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlatformResetPasswordRequest) Reset() { *m = PlatformResetPasswordRequest{} } +func (m *PlatformResetPasswordRequest) String() string { return proto.CompactTextString(m) } +func (*PlatformResetPasswordRequest) ProtoMessage() {} +func (*PlatformResetPasswordRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9202d8f598083902, []int{23} +} + +func (m *PlatformResetPasswordRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PlatformResetPasswordRequest.Unmarshal(m, b) +} +func (m *PlatformResetPasswordRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PlatformResetPasswordRequest.Marshal(b, m, deterministic) +} +func (m *PlatformResetPasswordRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlatformResetPasswordRequest.Merge(m, src) +} +func (m *PlatformResetPasswordRequest) XXX_Size() int { + return xxx_messageInfo_PlatformResetPasswordRequest.Size(m) +} +func (m *PlatformResetPasswordRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PlatformResetPasswordRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PlatformResetPasswordRequest proto.InternalMessageInfo + +func (m *PlatformResetPasswordRequest) GetEmail() string { + if m != nil { + return m.Email + } + return "" +} + +type PlatformResetPasswordResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PlatformResetPasswordResponse) Reset() { *m = PlatformResetPasswordResponse{} } +func (m *PlatformResetPasswordResponse) String() string { return proto.CompactTextString(m) } +func (*PlatformResetPasswordResponse) ProtoMessage() {} +func (*PlatformResetPasswordResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_9202d8f598083902, []int{24} +} + +func (m *PlatformResetPasswordResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PlatformResetPasswordResponse.Unmarshal(m, b) +} +func (m *PlatformResetPasswordResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PlatformResetPasswordResponse.Marshal(b, m, deterministic) +} +func (m *PlatformResetPasswordResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_PlatformResetPasswordResponse.Merge(m, src) +} +func (m *PlatformResetPasswordResponse) XXX_Size() int { + return xxx_messageInfo_PlatformResetPasswordResponse.Size(m) +} +func (m *PlatformResetPasswordResponse) XXX_DiscardUnknown() { + xxx_messageInfo_PlatformResetPasswordResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_PlatformResetPasswordResponse proto.InternalMessageInfo + func init() { proto.RegisterEnum("server.DistributionMethod", DistributionMethod_name, DistributionMethod_value) proto.RegisterType((*VersionInfo)(nil), "server.VersionInfo") @@ -1261,6 +1332,8 @@ func init() { proto.RegisterType((*PlatformSignUpResponse)(nil), "server.PlatformSignUpResponse") proto.RegisterType((*PlatformSignInRequest)(nil), "server.PlatformSignInRequest") proto.RegisterType((*PlatformSignInResponse)(nil), "server.PlatformSignInResponse") + proto.RegisterType((*PlatformResetPasswordRequest)(nil), "server.PlatformResetPasswordRequest") + proto.RegisterType((*PlatformResetPasswordResponse)(nil), "server.PlatformResetPasswordResponse") } func init() { @@ -1268,96 +1341,100 @@ func init() { } var fileDescriptor_9202d8f598083902 = []byte{ - // 1422 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x57, 0x5b, 0x6f, 0x1b, 0xb7, - 0x12, 0x3e, 0x92, 0x13, 0x5b, 0x1a, 0xf9, 0x22, 0x53, 0xbe, 0x6c, 0x64, 0x3b, 0xf6, 0x59, 0x20, - 0x39, 0x8e, 0x73, 0x62, 0x21, 0x3e, 0xc0, 0x69, 0x9b, 0xbe, 0xd4, 0xb6, 0x9c, 0x54, 0x48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d, 0x19, 0xcd, 0xb2, 0x4b, 0x63, 0xd1, 0x14, 0x59, - 0x04, 0xec, 0x43, 0x71, 0xb2, 0x17, 0xa0, 0x5d, 0xe3, 0xf3, 0x96, 0x4e, 0x53, 0xde, 0xbb, 0x9d, - 0xa0, 0xc3, 0xee, 0xca, 0xb0, 0xf7, 0xec, 0x35, 0x11, 0x76, 0x92, 0xa5, 0x13, 0x1d, 0x6f, 0x0a, - 0xc3, 0x44, 0x53, 0xfb, 0xcf, 0x30, 0xd1, 0x5b, 0x7a, 0xc9, 0x58, 0xa2, 0x86, 0x53, 0x51, 0xa4, - 0x94, 0x80, 0xb5, 0x28, 0x3d, 0x60, 0xd2, 0x83, 0xd2, 0x03, 0x0e, 0xfb, 0xc9, 0x8c, 0x80, 0xb5, - 0xe8, 0x59, 0xe6, 0xe0, 0x04, 0xbe, 0xcc, 0x99, 0xbf, 0xf4, 0x57, 0xf3, 0xf2, 0x8b, 0xfb, 0xbf, - 0xdf, 0x03, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x60, 0x8f, 0x51, 0xe5, 0x0f, 0x00, 0x00, + // 1475 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x5b, 0x6f, 0x1b, 0xc5, + 0x17, 0xff, 0xdb, 0x69, 0x13, 0xef, 0x71, 0x2e, 0xce, 0x38, 0x97, 0xed, 0x26, 0xa9, 0xf3, 0x5f, + 0x91, 0x92, 0xa6, 0x34, 0x56, 0x83, 0xc4, 0xa5, 0xf0, 0x40, 0x6e, 0x2d, 0x56, 0x9b, 0xa6, 0xac, + 0x93, 0x82, 0x78, 0x59, 0x4d, 0xb2, 0x63, 0x7b, 0x95, 0xbd, 0x98, 0x9d, 0xb1, 0xad, 0xf0, 0x88, + 0xfa, 0xc6, 0x23, 0xe2, 0x2b, 0xf0, 0x79, 0x90, 0x80, 0x67, 0x24, 0xc4, 0x07, 0x41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28, 0x8d, 0xb6, 0x1a, 0x54, 0xd1, + 0x31, 0x27, 0x34, 0x32, 0x6b, 0x73, 0x32, 0x40, 0xd1, 0x56, 0x04, 0xed, 0x1d, 0x7b, 0x89, 0xd3, + 0x8e, 0xa2, 0x54, 0xa2, 0xc3, 0x3d, 0xa7, 0x9f, 0x68, 0x66, 0x7b, 0xeb, 0x27, 0x3a, 0xa1, 0x55, + 0x0d, 0x25, 0xaa, 0x31, 0x55, 0x09, 0xca, 0x20, 0xac, 0x45, 0xd9, 0x84, 0x69, 0x8b, 0xcb, 0x26, + 0x1c, 0x68, 0x57, 0x93, 0x09, 0x6b, 0x11, 0x27, 0xfc, 0x3e, 0xd7, 0x6f, 0x9e, 0x43, 0x1d, 0x09, + 0xbd, 0x33, 0x1a, 0x39, 0xab, 0xdd, 0x59, 0x5b, 0x6f, 0x40, 0xa9, 0x63, 0x6c, 0x89, 0x63, 0x54, + 0x6c, 0x6b, 0xe8, 0x18, 0x43, 0xd8, 0xc7, 0xb9, 0x9d, 0x03, 0xf8, 0xba, 0xa0, 0xff, 0xbf, 0xb8, + 0x98, 0x16, 0xe3, 0xc5, 0xfb, 0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x5b, 0x2a, 0x5d, 0xd2, + 0x10, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1393,6 +1470,8 @@ type ServerClient interface { PlatformSignUp(ctx context.Context, in *PlatformSignUpRequest, opts ...grpc.CallOption) (*PlatformSignUpResponse, error) // PlatformSignIn links that PMM instance to Percona Platform user. PlatformSignIn(ctx context.Context, in *PlatformSignInRequest, opts ...grpc.CallOption) (*PlatformSignInResponse, error) + // PlatformResetPassword initiates password restore procedure. + PlatformResetPassword(ctx context.Context, in *PlatformResetPasswordRequest, opts ...grpc.CallOption) (*PlatformResetPasswordResponse, error) } type serverClient struct { @@ -1493,6 +1572,15 @@ func (c *serverClient) PlatformSignIn(ctx context.Context, in *PlatformSignInReq return out, nil } +func (c *serverClient) PlatformResetPassword(ctx context.Context, in *PlatformResetPasswordRequest, opts ...grpc.CallOption) (*PlatformResetPasswordResponse, error) { + out := new(PlatformResetPasswordResponse) + err := c.cc.Invoke(ctx, "/server.Server/PlatformResetPassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // ServerServer is the server API for Server service. type ServerServer interface { // Version returns PMM Server versions. @@ -1516,6 +1604,8 @@ type ServerServer interface { PlatformSignUp(context.Context, *PlatformSignUpRequest) (*PlatformSignUpResponse, error) // PlatformSignIn links that PMM instance to Percona Platform user. PlatformSignIn(context.Context, *PlatformSignInRequest) (*PlatformSignInResponse, error) + // PlatformResetPassword initiates password restore procedure. + PlatformResetPassword(context.Context, *PlatformResetPasswordRequest) (*PlatformResetPasswordResponse, error) } // UnimplementedServerServer can be embedded to have forward compatible implementations. @@ -1552,6 +1642,9 @@ func (*UnimplementedServerServer) PlatformSignUp(ctx context.Context, req *Platf func (*UnimplementedServerServer) PlatformSignIn(ctx context.Context, req *PlatformSignInRequest) (*PlatformSignInResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PlatformSignIn not implemented") } +func (*UnimplementedServerServer) PlatformResetPassword(ctx context.Context, req *PlatformResetPasswordRequest) (*PlatformResetPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PlatformResetPassword not implemented") +} func RegisterServerServer(s *grpc.Server, srv ServerServer) { s.RegisterService(&_Server_serviceDesc, srv) @@ -1737,6 +1830,24 @@ func _Server_PlatformSignIn_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } +func _Server_PlatformResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PlatformResetPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServerServer).PlatformResetPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/server.Server/PlatformResetPassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServerServer).PlatformResetPassword(ctx, req.(*PlatformResetPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Server_serviceDesc = grpc.ServiceDesc{ ServiceName: "server.Server", HandlerType: (*ServerServer)(nil), @@ -1781,6 +1892,10 @@ var _Server_serviceDesc = grpc.ServiceDesc{ MethodName: "PlatformSignIn", Handler: _Server_PlatformSignIn_Handler, }, + { + MethodName: "PlatformResetPassword", + Handler: _Server_PlatformResetPassword_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "serverpb/server.proto", diff --git a/vendor/github.com/percona/pmm/api/serverpb/server.pb.gw.go b/vendor/github.com/percona/pmm/api/serverpb/server.pb.gw.go index 05ca175443..ff88a7d2fd 100644 --- a/vendor/github.com/percona/pmm/api/serverpb/server.pb.gw.go +++ b/vendor/github.com/percona/pmm/api/serverpb/server.pb.gw.go @@ -354,6 +354,40 @@ func local_request_Server_PlatformSignIn_0(ctx context.Context, marshaler runtim } +func request_Server_PlatformResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, client ServerClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PlatformResetPasswordRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.PlatformResetPassword(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Server_PlatformResetPassword_0(ctx context.Context, marshaler runtime.Marshaler, server ServerServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq PlatformResetPasswordRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.PlatformResetPassword(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterServerHandlerServer registers the http handlers for service Server to "mux". // UnaryRPC :call ServerServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -559,6 +593,26 @@ func RegisterServerHandlerServer(ctx context.Context, mux *runtime.ServeMux, ser }) + mux.Handle("POST", pattern_Server_PlatformResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Server_PlatformResetPassword_0(rctx, inboundMarshaler, server, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Server_PlatformResetPassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -800,6 +854,26 @@ func RegisterServerHandlerClient(ctx context.Context, mux *runtime.ServeMux, cli }) + mux.Handle("POST", pattern_Server_PlatformResetPassword_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Server_PlatformResetPassword_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Server_PlatformResetPassword_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -823,6 +897,8 @@ var ( pattern_Server_PlatformSignUp_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "Platform", "SignUp"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Server_PlatformSignIn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "Platform", "SignIn"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Server_PlatformResetPassword_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "Platform", "ResetPassword"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -845,4 +921,6 @@ var ( forward_Server_PlatformSignUp_0 = runtime.ForwardResponseMessage forward_Server_PlatformSignIn_0 = runtime.ForwardResponseMessage + + forward_Server_PlatformResetPassword_0 = runtime.ForwardResponseMessage ) diff --git a/vendor/github.com/percona/pmm/api/serverpb/server.validator.pb.go b/vendor/github.com/percona/pmm/api/serverpb/server.validator.pb.go index cee430e619..785bcc86ea 100644 --- a/vendor/github.com/percona/pmm/api/serverpb/server.validator.pb.go +++ b/vendor/github.com/percona/pmm/api/serverpb/server.validator.pb.go @@ -172,3 +172,12 @@ func (this *PlatformSignInRequest) Validate() error { func (this *PlatformSignInResponse) Validate() error { return nil } +func (this *PlatformResetPasswordRequest) Validate() error { + if this.Email == "" { + return github_com_mwitkow_go_proto_validators.FieldError("Email", fmt.Errorf(`value '%v' must not be an empty string`, this.Email)) + } + return nil +} +func (this *PlatformResetPasswordResponse) Validate() error { + return nil +} From c72e4a501df260d1f771714758a25f8e154f20f8 Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Thu, 23 Jul 2020 18:26:38 +0200 Subject: [PATCH 2/2] SAAS-174 Add password reset method --- services/platform/platform.go | 16 ++++++++++++++++ services/platform/platform_test.go | 11 +++++++++++ services/server/deps.go | 1 + services/server/mock_platform_service_test.go | 14 ++++++++++++++ services/server/server.go | 11 +++++++++++ 5 files changed, 53 insertions(+) diff --git a/services/platform/platform.go b/services/platform/platform.go index dc6bea83dc..33e09daafd 100644 --- a/services/platform/platform.go +++ b/services/platform/platform.go @@ -171,6 +171,22 @@ func (s *Service) refreshSession(ctx context.Context) error { return nil } +// ResetPassword initiates password reset procedure for user with given email. +func (s *Service) ResetPassword(ctx context.Context, email string) error { + cc, err := dial(ctx, s.host) + if err != nil { + return errors.Wrap(err, "failed establish connection with Percona") + } + defer cc.Close() //nolint:errcheck + + _, err = api.NewAuthAPIClient(cc).ResetPassword(ctx, &api.ResetPasswordRequest{Email: email}) + if err != nil { + return errors.Wrap(err, "failed to reset password") + } + + return nil +} + func dial(ctx context.Context, fullHost string) (*grpc.ClientConn, error) { host, _, err := net.SplitHostPort(fullHost) if err != nil { diff --git a/services/platform/platform_test.go b/services/platform/platform_test.go index 73a99eb6cc..86ade0f7fb 100644 --- a/services/platform/platform_test.go +++ b/services/platform/platform_test.go @@ -82,6 +82,17 @@ func TestPlatformService(t *testing.T) { err = s.refreshSession(context.Background()) assert.NoError(t, err) }) + + t.Run("ResetPassword", func(t *testing.T) { + login := gofakeit.Email() + password := gofakeit.Password(true, true, true, false, false, 14) + + err := s.SignUp(context.Background(), login, password) + require.NoError(t, err) + + err = s.ResetPassword(context.Background(), login) + assert.NoError(t, err) + }) } func init() { //nolint:gochecknoinits diff --git a/services/server/deps.go b/services/server/deps.go index 25faf9dcb7..683b901247 100644 --- a/services/server/deps.go +++ b/services/server/deps.go @@ -93,4 +93,5 @@ type telemetryService interface { type platformService interface { SignUp(ctx context.Context, email, password string) error SignIn(ctx context.Context, email, password string) error + ResetPassword(ctx context.Context, email string) error } diff --git a/services/server/mock_platform_service_test.go b/services/server/mock_platform_service_test.go index 75d7921ba2..e0684385c9 100644 --- a/services/server/mock_platform_service_test.go +++ b/services/server/mock_platform_service_test.go @@ -13,6 +13,20 @@ type mockPlatformService struct { mock.Mock } +// ResetPassword provides a mock function with given fields: ctx, email +func (_m *mockPlatformService) ResetPassword(ctx context.Context, email string) error { + ret := _m.Called(ctx, email) + + var r0 error + if rf, ok := ret.Get(0).(func(context.Context, string) error); ok { + r0 = rf(ctx, email) + } else { + r0 = ret.Error(0) + } + + return r0 +} + // SignIn provides a mock function with given fields: ctx, email, password func (_m *mockPlatformService) SignIn(ctx context.Context, email string, password string) error { ret := _m.Called(ctx, email, password) diff --git a/services/server/server.go b/services/server/server.go index cfa54567b9..15d739bebe 100644 --- a/services/server/server.go +++ b/services/server/server.go @@ -636,6 +636,17 @@ func (s *Server) PlatformSignIn(ctx context.Context, req *serverpb.PlatformSignI return &serverpb.PlatformSignInResponse{}, nil } +// PlatformResetPassword initiates Percona Platform user's password reset procedure. +func (s *Server) PlatformResetPassword(ctx context.Context, req *serverpb.PlatformResetPasswordRequest) (*serverpb.PlatformResetPasswordResponse, error) { + nCtx, cancel := context.WithTimeout(ctx, platformAPITimeout) + defer cancel() + if err := s.platformService.ResetPassword(nCtx, req.Email); err != nil { + return nil, err + } + + return &serverpb.PlatformResetPasswordResponse{}, nil +} + // check interfaces var ( _ serverpb.ServerServer = (*Server)(nil)