NameIdentifier 和 IdentityProvider (WIF) 声明可以用于唯一标识任何用户吗?
考虑使用访问控制服务(ACS)和Windows Identity Foundation (WIF),用于保护我的 WCF 数据服务 Web API 应用程序。
如何使用声明来唯一标识用户?
我的想法是使用标准声明 NameIdentifier 的组合和 WIF 声明 IdentityProvider 结合起来为任何用户创建唯一的 ID。
这个组合真的稳定且独特吗? IP 会突然更改其 IdentityProvider 字符串吗?
这里的想法是将两半的连接字符串存储为任何用户的唯一 ID。
NameIdentifier 声明是否有任何安全隐患?
干杯,
M.
Thinking of using Access Control Service (ACS) and Windows Identity Foundation (WIF) to secure my WCF Data Services Web API application.
How can I use claims to uniquely identify a user?
My idea is to use the combination of the standard claim NameIdentifier and the WIF claim IdentityProvider combined to create a unique ID for any user.
Is this combo truly stable and unique? Could an IP suddenly change it's IdentityProvider string?
The idea here is to store the concatenated string of the two halves as a unique ID for any user.
Does the NameIdentifier claim have any security implications?
Cheers,
M.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这似乎很合理。请注意,nameidentifier 是 IdP 特定的,这意味着它由您进行身份验证的身份提供商(例如 LiveID、Google 等)提供。 ACS 只是将该值复制到索赔中。请与每一位提供商核实,看看他们做出了哪些保证。我的假设是,对于“回访用户”,它们不应该改变 ->拥有相同用户名/密码的人。
人们也经常使用电子邮件地址。如果可用,您可能也希望将其关联起来作为额外的措施。
This seems reasonable. Note that nameidentifier is IdP specific, meaning it is supplied by the identity provider you authenticated with (e.g. LiveID, Google, etc). ACS is simply copying this value into a claim. Check with each one of those providers to see what guarantees they make. My assumption is that they should not change for a "returning user" -> someone who posseses the same username/Password.
People often use e-mail addresses as well. When available, you might want to correlate it too as an extra measure.
Justin Smith 在他的 MIX11 演讲中提到了这一点(参见幻灯片 22,第 28 分钟)谈话) - 据我了解,ACS 为您提供名称标识符和 IdP 名称。你把元组放在一起,它应该有利于唯一的ID。
Justin Smith mentioned this in his MIX11 talk (see slide 22, 28 minutes into the talk) - it was my understanding that ACS gives you the nameidentifier and the IdP name. You take the tuple together and it should be good for unique id.