简体   繁体   English

不同接口的认证/授权

[英]Authentication / authorization for different interfaces

I've got a Windows service where clients should be able to authenticate and authorize via different interfaces, but now I'm not sure what providers/classes/framework I should use. 我有一个Windows服务,客户端应该可以通过不同的界面进行身份验证和授权,但是现在我不确定应该使用什么提供程序/类/框架。

Requirements on the security context: 安全上下文要求:

  • Users 用户
  • Groups
  • Roles 角色

Requirements on the authentication methods: 对身份验证方法的要求:

  • Basic (username/password) 基本(用户名/密码)
  • Windows Login (current) Windows登录(当前)
  • Domain login 域登录
  • Certificate 证书

The interfaces my service provides: 我的服务提供的接口:

  • WCF host (WS-* conform) WCF主机(符合WS- *)
  • OWIN based Web API (for eg mobile devices) 基于OWIN的Web API(例如,移动设备)

Now Microsoft provides like a thousand ways to accomplish such a task with numerous classes, frameworks... from the new ASP.Net Identity Model to Forms Authentication to Security Context (WCF) or Principals (Windows) - what I'm looking for is a set of tools that can be used preferably everywhere (persisting in database, passing to WCF client proxies, using with view models in WPF..) What could I use so I don't have to spent the rest of my life mapping classes and data and doing heavy complex domain logic instead of taking advantage of a certain framework? 现在,Microsoft提供了大约一千种方法来使用众多类,框架来完成此任务,从新的ASP.Net身份模型到表单身份验证再到安全上下文(WCF)或委托人(Windows),我正在寻找的是一套最好在任何地方都可以使用的工具(持久化在数据库中,传递给WCF客户端代理,与WPF中的视图模型一起使用。)我可以使用什么,所以我不必花费余生映射类和数据并执行繁重的复杂域逻辑,而不是利用某个框架?

ThinkTecture's excellent IdentityServer is probably the way to go. ThinkTecture出色的IdentityServer可能就是要走的路。 More information and downloads are here . 更多信息和下载在这里 Both build on the concept of federated authentication as provided by the Windows Identity Foundation (WIF) and Active Directory Federation Services (AD FS). 两者都基于Windows身份基础 (WIF)和Active Directory联合身份验证服务 (AD FS)提供的联合身份验证的概念。

For blog posts on IdentityServer check out Dominick Baier's blog at leastprivilege.com . 有关IdentityServer上的博客文章,请查看Dominick Baier的博客at 至少privilege.com

For more info on WIF and AD FS, Vittorio Bertocci has a great book . 有关WIF和AD FS的更多信息,Vittorio Bertocci着有很棒的书 You can also download a copy of Microsoft's Guide to Claims-Based Identity and Access Control . 您还可以下载Microsoft的《基于声明的身份和访问控制指南》的副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM