spring-saml

Configure POST ProtocolBinding in Spring Security SAML authentication request

青春壹個敷衍的年華 提交于 2019-12-04 08:48:20
Spring Security SAML insists on requesting the Artifact binding in the SAML authentication request (ProtocolBinding attribute): <saml2p:AuthnRequest xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" AssertionConsumerServiceURL="http://sp.com/saml/SSO/alias/defaultAlias" Destination="https://idp.com/idp" ForceAuthn="false" ID="a4acj06d42fdc0d3494h859g3f7005c" IsPassive="false" IssueInstant="2012-12-05T17:07:18.271Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact" Version="2.0" > How can I configure POST binding instead? Thanks for any answers! -- Andreas Thanks nobby and

How to add new idp metadata in spring-SAML at runtime

烈酒焚心 提交于 2019-12-04 04:50:06
I am integrating spring-security-saml extension to support SSO in my web-application, my application should allow different customers to add their IDP metadata and their certificate to my webapp (which is an SP) so that my webapp can initiate SSO against their idp. Right now I am defining a "metadata" bean in my java config where in I add the idp metadata to CachingMetadataManager. But this happens only once, I am not able to figure out how do I add a new idp metadata to MetadataManager at runtime (without re-starting my app). Can I just get the metadata bean from spring ApplicationContext and

Spring SAML Extension and Spring Security CSRF Protection Conflict

本小妞迷上赌 提交于 2019-12-04 03:58:37
We have a Spring MVC (4.0.5) application with Spring Security (3.2.4) which includes CSRF protection which works fine. We are now adding the SAML security extension (spring-security-saml2-core 1.0.0) which causes an issue with CSRF protection. The metadata has been configured on SSOCircle and trying to access http://localhost:8080/myapp directs to the login page on SSOCircle. After authentication, the browser redirects to http://localhost:8080/myapp/saml/SSO and generates an error: HTTP Status 403 - Expected CSRF token not found. Has your session expired? If we turn off CSRF protection,

Spring SAML - Reading and refreshing IdP metadata at runtime

元气小坏坏 提交于 2019-12-03 21:18:29
I am using WSO2 and SSOCircle with the Spring-SAML extension. We are testing configurations at this time and have defined 2 IdP's and 2 SP's within our applicationContext. So, currently, we have 2 statically defined IdP's within our spring xml config and this is working. For testing purpose we are using the combination of CachingMetadataManager and ResourceBackedMetadataProvider so the IdP metadata is built inside of our WAR archive. Sample: <bean id="metadata" class="org.springframework.security.saml.metadata.CachingMetadataManager"> <constructor-arg> <list> <bean class="org.springframework

Configuring Spring SAML for SSO with PingFederate

二次信任 提交于 2019-12-03 16:27:44
We have decided to use Ping Federate to be our SSO solution. I have searched many examples but have not found a spring configuration that clearly describes how I need to set up my SP and/or IdP on the PingFederate side. I have not found a Spring document that describes what I need exactly to implement this. Any help, much appreciated. Currently there's no step-by-step guide on establishing federation between Spring SAML and Ping, but the steps are very similar to what's described in the quick start guide of Spring SAML. The best approach is to start with the sample application included inside

can I implement both SAML and basic spring security within an application?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 15:24:01
I have requirement for our application where we need to implement Spring SAML within our app to enable federated SSO for one customer. However we need to maintain existing login flow using spring-security for other customer. So my question is can we have two security mechanism for an web application so that it will be treated as multi-tenancy. Can i implement OAuth and SAML in same application. thanks in advance.. Yes, you can combine your existing password authentication with SAML. See the sample application of Spring SAML for details - it contains both of the methods combined. It is also

How to configuration of IDP metadata and SP metadata in Spring Security SAML sample?

吃可爱长大的小学妹 提交于 2019-12-03 08:28:49
I want to deal with Spring Security SAML. For this, I start to explore Spring Security SAML . At the beginning, I create an account at SSOCircle . Than I configurated of IDP metadata and generation of SP metadata (4.2.2 and 4.2.3). At entityId I set: <bean id="metadataGeneratorFilter" class="org.springframework.security.saml.metadata.MetadataGeneratorFilter"> <constructor-arg> <bean class="org.springframework.security.saml.metadata.MetadataGenerator"> <property name="entityId" value="http://idp.ssocircle.com"/> </bean> </constructor-arg> </bean> When I start application, I have: Error occurred

IDP initiated SAML login error - Authentication statement is too old to be used with value

二次信任 提交于 2019-12-03 08:20:03
问题 We are using ADFS as an IDP and our application acts as SP. Below is a sample Auth response <?xml version="1.0" encoding="UTF-8"?> <Assertion xmlns="urn:oasis:names:tc:SAML:2.0:assertion" ID="_82062d3d-897f-473e-90ad-0bb351d63b22" IssueInstant="2015-04-29T20:39:17.240Z" Version="2.0"> <Issuer>http://adfs/services/trust</Issuer> <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> <ds:SignedInfo> <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" /> <ds

Spring saml - how remember request parameter when initiate login on SP, and procesing them after IdP response

谁说胖子不能爱 提交于 2019-12-03 07:25:29
I want remember url request parameter from first request of my site (SP) and use them after response from IdP. I'm using spring-saml extension and think about relayState attribute but can't find example how build it with parameters from request. I need that for redirect user after sso authentication process to target page (module of application) depends on what was in first request. Spring SAML sample application behaves like this out of the box. When user hits a page which is protected by Spring Security and requires authentication system: remembers parameters which were used to invoke the

Spring Security on Wildfly: error while executing the filter chain

邮差的信 提交于 2019-12-03 02:29:02
问题 I'm trying to integrate Spring Security SAML Extension with Spring Boot . About the matter, I did develop a complete sample application. Its source code is available on GitHub: spring-boot-saml-integration on GitHub By running it as Spring Boot application (running against the SDK built-in Application Server), the WebApp works fine. Unfortunately, the same AuthN process doesn't work at all on Undertow/WildFly . According to the logs, the IdP actually performs the AuthN process: the