I have a simple Spring Security config in root context:
<security:http auto-config="true">
<security:intercept-url pattern="/trac" access="ROLE_ADMIN" />
<security:form-login login-page="/login"
default-target-url="/home"
authentication-failure-url="/loginfailed"/>
<security:logout logout-success-url="/logout" />
</security:http>
I would like to secure all requests that come to my app. My Context root is 'trac' so when I run the app from Eclipse it loads: http://localhost:8080/trac/ url. I thought this mapping would block any uri with /trac. Hovewer, ony /trac url itself is in fact intercepted and secured. When I paste more detailed url for instance: http://localhost:8080/trac/cars/add it's not intercepted and I can simply access any resource and adress. I also tried:
<security:intercept-url pattern="/trac/**" access="ROLE_ADMIN" />
with no success. How to fix this config?