azure-ad-b2c - 在 Azure AD B2C 自定义策略中,IdentityExperienceFrameworkApps 如何在没有秘密的情况下连接到 AD
问题描述
还发布到https://github.com/Azure-Samples/active-directory-b2c-custom-policy-starterpack/issues/29
在B2C 自定义策略 Starterpack中,我们的文件LocalAccounts/TrustFrameworkExtensions.xml
包含:
<TechnicalProfiles>
<TechnicalProfile Id="login-NonInteractive">
<Metadata>
<Item Key="client_id">ProxyIdentityExperienceFrameworkAppId</Item>
<Item Key="IdTokenAudience">IdentityExperienceFrameworkAppId</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="client_id" DefaultValue="ProxyIdentityExperienceFrameworkAppID" />
<InputClaim ClaimTypeReferenceId="resource_id" PartnerClaimType="resource" DefaultValue="IdentityExperienceFrameworkAppID" />
</InputClaims>
</TechnicalProfile>
</TechnicalProfiles>
有人可以解释为什么需要两个应用程序才能使这些自定义策略起作用吗?IEF 如何使用它们?
此外,在这些文件中,我没有看到任何秘密或应用程序密钥被传递给 IEF。IEF 如何仅使用应用程序 ID 连接到 AAD?
解决方案
login-NonInteractive技术配置文件通过使用资源所有者密码凭据授予类型向 Azure AD 目录发送访问令牌请求来对本地帐户进行身份验证:
<Metadata>
<Item Key="authorization_endpoint">https://login.microsoftonline.com/{tenant}/oauth2/token</Item>
</Metadata>
<InputClaims>
<InputClaim ClaimTypeReferenceId="grant_type" DefaultValue="password" />
<InputClaim ClaimTypeReferenceId="client_id" DefaultValue="ProxyIdentityExperienceFrameworkAppID" />
<InputClaim ClaimTypeReferenceId="resource_id" PartnerClaimType="resource" DefaultValue="IdentityExperienceFrameworkAppID" />
<InputClaim ClaimTypeReferenceId="signInName" PartnerClaimType="username" Required="true" />
<InputClaim ClaimTypeReferenceId="password" Required="true" />
<InputClaim ClaimTypeReferenceId="scope" DefaultValue="openid" />
<InputClaim ClaimTypeReferenceId="nca" PartnerClaimType="nca" DefaultValue="1" />
</InputClaims>
与 Azure AD 目录的所有访问令牌请求一样,此访问请求必须包含客户端应用程序(即ProxyIdentityExperienceFramework应用程序)和资源应用程序(即IdentityExperienceFramework应用程序)的标识符。
您不必为客户端应用程序指定密钥,因为它已注册为本机应用程序。
推荐阅读
- python - 使用 C API 的 Numpy 多切片?
- python - Find missing words between two pandas columns
- javascript - 根据下拉列表中的选定文本灰显/禁用文本框
- typescript - 将 intersect 类型封装到接口中
- scala - 使用多个 url 进行 Gatlin 测试
- java - com.fasterxml.jackson.databind.JsonMappingException 无法构造类的实例
- python - 如何从 Tensorflow 中重新训练的 Inception 模型中找到传输层
- python - 获取服务器的 URL
- azure-devops - Azure DevOps 异常:LinkedAuthorizationFailed
- html - img src 外部链接未显示