diff --git a/console/src/app/modules/providers/provider-oidc/provider-oidc.component.html b/console/src/app/modules/providers/provider-oidc/provider-oidc.component.html index a33b4aa3d9..41f8351629 100644 --- a/console/src/app/modules/providers/provider-oidc/provider-oidc.component.html +++ b/console/src/app/modules/providers/provider-oidc/provider-oidc.component.html @@ -78,6 +78,14 @@ +
+ +
+

{{ 'IDP.ISIDTOKENMAPPING_DESC' | translate }}

+ {{ 'IDP.ISIDTOKENMAPPING' | translate }} +
+
+
{ @@ -131,6 +133,7 @@ export class ProviderOIDCComponent { req.setIssuer(this.issuer?.value); req.setScopesList(this.scopesList?.value); req.setProviderOptions(this.options); + req.setIsIdTokenMapping(this.isIdTokenMapping?.value); this.loading = true; this.service @@ -160,6 +163,7 @@ export class ProviderOIDCComponent { req.setIssuer(this.issuer?.value); req.setScopesList(this.scopesList?.value); req.setProviderOptions(this.options); + req.setIsIdTokenMapping(this.isIdTokenMapping?.value); this.loading = true; this.service @@ -224,4 +228,8 @@ export class ProviderOIDCComponent { public get scopesList(): AbstractControl | null { return this.form.get('scopesList'); } + + public get isIdTokenMapping(): AbstractControl | null { + return this.form.get('isIdTokenMapping'); + } } diff --git a/console/src/assets/i18n/bg.json b/console/src/assets/i18n/bg.json index 4c10757a66..1bceff83fa 100644 --- a/console/src/assets/i18n/bg.json +++ b/console/src/assets/i18n/bg.json @@ -1822,7 +1822,9 @@ "DELETED": "Idp премахнат успешно!", "ADDED": "Добавено успешно.", "REMOVED": "Премахнато успешно." - } + }, + "ISIDTOKENMAPPING": "Съответствие от ID токен", + "ISIDTOKENMAPPING_DESC": "Ако е избрано, информацията на доставчика се съответства от ID токена, а не от userinfo крайната точка." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/de.json b/console/src/assets/i18n/de.json index d97876fbe4..9a0c189944 100644 --- a/console/src/assets/i18n/de.json +++ b/console/src/assets/i18n/de.json @@ -1831,7 +1831,9 @@ "DELETED": "Idp erfolgreich gelöscht!", "ADDED": "Erfolgreich hinzugefügt.", "REMOVED": "Erfolgreich entfernt." - } + }, + "ISIDTOKENMAPPING": "Zuordnung vom ID-Token", + "ISIDTOKENMAPPING_DESC": "Legt fest, ob für das Mapping der Provider Informationen das ID-Token verwendet werden soll, anstatt des Userinfo-Endpoints." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/en.json b/console/src/assets/i18n/en.json index 34c0fce960..c1a8f2b6da 100644 --- a/console/src/assets/i18n/en.json +++ b/console/src/assets/i18n/en.json @@ -1828,7 +1828,9 @@ "DELETED": "Idp removed successfully!", "ADDED": "Added successfully.", "REMOVED": "Removed successfully." - } + }, + "ISIDTOKENMAPPING": "Map from the ID token", + "ISIDTOKENMAPPING_DESC": "If selected, provider information gets mapped from the ID token, not from the userinfo endpoint." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/es.json b/console/src/assets/i18n/es.json index acd565e592..afe86e5aa0 100644 --- a/console/src/assets/i18n/es.json +++ b/console/src/assets/i18n/es.json @@ -1828,7 +1828,9 @@ "DELETED": "¡IDP eliminado con éxito!", "ADDED": "Añadido con éxito.", "REMOVED": "Eliminado con éxito." - } + }, + "ISIDTOKENMAPPING": "Asignación del ID token", + "ISIDTOKENMAPPING_DESC": "Si se selecciona, la información del proveedor se asigna desde el ID token, no desde el punto final de userinfo." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/fr.json b/console/src/assets/i18n/fr.json index c4b7dd3bf7..bd4d6bf0fa 100644 --- a/console/src/assets/i18n/fr.json +++ b/console/src/assets/i18n/fr.json @@ -1832,7 +1832,9 @@ "DELETED": "Idp supprimé avec succès !", "ADDED": "Ajouté avec succès.", "REMOVED": "Suppression réussie." - } + }, + "ISIDTOKENMAPPING": "Mappage depuis le jeton ID", + "ISIDTOKENMAPPING_DESC": "Si sélectionné, les informations du fournisseur sont mappées à partir du jeton ID, et non à partir du point d'extrémité userinfo." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/it.json b/console/src/assets/i18n/it.json index e14a12365e..57d0383c3a 100644 --- a/console/src/assets/i18n/it.json +++ b/console/src/assets/i18n/it.json @@ -1832,7 +1832,9 @@ "DELETED": "IDP rimosso con successo!", "ADDED": "Aggiunto con successo.", "REMOVED": "Rimosso con successo." - } + }, + "ISIDTOKENMAPPING": "Mappatura dal token ID", + "ISIDTOKENMAPPING_DESC": "Se selezionato, le informazioni del provider vengono mappate dal token ID, non dal punto finale userinfo." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/ja.json b/console/src/assets/i18n/ja.json index 6eb5718f67..c5fd927465 100644 --- a/console/src/assets/i18n/ja.json +++ b/console/src/assets/i18n/ja.json @@ -1823,7 +1823,9 @@ "DELETED": "IDPは正常に削除されました!", "ADDED": "正常に追加されました。", "REMOVED": "正常に削除されました。" - } + }, + "ISIDTOKENMAPPING": "IDトークンからのマッピング", + "ISIDTOKENMAPPING_DESC": "選択された場合、プロバイダ情報はIDトークンからマッピングされ、userinfoエンドポイントからではありません。" }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/mk.json b/console/src/assets/i18n/mk.json index 81b6001885..f01d931d81 100644 --- a/console/src/assets/i18n/mk.json +++ b/console/src/assets/i18n/mk.json @@ -1828,7 +1828,9 @@ "DELETED": "IDP успешно отстранет!", "ADDED": "Успешно додадено.", "REMOVED": "Успешно отстрането." - } + }, + "ISIDTOKENMAPPING": "Совпаѓање од ID токен", + "ISIDTOKENMAPPING_DESC": "Ако е избрано, информациите од провајдерот се мапираат од ID токенот, а не од userinfo крајната точка." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/pl.json b/console/src/assets/i18n/pl.json index 0c74e3de22..71aef9be52 100644 --- a/console/src/assets/i18n/pl.json +++ b/console/src/assets/i18n/pl.json @@ -1832,7 +1832,9 @@ "DELETED": "Dostawca tożsamości usunięty pomyślnie!", "ADDED": "Dodano pomyślnie.", "REMOVED": "Usunięto pomyślnie." - } + }, + "ISIDTOKENMAPPING": "Mapowanie z tokena ID", + "ISIDTOKENMAPPING_DESC": "Jeśli wybrane, informacje dostawcy są mapowane z tokena ID, a nie z punktu końcowego userinfo." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/pt.json b/console/src/assets/i18n/pt.json index 6f8d76c685..7ff90c0087 100644 --- a/console/src/assets/i18n/pt.json +++ b/console/src/assets/i18n/pt.json @@ -1826,7 +1826,9 @@ "DELETED": "Provedor de identidade removido com sucesso!", "ADDED": "Adicionado com sucesso.", "REMOVED": "Removido com sucesso." - } + }, + "ISIDTOKENMAPPING": "Mapeamento do token ID", + "ISIDTOKENMAPPING_DESC": "Se selecionado, as informações do provedor são mapeadas a partir do token ID, e não do ponto final userinfo." }, "MFA": { "LIST": { diff --git a/console/src/assets/i18n/zh.json b/console/src/assets/i18n/zh.json index 3d7aaefede..9835802018 100644 --- a/console/src/assets/i18n/zh.json +++ b/console/src/assets/i18n/zh.json @@ -1831,7 +1831,9 @@ "DELETED": "IDP 删除成功!", "ADDED": "添加成功。", "REMOVED": "成功删除。" - } + }, + "ISIDTOKENMAPPING": "从ID令牌映射", + "ISIDTOKENMAPPING_DESC": "如果选中,提供商信息将从ID令牌映射,而不是从userinfo端点。" }, "MFA": { "LIST": { diff --git a/internal/api/grpc/management/idp_converter.go b/internal/api/grpc/management/idp_converter.go index 6b0becd98a..efce720a89 100644 --- a/internal/api/grpc/management/idp_converter.go +++ b/internal/api/grpc/management/idp_converter.go @@ -248,12 +248,13 @@ func updateGenericOAuthProviderToCommand(req *mgmt_pb.UpdateGenericOAuthProvider func addGenericOIDCProviderToCommand(req *mgmt_pb.AddGenericOIDCProviderRequest) command.GenericOIDCProvider { return command.GenericOIDCProvider{ - Name: req.Name, - Issuer: req.Issuer, - ClientID: req.ClientId, - ClientSecret: req.ClientSecret, - Scopes: req.Scopes, - IDPOptions: idp_grpc.OptionsToCommand(req.ProviderOptions), + Name: req.Name, + Issuer: req.Issuer, + ClientID: req.ClientId, + ClientSecret: req.ClientSecret, + Scopes: req.Scopes, + IsIDTokenMapping: req.IsIdTokenMapping, + IDPOptions: idp_grpc.OptionsToCommand(req.ProviderOptions), } } diff --git a/proto/zitadel/idp.proto b/proto/zitadel/idp.proto index 645642f30c..b8c388bb6e 100644 --- a/proto/zitadel/idp.proto +++ b/proto/zitadel/idp.proto @@ -342,7 +342,12 @@ message GenericOIDCConfig { description: "the scopes requested by ZITADEL during the request on the identity provider"; } ]; - bool is_id_token_mapping = 4; + bool is_id_token_mapping = 4 [ + (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = { + example: "true"; + description: "if true, provider information get mapped from the id token, not from the userinfo endpoint"; + } + ]; } message GitHubConfig {