<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean class="de.kredito.WebConfiguration"/>
<context:annotation-config/>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider ref="clientProvider" />
</security:authentication-manager>
<security:http pattern="/rest/**" entry-point-ref="samlEntryPoint">
<security:headers disabled="true" />
<security:intercept-url pattern="/rest/**" access="isAuthenticated()" />
<security:csrf disabled="true"/>
</security:http>
<bean id="samlEntryPoint" class="org.pac4j.springframework.security.web.ClientAuthenticationEntryPoint">
<property name="client" ref="samlClient" />
</bean>
<bean id="samlConfig" class="org.pac4j.saml.client.SAML2ClientConfiguration">
<property name="keystorePath" value="resource:security/samlKeystore.jks" />
<property name="keystorePassword" value="pac4j-demo-passwd" />
<property name="privateKeyPassword" value="pac4j-demo-passwd" />
<property name="identityProviderMetadataPath" value="resource:metadata/okta.xml" />
<property name="maximumAuthenticationLifetime" value="3600" />
<property name="serviceProviderEntityId" value="http://localhost:8080/callback?client_name=SAML2Client" />
<property name="serviceProviderMetadataPath" value="sp-metadata.xml" />
</bean>
<bean id="samlClient" class="org.pac4j.saml.client.SAML2Client">
<constructor-arg name="configuration" ref="samlConfig" />
</bean>
<bean id="clients" class="org.pac4j.core.client.Clients">
<property name="callbackUrl" value="http://localhost:8080/rest/login" />
<property name="clients">
<list>
<ref bean="samlClient" />
</list>
</property>
</bean>
<bean id="clientFilter" class="org.pac4j.springframework.security.web.ClientAuthenticationFilter">
<property name="clients" ref="clients" />
<property name="sessionAuthenticationStrategy" ref="sas" />
<property name="authenticationManager" ref="authenticationManager" />
</bean>
<bean id="clientProvider" class="org.pac4j.springframework.security.authentication.ClientAuthenticationProvider">
<property name="clients" ref="clients" />
</bean>
<bean id="httpSessionRequestCache" class="org.springframework.security.web.savedrequest.HttpSessionRequestCache" />
<bean id="sas" class="org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy" />
</beans>
--
You received this message because you are subscribed to the Google Groups "pac4j-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pac4j-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<bean id="clientProvider" class="org.pac4j.springframework.security.authentication.ClientAuthenticationProvider">
<property name="clients" ref="clients" />
</bean>
In the ClientAuthenticationFilter class authenticate method. But it look like that my flow never reach this authorisation point.
...
--
<bean id="clients" class="org.pac4j.core.client.Clients">
<property name="callbackUrl" value="http://localhost:8080/callback" />
<property name="clients">
<list>
<ref bean="samlClient" />
</list>
</property>
</bean>
<bean id="samlConfig" class="org.pac4j.saml.client.SAML2ClientConfiguration">
<property name="keystorePath" value="resource:security/samlKeystore.jks" />
<property name="keystorePassword" value="pac4j-demo-passwd" />
<property name="privateKeyPassword" value="pac4j-demo-passwd" />
<property name="identityProviderMetadataPath" value="resource:metadata/okta.xml" />
<property name="maximumAuthenticationLifetime" value="3600" />
<property name="serviceProviderEntityId" value="http://localhost:8080/callback?client_name=SAML2Client" />
<property name="serviceProviderMetadataPath" value="sp-metadata.xml" />
</bean>
...
<security:http pattern="/admin/auth.html/**" entry-point-ref="samlEntryPoint">
<security:headers disabled="true" />
<security:intercept-url pattern="/admin/auth.html/**" access="isAuthenticated()" />
</security:http>
--
<!-- common to all clients -->
<bean id="clientFilter" class="org.pac4j.springframework.security.web.ClientAuthenticationFilter">
<property name="clients" ref="clients" />
<property name="sessionAuthenticationStrategy" ref="sas" />
<property name="authenticationManager" ref="authenticationManager" />
</bean>
<bean id="clients" class="org.pac4j.core.client.Clients">
<property name="callbackUrl" value="http://localhost:8080/callback" />
<property name="clients">
<list>
<ref bean="samlClient" />
</list>
</property>
</bean>
<security:http pattern="/**" entry-point-ref="casEntryPoint">
<security:csrf disabled="true"/>
<security:headers disabled="true" />
<<security:custom-filter after="CAS_FILTER" ref="clientFilter" />
<security:intercept-url pattern="/cas/restricted.jsp" access="hasRole('ADMIN')" />
<security:intercept-url pattern="/cas/**" access="isAuthenticated()" />
<security:intercept-url pattern="/**" access="permitAll()" />
<security:logout logout-success-url="/" />
</security:http>