我正在使用SAML2和ADFS2(IdP)创建SSO"概念证明".登录工作正常,但ADFS2要求我的Logout请求被签名(使用私钥),然后我想我会在我的信赖方信任中的签名选项卡下添加相同的证书(.cer文件)在ADFS2中.唯一的问题是我的应用程序(服务提供商)没有证书.我知道我可以为此目的创建一个自签名证书,但我似乎无法弄清楚如何创建一个我需要的东西.
ADFS 2.0是否支持本维基百科文章中提及的SAML 1.1协议和Web SSO配置文件,或者仅支持SAML 1.1令牌?
似乎Microsoft ADFSv2支持WS-Trust和SAML Passive,但它构建的WIF堆栈不支持SAML.
WS-Trust和SAML-P有什么区别?它们是否共享相同的安全漏洞,如果是这样,它们是什么?
注意:这里有一个类似但不同的问题:
我们有一个Web应用程序(asp.net mvc 3),它应支持通过AD进行内部使用的SSO.我们还有一个庞大的外部用户社区,我们希望为所有Web应用程序提供SSO.例如:external_user1使用相同的登录访问webappA,webappB和webappC.此外,domain\user1可以访问所有三个webapps.我们计划使用WIF和ADFS 2.0.
我们不希望为所有外部用户提供AD帐户,因此过去我们可能尝试过使用ADFS 1.x和ADAM的解决方案.但是,我们在Windows Server 2008 R2和ADFS 2.0上无法使用AD LDS(ADAM的后继者)来验证用户.
什么是SSO方法(使用微软产品)?
有人可以解释依赖方信任的内容.我正在为CRM配置IFD,但我找不到依赖方是什么以及做什么的基本信息?
我在解密saml令牌时遇到错误.但是,重新启动服务器后,此问题不一致.它工作正常,直到昨晚:(
DEBUG Decrypter:631 - Attempt to decrypt EncryptedKey using credential from KEK KeyInfo resolver failed:
org.opensaml.xml.encryption.DecryptionException: Probable runtime exception on decryption:unknown parameter type.
at org.opensaml.xml.encryption.Decrypter.decryptKey(Decrypter.java:705)
at org.opensaml.xml.encryption.Decrypter.decryptKey(Decrypter.java:628)
at org.opensaml.xml.encryption.Decrypter.decryptUsingResolvedEncryptedKey(Decrypter.java:783)
at org.opensaml.xml.encryption.Decrypter.decryptDataToDOM(Decrypter.java:524)
at org.opensaml.xml.encryption.Decrypter.decryptDataToList(Decrypter.java:442)
at org.opensaml.xml.encryption.Decrypter.decryptData(Decrypter.java:403)
at org.opensaml.saml2.encryption.Decrypter.decryptData(Decrypter.java:141)
at org.opensaml.saml2.encryption.Decrypter.decrypt(Decrypter.java:69)
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:199)
at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:82)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
at org.springframework.security.saml.SAMLProcessingFilter.attemptAuthentication(SAMLProcessingFilter.java:84)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:195)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:166)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:87)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at …
Run Code Online (Sandbox Code Playgroud) 我使用透明代理,是否可以将声明身份传递给另一个WebAPI?
我有两个WebAPI,演示文稿和应用程序,都使用ADFS进行身份验证.
到目前为止,我的代码处理了对应用程序WebAPI的表示请求
//Obtain ClaimsIdentity (Contains claims)
ClaimsPrincipal icp = Thread.CurrentPrincipal as ClaimsPrincipal;
ClaimsIdentity claimsIdentity = (ClaimsIdentity)icp.Identity;
var baseAddress = ConfigurationManager.AppSettings["ApplicationalWebApiUrl"] + "/" + url;
var http = (HttpWebRequest)WebRequest.Create(new Uri(baseAddress));
http.Accept = "application/json; charset=utf-8";
http.ContentType = "application/json; charset=utf-8";
http.Method = "GET";
//Doesn't pass the ClaimsIdentity
http.UseDefaultCredentials = true;
try
{
//Get the requested data
var response = http.GetResponse();
var stream = response.GetResponseStream();
var sr = new StreamReader(stream);
var contentResponse = sr.ReadToEnd();
return Request.CreateResponse(JsonConvert.DeserializeObject<Object>(contentResponse));
}
catch (Exception ex)
{
return Request.CreateResponse(HttpStatusCode.BadRequest, …
Run Code Online (Sandbox Code Playgroud) 好的,所以我对索赔感知应用程序的整个世界都很陌生.我能够使用Azure ACS快速启动和运行,但在尝试使用ADFS 2.0作为身份提供程序时,它有点不同(我想将其实际用作联合提供程序,但暂时我我只是试图使用它作为身份提供者来运行样本.
我一直在查看这里的指南,并试图遵循AD FS 2.0联盟,其中列出了WIF应用程序循序渐进指南.它将指导您完成设置ADFS 2.0以及一些声明感知的示例应用程序,您只需查看正在发送的声明即可.
所以我可以启动并运行,通过指南中定义的声明(只是Windows帐户名称).问题是当我尝试添加更多.我可以使用Pass Through或Filter Incoming Claim规则模板转到ADFS GUI中的依赖方应用程序并添加Issuance Transform Rule .但是,当我运行我的应用程序时,除非添加的声明类型是Name,否则它不会将声明传递给我的应用程序.
我想要传递的其中一个是登录到应用程序的用户的电子邮件地址.所以我添加了一个规则来传递电子邮件地址,然后更新示例应用程序的web.config以取消注释claimTypeRequired部分下的这一行:
<claimType type="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" optional="false" />
Run Code Online (Sandbox Code Playgroud)
请注意,我将其设置为非可选.我还更新了要添加的应用程序的联合元数据,如下所示:
<auth:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" Optional="false" xmlns:auth="http://docs.oasis-open.org/wsfed/authorization/200706" />
Run Code Online (Sandbox Code Playgroud)
然后我进入ADFS GUI,转到依赖方信任,并从我的示例应用程序中选择了联邦元数据更新.因此,它现在将电子邮件列为已接受的声明之一.
然后,我进入了声明提供程序信任,并将电子邮件声明规则添加到Active Directory提供程序信任的接受转换规则中(列出的唯一一个).
但是,当我运行应用程序时,它没有通过电子邮件声明(或我尝试的任何其他声明).谁能告诉我我在这里失踪了什么?
我还应该注意,我运行了一项测试,将我的应用程序更改为仅接受电子邮件声明规则,不仅没有通过电子邮件,而且它仍然通过Windows帐户名称和名称声明,尽管事实是我甚至没有将它们列为我申请的可接受的索赔.
如果有人能指出我在这里发生严重错误的地方,那将非常感激.
根据之前的博客文章启用日志记录后,以下是日志中的相关条目:
事件ID 1000,"输入详细信息中包含的主叫索赔":
所以你可以看到,我要求的信息显然已经丢失了.我将日志记录输出设置为详细,但实际上没有其他任何兴趣.您将看到NETWORK SERVICE用户的跟踪记录(具有相同的声明集),但没有什么引人注目的.所有日志条目都是信息性的,没有任何错误.
我正在构建一个ASP.NET Web应用程序,使用Windows Identity Foundation对用户进行身份验证.
该组织有一个内部部署ADFS STS.他们的Office365通过Microsoft Federation Gateway与内部部署STS进行身份验证.新的Web应用程序还将针对带有WIF的内部部署STS进行身份验证.
我可以在新应用程序和Office365环境之间建立静默单一登录吗?因此,用户登录Web应用程序后无需登录Office365,反之亦然.
我们拥有一个托管和配置为将ADFS 2.0用于SSO的网站。当我通过https浏览网站时,出现以下错误。
我认为原因是负载平衡器使用http击中Web服务器。如果我更改了web.config中的以下条目,则可能会解决,但不确定副作用。有什么经验吗?
<federatedAuthentication>
<wsFederation passiveRedirectEnabled="true"
issuer="https://localhost/abc"
realm="https://localhost/abc/" requireHttps="true"/>
<cookieHandler requireSsl="true"/>
</federatedAuthentication>
Run Code Online (Sandbox Code Playgroud)
异常详细信息:System.InvalidOperationException:ID1059:由于URL方案不是https且配置中requireSsl设置为true,因此无法对用户进行身份验证,因此将不发送身份验证cookie。将URL方案更改为https或在配置中的cookieHandler元素上将requireSsl设置为false。
System.IdentityModel.Services.WSFederationAuthenticationModule.OnEndRequest(对象发送者,EventArgs参数)+726
adfs2.0 ×10
wif ×4
saml ×2
saml-2.0 ×2
adfs ×1
asp.net ×1
asp.net-mvc ×1
c# ×1
crm ×1
federation ×1
httpclient ×1
https ×1
java ×1
office365 ×1
spring-saml ×1