Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8596417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T00:40:34+00:00 2026-06-12T00:40:34+00:00

We follow a certain convention when creating our URIs. All authentication related URIs such

  • 0

We follow a certain convention when creating our URIs. All authentication related URIs such as /login, /logout, /changepassword etc fall under the sub-context /auth.

Thus our authentication-related URIs look like:

/auth/login
/auth/logout
/auth/changepassword

This is what we have in the Spring security context XML.

<http pattern="/auth/**" security="none" />
<http pattern="/resources/**" security="none" />

<http auto-config="true" access-decision-manager-ref="accessDecisionManager">
    <intercept-url pattern="/admin/**" access="ADMINISTRATIVE_ACCESS"/>
    <intercept-url pattern="/**" access="XYZ_ACCESS"/>

    <form-login
            login-page="/auth/login"
            default-target-url="/content"
            authentication-failure-url="/auth/loginFailed"
            authentication-success-handler-ref="authenticationSuccessHandler"/>

    <logout logout-url="/auth/logout" logout-success-url="/auth/login"/>
</http>

The problem now is that /auth/logout gives me a 404 when accessed. However, if I change it to start with something other than /auth such as /abcd/logout or even /logout, it works fine.

I am thinking this is due to the fact that we have defined /auth/** as unsecured and yet trying to use it as a logout page. (How can you access logout if you have not logged in?)

Is there any way out of this in order to please our rather strict URI naming convention?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T00:40:35+00:00Added an answer on June 12, 2026 at 12:40 am

    You’re right about the part:

    I am thinking this is due to the fact that we have defined /auth/** as
    unsecured and yet trying to use it as a logout page. (How can you
    access logout if you have not logged in?)

    More precise defining

    <http pattern="/auth/**" security="none" />
    

    means no Spring Security filter is applied to requests that match /auth/** pattern and hence Spring Security does not controll /auth/logout URL while it should.

    Because Spring Security matches pattern from top to bottom simple override for /auth/logout in your main <http> won’t work, so solution to that problem can be defining separate patterns:

    <http pattern="/auth/login" security="none" />
    <http pattern="/auth/changepassword" security="none" />
    <http pattern="/resources/**" security="none" />
    
    <http auto-config="true" use-expressions="true" access-decision-manager-ref="accessDecisionManager">
        <intercept-url pattern="/auth/logout" access="permitAll"/>
        <intercept-url pattern="/admin/**" access="ADMINISTRATIVE_ACCESS"/>
        <intercept-url pattern="/**" access="XYZ_ACCESS"/>
        <!-- rest of your config -->
    </http>
    

    If you have many of /auth/* URLs to be handled, you can use <http>‘s request-matcher="regex", but I don’t think it’ll be readable that way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The JavaBeans methods' signature's has to follow certain conventions such as set.../get... and such.
I need to be able to read a list of variables that follow certain
I need to parse some information from lines of texts that follow a certain
Some background: In Germany (at least) invoice numbers have to follow certain rules: The
When is about programming, we certain have some blogs to follow, but when your
I have a program where for certain code paths, the address book constants (such
I have to following problem: If i want to follow the Rails naming convention
The current project I'm working requires me to follow certain procedures to eliminate whitespace
I have this follow system that lets you follow certain type of statuses. When
follow up: while I had already been using swfobject with static publishing, dynamic publishing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.