Results 1 to 3 of 3

Thread: Need to know if Spring security has this support ?

  1. #1
    Join Date
    Sep 2011
    Posts
    3

    Default Need to know if Spring security has this support ?

    Hi All

    I am a new user to Spring Security.

    Problem : I have a user being created in a company(Company A), and there can be several users in a company(Company A) (Let us assume).

    And all the users of the company(Company A) log in to the application with "ROLE_USER" privilege with spring security 3.0 (Database authorization).

    When a user(Mr.X) is logged in and accessing a page and at the same time i remove the company (Company A) (from admin login) to which the user(Mr.x) had logged in . At this moment i delete all the users in Company A and there authorities from the DB.

    Now i wonder how spring still allows the person who has already logged in to access the other pages.

    can any one explain this ? and is there any solution to get out to login page for Mr.x ?

    thanks
    Pradheep

  2. #2
    Join Date
    Jan 2008
    Posts
    1,826

    Default

    The reason is after the user has logged in, the user is cached in HttpSession and is not looked up in the database again. One option is to use the SessionRegistry to mark the user as logged out. Read about Session Management. You might also find this thread of interest.
    Rob Winch - @rob_winch
    Spring Security Lead
    Pivotal

  3. #3
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,625

    Default

    Or to simply reauthenticate on each incoming request (this was an option in older versions). Which basically re-loads the credentials from the database on each incoming request.
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •