<sec:http entry-point-ref="negotiateSecurityFilterEntryPoint">
<sec:intercept-url pattern="/assets/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY" />
<sec:custom-filter ref="preAuthFilter" before="BASIC_AUTH_FILTER" />
<sec:custom-filter ref="waffleNegotiateSecurityFilter" position="BASIC_AUTH_FILTER" />
<sec:custom-filter ref="postAuthFilter" after="BASIC_AUTH_FILTER" />
</sec:http>
I use the providerCollection as follows (from the Github docs)d
<bean id="waffleSecurityFilterProviderCollection" class="waffle.servlet.spi.SecurityFilterProviderCollection">
<constructor-arg>
<list>
<ref bean="negotiateSecurityFilterProvider" />
<ref bean="basicSecurityFilterProvider" />
</list>
</constructor-arg>
</bean>To check each time a user logs in I use a preAuthFilter and a postAuthFilterPreAuth:WindowsAuthenticationToken authentication = (WindowsAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();if(authentication != null) {
servletRequest.setAttribute("Authorized", true);
} else {
servletRequest.setAttribute("Authorized", false);
}PostAuth:if((Boolean) servletRequest.getAttribute("Authorized") == false) {
publisher.publish();}The publisher triggers an AuthenticationSuccessEvent in which we update login-count, last-login date etc as well as adding a role (ROLE_MANAGER) if the user should have this access (this is determined by a 3rd party web-api)if(isManager(authentication)) {
authentication.getAuthorities().add(new RoleManagerAuthority());
}Everything works great when using chrome, however, when we user IE11 something strange happens. The first request adds ROLE_MANAGER correctly if the user has it and then the role stays for 4-5 (random) requests (we build our application on top of a RESTFul API which can have multiple requests each page-render) and then all of a sudden the roles gets reset and ROLE_MANAGER is removed (the preauthfilter doesnt detect that the user is unauthenticated). The user then has the standard roles (ROLE_USER + ROLE_<groups>[])Ive tried to look at the web-traffic to see if a renegotiation occurs but have failed to find such requests. And shouldnt the preAuthFilter detect this if that would be the case?Thankful for any insight into this issue, as well if you have any other design for customizing the waffle authentication pipeline (like we who are dependent on a 3rd party web-interface for adding a role)
--
You received this message because you are subscribed to the Google Groups "waffle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy">
<sec:filter-chain-map path-type="ant">
<sec:filter-chain pattern="/assets/**" filters="none" />
<sec:filter-chain pattern="/**" filters="
preAuthFilter,
waffleNegotiateSecurityFilter,
postAuthFilter"/>
</sec:filter-chain-map>
</bean>
<sec:http entry-point-ref="negotiateSecurityFilterEntryPoint">
<sec:intercept-url pattern="/assets/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<sec:intercept-url pattern="/**" access="IS_AUTHENTICATED_FULLY" />
<sec:custom-filter ref="filterChainProxy" position="BASIC_AUTH_FILTER" />
</sec:http>
| if (!authorizationHeader.isNull() | |
| && this.provider.isSecurityPackageSupported(authorizationHeader.getSecurityPackage())) { |
EDIT: Chrome does send this header at the first requestauthorization: Negotiate TlRMTVNTUAABAAAAl4II4gAAAAAA...
--
You received this message because you are subscribed to the Google Groups "waffle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "waffle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<bean id="waffleSecurityFilterProviderCollection" class="waffle.servlet.spi.SecurityFilterProviderCollection">
<constructor-arg>
<list>
<ref bean="negotiateSecurityFilterProvider" />
<ref bean="basicSecurityFilterProvider" />
</list>
</constructor-arg>
</bean>
We have exactly the same issue on our corporate network with SSO though, ie11 not working but chrome does. | protected boolean setAuthentication(final HttpServletRequest request, final HttpServletResponse response, | |
| final Authentication authentication) { | |
| SecurityContextHolder.getContext().setAuthentication(authentication); | |
| return true; | |
| } |
if (!authorizationHeader.isNull()
&& this.provider.isSecurityPackageSupported(authorizationHeader.getSecurityPackage())
&& SecurityContextHolder.getContext().getAuthentication() == null) {if(SecurityContextHolder.getContext().getAuthentication() == null) {
SecurityContextHolder.getContext().setAuthentication(authentication);
return true;
}
return false;--
You received this message because you are subscribed to the Google Groups "waffle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.