The security framework in Springside 3

Source: Internet
Author: User

In the official document of the Springside 3, the security framework uses spring Secure 2.0. At first glance, startled me, thought Acegi so quickly was eliminated. Search engine, found that the original Spring Security 2.0 is Acegi 2.0. The hanging heart put it down. Although Springside 3 's profile about Acegi looks unfamiliar, everything is relieved after reading the official document of Acegi 2.0.

First of all, to talk about the basics of Acegi, ACEGI structure is more complex, but I hope that the following words can make it clear. As you all know, if you want to protect the Web resources, the best way is filter, in order to protect the method call, the best way is AOP. Acegi the protection of Web resources, is realized by the filter. The following figure:

In general, our filter is configured in Web.xml, but Acegi is not the same, it is configured in Web.xml is only a proxy, and the real effect of the filter is as a bean configuration in spring. The agents in the Web.xml, in turn, call these beans to protect the Web resources, and these filter is managed as a bean by spring, so it's easy to implement AOP.

Acegi provides a lot of filter, there are more than 10, one one to learn more complex. But for our web developers, there are only a few that are commonly used, as shown in the following image, marked by the red circle:

From top to bottom, they realize the function is 1, the establishment must be HTTPS connection, 2, from the session to extract the user's authentication information 3, exit login; 4, login; 5, remember the user; 6, all applications must be configured with this filter.

In general, we write a Web application only need to familiarize ourselves with these few filter, if you do not need HTTPS connection, even the first is not familiar. But some people will wonder how these filter links to my database. Don't worry, these filters do not directly deal with the user's authentication, nor directly deal with the user's authorization, but to the authentication manager and decision manager. The following figure:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.