From 608eee5a2eef3c33a7051f08535d8c8d6b92cc30 Mon Sep 17 00:00:00 2001 From: Artem Gavrilov Date: Tue, 28 Jul 2020 18:48:25 +0200 Subject: [PATCH] SAAS-174 Add Percona Platform user password reset method This reverts commit 385a4739bdf98736d48b80dfe9880e78796e0e2a. --- .../platform_reset_password_parameters.go | 131 ++++++++ .../platform_reset_password_responses.go | 223 +++++++++++++ .../json/client/server/server_client.go | 35 +++ api/serverpb/json/serverpb.json | 73 +++++ api/serverpb/server.pb.go | 295 ++++++++++++------ api/serverpb/server.pb.gw.go | 78 +++++ api/serverpb/server.proto | 18 ++ api/serverpb/server.validator.pb.go | 9 + api/swagger/swagger.json | 73 +++++ 9 files changed, 845 insertions(+), 90 deletions(-) create mode 100644 api/serverpb/json/client/server/platform_reset_password_parameters.go create mode 100644 api/serverpb/json/client/server/platform_reset_password_responses.go diff --git a/api/serverpb/json/client/server/platform_reset_password_parameters.go b/api/serverpb/json/client/server/platform_reset_password_parameters.go new file mode 100644 index 00000000000..79515a918ac --- /dev/null +++ b/api/serverpb/json/client/server/platform_reset_password_parameters.go @@ -0,0 +1,131 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "context" + "net/http" + "time" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + cr "github.com/go-openapi/runtime/client" + "github.com/go-openapi/strfmt" +) + +// NewPlatformResetPasswordParams creates a new PlatformResetPasswordParams object +// with the default values initialized. +func NewPlatformResetPasswordParams() *PlatformResetPasswordParams { + var () + return &PlatformResetPasswordParams{ + + timeout: cr.DefaultTimeout, + } +} + +// NewPlatformResetPasswordParamsWithTimeout creates a new PlatformResetPasswordParams object +// with the default values initialized, and the ability to set a timeout on a request +func NewPlatformResetPasswordParamsWithTimeout(timeout time.Duration) *PlatformResetPasswordParams { + var () + return &PlatformResetPasswordParams{ + + timeout: timeout, + } +} + +// NewPlatformResetPasswordParamsWithContext creates a new PlatformResetPasswordParams object +// with the default values initialized, and the ability to set a context for a request +func NewPlatformResetPasswordParamsWithContext(ctx context.Context) *PlatformResetPasswordParams { + var () + return &PlatformResetPasswordParams{ + + Context: ctx, + } +} + +// NewPlatformResetPasswordParamsWithHTTPClient creates a new PlatformResetPasswordParams object +// with the default values initialized, and the ability to set a custom HTTPClient for a request +func NewPlatformResetPasswordParamsWithHTTPClient(client *http.Client) *PlatformResetPasswordParams { + var () + return &PlatformResetPasswordParams{ + HTTPClient: client, + } +} + +/*PlatformResetPasswordParams contains all the parameters to send to the API endpoint +for the platform reset password operation typically these are written to a http.Request +*/ +type PlatformResetPasswordParams struct { + + /*Body*/ + Body PlatformResetPasswordBody + + timeout time.Duration + Context context.Context + HTTPClient *http.Client +} + +// WithTimeout adds the timeout to the platform reset password params +func (o *PlatformResetPasswordParams) WithTimeout(timeout time.Duration) *PlatformResetPasswordParams { + o.SetTimeout(timeout) + return o +} + +// SetTimeout adds the timeout to the platform reset password params +func (o *PlatformResetPasswordParams) SetTimeout(timeout time.Duration) { + o.timeout = timeout +} + +// WithContext adds the context to the platform reset password params +func (o *PlatformResetPasswordParams) WithContext(ctx context.Context) *PlatformResetPasswordParams { + o.SetContext(ctx) + return o +} + +// SetContext adds the context to the platform reset password params +func (o *PlatformResetPasswordParams) SetContext(ctx context.Context) { + o.Context = ctx +} + +// WithHTTPClient adds the HTTPClient to the platform reset password params +func (o *PlatformResetPasswordParams) WithHTTPClient(client *http.Client) *PlatformResetPasswordParams { + o.SetHTTPClient(client) + return o +} + +// SetHTTPClient adds the HTTPClient to the platform reset password params +func (o *PlatformResetPasswordParams) SetHTTPClient(client *http.Client) { + o.HTTPClient = client +} + +// WithBody adds the body to the platform reset password params +func (o *PlatformResetPasswordParams) WithBody(body PlatformResetPasswordBody) *PlatformResetPasswordParams { + o.SetBody(body) + return o +} + +// SetBody adds the body to the platform reset password params +func (o *PlatformResetPasswordParams) SetBody(body PlatformResetPasswordBody) { + o.Body = body +} + +// WriteToRequest writes these params to a swagger request +func (o *PlatformResetPasswordParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error { + + if err := r.SetTimeout(o.timeout); err != nil { + return err + } + var res []error + + if err := r.SetBodyParam(o.Body); err != nil { + return err + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} diff --git a/api/serverpb/json/client/server/platform_reset_password_responses.go b/api/serverpb/json/client/server/platform_reset_password_responses.go new file mode 100644 index 00000000000..424c0162545 --- /dev/null +++ b/api/serverpb/json/client/server/platform_reset_password_responses.go @@ -0,0 +1,223 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package server + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "fmt" + "io" + "strconv" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/swag" +) + +// PlatformResetPasswordReader is a Reader for the PlatformResetPassword structure. +type PlatformResetPasswordReader struct { + formats strfmt.Registry +} + +// ReadResponse reads a server response into the received o. +func (o *PlatformResetPasswordReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) { + switch response.Code() { + case 200: + result := NewPlatformResetPasswordOK() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return result, nil + default: + result := NewPlatformResetPasswordDefault(response.Code()) + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + if response.Code()/100 == 2 { + return result, nil + } + return nil, result + } +} + +// NewPlatformResetPasswordOK creates a PlatformResetPasswordOK with default headers values +func NewPlatformResetPasswordOK() *PlatformResetPasswordOK { + return &PlatformResetPasswordOK{} +} + +/*PlatformResetPasswordOK handles this case with default header values. + +A successful response. +*/ +type PlatformResetPasswordOK struct { + Payload interface{} +} + +func (o *PlatformResetPasswordOK) Error() string { + return fmt.Sprintf("[POST /v1/Platform/ResetPassword][%d] platformResetPasswordOk %+v", 200, o.Payload) +} + +func (o *PlatformResetPasswordOK) GetPayload() interface{} { + return o.Payload +} + +func (o *PlatformResetPasswordOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + // response payload + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +// NewPlatformResetPasswordDefault creates a PlatformResetPasswordDefault with default headers values +func NewPlatformResetPasswordDefault(code int) *PlatformResetPasswordDefault { + return &PlatformResetPasswordDefault{ + _statusCode: code, + } +} + +/*PlatformResetPasswordDefault handles this case with default header values. + +An unexpected error response +*/ +type PlatformResetPasswordDefault struct { + _statusCode int + + Payload *PlatformResetPasswordDefaultBody +} + +// Code gets the status code for the platform reset password default response +func (o *PlatformResetPasswordDefault) Code() int { + return o._statusCode +} + +func (o *PlatformResetPasswordDefault) Error() string { + return fmt.Sprintf("[POST /v1/Platform/ResetPassword][%d] PlatformResetPassword default %+v", o._statusCode, o.Payload) +} + +func (o *PlatformResetPasswordDefault) GetPayload() *PlatformResetPasswordDefaultBody { + return o.Payload +} + +func (o *PlatformResetPasswordDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(PlatformResetPasswordDefaultBody) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} + +/*PlatformResetPasswordBody platform reset password body +swagger:model PlatformResetPasswordBody +*/ +type PlatformResetPasswordBody struct { + + // Existing Percona Platform user's email. + Email string `json:"email,omitempty"` +} + +// Validate validates this platform reset password body +func (o *PlatformResetPasswordBody) Validate(formats strfmt.Registry) error { + return nil +} + +// MarshalBinary interface implementation +func (o *PlatformResetPasswordBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *PlatformResetPasswordBody) UnmarshalBinary(b []byte) error { + var res PlatformResetPasswordBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} + +/*PlatformResetPasswordDefaultBody platform reset password default body +swagger:model PlatformResetPasswordDefaultBody +*/ +type PlatformResetPasswordDefaultBody struct { + + // error + Error string `json:"error,omitempty"` + + // code + Code int32 `json:"code,omitempty"` + + // message + Message string `json:"message,omitempty"` + + // details + Details []*DetailsItems0 `json:"details"` +} + +// Validate validates this platform reset password default body +func (o *PlatformResetPasswordDefaultBody) Validate(formats strfmt.Registry) error { + var res []error + + if err := o.validateDetails(formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +func (o *PlatformResetPasswordDefaultBody) validateDetails(formats strfmt.Registry) error { + + if swag.IsZero(o.Details) { // not required + return nil + } + + for i := 0; i < len(o.Details); i++ { + if swag.IsZero(o.Details[i]) { // not required + continue + } + + if o.Details[i] != nil { + if err := o.Details[i].Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("PlatformResetPassword default" + "." + "details" + "." + strconv.Itoa(i)) + } + return err + } + } + + } + + return nil +} + +// MarshalBinary interface implementation +func (o *PlatformResetPasswordDefaultBody) MarshalBinary() ([]byte, error) { + if o == nil { + return nil, nil + } + return swag.WriteJSON(o) +} + +// UnmarshalBinary interface implementation +func (o *PlatformResetPasswordDefaultBody) UnmarshalBinary(b []byte) error { + var res PlatformResetPasswordDefaultBody + if err := swag.ReadJSON(b, &res); err != nil { + return err + } + *o = res + return nil +} diff --git a/api/serverpb/json/client/server/server_client.go b/api/serverpb/json/client/server/server_client.go index ac5e54e3774..e57a780b886 100644 --- a/api/serverpb/json/client/server/server_client.go +++ b/api/serverpb/json/client/server/server_client.go @@ -37,6 +37,8 @@ type ClientService interface { Logs(params *LogsParams, writer io.Writer) (*LogsOK, error) + PlatformResetPassword(params *PlatformResetPasswordParams) (*PlatformResetPasswordOK, error) + PlatformSignIn(params *PlatformSignInParams) (*PlatformSignInOK, error) PlatformSignUp(params *PlatformSignUpParams) (*PlatformSignUpOK, error) @@ -217,6 +219,39 @@ func (a *Client) Logs(params *LogsParams, writer io.Writer) (*LogsOK, error) { return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* + PlatformResetPassword platforms reset password initiates password restore procedure +*/ +func (a *Client) PlatformResetPassword(params *PlatformResetPasswordParams) (*PlatformResetPasswordOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewPlatformResetPasswordParams() + } + + result, err := a.transport.Submit(&runtime.ClientOperation{ + ID: "PlatformResetPassword", + Method: "POST", + PathPattern: "/v1/Platform/ResetPassword", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &PlatformResetPasswordReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + }) + if err != nil { + return nil, err + } + success, ok := result.(*PlatformResetPasswordOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*PlatformResetPasswordDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* PlatformSignIn platforms sign in links that PMM instance to percona platform user */ diff --git a/api/serverpb/json/serverpb.json b/api/serverpb/json/serverpb.json index f1c544bd93d..ae65365633a 100644 --- a/api/serverpb/json/serverpb.json +++ b/api/serverpb/json/serverpb.json @@ -127,6 +127,79 @@ } } }, + "/v1/Platform/ResetPassword": { + "post": { + "tags": [ + "Server" + ], + "summary": "PlatformResetPassword initiates password restore procedure.", + "operationId": "PlatformResetPassword", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "email": { + "description": "Existing Percona Platform user's email.", + "type": "string", + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response", + "schema": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "x-order": 1 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "x-order": 0 + }, + "value": { + "type": "string", + "format": "byte", + "x-order": 1 + } + } + }, + "x-order": 3 + }, + "error": { + "type": "string", + "x-order": 0 + }, + "message": { + "type": "string", + "x-order": 2 + } + } + } + } + } + } + }, "/v1/Platform/SignIn": { "post": { "tags": [ diff --git a/api/serverpb/server.pb.go b/api/serverpb/server.pb.go index 67e91e82768..40585e14bae 100644 --- a/api/serverpb/server.pb.go +++ b/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, 0x1c, - 0xa7, 0x2b, 0x39, 0x2d, 0xfa, 0xb2, 0xa0, 0xb5, 0x94, 0xb4, 0xf0, 0x5e, 0x54, 0x92, 0x92, 0xe0, - 0x3e, 0x16, 0xf9, 0x07, 0x45, 0x81, 0xfe, 0xac, 0x02, 0x6d, 0x9f, 0x0b, 0x14, 0xfd, 0x21, 0x05, - 0x6f, 0xab, 0xdb, 0x5a, 0x29, 0xda, 0xbe, 0xf5, 0x4d, 0xfc, 0xe6, 0xe3, 0x0c, 0x67, 0xf8, 0x71, - 0x76, 0x04, 0xeb, 0x8c, 0xd0, 0x3e, 0xa1, 0xdd, 0xab, 0x8a, 0xfa, 0x71, 0xd8, 0xa5, 0x31, 0x8f, - 0xd1, 0xbc, 0x5a, 0x95, 0xff, 0xdf, 0xf6, 0x79, 0xa7, 0x77, 0x75, 0xd8, 0x8c, 0xc3, 0x4a, 0x38, - 0xf0, 0xf9, 0x75, 0x3c, 0xa8, 0xb4, 0xe3, 0x27, 0x92, 0xf4, 0xa4, 0x8f, 0x03, 0xdf, 0xc3, 0x3c, - 0xa6, 0xac, 0x92, 0xfc, 0x54, 0xfb, 0xcb, 0xdb, 0xed, 0x38, 0x6e, 0x07, 0xa4, 0x82, 0xbb, 0x7e, - 0x05, 0x47, 0x51, 0xcc, 0x31, 0xf7, 0xe3, 0x88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 0xd9, 0x3b, 0x32, 0xd0, - 0xa6, 0x8d, 0x26, 0x02, 0xf1, 0x1e, 0x13, 0x91, 0x9a, 0x50, 0x18, 0xf9, 0xb2, 0x0c, 0xf3, 0x99, - 0xfe, 0x08, 0x0d, 0xf3, 0x49, 0xf9, 0x14, 0xd9, 0x5b, 0x32, 0xcc, 0xba, 0x5d, 0x14, 0x61, 0x8c, - 0xb5, 0xf2, 0x82, 0xc8, 0x74, 0x62, 0x58, 0x1e, 0x6f, 0x13, 0x68, 0x67, 0x78, 0x05, 0x29, 0x1f, - 0xa4, 0xf2, 0xfd, 0xdb, 0xcc, 0x3a, 0xda, 0x7d, 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, 0x73, 0x5b, + 0xdf, 0xd6, 0x69, 0x05, 0xbc, 0xf1, 0xe6, 0x39, 0xe7, 0x37, 0xe7, 0x37, 0xe7, 0xcc, 0x6f, 0xce, + 0x1e, 0x19, 0x96, 0x29, 0x49, 0xba, 0x24, 0x69, 0x5f, 0x54, 0xe5, 0x8f, 0xdd, 0x76, 0x12, 0xb3, + 0x18, 0x4d, 0xcb, 0x95, 0xf5, 0x41, 0xd3, 0x67, 0xad, 0xce, 0xc5, 0xee, 0x65, 0x1c, 0x56, 0xc3, + 0x9e, 0xcf, 0xae, 0xe2, 0x5e, 0xb5, 0x19, 0x3f, 0x14, 0xa0, 0x87, 0x5d, 0x1c, 0xf8, 0x1e, 0x66, + 0x71, 0x42, 0xab, 0xe9, 0x4f, 0xb9, 0xdf, 0x5a, 0x6f, 0xc6, 0x71, 0x33, 0x20, 0x55, 0xdc, 0xf6, + 0xab, 0x38, 0x8a, 0x62, 0x86, 0x99, 0x1f, 0x47, 0x54, 0x79, 0xef, 0x2a, 0xaf, 0x58, 0x5d, 0x74, + 0x1a, 0x55, 0xaf, 0x93, 0x08, 0x80, 0xf2, 0x57, 0x46, 0xfd, 0xcc, 0x0f, 0x09, 0x65, 0x38, 0x6c, + 0x4b, 0x80, 0xfd, 0x3a, 0x07, 0xc5, 0x57, 0x24, 0xa1, 0x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c, + 0xe9, 0x12, 0x8a, 0x03, 0x1f, 0xae, 0x7e, 0x3e, 0xe3, 0xdf, 0xb8, 0x7e, 0x3e, 0x19, 0x5f, 0x3a, + 0x7b, 0x4d, 0xd0, 0x2c, 0xdb, 0x25, 0x4e, 0xa3, 0xbd, 0xd5, 0xa7, 0x44, 0xa4, 0x13, 0xc3, 0xfc, + 0x70, 0x17, 0x42, 0x1b, 0xfd, 0x2b, 0xc8, 0xf8, 0xde, 0x59, 0x77, 0x27, 0xb9, 0x15, 0xdb, 0x5d, + 0xc1, 0x66, 0xda, 0xe5, 0x21, 0x36, 0x09, 0xe6, 0x84, 0x5d, 0x28, 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/api/serverpb/server.pb.gw.go b/api/serverpb/server.pb.gw.go index 05ca175443e..ff88a7d2fd5 100644 --- a/api/serverpb/server.pb.gw.go +++ b/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/api/serverpb/server.proto b/api/serverpb/server.proto index 53ef795799a..170246f2a75 100644 --- a/api/serverpb/server.proto +++ b/api/serverpb/server.proto @@ -188,6 +188,17 @@ message PlatformSignInRequest { message PlatformSignInResponse {} +message PlatformResetPasswordRequest { + // Existing Percona Platform user's email. + string email = 1 [ + (validator.field) = { + string_not_empty: true + } + ]; +} + +message PlatformResetPasswordResponse {} + // Server service provides generic PMM Server public APIs. service Server { // Version returns PMM Server versions. @@ -259,4 +270,11 @@ service Server { body: "*" }; } + // PlatformResetPassword initiates password restore procedure. + rpc PlatformResetPassword(PlatformResetPasswordRequest) returns (PlatformResetPasswordResponse) { + option (google.api.http) = { + post: "/v1/Platform/ResetPassword" + body: "*" + }; + } } diff --git a/api/serverpb/server.validator.pb.go b/api/serverpb/server.validator.pb.go index cee430e6198..785bcc86ea9 100644 --- a/api/serverpb/server.validator.pb.go +++ b/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 +} diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index f7b2867efd2..13dbe668ae1 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -127,6 +127,79 @@ } } }, + "/v1/Platform/ResetPassword": { + "post": { + "tags": [ + "Server" + ], + "summary": "PlatformResetPassword initiates password restore procedure.", + "operationId": "PlatformResetPassword", + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "type": "object", + "properties": { + "email": { + "description": "Existing Percona Platform user's email.", + "type": "string", + "x-order": 0 + } + } + } + } + ], + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "type": "object" + } + }, + "default": { + "description": "An unexpected error response", + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "x-order": 0 + }, + "code": { + "type": "integer", + "format": "int32", + "x-order": 1 + }, + "message": { + "type": "string", + "x-order": 2 + }, + "details": { + "type": "array", + "items": { + "type": "object", + "properties": { + "type_url": { + "type": "string", + "x-order": 0 + }, + "value": { + "type": "string", + "format": "byte", + "x-order": 1 + } + } + }, + "x-order": 3 + } + } + } + } + } + } + }, "/v1/Platform/SignIn": { "post": { "tags": [