From 2c5c2917f17253d4ba32479bc014a0d099abe46a Mon Sep 17 00:00:00 2001 From: Fabiennne Date: Tue, 31 Mar 2020 11:44:48 +0200 Subject: [PATCH] fix: remove unnecessary things --- pkg/admin/api/api.go | 5 - pkg/auth/api/grpc/auth.pb.go | 184 ++++++++-------------- pkg/auth/api/grpc/auth.pb.gw.go | 51 ------ pkg/auth/api/grpc/auth.swagger.json | 123 --------------- pkg/auth/api/grpc/mock/auth.proto.mock.go | 20 --- pkg/auth/api/grpc/user.go | 4 - pkg/auth/api/proto/auth.proto | 11 -- pkg/management/api/api.go | 5 - 8 files changed, 69 insertions(+), 334 deletions(-) diff --git a/pkg/admin/api/api.go b/pkg/admin/api/api.go index 92604a142f..c197885dfb 100644 --- a/pkg/admin/api/api.go +++ b/pkg/admin/api/api.go @@ -7,11 +7,6 @@ import ( "github.com/caos/zitadel/pkg/admin/api/grpc" ) -type API struct { - grpcServer grpc.Server - gateway grpc.Gateway -} - type Config struct { GRPC grpc_util.Config } diff --git a/pkg/auth/api/grpc/auth.pb.go b/pkg/auth/api/grpc/auth.pb.go index 0166dff10d..9742ac4500 100644 --- a/pkg/auth/api/grpc/auth.pb.go +++ b/pkg/auth/api/grpc/auth.pb.go @@ -2680,7 +2680,7 @@ var file_auth_proto_rawDesc = []byte{ 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x53, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x4d, 0x45, 0x54, 0x48, 0x4f, 0x44, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x53, 0x10, 0x02, 0x32, - 0x96, 0x1a, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0xba, 0x19, 0x0a, 0x0b, 0x41, 0x75, 0x74, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x7a, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, @@ -2856,52 +2856,46 @@ var file_auth_proto_rawDesc = []byte{ 0x74, 0x79, 0x22, 0x2c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x6d, 0x65, 0x2f, 0x6d, 0x66, 0x61, 0x2f, 0x6f, 0x74, 0x70, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x5a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x49, 0x44, 0x12, - 0x1b, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x1a, 0x19, 0x2e, 0x7a, - 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, - 0x0b, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb1, 0x01, 0x0a, - 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, - 0x4f, 0x72, 0x67, 0x73, 0x12, 0x2e, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x67, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x50, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x67, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, - 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x6f, 0x72, - 0x67, 0x73, 0x2f, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x3a, 0x01, 0x2a, 0x82, 0xb5, 0x18, + 0x12, 0xb1, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x79, 0x50, 0x72, 0x6f, + 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x67, 0x73, 0x12, 0x2e, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, + 0x65, 0x6c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x67, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, + 0x65, 0x6c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x79, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4f, 0x72, 0x67, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x20, 0x22, 0x1b, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x6f, 0x72, 0x67, 0x73, 0x2f, 0x5f, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x3a, 0x01, + 0x2a, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x64, 0x12, 0x7a, 0x0a, 0x0a, 0x49, 0x73, 0x49, 0x61, 0x6d, 0x41, 0x64, 0x6d, + 0x69, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x7a, 0x69, 0x74, + 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x73, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, + 0x6c, 0x2f, 0x5f, 0x69, 0x73, 0x69, 0x61, 0x6d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x7a, 0x0a, 0x0a, 0x49, 0x73, 0x49, 0x61, 0x6d, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x24, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x41, - 0x64, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2f, 0x5f, 0x69, - 0x73, 0x69, 0x61, 0x6d, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x0d, 0x61, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x89, 0x01, 0x0a, - 0x17, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x5a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x50, 0x65, 0x72, - 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x1a, 0x22, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x70, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7a, 0x69, 0x74, 0x61, 0x64, - 0x65, 0x6c, 0x2f, 0x6d, 0x65, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0xb7, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x61, 0x6f, 0x73, 0x2f, 0x7a, 0x69, 0x74, - 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x61, 0x70, - 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x92, 0x41, 0x88, 0x01, 0x12, 0x3b, 0x0a, 0x08, 0x41, 0x75, - 0x74, 0x68, 0x20, 0x41, 0x50, 0x49, 0x22, 0x2a, 0x12, 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, - 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x61, 0x6f, - 0x73, 0x2f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x32, 0x10, 0x61, 0x70, - 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x3a, 0x10, + 0x12, 0x89, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4d, 0x79, 0x5a, 0x69, 0x74, 0x61, 0x64, 0x65, + 0x6c, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x22, 0x2e, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x79, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, + 0x12, 0x17, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7a, + 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x6d, 0x65, 0x82, 0xb5, 0x18, 0x0f, 0x0a, 0x0d, 0x61, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x42, 0xb7, 0x01, 0x5a, + 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x61, 0x6f, 0x73, + 0x2f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x75, 0x74, + 0x68, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x92, 0x41, 0x88, 0x01, 0x12, 0x3b, + 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x20, 0x41, 0x50, 0x49, 0x22, 0x2a, 0x12, 0x28, 0x68, 0x74, + 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x61, 0x6f, 0x73, 0x2f, 0x7a, 0x69, 0x74, 0x61, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x6b, + 0x67, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x2a, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, - 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, - 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x67, 0x72, + 0x70, 0x63, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, + 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3002,38 +2996,36 @@ var file_auth_proto_depIdxs = []int32{ 38, // 38: zitadel.auth.api.v1.AuthService.AddMfaOTP:input_type -> google.protobuf.Empty 26, // 39: zitadel.auth.api.v1.AuthService.VerifyMfaOTP:input_type -> zitadel.auth.api.v1.VerifyMfaOtp 38, // 40: zitadel.auth.api.v1.AuthService.RemoveMfaOTP:input_type -> google.protobuf.Empty - 10, // 41: zitadel.auth.api.v1.AuthService.GetUserByID:input_type -> zitadel.auth.api.v1.UserID - 31, // 42: zitadel.auth.api.v1.AuthService.SearchMyProjectOrgs:input_type -> zitadel.auth.api.v1.MyProjectOrgSearchRequest - 38, // 43: zitadel.auth.api.v1.AuthService.IsIamAdmin:input_type -> google.protobuf.Empty - 38, // 44: zitadel.auth.api.v1.AuthService.GetMyZitadelPermissions:input_type -> google.protobuf.Empty - 38, // 45: zitadel.auth.api.v1.AuthService.Healthz:output_type -> google.protobuf.Empty - 38, // 46: zitadel.auth.api.v1.AuthService.Ready:output_type -> google.protobuf.Empty - 39, // 47: zitadel.auth.api.v1.AuthService.Validate:output_type -> google.protobuf.Struct - 8, // 48: zitadel.auth.api.v1.AuthService.GetMyUserSessions:output_type -> zitadel.auth.api.v1.UserSessionViews - 12, // 49: zitadel.auth.api.v1.AuthService.GetMyUserProfile:output_type -> zitadel.auth.api.v1.UserProfile - 12, // 50: zitadel.auth.api.v1.AuthService.UpdateMyUserProfile:output_type -> zitadel.auth.api.v1.UserProfile - 14, // 51: zitadel.auth.api.v1.AuthService.GetMyUserEmail:output_type -> zitadel.auth.api.v1.UserEmail - 14, // 52: zitadel.auth.api.v1.AuthService.ChangeMyUserEmail:output_type -> zitadel.auth.api.v1.UserEmail - 38, // 53: zitadel.auth.api.v1.AuthService.VerifyMyUserEmail:output_type -> google.protobuf.Empty - 38, // 54: zitadel.auth.api.v1.AuthService.ResendMyEmailVerificationMail:output_type -> google.protobuf.Empty - 18, // 55: zitadel.auth.api.v1.AuthService.GetMyUserPhone:output_type -> zitadel.auth.api.v1.UserPhone - 18, // 56: zitadel.auth.api.v1.AuthService.ChangeMyUserPhone:output_type -> zitadel.auth.api.v1.UserPhone - 38, // 57: zitadel.auth.api.v1.AuthService.VerifyMyUserPhone:output_type -> google.protobuf.Empty - 38, // 58: zitadel.auth.api.v1.AuthService.ResendMyPhoneVerificationCode:output_type -> google.protobuf.Empty - 21, // 59: zitadel.auth.api.v1.AuthService.GetMyUserAddress:output_type -> zitadel.auth.api.v1.UserAddress - 21, // 60: zitadel.auth.api.v1.AuthService.UpdateMyUserAddress:output_type -> zitadel.auth.api.v1.UserAddress - 27, // 61: zitadel.auth.api.v1.AuthService.GetMyMfas:output_type -> zitadel.auth.api.v1.MultiFactors - 38, // 62: zitadel.auth.api.v1.AuthService.SetMyPassword:output_type -> google.protobuf.Empty - 38, // 63: zitadel.auth.api.v1.AuthService.ChangeMyPassword:output_type -> google.protobuf.Empty - 29, // 64: zitadel.auth.api.v1.AuthService.AddMfaOTP:output_type -> zitadel.auth.api.v1.MfaOtpResponse - 29, // 65: zitadel.auth.api.v1.AuthService.VerifyMfaOTP:output_type -> zitadel.auth.api.v1.MfaOtpResponse - 38, // 66: zitadel.auth.api.v1.AuthService.RemoveMfaOTP:output_type -> google.protobuf.Empty - 11, // 67: zitadel.auth.api.v1.AuthService.GetUserByID:output_type -> zitadel.auth.api.v1.User - 33, // 68: zitadel.auth.api.v1.AuthService.SearchMyProjectOrgs:output_type -> zitadel.auth.api.v1.MyProjectOrgSearchResponse - 34, // 69: zitadel.auth.api.v1.AuthService.IsIamAdmin:output_type -> zitadel.auth.api.v1.IsAdminResponse - 36, // 70: zitadel.auth.api.v1.AuthService.GetMyZitadelPermissions:output_type -> zitadel.auth.api.v1.MyPermissions - 45, // [45:71] is the sub-list for method output_type - 19, // [19:45] is the sub-list for method input_type + 31, // 41: zitadel.auth.api.v1.AuthService.SearchMyProjectOrgs:input_type -> zitadel.auth.api.v1.MyProjectOrgSearchRequest + 38, // 42: zitadel.auth.api.v1.AuthService.IsIamAdmin:input_type -> google.protobuf.Empty + 38, // 43: zitadel.auth.api.v1.AuthService.GetMyZitadelPermissions:input_type -> google.protobuf.Empty + 38, // 44: zitadel.auth.api.v1.AuthService.Healthz:output_type -> google.protobuf.Empty + 38, // 45: zitadel.auth.api.v1.AuthService.Ready:output_type -> google.protobuf.Empty + 39, // 46: zitadel.auth.api.v1.AuthService.Validate:output_type -> google.protobuf.Struct + 8, // 47: zitadel.auth.api.v1.AuthService.GetMyUserSessions:output_type -> zitadel.auth.api.v1.UserSessionViews + 12, // 48: zitadel.auth.api.v1.AuthService.GetMyUserProfile:output_type -> zitadel.auth.api.v1.UserProfile + 12, // 49: zitadel.auth.api.v1.AuthService.UpdateMyUserProfile:output_type -> zitadel.auth.api.v1.UserProfile + 14, // 50: zitadel.auth.api.v1.AuthService.GetMyUserEmail:output_type -> zitadel.auth.api.v1.UserEmail + 14, // 51: zitadel.auth.api.v1.AuthService.ChangeMyUserEmail:output_type -> zitadel.auth.api.v1.UserEmail + 38, // 52: zitadel.auth.api.v1.AuthService.VerifyMyUserEmail:output_type -> google.protobuf.Empty + 38, // 53: zitadel.auth.api.v1.AuthService.ResendMyEmailVerificationMail:output_type -> google.protobuf.Empty + 18, // 54: zitadel.auth.api.v1.AuthService.GetMyUserPhone:output_type -> zitadel.auth.api.v1.UserPhone + 18, // 55: zitadel.auth.api.v1.AuthService.ChangeMyUserPhone:output_type -> zitadel.auth.api.v1.UserPhone + 38, // 56: zitadel.auth.api.v1.AuthService.VerifyMyUserPhone:output_type -> google.protobuf.Empty + 38, // 57: zitadel.auth.api.v1.AuthService.ResendMyPhoneVerificationCode:output_type -> google.protobuf.Empty + 21, // 58: zitadel.auth.api.v1.AuthService.GetMyUserAddress:output_type -> zitadel.auth.api.v1.UserAddress + 21, // 59: zitadel.auth.api.v1.AuthService.UpdateMyUserAddress:output_type -> zitadel.auth.api.v1.UserAddress + 27, // 60: zitadel.auth.api.v1.AuthService.GetMyMfas:output_type -> zitadel.auth.api.v1.MultiFactors + 38, // 61: zitadel.auth.api.v1.AuthService.SetMyPassword:output_type -> google.protobuf.Empty + 38, // 62: zitadel.auth.api.v1.AuthService.ChangeMyPassword:output_type -> google.protobuf.Empty + 29, // 63: zitadel.auth.api.v1.AuthService.AddMfaOTP:output_type -> zitadel.auth.api.v1.MfaOtpResponse + 29, // 64: zitadel.auth.api.v1.AuthService.VerifyMfaOTP:output_type -> zitadel.auth.api.v1.MfaOtpResponse + 38, // 65: zitadel.auth.api.v1.AuthService.RemoveMfaOTP:output_type -> google.protobuf.Empty + 33, // 66: zitadel.auth.api.v1.AuthService.SearchMyProjectOrgs:output_type -> zitadel.auth.api.v1.MyProjectOrgSearchResponse + 34, // 67: zitadel.auth.api.v1.AuthService.IsIamAdmin:output_type -> zitadel.auth.api.v1.IsAdminResponse + 36, // 68: zitadel.auth.api.v1.AuthService.GetMyZitadelPermissions:output_type -> zitadel.auth.api.v1.MyPermissions + 44, // [44:69] is the sub-list for method output_type + 19, // [19:44] is the sub-list for method input_type 19, // [19:19] is the sub-list for extension type_name 19, // [19:19] is the sub-list for extension extendee 0, // [0:19] is the sub-list for field type_name @@ -3453,8 +3445,6 @@ type AuthServiceClient interface { AddMfaOTP(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*MfaOtpResponse, error) VerifyMfaOTP(ctx context.Context, in *VerifyMfaOtp, opts ...grpc.CallOption) (*MfaOtpResponse, error) RemoveMfaOTP(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) - //TODO: Remove func only for tests - GetUserByID(ctx context.Context, in *UserID, opts ...grpc.CallOption) (*User, error) SearchMyProjectOrgs(ctx context.Context, in *MyProjectOrgSearchRequest, opts ...grpc.CallOption) (*MyProjectOrgSearchResponse, error) IsIamAdmin(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*IsAdminResponse, error) //Permission @@ -3667,15 +3657,6 @@ func (c *authServiceClient) RemoveMfaOTP(ctx context.Context, in *empty.Empty, o return out, nil } -func (c *authServiceClient) GetUserByID(ctx context.Context, in *UserID, opts ...grpc.CallOption) (*User, error) { - out := new(User) - err := c.cc.Invoke(ctx, "/zitadel.auth.api.v1.AuthService/GetUserByID", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *authServiceClient) SearchMyProjectOrgs(ctx context.Context, in *MyProjectOrgSearchRequest, opts ...grpc.CallOption) (*MyProjectOrgSearchResponse, error) { out := new(MyProjectOrgSearchResponse) err := c.cc.Invoke(ctx, "/zitadel.auth.api.v1.AuthService/SearchMyProjectOrgs", in, out, opts...) @@ -3731,8 +3712,6 @@ type AuthServiceServer interface { AddMfaOTP(context.Context, *empty.Empty) (*MfaOtpResponse, error) VerifyMfaOTP(context.Context, *VerifyMfaOtp) (*MfaOtpResponse, error) RemoveMfaOTP(context.Context, *empty.Empty) (*empty.Empty, error) - //TODO: Remove func only for tests - GetUserByID(context.Context, *UserID) (*User, error) SearchMyProjectOrgs(context.Context, *MyProjectOrgSearchRequest) (*MyProjectOrgSearchResponse, error) IsIamAdmin(context.Context, *empty.Empty) (*IsAdminResponse, error) //Permission @@ -3809,9 +3788,6 @@ func (*UnimplementedAuthServiceServer) VerifyMfaOTP(context.Context, *VerifyMfaO func (*UnimplementedAuthServiceServer) RemoveMfaOTP(context.Context, *empty.Empty) (*empty.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveMfaOTP not implemented") } -func (*UnimplementedAuthServiceServer) GetUserByID(context.Context, *UserID) (*User, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetUserByID not implemented") -} func (*UnimplementedAuthServiceServer) SearchMyProjectOrgs(context.Context, *MyProjectOrgSearchRequest) (*MyProjectOrgSearchResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchMyProjectOrgs not implemented") } @@ -4222,24 +4198,6 @@ func _AuthService_RemoveMfaOTP_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _AuthService_GetUserByID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UserID) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AuthServiceServer).GetUserByID(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/zitadel.auth.api.v1.AuthService/GetUserByID", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AuthServiceServer).GetUserByID(ctx, req.(*UserID)) - } - return interceptor(ctx, in, info, handler) -} - func _AuthService_SearchMyProjectOrgs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MyProjectOrgSearchRequest) if err := dec(in); err != nil { @@ -4386,10 +4344,6 @@ var _AuthService_serviceDesc = grpc.ServiceDesc{ MethodName: "RemoveMfaOTP", Handler: _AuthService_RemoveMfaOTP_Handler, }, - { - MethodName: "GetUserByID", - Handler: _AuthService_GetUserByID_Handler, - }, { MethodName: "SearchMyProjectOrgs", Handler: _AuthService_SearchMyProjectOrgs_Handler, diff --git a/pkg/auth/api/grpc/auth.pb.gw.go b/pkg/auth/api/grpc/auth.pb.gw.go index 1489ea1fa0..d089ded1b3 100644 --- a/pkg/auth/api/grpc/auth.pb.gw.go +++ b/pkg/auth/api/grpc/auth.pb.gw.go @@ -323,33 +323,6 @@ func request_AuthService_RemoveMfaOTP_0(ctx context.Context, marshaler runtime.M } -func request_AuthService_GetUserByID_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UserID - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetUserByID(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - func request_AuthService_SearchMyProjectOrgs_0(ctx context.Context, marshaler runtime.Marshaler, client AuthServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MyProjectOrgSearchRequest var metadata runtime.ServerMetadata @@ -863,26 +836,6 @@ func RegisterAuthServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux }) - mux.Handle("GET", pattern_AuthService_GetUserByID_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_AuthService_GetUserByID_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_AuthService_GetUserByID_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("POST", pattern_AuthService_SearchMyProjectOrgs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -991,8 +944,6 @@ var ( pattern_AuthService_RemoveMfaOTP_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"users", "me", "mfa", "otp"}, "")) - pattern_AuthService_GetUserByID_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"users", "id"}, "")) - pattern_AuthService_SearchMyProjectOrgs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"global", "projectorgs", "_search"}, "")) pattern_AuthService_IsIamAdmin_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"global", "_isiamadmin"}, "")) @@ -1045,8 +996,6 @@ var ( forward_AuthService_RemoveMfaOTP_0 = runtime.ForwardResponseMessage - forward_AuthService_GetUserByID_0 = runtime.ForwardResponseMessage - forward_AuthService_SearchMyProjectOrgs_0 = runtime.ForwardResponseMessage forward_AuthService_IsIamAdmin_0 = runtime.ForwardResponseMessage diff --git a/pkg/auth/api/grpc/auth.swagger.json b/pkg/auth/api/grpc/auth.swagger.json index c73ed1a85f..aafd5141dc 100644 --- a/pkg/auth/api/grpc/auth.swagger.json +++ b/pkg/auth/api/grpc/auth.swagger.json @@ -528,31 +528,6 @@ ] } }, - "/users/{id}": { - "get": { - "summary": "TODO: Remove func only for tests", - "operationId": "GetUserByID", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1User" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "AuthService" - ] - } - }, "/validate": { "get": { "operationId": "Validate", @@ -891,91 +866,6 @@ } } }, - "v1User": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "state": { - "$ref": "#/definitions/v1UserState" - }, - "creation_date": { - "type": "string", - "format": "date-time" - }, - "activation_date": { - "type": "string", - "format": "date-time" - }, - "change_date": { - "type": "string", - "format": "date-time" - }, - "last_login": { - "type": "string", - "format": "date-time" - }, - "password_changed": { - "type": "string", - "format": "date-time" - }, - "user_name": { - "type": "string" - }, - "first_name": { - "type": "string" - }, - "last_name": { - "type": "string" - }, - "nick_name": { - "type": "string" - }, - "display_name": { - "type": "string" - }, - "preferred_language": { - "type": "string" - }, - "gender": { - "$ref": "#/definitions/v1Gender" - }, - "email": { - "type": "string" - }, - "is_email_verified": { - "type": "boolean", - "format": "boolean" - }, - "phone": { - "type": "string" - }, - "is_phone_verified": { - "type": "boolean", - "format": "boolean" - }, - "country": { - "type": "string" - }, - "locality": { - "type": "string" - }, - "postal_code": { - "type": "string" - }, - "region": { - "type": "string" - }, - "street_address": { - "type": "string" - }, - "password_change_required": { - "type": "boolean", - "format": "boolean" - } - } - }, "v1UserAddress": { "type": "object", "properties": { @@ -1098,19 +988,6 @@ } } }, - "v1UserState": { - "type": "string", - "enum": [ - "USERSTATE_UNSPECIEFIED", - "USERSTATE_ACTIVE", - "USERSTATE_INACTIVE", - "USERSTATE_DELETED", - "USERSTATE_LOCKED", - "USERSTATE_SUSPEND", - "USERSTATE_INITIAL" - ], - "default": "USERSTATE_UNSPECIEFIED" - }, "v1VerifyMfaOtp": { "type": "object", "properties": { diff --git a/pkg/auth/api/grpc/mock/auth.proto.mock.go b/pkg/auth/api/grpc/mock/auth.proto.mock.go index 9e277f3c81..f829479430 100644 --- a/pkg/auth/api/grpc/mock/auth.proto.mock.go +++ b/pkg/auth/api/grpc/mock/auth.proto.mock.go @@ -257,26 +257,6 @@ func (mr *MockAuthServiceClientMockRecorder) GetMyZitadelPermissions(arg0, arg1 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetMyZitadelPermissions", reflect.TypeOf((*MockAuthServiceClient)(nil).GetMyZitadelPermissions), varargs...) } -// GetUserByID mocks base method -func (m *MockAuthServiceClient) GetUserByID(arg0 context.Context, arg1 *grpc.UserID, arg2 ...grpc0.CallOption) (*grpc.User, error) { - m.ctrl.T.Helper() - varargs := []interface{}{arg0, arg1} - for _, a := range arg2 { - varargs = append(varargs, a) - } - ret := m.ctrl.Call(m, "GetUserByID", varargs...) - ret0, _ := ret[0].(*grpc.User) - ret1, _ := ret[1].(error) - return ret0, ret1 -} - -// GetUserByID indicates an expected call of GetUserByID -func (mr *MockAuthServiceClientMockRecorder) GetUserByID(arg0, arg1 interface{}, arg2 ...interface{}) *gomock.Call { - mr.mock.ctrl.T.Helper() - varargs := append([]interface{}{arg0, arg1}, arg2...) - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetUserByID", reflect.TypeOf((*MockAuthServiceClient)(nil).GetUserByID), varargs...) -} - // Healthz mocks base method func (m *MockAuthServiceClient) Healthz(arg0 context.Context, arg1 *emptypb.Empty, arg2 ...grpc0.CallOption) (*emptypb.Empty, error) { m.ctrl.T.Helper() diff --git a/pkg/auth/api/grpc/user.go b/pkg/auth/api/grpc/user.go index 073168a6ab..fb7604189f 100644 --- a/pkg/auth/api/grpc/user.go +++ b/pkg/auth/api/grpc/user.go @@ -6,10 +6,6 @@ import ( "github.com/golang/protobuf/ptypes/empty" ) -func (s *Server) GetUserByID(ctx context.Context, request *UserID) (*User, error) { - return nil, errors.ThrowUnimplemented(nil, "GRPC-fj74G", "Not implemented") -} - func (s *Server) GetMyUserProfile(ctx context.Context, _ *empty.Empty) (*UserProfile, error) { return nil, errors.ThrowUnimplemented(nil, "GRPC-fis93", "Not implemented") } diff --git a/pkg/auth/api/proto/auth.proto b/pkg/auth/api/proto/auth.proto index 025f3676b5..9055d7f241 100644 --- a/pkg/auth/api/proto/auth.proto +++ b/pkg/auth/api/proto/auth.proto @@ -255,13 +255,6 @@ service AuthService { }; } - //TODO: Remove func only for tests - rpc GetUserByID(UserID) returns (User) { - option (google.api.http) = { - get: "/users/{id}" - }; - } - rpc SearchMyProjectOrgs(MyProjectOrgSearchRequest) returns (MyProjectOrgSearchResponse) { option (google.api.http) = { post: "/global/projectorgs/_search" @@ -318,10 +311,6 @@ enum OIDCResponseType { OIDCRESPONSETYPE_ID_TOKEN_TOKEN = 2; } -message UserID { - string id = 1; -} - message User { string id = 1; UserState state = 2; diff --git a/pkg/management/api/api.go b/pkg/management/api/api.go index bf5bbf6d7f..39b479dc14 100644 --- a/pkg/management/api/api.go +++ b/pkg/management/api/api.go @@ -8,11 +8,6 @@ import ( "github.com/caos/zitadel/pkg/management/api/grpc" ) -type API struct { - grpcServer grpc.Server - gateway grpc.Gateway -} - type Config struct { GRPC grpc_util.Config }