Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
fix: resolve white-screen hang on SSO test connection (#18181)
boojackfdcc0eebabd1
diff --git a/backend/api/v1/idp_service.go b/backend/api/v1/idp_service.goindex 9fef1fad19..3916e71f8e 100644--- a/backend/api/v1/idp_service.go+++ b/backend/api/v1/idp_service.go@@ -294,10 +294,12 @@ func (s *IdentityProviderService) TestIdentityProvider(ctx context.Context, req}identityProvider.Config.GetOidcConfig().ClientSecret = storedIdentityProvider.Config.GetOidcConfig().ClientSecret}- oauth2Context := req.Msg.GetOauth2Context()- if oauth2Context == nil {- return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("missing OAuth2 context"))++ oidcContext := req.Msg.GetOidcContext()+ if oidcContext == nil {+ return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("missing OIDC context"))}+identityProviderConfig := convertIdentityProviderConfigToStore(identityProvider.Config)oidcIdentityProvider, err := oidc.NewIdentityProvider(ctx, identityProviderConfig.GetOidcConfig())if err != nil {@@ -305,7 +307,7 @@ func (s *IdentityProviderService) TestIdentityProvider(ctx context.Context, req}redirectURL := fmt.Sprintf("%s/oidc/callback", setting.ExternalUrl)- token, err := oidcIdentityProvider.ExchangeToken(ctx, redirectURL, oauth2Context.Code)+ token, err := oidcIdentityProvider.ExchangeToken(ctx, redirectURL, oidcContext.Code)if err != nil {return nil, connect.NewError(connect.CodeInvalidArgument, errors.Errorf("failed to exchange access token, error: %s", err.Error()))}diff --git a/backend/generated-go/v1/idp_service.pb.go b/backend/generated-go/v1/idp_service.pb.goindex f47add43e0..108ea0f86f 100644--- a/backend/generated-go/v1/idp_service.pb.go+++ b/backend/generated-go/v1/idp_service.pb.go@@ -180,7 +180,7 @@ func (x LDAPIdentityProviderConfig_SecurityProtocol) Number() protoreflect.EnumN// Deprecated: Use LDAPIdentityProviderConfig_SecurityProtocol.Descriptor instead.func (LDAPIdentityProviderConfig_SecurityProtocol) EnumDescriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{13, 0}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{14, 0}}type GetIdentityProviderRequest struct {@@ -497,6 +497,7 @@ type TestIdentityProviderRequest struct {// Types that are valid to be assigned to Context://// *TestIdentityProviderRequest_Oauth2Context+ // *TestIdentityProviderRequest_OidcContextContext isTestIdentityProviderRequest_Context `protobuf_oneof:"context"`unknownFields protoimpl.UnknownFieldssizeCache protoimpl.SizeCache@@ -555,6 +556,15 @@ func (x *TestIdentityProviderRequest) GetOauth2Context() *OAuth2IdentityProviderreturn nil}+func (x *TestIdentityProviderRequest) GetOidcContext() *OIDCIdentityProviderTestRequestContext {+ if x != nil {+ if x, ok := x.Context.(*TestIdentityProviderRequest_OidcContext); ok {+ return x.OidcContext+ }+ }+ return nil+}+type isTestIdentityProviderRequest_Context interface {isTestIdentityProviderRequest_Context()}@@ -563,8 +573,15 @@ type TestIdentityProviderRequest_Oauth2Context struct {Oauth2Context *OAuth2IdentityProviderTestRequestContext `protobuf:"bytes,2,opt,name=oauth2_context,json=oauth2Context,proto3,oneof"`}+type TestIdentityProviderRequest_OidcContext struct {+ // OIDC authentication context for test connection.+ OidcContext *OIDCIdentityProviderTestRequestContext `protobuf:"bytes,3,opt,name=oidc_context,json=oidcContext,proto3,oneof"`+}+func (*TestIdentityProviderRequest_Oauth2Context) isTestIdentityProviderRequest_Context() {}+func (*TestIdentityProviderRequest_OidcContext) isTestIdentityProviderRequest_Context() {}+type OAuth2IdentityProviderTestRequestContext struct {state protoimpl.MessageState `protogen:"open.v1"`// Authorize code from website.@@ -610,6 +627,51 @@ func (x *OAuth2IdentityProviderTestRequestContext) GetCode() string {return ""}+type OIDCIdentityProviderTestRequestContext struct {+ state protoimpl.MessageState `protogen:"open.v1"`+ // Authorize code from OIDC provider.+ Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"`+ unknownFields protoimpl.UnknownFields+ sizeCache protoimpl.SizeCache+}++func (x *OIDCIdentityProviderTestRequestContext) Reset() {+ *x = OIDCIdentityProviderTestRequestContext{}+ mi := &file_v1_idp_service_proto_msgTypes[8]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+}++func (x *OIDCIdentityProviderTestRequestContext) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*OIDCIdentityProviderTestRequestContext) ProtoMessage() {}++func (x *OIDCIdentityProviderTestRequestContext) ProtoReflect() protoreflect.Message {+ mi := &file_v1_idp_service_proto_msgTypes[8]+ if x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use OIDCIdentityProviderTestRequestContext.ProtoReflect.Descriptor instead.+func (*OIDCIdentityProviderTestRequestContext) Descriptor() ([]byte, []int) {+ return file_v1_idp_service_proto_rawDescGZIP(), []int{8}+}++func (x *OIDCIdentityProviderTestRequestContext) GetCode() string {+ if x != nil {+ return x.Code+ }+ return ""+}+type TestIdentityProviderResponse struct {state protoimpl.MessageState `protogen:"open.v1"`// The map of claims returned by the identity provider.@@ -622,7 +684,7 @@ type TestIdentityProviderResponse struct {func (x *TestIdentityProviderResponse) Reset() {*x = TestIdentityProviderResponse{}- mi := &file_v1_idp_service_proto_msgTypes[8]+ mi := &file_v1_idp_service_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -634,7 +696,7 @@ func (x *TestIdentityProviderResponse) String() string {func (*TestIdentityProviderResponse) ProtoMessage() {}func (x *TestIdentityProviderResponse) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[8]+ mi := &file_v1_idp_service_proto_msgTypes[9]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -647,7 +709,7 @@ func (x *TestIdentityProviderResponse) ProtoReflect() protoreflect.Message {// Deprecated: Use TestIdentityProviderResponse.ProtoReflect.Descriptor instead.func (*TestIdentityProviderResponse) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{8}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{9}}func (x *TestIdentityProviderResponse) GetClaims() map[string]string {@@ -683,7 +745,7 @@ type IdentityProvider struct {func (x *IdentityProvider) Reset() {*x = IdentityProvider{}- mi := &file_v1_idp_service_proto_msgTypes[9]+ mi := &file_v1_idp_service_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -695,7 +757,7 @@ func (x *IdentityProvider) String() string {func (*IdentityProvider) ProtoMessage() {}func (x *IdentityProvider) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[9]+ mi := &file_v1_idp_service_proto_msgTypes[10]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -708,7 +770,7 @@ func (x *IdentityProvider) ProtoReflect() protoreflect.Message {// Deprecated: Use IdentityProvider.ProtoReflect.Descriptor instead.func (*IdentityProvider) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{9}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{10}}func (x *IdentityProvider) GetName() string {@@ -760,7 +822,7 @@ type IdentityProviderConfig struct {func (x *IdentityProviderConfig) Reset() {*x = IdentityProviderConfig{}- mi := &file_v1_idp_service_proto_msgTypes[10]+ mi := &file_v1_idp_service_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -772,7 +834,7 @@ func (x *IdentityProviderConfig) String() string {func (*IdentityProviderConfig) ProtoMessage() {}func (x *IdentityProviderConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[10]+ mi := &file_v1_idp_service_proto_msgTypes[11]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -785,7 +847,7 @@ func (x *IdentityProviderConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use IdentityProviderConfig.ProtoReflect.Descriptor instead.func (*IdentityProviderConfig) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{10}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{11}}func (x *IdentityProviderConfig) GetConfig() isIdentityProviderConfig_Config {@@ -874,7 +936,7 @@ type OAuth2IdentityProviderConfig struct {func (x *OAuth2IdentityProviderConfig) Reset() {*x = OAuth2IdentityProviderConfig{}- mi := &file_v1_idp_service_proto_msgTypes[11]+ mi := &file_v1_idp_service_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -886,7 +948,7 @@ func (x *OAuth2IdentityProviderConfig) String() string {func (*OAuth2IdentityProviderConfig) ProtoMessage() {}func (x *OAuth2IdentityProviderConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[11]+ mi := &file_v1_idp_service_proto_msgTypes[12]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -899,7 +961,7 @@ func (x *OAuth2IdentityProviderConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use OAuth2IdentityProviderConfig.ProtoReflect.Descriptor instead.func (*OAuth2IdentityProviderConfig) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{11}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{12}}func (x *OAuth2IdentityProviderConfig) GetAuthUrl() string {@@ -992,7 +1054,7 @@ type OIDCIdentityProviderConfig struct {func (x *OIDCIdentityProviderConfig) Reset() {*x = OIDCIdentityProviderConfig{}- mi := &file_v1_idp_service_proto_msgTypes[12]+ mi := &file_v1_idp_service_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1004,7 +1066,7 @@ func (x *OIDCIdentityProviderConfig) String() string {func (*OIDCIdentityProviderConfig) ProtoMessage() {}func (x *OIDCIdentityProviderConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[12]+ mi := &file_v1_idp_service_proto_msgTypes[13]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1017,7 +1079,7 @@ func (x *OIDCIdentityProviderConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use OIDCIdentityProviderConfig.ProtoReflect.Descriptor instead.func (*OIDCIdentityProviderConfig) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{12}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{13}}func (x *OIDCIdentityProviderConfig) GetIssuer() string {@@ -1109,7 +1171,7 @@ type LDAPIdentityProviderConfig struct {func (x *LDAPIdentityProviderConfig) Reset() {*x = LDAPIdentityProviderConfig{}- mi := &file_v1_idp_service_proto_msgTypes[13]+ mi := &file_v1_idp_service_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1121,7 +1183,7 @@ func (x *LDAPIdentityProviderConfig) String() string {func (*LDAPIdentityProviderConfig) ProtoMessage() {}func (x *LDAPIdentityProviderConfig) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[13]+ mi := &file_v1_idp_service_proto_msgTypes[14]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1134,7 +1196,7 @@ func (x *LDAPIdentityProviderConfig) ProtoReflect() protoreflect.Message {// Deprecated: Use LDAPIdentityProviderConfig.ProtoReflect.Descriptor instead.func (*LDAPIdentityProviderConfig) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{13}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{14}}func (x *LDAPIdentityProviderConfig) GetHost() string {@@ -1220,7 +1282,7 @@ type FieldMapping struct {func (x *FieldMapping) Reset() {*x = FieldMapping{}- mi := &file_v1_idp_service_proto_msgTypes[14]+ mi := &file_v1_idp_service_proto_msgTypes[15]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1232,7 +1294,7 @@ func (x *FieldMapping) String() string {func (*FieldMapping) ProtoMessage() {}func (x *FieldMapping) ProtoReflect() protoreflect.Message {- mi := &file_v1_idp_service_proto_msgTypes[14]+ mi := &file_v1_idp_service_proto_msgTypes[15]if x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1245,7 +1307,7 @@ func (x *FieldMapping) ProtoReflect() protoreflect.Message {// Deprecated: Use FieldMapping.ProtoReflect.Descriptor instead.func (*FieldMapping) Descriptor() ([]byte, []int) {- return file_v1_idp_service_proto_rawDescGZIP(), []int{14}+ return file_v1_idp_service_proto_rawDescGZIP(), []int{15}}func (x *FieldMapping) GetIdentifier() string {@@ -1298,12 +1360,15 @@ const file_v1_idp_service_proto_rawDesc = "" +"\rallow_missing\x18\x03 \x01(\bR\fallowMissing\"M\n" +"\x1dDeleteIdentityProviderRequest\x12,\n" +"\x04name\x18\x01 \x01(\tB\x18\xe0A\x02\xfaA\x12\n" +- "\x10bytebase.com/IdPR\x04name\"\xd4\x01\n" ++ "\x10bytebase.com/IdPR\x04name\"\xae\x02\n" +"\x1bTestIdentityProviderRequest\x12J\n" +"\x11identity_provider\x18\x01 \x01(\v2\x1d.bytebase.v1.IdentityProviderR\x10identityProvider\x12^\n" +- "\x0eoauth2_context\x18\x02 \x01(\v25.bytebase.v1.OAuth2IdentityProviderTestRequestContextH\x00R\roauth2ContextB\t\n" ++ "\x0eoauth2_context\x18\x02 \x01(\v25.bytebase.v1.OAuth2IdentityProviderTestRequestContextH\x00R\roauth2Context\x12X\n" ++ "\foidc_context\x18\x03 \x01(\v23.bytebase.v1.OIDCIdentityProviderTestRequestContextH\x00R\voidcContextB\t\n" +"\acontext\">\n" +"(OAuth2IdentityProviderTestRequestContext\x12\x12\n" ++ "\x04code\x18\x01 \x01(\tR\x04code\"<\n" ++ "&OIDCIdentityProviderTestRequestContext\x12\x12\n" +"\x04code\x18\x01 \x01(\tR\x04code\"\xbb\x02\n" +"\x1cTestIdentityProviderResponse\x12M\n" +"\x06claims\x18\x01 \x03(\v25.bytebase.v1.TestIdentityProviderResponse.ClaimsEntryR\x06claims\x12T\n" +@@ -1405,7 +1470,7 @@ func file_v1_idp_service_proto_rawDescGZIP() []byte {}var file_v1_idp_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3)-var file_v1_idp_service_proto_msgTypes = make([]protoimpl.MessageInfo, 17)+var file_v1_idp_service_proto_msgTypes = make([]protoimpl.MessageInfo, 18)var file_v1_idp_service_proto_goTypes = []any{(IdentityProviderType)(0), // 0: bytebase.v1.IdentityProviderType(OAuth2AuthStyle)(0), // 1: bytebase.v1.OAuth2AuthStyle@@ -1418,55 +1483,57 @@ var file_v1_idp_service_proto_goTypes = []any{(*DeleteIdentityProviderRequest)(nil), // 8: bytebase.v1.DeleteIdentityProviderRequest(*TestIdentityProviderRequest)(nil), // 9: bytebase.v1.TestIdentityProviderRequest(*OAuth2IdentityProviderTestRequestContext)(nil), // 10: bytebase.v1.OAuth2IdentityProviderTestRequestContext- (*TestIdentityProviderResponse)(nil), // 11: bytebase.v1.TestIdentityProviderResponse- (*IdentityProvider)(nil), // 12: bytebase.v1.IdentityProvider- (*IdentityProviderConfig)(nil), // 13: bytebase.v1.IdentityProviderConfig- (*OAuth2IdentityProviderConfig)(nil), // 14: bytebase.v1.OAuth2IdentityProviderConfig- (*OIDCIdentityProviderConfig)(nil), // 15: bytebase.v1.OIDCIdentityProviderConfig- (*LDAPIdentityProviderConfig)(nil), // 16: bytebase.v1.LDAPIdentityProviderConfig- (*FieldMapping)(nil), // 17: bytebase.v1.FieldMapping- nil, // 18: bytebase.v1.TestIdentityProviderResponse.ClaimsEntry- nil, // 19: bytebase.v1.TestIdentityProviderResponse.UserInfoEntry- (*fieldmaskpb.FieldMask)(nil), // 20: google.protobuf.FieldMask- (*emptypb.Empty)(nil), // 21: google.protobuf.Empty+ (*OIDCIdentityProviderTestRequestContext)(nil), // 11: bytebase.v1.OIDCIdentityProviderTestRequestContext+ (*TestIdentityProviderResponse)(nil), // 12: bytebase.v1.TestIdentityProviderResponse+ (*IdentityProvider)(nil), // 13: bytebase.v1.IdentityProvider+ (*IdentityProviderConfig)(nil), // 14: bytebase.v1.IdentityProviderConfig+ (*OAuth2IdentityProviderConfig)(nil), // 15: bytebase.v1.OAuth2IdentityProviderConfig+ (*OIDCIdentityProviderConfig)(nil), // 16: bytebase.v1.OIDCIdentityProviderConfig+ (*LDAPIdentityProviderConfig)(nil), // 17: bytebase.v1.LDAPIdentityProviderConfig+ (*FieldMapping)(nil), // 18: bytebase.v1.FieldMapping+ nil, // 19: bytebase.v1.TestIdentityProviderResponse.ClaimsEntry+ nil, // 20: bytebase.v1.TestIdentityProviderResponse.UserInfoEntry+ (*fieldmaskpb.FieldMask)(nil), // 21: google.protobuf.FieldMask+ (*emptypb.Empty)(nil), // 22: google.protobuf.Empty}var file_v1_idp_service_proto_depIdxs = []int32{- 12, // 0: bytebase.v1.ListIdentityProvidersResponse.identity_providers:type_name -> bytebase.v1.IdentityProvider- 12, // 1: bytebase.v1.CreateIdentityProviderRequest.identity_provider:type_name -> bytebase.v1.IdentityProvider- 12, // 2: bytebase.v1.UpdateIdentityProviderRequest.identity_provider:type_name -> bytebase.v1.IdentityProvider- 20, // 3: bytebase.v1.UpdateIdentityProviderRequest.update_mask:type_name -> google.protobuf.FieldMask- 12, // 4: bytebase.v1.TestIdentityProviderRequest.identity_provider:type_name -> bytebase.v1.IdentityProvider+ 13, // 0: bytebase.v1.ListIdentityProvidersResponse.identity_providers:type_name -> bytebase.v1.IdentityProvider+ 13, // 1: bytebase.v1.CreateIdentityProviderRequest.identity_provider:type_name -> bytebase.v1.IdentityProvider+ 13, // 2: bytebase.v1.UpdateIdentityProviderRequest.identity_provider:type_name -> bytebase.v1.IdentityProvider+ 21, // 3: bytebase.v1.UpdateIdentityProviderRequest.update_mask:type_name -> google.protobuf.FieldMask+ 13, // 4: bytebase.v1.TestIdentityProviderRequest.identity_provider:type_name -> bytebase.v1.IdentityProvider10, // 5: bytebase.v1.TestIdentityProviderRequest.oauth2_context:type_name -> bytebase.v1.OAuth2IdentityProviderTestRequestContext- 18, // 6: bytebase.v1.TestIdentityProviderResponse.claims:type_name -> bytebase.v1.TestIdentityProviderResponse.ClaimsEntry- 19, // 7: bytebase.v1.TestIdentityProviderResponse.user_info:type_name -> bytebase.v1.TestIdentityProviderResponse.UserInfoEntry- 0, // 8: bytebase.v1.IdentityProvider.type:type_name -> bytebase.v1.IdentityProviderType- 13, // 9: bytebase.v1.IdentityProvider.config:type_name -> bytebase.v1.IdentityProviderConfig- 14, // 10: bytebase.v1.IdentityProviderConfig.oauth2_config:type_name -> bytebase.v1.OAuth2IdentityProviderConfig- 15, // 11: bytebase.v1.IdentityProviderConfig.oidc_config:type_name -> bytebase.v1.OIDCIdentityProviderConfig- 16, // 12: bytebase.v1.IdentityProviderConfig.ldap_config:type_name -> bytebase.v1.LDAPIdentityProviderConfig- 17, // 13: bytebase.v1.OAuth2IdentityProviderConfig.field_mapping:type_name -> bytebase.v1.FieldMapping- 1, // 14: bytebase.v1.OAuth2IdentityProviderConfig.auth_style:type_name -> bytebase.v1.OAuth2AuthStyle- 17, // 15: bytebase.v1.OIDCIdentityProviderConfig.field_mapping:type_name -> bytebase.v1.FieldMapping- 1, // 16: bytebase.v1.OIDCIdentityProviderConfig.auth_style:type_name -> bytebase.v1.OAuth2AuthStyle- 2, // 17: bytebase.v1.LDAPIdentityProviderConfig.security_protocol:type_name -> bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol- 17, // 18: bytebase.v1.LDAPIdentityProviderConfig.field_mapping:type_name -> bytebase.v1.FieldMapping- 3, // 19: bytebase.v1.IdentityProviderService.GetIdentityProvider:input_type -> bytebase.v1.GetIdentityProviderRequest- 4, // 20: bytebase.v1.IdentityProviderService.ListIdentityProviders:input_type -> bytebase.v1.ListIdentityProvidersRequest- 6, // 21: bytebase.v1.IdentityProviderService.CreateIdentityProvider:input_type -> bytebase.v1.CreateIdentityProviderRequest- 7, // 22: bytebase.v1.IdentityProviderService.UpdateIdentityProvider:input_type -> bytebase.v1.UpdateIdentityProviderRequest- 8, // 23: bytebase.v1.IdentityProviderService.DeleteIdentityProvider:input_type -> bytebase.v1.DeleteIdentityProviderRequest- 9, // 24: bytebase.v1.IdentityProviderService.TestIdentityProvider:input_type -> bytebase.v1.TestIdentityProviderRequest- 12, // 25: bytebase.v1.IdentityProviderService.GetIdentityProvider:output_type -> bytebase.v1.IdentityProvider- 5, // 26: bytebase.v1.IdentityProviderService.ListIdentityProviders:output_type -> bytebase.v1.ListIdentityProvidersResponse- 12, // 27: bytebase.v1.IdentityProviderService.CreateIdentityProvider:output_type -> bytebase.v1.IdentityProvider- 12, // 28: bytebase.v1.IdentityProviderService.UpdateIdentityProvider:output_type -> bytebase.v1.IdentityProvider- 21, // 29: bytebase.v1.IdentityProviderService.DeleteIdentityProvider:output_type -> google.protobuf.Empty- 11, // 30: bytebase.v1.IdentityProviderService.TestIdentityProvider:output_type -> bytebase.v1.TestIdentityProviderResponse- 25, // [25:31] is the sub-list for method output_type- 19, // [19:25] 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+ 11, // 6: bytebase.v1.TestIdentityProviderRequest.oidc_context:type_name -> bytebase.v1.OIDCIdentityProviderTestRequestContext+ 19, // 7: bytebase.v1.TestIdentityProviderResponse.claims:type_name -> bytebase.v1.TestIdentityProviderResponse.ClaimsEntry+ 20, // 8: bytebase.v1.TestIdentityProviderResponse.user_info:type_name -> bytebase.v1.TestIdentityProviderResponse.UserInfoEntry+ 0, // 9: bytebase.v1.IdentityProvider.type:type_name -> bytebase.v1.IdentityProviderType+ 14, // 10: bytebase.v1.IdentityProvider.config:type_name -> bytebase.v1.IdentityProviderConfig+ 15, // 11: bytebase.v1.IdentityProviderConfig.oauth2_config:type_name -> bytebase.v1.OAuth2IdentityProviderConfig+ 16, // 12: bytebase.v1.IdentityProviderConfig.oidc_config:type_name -> bytebase.v1.OIDCIdentityProviderConfig+ 17, // 13: bytebase.v1.IdentityProviderConfig.ldap_config:type_name -> bytebase.v1.LDAPIdentityProviderConfig+ 18, // 14: bytebase.v1.OAuth2IdentityProviderConfig.field_mapping:type_name -> bytebase.v1.FieldMapping+ 1, // 15: bytebase.v1.OAuth2IdentityProviderConfig.auth_style:type_name -> bytebase.v1.OAuth2AuthStyle+ 18, // 16: bytebase.v1.OIDCIdentityProviderConfig.field_mapping:type_name -> bytebase.v1.FieldMapping+ 1, // 17: bytebase.v1.OIDCIdentityProviderConfig.auth_style:type_name -> bytebase.v1.OAuth2AuthStyle+ 2, // 18: bytebase.v1.LDAPIdentityProviderConfig.security_protocol:type_name -> bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol+ 18, // 19: bytebase.v1.LDAPIdentityProviderConfig.field_mapping:type_name -> bytebase.v1.FieldMapping+ 3, // 20: bytebase.v1.IdentityProviderService.GetIdentityProvider:input_type -> bytebase.v1.GetIdentityProviderRequest+ 4, // 21: bytebase.v1.IdentityProviderService.ListIdentityProviders:input_type -> bytebase.v1.ListIdentityProvidersRequest+ 6, // 22: bytebase.v1.IdentityProviderService.CreateIdentityProvider:input_type -> bytebase.v1.CreateIdentityProviderRequest+ 7, // 23: bytebase.v1.IdentityProviderService.UpdateIdentityProvider:input_type -> bytebase.v1.UpdateIdentityProviderRequest+ 8, // 24: bytebase.v1.IdentityProviderService.DeleteIdentityProvider:input_type -> bytebase.v1.DeleteIdentityProviderRequest+ 9, // 25: bytebase.v1.IdentityProviderService.TestIdentityProvider:input_type -> bytebase.v1.TestIdentityProviderRequest+ 13, // 26: bytebase.v1.IdentityProviderService.GetIdentityProvider:output_type -> bytebase.v1.IdentityProvider+ 5, // 27: bytebase.v1.IdentityProviderService.ListIdentityProviders:output_type -> bytebase.v1.ListIdentityProvidersResponse+ 13, // 28: bytebase.v1.IdentityProviderService.CreateIdentityProvider:output_type -> bytebase.v1.IdentityProvider+ 13, // 29: bytebase.v1.IdentityProviderService.UpdateIdentityProvider:output_type -> bytebase.v1.IdentityProvider+ 22, // 30: bytebase.v1.IdentityProviderService.DeleteIdentityProvider:output_type -> google.protobuf.Empty+ 12, // 31: bytebase.v1.IdentityProviderService.TestIdentityProvider:output_type -> bytebase.v1.TestIdentityProviderResponse+ 26, // [26:32] is the sub-list for method output_type+ 20, // [20:26] is the sub-list for method input_type+ 20, // [20:20] is the sub-list for extension type_name+ 20, // [20:20] is the sub-list for extension extendee+ 0, // [0:20] is the sub-list for field type_name}func init() { file_v1_idp_service_proto_init() }@@ -1477,8 +1544,9 @@ func file_v1_idp_service_proto_init() {file_v1_annotation_proto_init()file_v1_idp_service_proto_msgTypes[6].OneofWrappers = []any{(*TestIdentityProviderRequest_Oauth2Context)(nil),+ (*TestIdentityProviderRequest_OidcContext)(nil),}- file_v1_idp_service_proto_msgTypes[10].OneofWrappers = []any{+ file_v1_idp_service_proto_msgTypes[11].OneofWrappers = []any{(*IdentityProviderConfig_Oauth2Config)(nil),(*IdentityProviderConfig_OidcConfig)(nil),(*IdentityProviderConfig_LdapConfig)(nil),@@ -1489,7 +1557,7 @@ func file_v1_idp_service_proto_init() {GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: unsafe.Slice(unsafe.StringData(file_v1_idp_service_proto_rawDesc), len(file_v1_idp_service_proto_rawDesc)),NumEnums: 3,- NumMessages: 17,+ NumMessages: 18,NumExtensions: 0,NumServices: 1,},diff --git a/backend/generated-go/v1/idp_service_equal.pb.go b/backend/generated-go/v1/idp_service_equal.pb.goindex b1dcc98836..715052d3c2 100644--- a/backend/generated-go/v1/idp_service_equal.pb.go+++ b/backend/generated-go/v1/idp_service_equal.pb.go@@ -117,6 +117,9 @@ func (x *TestIdentityProviderRequest) Equal(y *TestIdentityProviderRequest) boolif !x.GetOauth2Context().Equal(y.GetOauth2Context()) {return false}+ if !x.GetOidcContext().Equal(y.GetOidcContext()) {+ return false+ }return true}@@ -133,6 +136,19 @@ func (x *OAuth2IdentityProviderTestRequestContext) Equal(y *OAuth2IdentityProvidreturn true}+func (x *OIDCIdentityProviderTestRequestContext) Equal(y *OIDCIdentityProviderTestRequestContext) bool {+ if x == y {+ return true+ }+ if x == nil || y == nil {+ return x == nil && y == nil+ }+ if x.Code != y.Code {+ return false+ }+ return true+}+func (x *TestIdentityProviderResponse) Equal(y *TestIdentityProviderResponse) bool {if x == y {return truediff --git a/frontend/src/components/IdentityProvider/TestConnection.vue b/frontend/src/components/IdentityProvider/TestConnection.vueindex 5ecedb9b74..fc369c6045 100644--- a/frontend/src/components/IdentityProvider/TestConnection.vue+++ b/frontend/src/components/IdentityProvider/TestConnection.vue@@ -143,14 +143,26 @@ const loginWithIdentityProviderEventListener = async (event: Event) => {const code = payload.code;try {isTestingInProgress.value = true;++ // Send correct context type based on IdP type+ // OIDC providers use oidcContext, OAuth2 providers use oauth2Context+ const isOidc = props.idp.type === IdentityProviderType.OIDC;+const request = create(TestIdentityProviderRequestSchema, {identityProvider: props.idp,- context: {- case: "oauth2Context",- value: {- code: code,- },- },+ context: isOidc+ ? {+ case: "oidcContext",+ value: {+ code: code,+ },+ }+ : {+ case: "oauth2Context",+ value: {+ code: code,+ },+ },});const response =await identityProviderServiceClientConnect.testIdentityProvider(request);diff --git a/frontend/src/types/proto-es/v1/idp_service_pb.d.ts b/frontend/src/types/proto-es/v1/idp_service_pb.d.tsindex c724ff4c3e..aae995edc2 100644--- a/frontend/src/types/proto-es/v1/idp_service_pb.d.ts+++ b/frontend/src/types/proto-es/v1/idp_service_pb.d.ts@@ -171,6 +171,14 @@ export declare type TestIdentityProviderRequest = Message<"bytebase.v1.TestIdent*/value: OAuth2IdentityProviderTestRequestContext;case: "oauth2Context";+ } | {+ /**+ * OIDC authentication context for test connection.+ *+ * @generated from field: bytebase.v1.OIDCIdentityProviderTestRequestContext oidc_context = 3;+ */+ value: OIDCIdentityProviderTestRequestContext;+ case: "oidcContext";} | { case: undefined; value?: undefined };};@@ -198,6 +206,24 @@ export declare type OAuth2IdentityProviderTestRequestContext = Message<"bytebase*/export declare const OAuth2IdentityProviderTestRequestContextSchema: GenMessage<OAuth2IdentityProviderTestRequestContext>;+/**+ * @generated from message bytebase.v1.OIDCIdentityProviderTestRequestContext+ */+export declare type OIDCIdentityProviderTestRequestContext = Message<"bytebase.v1.OIDCIdentityProviderTestRequestContext"> & {+ /**+ * Authorize code from OIDC provider.+ *+ * @generated from field: string code = 1;+ */+ code: string;+};++/**+ * Describes the message bytebase.v1.OIDCIdentityProviderTestRequestContext.+ * Use `create(OIDCIdentityProviderTestRequestContextSchema)` to create a new message.+ */+export declare const OIDCIdentityProviderTestRequestContextSchema: GenMessage<OIDCIdentityProviderTestRequestContext>;+/*** @generated from message bytebase.v1.TestIdentityProviderResponse*/diff --git a/frontend/src/types/proto-es/v1/idp_service_pb.js b/frontend/src/types/proto-es/v1/idp_service_pb.jsindex 03008ec6a2..be6a4897cc 100644--- a/frontend/src/types/proto-es/v1/idp_service_pb.js+++ b/frontend/src/types/proto-es/v1/idp_service_pb.js@@ -15,7 +15,7 @@ import { file_v1_annotation } from "./annotation_pb";* Describes the file v1/idp_service.proto.*/export const file_v1_idp_service = /*@__PURE__*/- fileDesc("ChR2MS9pZHBfc2VydmljZS5wcm90bxILYnl0ZWJhc2UudjEiRAoaR2V0SWRlbnRpdHlQcm92aWRlclJlcXVlc3QSJgoE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RpdHlQcm92aWRlclJlcXVlc3QaHS5ieXRlYmFzZS52MS5JZGVudGl0eVByb3ZpZGVyIqQB2kEdaWRlbnRpdHlfcHJvdmlkZXIsdXBkYXRlX21hc2uK6jAbYmIuaWRlbnRpdHlQcm92aWRlcnMudXBkYXRlkOowAZjqMAGi6jAbYmIuaWRlbnRpdHlQcm92aWRlcnMuY3JlYXRlgtPkkwI4OhFpZGVudGl0eV9wcm92aWRlcjIjL3YxL3tpZGVudGl0eV9wcm92aWRlci5uYW1lPWlkcHMvKn0SpQEKFkRlbGV0ZUlkZW50aXR5UHJvdmlkZXISKi5ieXRlYmFzZS52MS5EZWxldGVJZGVudGl0eVByb3ZpZGVyUmVxdWVzdBoWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eSJH2kEEbmFtZYrqMBtiYi5pZGVudGl0eVByb3ZpZGVycy5kZWxldGWQ6jABmOowAYLT5JMCEyoRL3YxL3tuYW1lPWlkcHMvKn0SqgEKFFRlc3RJZGVudGl0eVByb3ZpZGVyEiguYnl0ZWJhc2UudjEuVGVzdElkZW50aXR5UHJvdmlkZXJSZXF1ZXN0GikuYnl0ZWJhc2UudjEuVGVzdElkZW50aXR5UHJvdmlkZXJSZXNwb25zZSI9iuowG2JiLmlkZW50aXR5UHJvdmlkZXJzLnVwZGF0ZZDqMAGC0+STAhQ6ASoiDy92MS9pZHBzLyo6dGVzdEKlAQoPY29tLmJ5dGViYXNlLnYxQg9JZHBTZXJ2aWNlUHJvdG9QAVo0Z2l0aHViLmNvbS9ieXRlYmFzZS9ieXRlYmFzZS9iYWNrZW5kL2dlbmVyYXRlZC1nby92MaICA0JYWKoCC0J5dGViYXNlLlYxygILQnl0ZWJhc2VcVjHiAhdCeXRlYmFzZVxWMVxHUEJNZXRhZGF0YeoCDEJ5dGViYXNlOjpWMWIGcHJvdG8z", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_v1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ljZVByb3RvUAFaNGdpdGh1Yi5jb20vYnl0ZWJhc2UvYnl0ZWJhc2UvYmFja2VuZC9nZW5lcmF0ZWQtZ28vdjGiAgNCWFiqAgtCeXRlYmFzZS5WMcoCC0J5dGViYXNlXFYx4gIXQnl0ZWJhc2VcVjFcR1BCTWV0YWRhdGHqAgxCeXRlYmFzZTo6VjFiBnByb3RvMw", [file_buf_validate_validate, file_google_api_annotations, file_google_api_client, file_google_api_field_behavior, file_google_api_resource, file_google_protobuf_empty, file_google_protobuf_field_mask, file_v1_annotation]);/*** Describes the message bytebase.v1.GetIdentityProviderRequest.@@ -73,53 +73,60 @@ export const TestIdentityProviderRequestSchema = /*@__PURE__*/export const OAuth2IdentityProviderTestRequestContextSchema = /*@__PURE__*/messageDesc(file_v1_idp_service, 7);+/**+ * Describes the message bytebase.v1.OIDCIdentityProviderTestRequestContext.+ * Use `create(OIDCIdentityProviderTestRequestContextSchema)` to create a new message.+ */+export const OIDCIdentityProviderTestRequestContextSchema = /*@__PURE__*/+ messageDesc(file_v1_idp_service, 8);+/*** Describes the message bytebase.v1.TestIdentityProviderResponse.* Use `create(TestIdentityProviderResponseSchema)` to create a new message.*/export const TestIdentityProviderResponseSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 8);+ messageDesc(file_v1_idp_service, 9);/*** Describes the message bytebase.v1.IdentityProvider.* Use `create(IdentityProviderSchema)` to create a new message.*/export const IdentityProviderSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 9);+ messageDesc(file_v1_idp_service, 10);/*** Describes the message bytebase.v1.IdentityProviderConfig.* Use `create(IdentityProviderConfigSchema)` to create a new message.*/export const IdentityProviderConfigSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 10);+ messageDesc(file_v1_idp_service, 11);/*** Describes the message bytebase.v1.OAuth2IdentityProviderConfig.* Use `create(OAuth2IdentityProviderConfigSchema)` to create a new message.*/export const OAuth2IdentityProviderConfigSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 11);+ messageDesc(file_v1_idp_service, 12);/*** Describes the message bytebase.v1.OIDCIdentityProviderConfig.* Use `create(OIDCIdentityProviderConfigSchema)` to create a new message.*/export const OIDCIdentityProviderConfigSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 12);+ messageDesc(file_v1_idp_service, 13);/*** Describes the message bytebase.v1.LDAPIdentityProviderConfig.* Use `create(LDAPIdentityProviderConfigSchema)` to create a new message.*/export const LDAPIdentityProviderConfigSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 13);+ messageDesc(file_v1_idp_service, 14);/*** Describes the enum bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol.*/export const LDAPIdentityProviderConfig_SecurityProtocolSchema = /*@__PURE__*/- enumDesc(file_v1_idp_service, 13, 0);+ enumDesc(file_v1_idp_service, 14, 0);/*** @generated from enum bytebase.v1.LDAPIdentityProviderConfig.SecurityProtocol@@ -132,7 +139,7 @@ export const LDAPIdentityProviderConfig_SecurityProtocol = /*@__PURE__*/* Use `create(FieldMappingSchema)` to create a new message.*/export const FieldMappingSchema = /*@__PURE__*/- messageDesc(file_v1_idp_service, 14);+ messageDesc(file_v1_idp_service, 15);/*** Describes the enum bytebase.v1.IdentityProviderType.diff --git a/frontend/src/views/OAuthCallback.vue b/frontend/src/views/OAuthCallback.vueindex ffe2f2bd81..cedf996381 100644--- a/frontend/src/views/OAuthCallback.vue+++ b/frontend/src/views/OAuthCallback.vue@@ -9,12 +9,25 @@Back to Sign in</router-link></div>+ <div v-else class="mt-2">+ <div class="flex items-center gap-x-2">+ <NSpin size="small" />+ <span>{{ state.message || "Processing authentication..." }}</span>+ </div>+ <NButton+ v-if="state.oAuthState?.popup && state.showCloseButton"+ class="mt-4"+ @click="window.close()"+ >+ Close this window+ </NButton>+ </div></div></template><script lang="ts" setup>import { create } from "@bufbuild/protobuf";-import { NButton } from "naive-ui";+import { NButton, NSpin } from "naive-ui";import { onMounted, reactive } from "vue";import { useRoute } from "vue-router";import { AUTH_SIGNIN_MODULE } from "@/router/auth";@@ -29,6 +42,7 @@ interface LocalState {hasError: boolean;oAuthState: OAuthState | undefined;payload: OAuthWindowEventPayload;+ showCloseButton: boolean;}const route = useRoute();@@ -42,6 +56,7 @@ const state = reactive<LocalState>({error: "",code: "",},+ showCloseButton: false,});onMounted(() => {@@ -99,59 +114,97 @@ onMounted(() => {const triggerAuthCallback = async () => {const { oAuthState, hasError } = state;- if (hasError || !oAuthState) {- window.opener.dispatchEvent(- new CustomEvent("bb.oauth.unknown", {- detail: state.payload,- })- );- return;- }- const eventName = oAuthState.event;- if (eventName.startsWith("bb.oauth.signin")) {- if (oAuthState.popup) {+ // Handle popup flow with robust error handling+ if (oAuthState?.popup) {+ try {+ // Check if opener window is available and not closed+ if (!window.opener || window.opener.closed) {+ state.hasError = true;+ state.message =+ "Authentication completed, but the parent window is no longer available. Please close this window and try again.";+ state.showCloseButton = true;+ return;+ }++ const eventName = hasError ? "bb.oauth.unknown" : oAuthState.event;++ // Dispatch event to parent windowwindow.opener.dispatchEvent(new CustomEvent(eventName, {detail: state.payload,}));- window.close();- } else {- // Determine context type based on the stored IdP type- // OIDC providers use oidcContext, OAuth2 providers use oauth2Context- const isOidc = oAuthState.idpType === IdentityProviderType.OIDC;-- await authStore.login(- create(LoginRequestSchema, {- idpName: eventName.split(".").pop()!,- idpContext: {- context: isOidc- ? {- case: "oidcContext",- value: {- code: state.payload.code,- },- }- : {- case: "oauth2Context",- value: {- code: state.payload.code,- },- },- },- web: true,- }),- oAuthState.redirect- );++ // Try to close the popup window+ try {+ window.close();++ // If window.close() doesn't work immediately (some browsers delay it),+ // show a close button after a short delay+ setTimeout(() => {+ if (!window.closed) {+ state.showCloseButton = true;+ state.message = hasError+ ? state.message+ : "Authentication completed. You can close this window.";+ }+ }, 500);+ } catch {+ // Browser blocked window.close()+ state.showCloseButton = true;+ state.message = hasError+ ? state.message+ : "Authentication completed. Please close this window.";+ }+ } catch (error) {+ console.error("Failed to communicate with opener window:", error);+ state.hasError = true;+ state.message =+ "Authentication completed, but failed to communicate with the parent window. Please close this window and try again.";+ state.showCloseButton = true;}- } else {- window.opener.dispatchEvent(- new CustomEvent("bb.oauth.unknown", {- detail: state.payload,- })+ return;+ }++ // Handle redirect flow (non-popup)+ if (hasError || !oAuthState) {+ // For redirect flow, errors are already displayed in the template+ return;+ }++ const eventName = oAuthState.event;+ if (eventName.startsWith("bb.oauth.signin")) {+ // Determine context type based on the stored IdP type+ // OIDC providers use oidcContext, OAuth2 providers use oauth2Context+ const isOidc = oAuthState.idpType === IdentityProviderType.OIDC;+ const idpName = eventName.split(".").pop();+ if (!idpName) {+ return;+ }++ await authStore.login(+ create(LoginRequestSchema, {+ idpName,+ idpContext: {+ context: isOidc+ ? {+ case: "oidcContext",+ value: {+ code: state.payload.code,+ },+ }+ : {+ case: "oauth2Context",+ value: {+ code: state.payload.code,+ },+ },+ },+ web: true,+ }),+ oAuthState.redirect);- window.close();}};</script>diff --git a/proto/gen/grpc-doc/openapi.yaml b/proto/gen/grpc-doc/openapi.yamlindex 5ec4113b03..fc090036ba 100644--- a/proto/gen/grpc-doc/openapi.yaml+++ b/proto/gen/grpc-doc/openapi.yaml@@ -11603,6 +11603,12 @@ components:type: stringdescription: Authorization code from OIDC provider.description: OpenID Connect authentication context.+ OIDCIdentityProviderTestRequestContext:+ type: object+ properties:+ code:+ type: string+ description: Authorize code from OIDC provider.ObjectSchema:type: objectproperties:@@ -14392,6 +14398,10 @@ components:description: The identity provider to test connection including uncreated.oauth2Context:$ref: '#/components/schemas/OAuth2IdentityProviderTestRequestContext'+ oidcContext:+ allOf:+ - $ref: '#/components/schemas/OIDCIdentityProviderTestRequestContext'+ description: OIDC authentication context for test connection.TestIdentityProviderResponse:type: objectproperties:diff --git a/proto/gen/grpc-doc/v1/README.md b/proto/gen/grpc-doc/v1/README.mdindex f64ba87d2f..a02ed8104d 100644--- a/proto/gen/grpc-doc/v1/README.md+++ b/proto/gen/grpc-doc/v1/README.md@@ -409,6 +409,7 @@- [OAuth2IdentityProviderConfig](#bytebase-v1-OAuth2IdentityProviderConfig)- [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext)- [OIDCIdentityProviderConfig](#bytebase-v1-OIDCIdentityProviderConfig)+ - [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext)- [TestIdentityProviderRequest](#bytebase-v1-TestIdentityProviderRequest)- [TestIdentityProviderResponse](#bytebase-v1-TestIdentityProviderResponse)- [TestIdentityProviderResponse.ClaimsEntry](#bytebase-v1-TestIdentityProviderResponse-ClaimsEntry)@@ -6936,6 +6937,21 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.+<a name="bytebase-v1-OIDCIdentityProviderTestRequestContext"></a>++### OIDCIdentityProviderTestRequestContext++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| code | [string](#string) | | Authorize code from OIDC provider. |++++++<a name="bytebase-v1-TestIdentityProviderRequest"></a>### TestIdentityProviderRequest@@ -6946,6 +6962,7 @@ OIDCIdentityProviderConfig is the structure for OIDC identity provider config.| ----- | ---- | ----- | ----------- || identity_provider | [IdentityProvider](#bytebase-v1-IdentityProvider) | | The identity provider to test connection including uncreated. || oauth2_context | [OAuth2IdentityProviderTestRequestContext](#bytebase-v1-OAuth2IdentityProviderTestRequestContext) | | |+| oidc_context | [OIDCIdentityProviderTestRequestContext](#bytebase-v1-OIDCIdentityProviderTestRequestContext) | | OIDC authentication context for test connection. |diff --git a/proto/gen/grpc-doc/v1/index.html b/proto/gen/grpc-doc/v1/index.htmlindex 290eb8a453..6f1dc8693c 100644--- a/proto/gen/grpc-doc/v1/index.html+++ b/proto/gen/grpc-doc/v1/index.html@@ -1741,6 +1741,10 @@<a href="#bytebase.v1.OIDCIdentityProviderConfig"><span class="badge">M</span>OIDCIdentityProviderConfig</a></li>+ <li>+ <a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext"><span class="badge">M</span>OIDCIdentityProviderTestRequestContext</a>+ </li>+<li><a href="#bytebase.v1.TestIdentityProviderRequest"><span class="badge">M</span>TestIdentityProviderRequest</a></li>@@ -19698,6 +19702,30 @@ Should be fetched from the well-known configuration file of the OIDC provider. <+ <h3 id="bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</h3>+ <p></p>+++ <table class="field-table">+ <thead>+ <tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>+ </thead>+ <tbody>++ <tr>+ <td>code</td>+ <td><a href="#string">string</a></td>+ <td></td>+ <td><p>Authorize code from OIDC provider. </p></td>+ </tr>++ </tbody>+ </table>+++++<h3 id="bytebase.v1.TestIdentityProviderRequest">TestIdentityProviderRequest</h3><p></p>@@ -19722,6 +19750,13 @@ Should be fetched from the well-known configuration file of the OIDC provider. <<td><p> </p></td></tr>+ <tr>+ <td>oidc_context</td>+ <td><a href="#bytebase.v1.OIDCIdentityProviderTestRequestContext">OIDCIdentityProviderTestRequestContext</a></td>+ <td></td>+ <td><p>OIDC authentication context for test connection. </p></td>+ </tr>+</tbody></table>diff --git a/proto/v1/v1/idp_service.proto b/proto/v1/v1/idp_service.protoindex 0f98c8278b..fc87c5efbe 100644--- a/proto/v1/v1/idp_service.proto+++ b/proto/v1/v1/idp_service.proto@@ -144,6 +144,8 @@ message TestIdentityProviderRequest {oneof context {OAuth2IdentityProviderTestRequestContext oauth2_context = 2;+ // OIDC authentication context for test connection.+ OIDCIdentityProviderTestRequestContext oidc_context = 3;}}@@ -152,6 +154,11 @@ message OAuth2IdentityProviderTestRequestContext {string code = 1;}+message OIDCIdentityProviderTestRequestContext {+ // Authorize code from OIDC provider.+ string code = 1;+}+message TestIdentityProviderResponse {// The map of claims returned by the identity provider.map<string, string> claims = 1;