c# – 单点登录:我应该去哪个方向?

我有一个SaaS Web应用程序,可以满足多个教育机构的需求.所有客户端都托管在同一个应用程序/数据库中.该应用程序目前用C#编写,用于ASP.Net 4 Web窗体.

目前,我的应用程序使用本地/本机数据库进行用户身份验证/授权

我们的客户要求我们支持单点登录,其中客户端是身份验证提供者,而我的应用程序是消费者.

问题是客户端通过不同的协议/机制(如Shibboleth和OpenID Connect)要求SSO.这意味着我需要/应该创建一个适用于所有这些或至少可扩展的解决方案.

我遇到了Thinktecture的IdentityServer,我认为它可以抽象出我的客户使用的各种SSO机制,并将我的应用理解的基于声明的身份令牌返回给我的应用程序.

尽管我对这个概念感到苦苦挣扎.这是否意味着我的应用程序将所有身份验证请求重定向到IdentityServer,让IdentityServer来回处理OpenID Connect,然后从IdentityServer接收一个令牌以获取有关用户的信息?身份服务器如何知道用户的领域(即,它知道哪个客户端身份验证提供程序将用户发送到)? IdentityServer是否需要在我的应用程序的本地/本机数据库中验证用户的存在? IdentityServer可以同时处理SSO和本地登录吗?

一个单独的身份服务器的方式去?看起来好像是,允许我的应用程序与一个点(身份服务器)集成.但是,Thinktecture的IdentityServer上没有很多文档,除了如何配置它. ADFS可能会提供类似的解决方案,但大多数示例都与ADFS和Azure有关.

最后,我假设我仍然会维护有关每个用户的本地/本机授权数据,因为第三方身份验证提供程序不可能知道我的应用程序的特定授权需求.

有什么想法或建议吗?

解决方法

Does this mean that my app redirects all authentication requests to the IdentityServer,lets IdentityServer handle the back and forth of say OpenID Connect,and then receives a token back from IdentityServer with the information I need about the user?

基本上是的.但这取决于你如何设置它.如果您只有一个客户端或一个身份验证提供程序,则您的页面可以调用客户端的身份验证提或者您可以设置本地IdentityServer(更具可扩展性的IMHO)并将客户端的身份验证提供程序配置为另一个IdP(身份提供程序).

How does the identity server kNow the realm of the user (i.e. so it kNows which client auth provider to send the user to)?

如果您使用第二个选项,那么您的应用程序将重定向到IdentityServer,并且基于主域,它将自动重定向到IdP.如果您的应用程序未指定主域,则IdentityServer将显示所有已配置的IdP,并且用户选择要进行身份验证的IdP.

Does the IdentityServer need to validate the existence of the user in my app’s local/native database?

这取决于你.如果您希望验证本地数据库中是否存在用户,则可以通过扩展IdentityServer来实现.

Can the IdentityServer handle both SSO and local logins?

是的,它可以.

Is a separate identity server the way to go? It seems like it would be,allowing my app to integrate with one point (the identity server).

您始终可以在本地应用程序中使用IdentityServer和integrate it.或者您可以使用Shiboleth作为本地身份验证提供程序.两者都实现了WS-Federation,WS-Trust或OpenId等标准,两者都是开源的,因此您可以根据自己的喜好对其进行扩展/修改.

But,there’s not a lot of documentation out there on Thinktecture’s IdentityServer other than how to configure it.

我真的不能说有多少文档.但如果您愿意,NDC oslo 2014将举办为期2天的会前研讨会,Dominick Baier和brock Allen(IdentityServer的作者)将为您提供您想要了解的所有信息.

相关文章

原文地址:http://msdn.microsoft.com/en-us/magazine/cc163...
前言 随着近些年微服务的流行,有越来越多的开发者和团队所采...
最近因为比较忙,好久没有写博客了,这篇主要给大家分享一下...
在多核CPU在今天和不久的将来,计算机将拥有更多的内核,Mic...
c语言输入成绩怎么判断等级
字符型数据在内存中的存储形式是什么