如何为 saml azure 广告设置 shibboleth

How to setup shibboleth for saml azure ad

嘿,我给了一个任务来设置 shibboleth 以使用带有 azure ad 的 saml 2.0 来验证我的 web 应用程序(.net 核心应用程序 (SP))。我的 Web 应用程序将充当 SP,并将操纵从 IDP 返回的 claims/attributes,在我的例子中这是天蓝色的广告。我进行了研究,但找不到任何相关文档或将 shibboleth 配置为使用 azure ad as (IDP) 进行 saml 身份验证的 SP 的实施示例。我们可以设置 shibboleth 以支持带有 azure ad 的 saml 2.0 吗?另外我想知道在成功验证后 claims/attributes 将如何从 shibboleth 传递到我的应用程序以便我可以进一步使用它们进行处理?

请检查此博客> Azure AD SAML federation using Shibboleth SP | by Rohan Islam | Medium 是否可以解决您的问题。

  1. Configure the SAML SSO in azure ad portal for the application by selecting Single sign on and Copy the identities to use later.
  2. Try to do Shibboleth SP configuration by updating shibboleth2.xml file under /etc/shibboleth directory.
  3. Update the applications’s entity ID , session lifetime configuration .Also change sso entity ID with the azure AD generated entity ID.
  4. Generate SP Metadata by accessing the metatdata url and by making the required changes .This SP metadata xml file is to be uploaded in sso page of azure ad under mange identity section.

所有映射的属性都将存储在 session 中,以便您可以在应用程序中访问它们。 SP 通过使用 HTTP_PREFIX

将数据“导出”到一组环境变量或 HTTP 请求 headers 来使 attribute 和其他 session 信息对应用程序可用

参考文献:

  1. NativeSPAttributeAccess (atlassian.net)
  2. How to read attributes? - Stack Overflow or NativeSPAddAttribute - Shibboleth 2 - Confluence (atlassian.net)
  3. c# - asp.net MVC authentication with Shibboleth - Stack Overflow