惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Simon Willison's Weblog
Simon Willison's Weblog
云风的 BLOG
云风的 BLOG
宝玉的分享
宝玉的分享
美团技术团队
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Register - Security
The Register - Security
S
SegmentFault 最新的问题
博客园 - 司徒正美
The GitHub Blog
The GitHub Blog
量子位
SecWiki News
SecWiki News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
P
Palo Alto Networks Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
爱范儿
爱范儿
S
Secure Thoughts
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
D
Docker
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
F
Fortinet All Blogs
T
Threat Research - Cisco Blogs
P
Proofpoint News Feed
Schneier on Security
Schneier on Security
Y
Y Combinator Blog
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
Recent Commits to openclaw:main
Recent Commits to openclaw:main
G
GRAHAM CLULEY
Recorded Future
Recorded Future
罗磊的独立博客
Forbes - Security
Forbes - Security
Security Latest
Security Latest
NISL@THU
NISL@THU
T
The Exploit Database - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
T
Tenable Blog
C
Cybersecurity and Infrastructure Security Agency CISA
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Apple Machine Learning Research
Apple Machine Learning Research
K
Kaspersky official blog
月光博客
月光博客
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic

博客园 - 追萝驴

Nginx + Frp + Let'sEncrypt 泛域名证书 Devexpress XAF的前端优化策略 本页不但包含安全的内容,也包含不安全的内容。是否显示不安全的内容 WIF应用与ADFS 2.0配置实战(续):实现SSO 配置了主机头后访问站点持续要求输入身份凭证,之后401.1 IE持续崩溃备忘 Sharepoint 2010 备忘 APPDEV Sharepoint 2010 For Developers. 笔记 庆祝NH3 GA Released 兼思考两个问题的解决方案 - 追萝驴 WCF部署至IIS问题二则 WCF+Silverlight 异常处理 2 NHibernate: Batch Updates & Batch Inserts - 追萝驴 NHibernate: Session.Save 采用版本控制时无必要地自动Update版本字段的问题 WCF+Silverlight 异常处理 "Exception of type System.ExecutionEngineException was thrown" ExtJS: SuperBoxSelect supports single select mode [转]How to remove an assembly from the Cache if it is locked by Microsoft Installer Adding/removing fields and columns drag & drop bug's fix Ext JS继承: 关于object, constructor和prototype
WIF应用与ADFS 2.0配置实战
追萝驴 · 2011-03-18 · via 博客园 - 追萝驴

步骤1:配置主机头。这应该不是必须,但是我配了。详见上一篇博客。

步骤结果:经测试用主机头的地址能访问。

步骤2:Add STS Reference:

其中Use an existing STS一步,输入ADFS的FederationMetadata.xml所在。这里需要注意输入机器名称和完整名称有轻微不同。例如:机器名为xxx,域名为abc,我这边的环境机器的完整名称应为:xxx.abc.loc。而在xxx这台机器上的证书是按照完整名称颁发的,所以输入机器名称和完整名称的区别是,输入机器名称然后下一步时会有警告,说证书和地址不符。

其他的步骤暂时都是按照最简单的来。

完毕后,结果是:

更改了web.config和增加了自身的FederationMetadata.xml文件。

步骤3:

在ADFS中增加信赖方

选择手动输入有关信赖方德数据。并启用对WS-Federation被动协议的支持。这里输入的url应为应用的url,即之前Add STS Reference时候指定的Application URI。

然后下一步的时候,这个url会自动作为信赖方标识符出现。注意!这里的标识符貌似是case sensitive的!也就是应和应用的audienceUris完全匹配(这个不是100%确定,忘了,反正是要和一个什么东西一致)

完毕。暂时可以不添加声明规则。

结果:增加了ADFS中的依赖方的配置。

步骤4:

测试。排查错误:

@Passive client: The X.509 certificate CN=Geneva Signing Certificate is not in the trusted people store

如果运行过程中出现了这个错误,那么恭喜,整个过程是正常的。说明已经成功从issuer方返回到了application方,只不过因为是测试环境的证书,所以不认。参考http://social.msdn.microsoft.com/Forums/en-SG/Geneva/thread/ca0be31e-ab2e-447f-8562-99ea9cbec86b 做更改。

上面的错误消除后,应该能够回到应用的代码了。但是,如果有代码类似于HttpContext.Current.User.Identity.Name,则会报NullReference的异常。明明认证通过,为什么会是null呢?断点看看,可以知道Identity已经是Microsoft.IdentityModel.Claims.ClaimsIdentity的类型,而其有一属性为:DefaultNameClaimType = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"。而默认FedUtil工具生成的Claims会包括name和role,而这里是name,言下之意是ClaimsIdentity会根据name来确定Identity的name。

了解,行动:回到ADFS,添加一个转换传入声明,把Windows 账户名转成名称。

再来,搞定!

接下来应该差不多了。但如果测试的时候发现每次关闭browser再重新登陆都要log in的话,检查一下ADFS那个机器的adfs url的站点是否已经在IE的intranet站点中。没有的话,添加。

最基本的几个步骤。暂时记录一下,不然真的要忘了。