ACS 联盟问题
我正在构建一个 Azure 托管的 WCF 服务,我希望使用存储在 SQL Server 数据库中的凭据通过 ACS 来保护该服务。我已经查看了一堆 ADFS2 示例,但尚未弄清楚如何做到这一点。我确信我在这里遗漏了一些明显的东西,所以任何建议将不胜感激。谢谢...
I'm building an Azure-hosted WCF service that I'd like to secure with ACS using credentials stored in an SQL Server database. I've looked at a bunch of ADFS2 examples but have yet to figure out how to do this. I'm sure I'm missing something obvious here so any advice would be greatly appreciated. Thanks...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该能够创建自己的 STS,如下所示:
http ://dotnet.dzone.com/news/5-minutes-wif-make-your-aspnet
只需添加代码即可查找您的用户。
本文讨论如何创建将 STS 添加到 Azure 访问控制服务所需的联合元数据:
WIF手动生成 federationmetadata.xml
在您的原始项目中,您应该能够添加访问控制服务作为 STS,如果一切设置正确,您将看到新的STS。
You should be able to create your own STS, like this:
http://dotnet.dzone.com/news/5-minutes-wif-make-your-aspnet
Just add in the code to look your user up.
This post discusses how to create the federation metadata required to add the STS to the Azure Access Control Service:
WIF manually generate federationmetadata.xml
In your original project, you should then be able to add the Access Control Service as the STS, and if everything is set up correctly, you'll see your new STS.
如果您想使用 ACS(虽然在您的帖子中没有明确说明为什么需要它),您需要让 WCF 服务信任 ACS,然后将 ACS 配置为信任可以根据 SQL 对用户进行身份验证的 STS。您不能为此使用 ADFS,因为它当前仅支持 AD 身份验证。
您的选择多种多样,但最简单的是创建您自己的 STS,如 Richard 提到的,或者使用已经这样做的 STS,例如 StarterSTS 或 CodePlex 中更现代的 Identity Server(都是开源的,由 Thinktecture 的 Dominick Baier 贡献)。
但问题仍然存在:为什么需要 ACS?最简单的解决方案是让 WCF 服务直接信任(SQL 支持的)STS。
以下是 ACS 何时有用的一些示例:
If you want to use ACS (not clear in your post why you need it though), you need to have your WCF service trust ACS and then configure ACS to trust an STS that can authenticate users agaist SQL. You cannot use ADFS for that as it currently only supports authentication with AD.
Your options are varied, but the simplest would be to create your own STS as Richard mentions, or use one that already does that like StarterSTS or the more moder Identity Server in CodePlex (both open source and contributed by Dominick Baier from Thinktecture).
The question though remains: why you need ACS? The simplest solution would be to have your WCF service trust the (SQL backed) STS directly.
Here are some examples of when ACS would be useful: