Spring Security 简明教程

Spring Security - Project Modules

Spring Security 代码库根据不同的功能及其对第三方库的依赖关系分为多个 jar。对于 Maven,我们需要相应地设置所需的依赖项。以下是构成 Spring Security 项目的 jar 的列表。

Spring Security codebase is divided into multiple jars based on different functionalities and their dependencies on third party libraries. In case of Maven, we need to set the required dependencies accordingly. Following is the list of jars that constitutes the Spring Security project.

  1. Core − spring-security-core.jar

  2. Web − spring-security-web.jar

  3. Config − spring-security-config.jar

  4. LDAP − spring-security-ldap.jar

  5. ACL − spring-security-acl.jar

  6. CAS − spring-security-cas-client.jar

  7. OpenID − spring-security-openid.jar

  8. OpenID − spring-security-web.jar

让我们探讨 Spring Security 的每个 jar 的细节。

Let’s explore details of each jar of Spring Security.

Core − spring-security-core.jar

Core jar 包含使用 Spring Security 的任何应用程序所需的高级包。它支持独立应用程序、远程客户端、用于方法安全性的服务层和使用 JDBC 的用户配置。以下包是 core jar 的一部分,其中包含用于身份验证、访问控制、远程支持和基本配置类的核心类。

Core jar contains top level packages required by any application using Spring Security. It supports standalone applications, remote clients, service layer for method security and user provisioning using JDBC. Following packages are part of core jar containing core classes for authentication, access control, remoting support and basic provisioning classes.

  1. org.springframework.security.core

  2. org.springframework.security.access

  3. org.springframework.security.authentication

  4. org.springframework.security.provisioning

  5. org.springframework.security.remoting

Web − spring-security-web.jar

Web jar 提供 Web 身份验证服务、基于 URL 的访问控制。它支持 Servlet API。以下包是包含过滤器类和其他与 Web 安全相关的类的 web jar 的一部分。

Web jar provides web authentication services, URL based access control. It supports Servlet API. Following package is part of web jar containing filter classes and other web security related classes.

  1. org.springframework.security.web

Config − spring-security-config.jar

Config jar 携带安全命名空间解析代码库,当使用 Spring Security XML 命名空间进行配置时需要它。以下包是 config jar 的一部分。

Config jar carries security namespace parsing codebase, It is needed in case of Spring Security XML namespace is used for configuration. Following package is part of config jar.

  1. org.springframework.security.config

LDAP − spring-security-ldap.jar

LDAP jar 提供 ldap 身份验证服务和 ldap 配置代码。当我们需要使用 LDAP 身份验证或使用 LDAP 管理的条目时,它必不可少。以下包是 ldap jar 的一部分。

LDAP jar provides ldap authentication services and ldap provisioning code. It is required when we’re to use LDAP authentication or LDAP managed entries are to be used. Following package is part of ldap jar.

  1. org.springframework.security.ldap

ACL − spring-security-acl.jar

ACL jar 提供了专门的 Domain Object ACL 实现。它用于向应用程序中特定于域的对象实例提供安全性。以下包是 acl jar 的一部分。

ACL jar provides specialized Domain Object ACL implementation. It is used to provide securty to domain specific object instances in the application. Following package is part of acl jar.

  1. org.springframework.security.acl

CAS − spring-security-cas-client.jar

CAS jar 提供 CAS 客户端集成类。当 CAS 单点登录服务器要与 Spring Security Web 身份验证集成时,它必不可少。以下包是 cas jar 的一部分。

CAS jar provides CAS client integration classes. It is required in case of CAS Single Sign-on Server is to be integrated with Spring Security Web authentication. Following package is part of cas jar.

  1. org.springframework.security.cas

OpenId − spring-security-openid.jar

OpenId jar 提供 OpenId web 身份验证服务,用于对照外部 OpenId 服务器对用户进行身份验证。以下包是 openid jar 的一部分。

OpenId jar provides OpenId web authentication services, and is used to authenticate users against external OpenId server. Following package is part of openid jar.

  1. org.springframework.security.openid