I turned on security logging and this is what I see for one request of the home page:
The stuff that is inside a <security:authorize ifAllGranted="ROLE_ADMIN"> is still visible to a non-authenticated person.Code:Converted URL to lowercase, from: '/'; to: '/' Candidate is: '/'; pattern is /**; matched=true / at position 1 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.context.SecurityContextPersistenceFilter@1e44e3e9' HttpSession returned null object for SPRING_SECURITY_CONTEXT No SecurityContext was available from the HttpSession: org.apache.catalina.session.StandardSessionFacade@115e01c2. A new one will be created. / at position 2 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.authentication.logout.LogoutFilter@29fd28da' / at position 3 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@2b8515bf' / at position 4 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.authentication.www.BasicAuthenticationFilter@2e56c4eb' Authorization header: null / at position 5 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.savedrequest.RequestCacheAwareFilter@429a3811' / at position 6 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1ad70640' / at position 7 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.authentication.AnonymousAuthenticationFilter@447f1499' Populated SecurityContextHolder with anonymous token: 'org.springframework.security.authentication.AnonymousAuthenticationToken@90576bf4: Principal: anonymousUser; Password: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@21a2c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 577455A205EE55571E2E8DFC25CB5BB7; Granted Authorities: ROLE_ANONYMOUS' / at position 8 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.session.SessionManagementFilter@73216bf0' / at position 9 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.access.ExceptionTranslationFilter@1735949d' / at position 10 of 10 in additional filter chain; firing Filter: 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3eafdb52' Converted URL to lowercase, from: '/'; to: '/' Candidate is: '/'; pattern is /admin/**; matched=false Candidate is: '/'; pattern is /researcher/**; matched=false Candidate is: '/'; pattern is /interest/**; matched=false Candidate is: '/'; pattern is /member/**; matched=false Candidate is: '/'; pattern is /resources/**; matched=false Candidate is: '/'; pattern is /static/**; matched=false Candidate is: '/'; pattern is /**; matched=true Secure object: FilterInvocation: URL: /; Attributes: [IS_AUTHENTICATED_ANONYMOUSLY] Previously Authenticated: org.springframework.security.authentication.AnonymousAuthenticationToken@90576bf4: Principal: anonymousUser; Password: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@21a2c: RemoteIpAddress: 0:0:0:0:0:0:0:1; SessionId: 577455A205EE55571E2E8DFC25CB5BB7; Granted Authorities: ROLE_ANONYMOUS Voter: org.springframework.security.access.vote.RoleVoter@167d912, returned: 0 Voter: org.springframework.security.access.vote.AuthenticatedVoter@48dc2d76, returned: 1 Authorization successful RunAsManager did not change Authentication object / reached end of additional filter chain; proceeding with original chain DispatcherServlet with name 'FacultyResources2' determining Last-Modified value for [/csri/app/index] Mapping [/index] to handler 'org.springframework.web.servlet.mvc.UrlFilenameViewController@32c57076' Last-Modified value for [/csri/app/index] is: -1 DispatcherServlet with name 'FacultyResources2' processing GET request for [/csri/app/index] Returning view name 'index' for lookup path [/index] Rendering view [org.springframework.web.servlet.view.tiles2.TilesView: name 'index'; URL [index]] in DispatcherServlet with name 'FacultyResources2' Successfully completed request Chain processed normally SecurityContextHolder now cleared, as request processing completed


Reply With Quote
