Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: rename `username` to `display_name` (#4370)
boojacka9939ed2ac4a
diff --git a/frontend/src/types/proto/store/idp.ts b/frontend/src/types/proto/store/idp.tsindex 2d75b4c89a..8aa0aa0d55 100644--- a/frontend/src/types/proto/store/idp.ts+++ b/frontend/src/types/proto/store/idp.ts@@ -66,12 +66,21 @@ export interface OIDCIdentityProviderConfig {fieldMapping?: FieldMapping;}-/** FieldMapping uses for mapping user info from identity provider to Bytebase. */+/**+ * FieldMapping saves the field names from user info API of identity provider.+ * As we save all raw json string of user info response data into `principal.idp_user_info`,+ * we can extract the relevant data based with `FieldMapping`.+ *+ * e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.+ * Then the identifier of FieldMapping will be `login`, display_name will be `name`,+ * and email will be `email`.+ * reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user+ */export interface FieldMapping {/** Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. */identifier: string;- /** Username is the field name of username in 3rd-party idp user info. Required. */- username: string;+ /** DisplayName is the field name of display name in 3rd-party idp user info. Required. */+ displayName: string;/** Email is the field name of primary email in 3rd-party idp user info. Required. */email: string;}@@ -338,7 +347,7 @@ export const OIDCIdentityProviderConfig = {};function createBaseFieldMapping(): FieldMapping {- return { identifier: "", username: "", email: "" };+ return { identifier: "", displayName: "", email: "" };}export const FieldMapping = {@@ -346,8 +355,8 @@ export const FieldMapping = {if (message.identifier !== "") {writer.uint32(10).string(message.identifier);}- if (message.username !== "") {- writer.uint32(18).string(message.username);+ if (message.displayName !== "") {+ writer.uint32(18).string(message.displayName);}if (message.email !== "") {writer.uint32(26).string(message.email);@@ -366,7 +375,7 @@ export const FieldMapping = {message.identifier = reader.string();break;case 2:- message.username = reader.string();+ message.displayName = reader.string();break;case 3:message.email = reader.string();@@ -382,7 +391,7 @@ export const FieldMapping = {fromJSON(object: any): FieldMapping {return {identifier: isSet(object.identifier) ? String(object.identifier) : "",- username: isSet(object.username) ? String(object.username) : "",+ displayName: isSet(object.displayName) ? String(object.displayName) : "",email: isSet(object.email) ? String(object.email) : "",};},@@ -390,7 +399,7 @@ export const FieldMapping = {toJSON(message: FieldMapping): unknown {const obj: any = {};message.identifier !== undefined && (obj.identifier = message.identifier);- message.username !== undefined && (obj.username = message.username);+ message.displayName !== undefined && (obj.displayName = message.displayName);message.email !== undefined && (obj.email = message.email);return obj;},@@ -398,7 +407,7 @@ export const FieldMapping = {fromPartial(object: DeepPartial<FieldMapping>): FieldMapping {const message = createBaseFieldMapping();message.identifier = object.identifier ?? "";- message.username = object.username ?? "";+ message.displayName = object.displayName ?? "";message.email = object.email ?? "";return message;},diff --git a/frontend/src/types/proto/v1/idp_service.ts b/frontend/src/types/proto/v1/idp_service.tsindex ebd39dc8c6..941a5d8a14 100644--- a/frontend/src/types/proto/v1/idp_service.ts+++ b/frontend/src/types/proto/v1/idp_service.ts@@ -160,12 +160,21 @@ export interface OIDCIdentityProviderConfig {fieldMapping?: FieldMapping;}-/** FieldMapping uses for mapping user info from identity provider to Bytebase. */+/**+ * FieldMapping saves the field names from user info API of identity provider.+ * As we save all raw json string of user info response data into `principal.idp_user_info`,+ * we can extract the relevant data based with `FieldMapping`.+ *+ * e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.+ * Then the identifier of FieldMapping will be `login`, display_name will be `name`,+ * and email will be `email`.+ * reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-user+ */export interface FieldMapping {/** Identifier is the field name of the unique identifier in 3rd-party idp user info. Required. */identifier: string;- /** Username is the field name of username in 3rd-party idp user info. Required. */- username: string;+ /** DisplayName is the field name of display name in 3rd-party idp user info. Required. */+ displayName: string;/** Email is the field name of primary email in 3rd-party idp user info. Required. */email: string;}@@ -932,7 +941,7 @@ export const OIDCIdentityProviderConfig = {};function createBaseFieldMapping(): FieldMapping {- return { identifier: "", username: "", email: "" };+ return { identifier: "", displayName: "", email: "" };}export const FieldMapping = {@@ -940,8 +949,8 @@ export const FieldMapping = {if (message.identifier !== "") {writer.uint32(10).string(message.identifier);}- if (message.username !== "") {- writer.uint32(18).string(message.username);+ if (message.displayName !== "") {+ writer.uint32(18).string(message.displayName);}if (message.email !== "") {writer.uint32(26).string(message.email);@@ -960,7 +969,7 @@ export const FieldMapping = {message.identifier = reader.string();break;case 2:- message.username = reader.string();+ message.displayName = reader.string();break;case 3:message.email = reader.string();@@ -976,7 +985,7 @@ export const FieldMapping = {fromJSON(object: any): FieldMapping {return {identifier: isSet(object.identifier) ? String(object.identifier) : "",- username: isSet(object.username) ? String(object.username) : "",+ displayName: isSet(object.displayName) ? String(object.displayName) : "",email: isSet(object.email) ? String(object.email) : "",};},@@ -984,7 +993,7 @@ export const FieldMapping = {toJSON(message: FieldMapping): unknown {const obj: any = {};message.identifier !== undefined && (obj.identifier = message.identifier);- message.username !== undefined && (obj.username = message.username);+ message.displayName !== undefined && (obj.displayName = message.displayName);message.email !== undefined && (obj.email = message.email);return obj;},@@ -992,7 +1001,7 @@ export const FieldMapping = {fromPartial(object: DeepPartial<FieldMapping>): FieldMapping {const message = createBaseFieldMapping();message.identifier = object.identifier ?? "";- message.username = object.username ?? "";+ message.displayName = object.displayName ?? "";message.email = object.email ?? "";return message;},diff --git a/proto/generated-go/store/idp.pb.go b/proto/generated-go/store/idp.pb.goindex 48a3ccc917..93d3b1b900 100644--- a/proto/generated-go/store/idp.pb.go+++ b/proto/generated-go/store/idp.pb.go@@ -318,7 +318,14 @@ func (x *OIDCIdentityProviderConfig) GetFieldMapping() *FieldMapping {return nil}-// FieldMapping uses for mapping user info from identity provider to Bytebase.+// FieldMapping saves the field names from user info API of identity provider.+// As we save all raw json string of user info response data into `principal.idp_user_info`,+// we can extract the relevant data based with `FieldMapping`.+//+// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.+// Then the identifier of FieldMapping will be `login`, display_name will be `name`,+// and email will be `email`.+// reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-usertype FieldMapping struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -326,8 +333,8 @@ type FieldMapping struct {// Identifier is the field name of the unique identifier in 3rd-party idp user info. Required.Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`- // Username is the field name of username in 3rd-party idp user info. Required.- Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`+ // DisplayName is the field name of display name in 3rd-party idp user info. Required.+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`// Email is the field name of primary email in 3rd-party idp user info. Required.Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`}@@ -371,9 +378,9 @@ func (x *FieldMapping) GetIdentifier() string {return ""}-func (x *FieldMapping) GetUsername() string {+func (x *FieldMapping) GetDisplayName() string {if x != nil {- return x.Username+ return x.DisplayName}return ""}@@ -432,20 +439,20 @@ var file_store_idp_proto_rawDesc = []byte{0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69,0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,- 0x22, 0x60, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,+ 0x22, 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01,0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72,- 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,- 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61,- 0x69, 0x6c, 0x2a, 0x54, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x49, 0x44,- 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f,- 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,- 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x12, 0x08,- 0x0a, 0x04, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x02, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65,- 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06,- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65,+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e,+ 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2a, 0x54, 0x0a, 0x14, 0x49, 0x64, 0x65,+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70,+ 0x65, 0x12, 0x26, 0x0a, 0x22, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52,+ 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50,+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55,+ 0x54, 0x48, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x02, 0x42,+ 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (diff --git a/proto/generated-go/v1/idp_service.pb.go b/proto/generated-go/v1/idp_service.pb.goindex 7554066491..76d1a61c6c 100644--- a/proto/generated-go/v1/idp_service.pb.go+++ b/proto/generated-go/v1/idp_service.pb.go@@ -816,7 +816,14 @@ func (x *OIDCIdentityProviderConfig) GetFieldMapping() *FieldMapping {return nil}-// FieldMapping uses for mapping user info from identity provider to Bytebase.+// FieldMapping saves the field names from user info API of identity provider.+// As we save all raw json string of user info response data into `principal.idp_user_info`,+// we can extract the relevant data based with `FieldMapping`.+//+// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.+// Then the identifier of FieldMapping will be `login`, display_name will be `name`,+// and email will be `email`.+// reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-usertype FieldMapping struct {state protoimpl.MessageStatesizeCache protoimpl.SizeCache@@ -824,8 +831,8 @@ type FieldMapping struct {// Identifier is the field name of the unique identifier in 3rd-party idp user info. Required.Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`- // Username is the field name of username in 3rd-party idp user info. Required.- Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`+ // DisplayName is the field name of display name in 3rd-party idp user info. Required.+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`// Email is the field name of primary email in 3rd-party idp user info. Required.Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`}@@ -869,9 +876,9 @@ func (x *FieldMapping) GetIdentifier() string {return ""}-func (x *FieldMapping) GetUsername() string {+func (x *FieldMapping) GetDisplayName() string {if x != nil {- return x.Username+ return x.DisplayName}return ""}@@ -1006,77 +1013,77 @@ var file_v1_idp_service_proto_rawDesc = []byte{0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,0x32, 0x19, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46,0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0c, 0x66, 0x69, 0x65,- 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x60, 0x0a, 0x0c, 0x46, 0x69, 0x65,+ 0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x67, 0x0a, 0x0c, 0x46, 0x69, 0x65,0x6c, 0x64, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65,0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69,- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65,- 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65,- 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x2a, 0x54, 0x0a, 0x14, 0x49,- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54,- 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f,- 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,- 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f,- 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x49, 0x44, 0x43, 0x10,- 0x02, 0x32, 0x85, 0x07, 0x0a, 0x17, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a,- 0x13, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,- 0x69, 0x64, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,- 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e,- 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x20, 0xda, 0x41,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31,- 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x83,- 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12, 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,- 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,- 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,- 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,- 0x13, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f,- 0x69, 0x64, 0x70, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49,- 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12,- 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,- 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69,- 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x26, 0xda, 0x41, 0x00, 0x82,- 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f,- 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64,- 0x70, 0x73, 0x12, 0xc3, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65,- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e,- 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,- 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65,- 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79,- 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x5e, 0xda, 0x41, 0x1d, 0x69, 0x64, 0x65,- 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2c, 0x75,- 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38,- 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69,- 0x64, 0x65, 0x72, 0x32, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69,- 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x7e, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65,- 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,- 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50,- 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16,- 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,- 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82,- 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65,- 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x8e, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x64,- 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f,- 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,- 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,- 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,- 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76,- 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,- 0x65, 0x72, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f,- 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d,- 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e,- 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72,- 0x6f, 0x74, 0x6f, 0x33,+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73,+ 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,+ 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61,+ 0x69, 0x6c, 0x2a, 0x54, 0x0a, 0x14, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x26, 0x0a, 0x22, 0x49, 0x44,+ 0x45, 0x4e, 0x54, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x52, 0x5f,+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,+ 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x4f, 0x41, 0x55, 0x54, 0x48, 0x32, 0x10, 0x01, 0x12, 0x08,+ 0x0a, 0x04, 0x4f, 0x49, 0x44, 0x43, 0x10, 0x02, 0x32, 0x85, 0x07, 0x0a, 0x17, 0x49, 0x64, 0x65,+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x53, 0x65, 0x72,+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x7f, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74,+ 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x27, 0x2e, 0x62, 0x79,+ 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x64, 0x65,+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,+ 0x64, 0x65, 0x72, 0x22, 0x20, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93,+ 0x02, 0x13, 0x12, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64,+ 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64,+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x12,+ 0x29, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69,+ 0x73, 0x74, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x64, 0x65,+ 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x73, 0x52, 0x65,+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x0a, 0x12, 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 0x73, 0x12, 0x8b, 0x01, 0x0a, 0x16,+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72,+ 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74,+ 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,+ 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31,+ 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65,+ 0x72, 0x22, 0x26, 0xda, 0x41, 0x00, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x11, 0x69, 0x64,+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22,+ 0x08, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x64, 0x70, 0x73, 0x12, 0xc3, 0x01, 0x0a, 0x16, 0x55, 0x70,+ 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76,+ 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,+ 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49,+ 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22,+ 0x5e, 0xda, 0x41, 0x1d, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f,+ 0x76, 0x69, 0x64, 0x65, 0x72, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,+ 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x3a, 0x11, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,+ 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x32, 0x23, 0x2f, 0x76, 0x31, 0x2f,+ 0x7b, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64,+ 0x65, 0x72, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x7e, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2a, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64,+ 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x52, 0x65,+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x20, 0xda,+ 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x2a, 0x11, 0x2f, 0x76,+ 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x12,+ 0x8e, 0x01, 0x0a, 0x18, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e,+ 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x62,+ 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x6c,+ 0x65, 0x74, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69,+ 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x79, 0x74,+ 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74,+ 0x79, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02,+ 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d,+ 0x69, 0x64, 0x70, 0x73, 0x2f, 0x2a, 0x7d, 0x3a, 0x75, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65,+ 0x42, 0x11, 0x5a, 0x0f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f,+ 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,}var (diff --git a/proto/store/idp.proto b/proto/store/idp.protoindex 54058e1fc1..2a32967e7b 100644--- a/proto/store/idp.proto+++ b/proto/store/idp.proto@@ -45,13 +45,20 @@ message OIDCIdentityProviderConfig {FieldMapping field_mapping = 4;}-// FieldMapping uses for mapping user info from identity provider to Bytebase.+// FieldMapping saves the field names from user info API of identity provider.+// As we save all raw json string of user info response data into `principal.idp_user_info`,+// we can extract the relevant data based with `FieldMapping`.+//+// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.+// Then the identifier of FieldMapping will be `login`, display_name will be `name`,+// and email will be `email`.+// reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-usermessage FieldMapping {// Identifier is the field name of the unique identifier in 3rd-party idp user info. Required.string identifier = 1;- // Username is the field name of username in 3rd-party idp user info. Required.- string username = 2;+ // DisplayName is the field name of display name in 3rd-party idp user info. Required.+ string display_name = 2;// Email is the field name of primary email in 3rd-party idp user info. Required.string email = 3;diff --git a/proto/v1/idp_service.proto b/proto/v1/idp_service.protoindex f961e63803..4a7308f886 100644--- a/proto/v1/idp_service.proto+++ b/proto/v1/idp_service.proto@@ -184,13 +184,20 @@ message OIDCIdentityProviderConfig {FieldMapping field_mapping = 4;}-// FieldMapping uses for mapping user info from identity provider to Bytebase.+// FieldMapping saves the field names from user info API of identity provider.+// As we save all raw json string of user info response data into `principal.idp_user_info`,+// we can extract the relevant data based with `FieldMapping`.+//+// e.g. For GitHub authenticated user API, it will return `login`, `name` and `email` in response.+// Then the identifier of FieldMapping will be `login`, display_name will be `name`,+// and email will be `email`.+// reference: https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-usermessage FieldMapping {// Identifier is the field name of the unique identifier in 3rd-party idp user info. Required.string identifier = 1;- // Username is the field name of username in 3rd-party idp user info. Required.- string username = 2;+ // DisplayName is the field name of display name in 3rd-party idp user info. Required.+ string display_name = 2;// Email is the field name of primary email in 3rd-party idp user info. Required.string email = 3;diff --git a/server/api/v1/idp_service.go b/server/api/v1/idp_service.goindex ebeae8e42d..a2d51613d3 100644--- a/server/api/v1/idp_service.go+++ b/server/api/v1/idp_service.go@@ -209,9 +209,9 @@ func convertToIdentityProvider(identityProvider *store.IdentityProviderMessage)func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.IdentityProviderConfig) *v1pb.IdentityProviderConfig {if v := identityProviderConfig.GetOauth2Config(); v != nil {fieldMapping := v1pb.FieldMapping{- Identifier: v.FieldMapping.Identifier,- Username: v.FieldMapping.Username,- Email: v.FieldMapping.Email,+ Identifier: v.FieldMapping.Identifier,+ DisplayName: v.FieldMapping.DisplayName,+ Email: v.FieldMapping.Email,}return &v1pb.IdentityProviderConfig{Config: &v1pb.IdentityProviderConfig_Oauth2Config{@@ -228,9 +228,9 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Iden}} else if v := identityProviderConfig.GetOidcConfig(); v != nil {fieldMapping := v1pb.FieldMapping{- Identifier: v.FieldMapping.Identifier,- Username: v.FieldMapping.Username,- Email: v.FieldMapping.Email,+ Identifier: v.FieldMapping.Identifier,+ DisplayName: v.FieldMapping.DisplayName,+ Email: v.FieldMapping.Email,}return &v1pb.IdentityProviderConfig{Config: &v1pb.IdentityProviderConfig_OidcConfig{@@ -250,9 +250,9 @@ func convertIdentityProviderConfigFromStore(identityProviderConfig *storepb.Idenfunc convertIdentityProviderConfigToStore(identityProviderConfig *v1pb.IdentityProviderConfig) *storepb.IdentityProviderConfig {if v := identityProviderConfig.GetOauth2Config(); v != nil {fieldMapping := storepb.FieldMapping{- Identifier: v.FieldMapping.Identifier,- Username: v.FieldMapping.Username,- Email: v.FieldMapping.Email,+ Identifier: v.FieldMapping.Identifier,+ DisplayName: v.FieldMapping.DisplayName,+ Email: v.FieldMapping.Email,}return &storepb.IdentityProviderConfig{Config: &storepb.IdentityProviderConfig_Oauth2Config{@@ -269,9 +269,9 @@ func convertIdentityProviderConfigToStore(identityProviderConfig *v1pb.IdentityP}} else if v := identityProviderConfig.GetOidcConfig(); v != nil {fieldMapping := storepb.FieldMapping{- Identifier: v.FieldMapping.Identifier,- Username: v.FieldMapping.Username,- Email: v.FieldMapping.Email,+ Identifier: v.FieldMapping.Identifier,+ DisplayName: v.FieldMapping.DisplayName,+ Email: v.FieldMapping.Email,}return &storepb.IdentityProviderConfig{Config: &storepb.IdentityProviderConfig_OidcConfig{diff --git a/store/principal.go b/store/principal.goindex 9273ad15ff..323eaeb73a 100644--- a/store/principal.go+++ b/store/principal.go@@ -93,7 +93,7 @@ type UserMessage struct {PasswordHash stringIdentityProviderResourceID *string// IdentityProviderUserInfo is a raw json string from userinfo api response.- // e.g. for GitHub's authenticated user api, it looks like the following structure..+ // e.g. for GitHub's authenticated user api, it looks like the following structure.// https://docs.github.com/en/rest/users/users?apiVersion=2022-11-28#get-the-authenticated-userIdentityProviderUserInfo stringRole api.Role