SAML 2.0 到 OpenID Connect 缺少 SUB 声明

SAML 2.0 to OpenID Connect missing SUB claim

我已将 AD FS 作为 SAML 2.0 up-party 在 FoxIDs 上连接,我的应用程序作为 down-party 与 OpenID Connect 连接。

我的申请中没有收到 SUB 申请,可能是什么问题?

FoxID 在 SAML 2.0 和 JWT 声明之间转换。其中 sub 声明是从 SAML 2.0 NameID attribute/claim 转换而来的。 NameID 声明的声明类型为 http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier

您需要更新 AD FS 配置才能发出 NameID 声明。这导致 sub 索赔价值 NameID

或者,如果 AD FS 例如正在发布 UPN (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn) 声明您可以在 FoxIDs 中定义声明转换,将 UPN (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn) 声明映射到 NameID (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier) 索赔。这会导致 sub 索赔,索赔价值 UPN

要进行调试,您可以临时添加具有常量值的 NameID (http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier) 声明,这会导致子声明。