Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Spring Security support multiple entry points?

I mean need different:

  • Login URL
  • Login out url
  • session time url
  • authentication provider
  • error page
  • css

for different entry point.

Is this possible?

like image 626
Xilang Avatar asked Jun 27 '11 10:06

Xilang


People also ask

How many ways we can implement Spring Security?

There are basically 2 ways to implement spring security. through bean configuration in . xml files and other by using Annotations.

What is the advantage of Spring Security?

Advantages of Spring SecurityProtection against attacks like session fixation, and clickjacking. Spring MVC integration. Support Java Configuration. Protect against brute force attacks.

Is Spring Security secure enough?

Spring Security allows us to assign a secure password encoder to our UserDetails object to prevent these mistakes. By default, it uses BCrypt to encrypt the passwords, which is considered a well-rounded algorithm for encoding passwords.

Will Spring Security secures all the applications?

If Spring Security is on the classpath, Spring Boot automatically secures all HTTP endpoints with “basic” authentication. However, you can further customize the security settings. The first thing you need to do is add Spring Security to the classpath.


1 Answers

From 3.1.0 (which is currently beta) it will support multiple <http> elements in the namespace.

So short answer:

In 3.1.x yes.

In 3.0.5.RELEASE no.

Longer aswer:

Here is additional info, check the links in the comments also.


I had a similar problem once, since I had multiple entry points.

A good way IMO would be to make a new login page which decides which login page to redirect to or even calls the logic of the other entry points. Then you can point spring to the new page.

I'm pretty sure this can be done inside the filter chain, but I wouldn't recommend it since you will need a lot of manual coding and bean definitions. Generally I don't think 3.0.5 was designed for multiple entry points.

like image 117
Simeon Avatar answered Sep 30 '22 02:09

Simeon