Hello Everyone,
I am new to spring security and not had much experiance with it, and was hoping someone could help me with an issue I have with regards to stopping users logging in using GET.
I have read the docs and still confused with how my spring security is behaving with regards to my app. I have configuared the security XML by placing a "denyALL on All GET requests" for my login URL, however I am still able to login using GET.
Here is the configuration
So I thought I could simply add a denyAll to GET requests on /loginWithDetailsCode:<security:http auto-config="false" use-expressions="true" entry-point-ref="formEntryPoint"> <security:custom-filter position="FORM_LOGIN_FILTER" ref="authenticationProcessingFilter"/> <security:custom-filter position="LOGOUT_FILTER" ref="logoutFilter"/> <security:intercept-url pattern="/loginWithDetails" access="denyAll" requires-channel="https" method="GET"/> <security:intercept-url pattern="/loginWithDetails" access="permitAll" requires-channel="https" method="POST"/> <security:intercept-url pattern="/" access="permitAll" requires-channel="https" /> <security:intercept-url pattern="/loginNoJS" access="permitAll" requires-channel="https" /> <security:intercept-url pattern="/loginFailed" access="permitAll" requires-channel="https" /> <security:intercept-url pattern="/activate" access="hasRole('ROLE_STAFF')" requires-channel="https" /> <security:intercept-url pattern="/resources/**/*" access="permitAll" requires-channel="any" /> <security:intercept-url pattern="/**" access="hasAnyRole('ROLE_USER','ROLE_STAFF')" requires-channel="https"/> <security:session-management session-authentication-strategy-ref="fixationProtection"/> </security:http>
and add permitAll to POST requests on /loginWithDetails
But I can still login with a GET requests using login details in the query string.
Can anyone help?
Regards
Darren.


Reply With Quote