本文共 8754 字,大约阅读时间需要 29 分钟。
In this post, we are going to discuss about Spring Framework “Security” Module Basics. We will develop some simple and advanced examples in my coming posts.
在本文中,我们将讨论有关Spring Framework“安全性”模块的基础知识。 我们将在以后的文章中开发一些简单和高级的示例。
Now-a-days, Developing Secure Applications is very crucial aspect to avoid Malfunctioning, Stealing or hacking our confidential data or unauthorized access. We can develop Secure applications using Spring Security Module to restrict access to our applications.
如今,开发安全应用程序对于避免发生故障,窃取或入侵我们的机密数据或未经授权的访问至关重要。 我们可以使用Spring Security Module开发安全应用程序,以限制对我们应用程序的访问。
Initially, Spring Framework was using a separate Third-Party Framework to support Spring Applications Security: Acegi Security. But it was not easy approach to develop secure applications and had some drawbacks.
最初,Spring Framework使用一个单独的第三方框架来支持Spring Applications Security:Acegi Security。 但是开发安全应用程序并不容易,并且存在一些缺点。
To avoid all these issues, The Spring Team (Pivotal Team) has integrated “Acegi Security” framework into Spring Framework as “Spring Security” module.
为了避免所有这些问题,Spring团队(Pivotal团队)已将“ Acegi Security”框架作为“ Spring Security”模块集成到Spring框架中。
Spring 4 Framework has the following modules to provide Security to the Spring-Based Applications:
Spring 4 Framework具有以下模块,可为基于Spring的应用程序提供安全性:
In Spring Framework, “Spring Security” module is the base module for rest of the Spring Security modules.
在Spring Framework中,“ Spring Security”模块是其余Spring Security模块的基本模块。
We are going to discuss some basics of “Spring Security” module in this post. We will discuss some simple and advanced real-time examples in my coming posts.
在本文中,我们将讨论“ Spring Security”模块的一些基础知识。 我们将在我的后续文章中讨论一些简单和高级的实时示例。
We will come back to rest of four modules once we are familiar with “Spring Security” module in my coming posts.
一旦我们在接下来的帖子中熟悉了“ Spring Security”模块,我们将回到四个模块的其余部分。
Spring Security is one of the Spring Framework’s Security modules. It is a Java SE/Java EE Security Framework to provide Authentication, Authorization, SSO and other Security features for Web Applications or Enterprise Applications.
Spring Security是Spring Framework的Security模块之一。 它是一个Java SE / Java EE安全框架,为Web应用程序或企业应用程序提供身份验证,授权,SSO和其他安全功能。
Spring Security Official website: https://projects.spring.io/spring-security/
Spring Security官方网站:https://projects.spring.io/spring-security/
Spring Security Documentation website: https://docs.spring.io/spring-security/site/docs/
Spring Security Documentation网站:https://docs.spring.io/spring-security/site/docs/
Latest stable, Spring Security Module version is “4.0.2.RELEASE”
Spring Security Module的最新稳定版本是“ 4.0.2.RELEASE”
Spring 3.x Security Framework provides the following Features:
Spring 3.x安全框架提供以下功能:
Spring 4.x Security Framework supports the following New Features:
Spring 4.x安全框架支持以下新功能:
We will develop some simple examples to demonstrate these features in my coming posts.
在接下来的文章中,我们将开发一些简单的示例来演示这些功能。
Spring Security supports the following two Levels of Authorization
Spring Security支持以下两个授权级别
NOTE
Spring Security supports “Method Level Security” by using AOP (Aspect-Oriented Programming) that means through Aspects. Spring Security supports “URL Level Security” by using Servlet filters.注意
Spring Security通过使用经过方面的AOP(面向方面的编程)来支持“方法级安全性”。 Spring Security通过使用Servlet过滤器来支持“ URL级安全性”。Spring 4 Security Framework provides the following Advantages:
Spring 4 Security Framework具有以下优点:
Spring 4 Security Module is again divided into 11 sub-modules. It has the following sub-modules:
Spring 4安全模块再次分为11个子模块 。 它具有以下子模块:
In Spring Framework’s Security Sub-Module, Spring Security Core Sub-Module is the base module for rest of all Security Sub-modules.
在Spring Framework的Security子模块中,Spring Security Core子模块是其余所有Security子模块的基本模块。
To support these 11 Spring Security modules, Spring framework has the following jars:
为了支持这11个Spring Security模块,Spring框架具有以下jar:
Almost all Spring Security JARs have similar kind of Maven or Gradle dependency entries as shown below:
几乎所有的Spring Security JAR都有类似的Maven或Gradle依赖项,如下所示:
org.springframework.security [Spring Security Module Name Here] 4.0.2.RELEASE
dependencies {compile 'org.springframework.security:[Spring Security Module Name Here]:4.0.2.RELEASE'}
pom.xml
pom.xml
org.springframework.security spring-security-core 4.0.2.RELEASE
build.gradle
build.gradle
dependencies { compile 'org.springframework.security:spring-security-core:4.0.2.RELEASE'}
That’s it all about Spring 4 Security Module basics. It’s time to start to develop some Simple Examples to explore Spring Security module.
这就是Spring 4 Security Module基础的全部内容。 现在该开始开发一些简单示例以探索Spring Security模块了。
We will use Spring STS Suite IDE, Maven or Gradle Build Tool and Java 7/8 to develop our applications.
我们将使用Spring STS Suite IDE,Maven或Gradle Build Tool和Java 7/8来开发我们的应用程序。
Please drop me a comment if you like my post or have any issues/suggestions.
如果您喜欢我的帖子或有任何问题/建议,请给我评论。
翻译自:
转载地址:http://rvlzd.baihongyu.com/