1

是否有示例如何将 OneLogin SSO (SAML) 集成到 ASP NET MVC 应用程序,例如使用 Kentor Auth Owin 扩展?

4

1 回答 1

2

详细步骤(假设您的应用托管在http://localhost/SampleApp):

  1. 从https://github.com/KentorIT/authservices下载最新版本的 KentorIT AuthServices并在 Visual Studio 中打开 Kentor.AuthServices.sln 解决方案。

  2. 识别 SampleApplication 项目并复制其 URL 属性,SampleApplication SP 的 ACS 和 SLS 端点基于该值

  3. 转到 Onelogin,应用程序 > 添加应用程序,然后在浏览器中搜索SAML 测试连接器并选择它。

  4. 在连接器的配置选项卡中,添加 Audience、Recipient、ACS 和 SLS 值,如果您的 SP 基本 URL 是http://localhost/SampleApp/,那么您应该添加:

  5. 观众:http://localhost/SampleApp/AuthServices

  6. 收件人和 ACS URL:http://localhost/SampleApp/AuthServices/Acs
  7. 单点注销 URL:http://localhost/SampleApp/AuthServices/Logout

  8. 现在是配置 SP AuthServices 的时候了,编辑 SampleApplication 项目的 web.config 文件。在该部分中,输入以下值:

    1. entityId = http://localhost/SampleApp/AuthServices
    2. returnUrl = http://localhost/SampleApp
  9. 在 Onelogin 连接器的 SSO 选项卡上,您将找到颁发者、SSO URL、SLO URL,您需要在 web.config 文件中注册这些数据,以及在 identityProviders 元素上注册 entityID、signOnUrl、logoutUrl。同样在 Onelogin 的 SSO 选项卡中,您会找到 IdP x509 证书,您可以在 Kentor 的配置中将其注册为签名证书。在此处查看 Kentor 文档

于 2017-06-09T08:29:27.020 回答