這次釋出的Spring Security-3.0.1是一個bug fix版,主要是對3.0中存在的一些問題進行修正。文檔中沒有添加新功能的介紹,但是将之前拼寫錯誤的一些類名進行了修正,建議開發者以這一版本的文檔為參考。
另:Spring Security從2010-01-01以後,版本控制從SVN換成了GIT,我們在翻譯文檔的時候,主要是根據SVN的變化來進行文檔内容的比對,這次 換成GIT後,感覺缺少了之前那種文本比對工具,如果有對GIT熟悉的朋友,還請推薦一下文本比對的工具,謝謝。
- 序言 I. 入門
-
- 1. 介紹
-
- 1.1. Spring Security是什麼? 1.2. 曆史 1.3. 發行版本号 1.4. 獲得Spring Security
-
- 1.4.1. 項目子產品
-
- 1.4.1.1. Core -
1.4.1.2. Web -spring-security-core.jar
1.4.1.3. Config -spring-security-web.jar
1.4.1.4. LDAP -spring-security-config.jar
1.4.1.5. ACL -spring-security-ldap.jar
1.4.1.6. CAS -spring-security-acl.jar
1.4.1.7. OpenID -spring-security-cas-client.jar
spring-security-openid.jar
1.4.2. 獲得源代碼
-
2. Security命名空間配置 -
-
- 2.1. 介紹
-
- 2.1.1. 命名空間的設計
2.2. 開始使用安全命名空間配置 -
- 2.2.1. 配置
-
- 2.2.2.1.
包含了什麼? 2.2.2.2. 表單和基本登入選項auto-config
2.2.3. 使用其他認證提供器 -
- 2.2.3.1. 添加一個密碼編碼器
2.2.2. 最小web.xml
配置<http>
2.3. 進階web特性 -
-
- 2.3.1. Remember-Me認證 2.3.2. 添加HTTP/HTTPS信道安全 2.3.3. 會話管理
-
- 2.3.3.1. 檢測逾時 2.3.3.2. 同步會話控制 2.3.3.3. 防止Session固定攻擊
2.3.4. 對OpenID的支援 -
- 2.3.4.1. 屬性交換
2.3.5. 添加你自己的filter -
- 2.3.5.1. 設定自定義
AuthenticationEntryPoint
2.4. 保護方法 -
-
- 2.4.1.
-
- 2.4.1.1. 使用
添加安全切點protect-pointcut
元素<global-method-security>
2.5. 預設的AccessDecisionManager -
-
- 2.5.1. 自定義AccessDecisionManager
2.6. 驗證管理器和命名空間
3. 示例程式 -
-
- 3.1. Tutorial示例 3.2. Contacts 3.3. LDAP例子 3.4. CAS例子 3.5. Pre-Authentication例子
4. Spring Security社群 -
- 4.1. 任務跟蹤 4.2. 成為參與者 4.3. 更多資訊
II. 結構和實作 -
-
- 5. 技術概述
-
- 5.1. 運作環境 5.2. 核心元件
-
- 5.2.1. SecurityContextHolder, SecurityContext 和 Authentication對象
-
- 5.2.1.1. 獲得目前使用者的資訊
5.2.2. UserDetailsService 5.2.3. GrantedAuthority 5.2.4. 小結
5.3. 驗證 -
-
- 5.3.1. 什麼是Spring Security的驗證呢? 5.3.2. 直接設定SecurityContextHolder的内容
5.4. 在web應用中驗證 -
- 5.4.1. ExceptionTranslationFilter 5.4.2. AuthenticationEntryPoint 5.4.3. 驗證機制 5.4.4. 在請求之間儲存
。SecurityContext
5.5. Spring Security中的通路控制(驗證) -
- 5.5.1. 安全和AOP建議 5.5.2. 安全對象和
-
- 5.5.2.1. 配置屬性是什麼? 5.5.2.2. RunAsManager 5.5.2.3. AfterInvocationManager 5.5.2.4. 擴充安全對象模型
AbstractSecurityInterceptor
5.6. 國際化 -
6. 核心服務 -
-
- 6.1. The
-
- 6.1.1.
DaoAuthenticationProvider
6.2. -
- 6.2.1. 記憶體認證 6.2.2.
-
- 6.2.2.1. 權限分組
JdbcDaoImpl
6.3. 密碼加密 -
-
- 6.3.1. 什麼是散列加密? 6.3.2. 為散列加點兒鹽 6.3.3. 散列和認證
,AuthenticationManager
和ProviderManager
sAuthenticationProvider
實作UserDetailsService
-
III. web應用安全 -
-
- 7. 安全過濾器鍊
-
- 7.1.
-
- 7.2.1. 繞過過濾器鍊
7.3. 過濾器順序 7.4. 使用其他過濾器 —— 基于架構
7.2.DelegatingFilterProxy
FilterChainProxy
8. 核心安全過濾器 -
-
- 8.1.
-
- 8.2.1.
8.2.2.AuthenticationEntryPoint
AccessDeniedHandler
8.3. -
- 8.3.1.
SecurityContextRepository
8.4. -
- 8.4.1. 認證成功和失敗的應用流程
8.2.FilterSecurityInterceptor
ExceptionTranslationFilter
SecurityContextPersistenceFilter
UsernamePasswordAuthenticationFilter
9. Basic(基本)和Digest(摘要)驗證 -
-
- 9.1.
-
- 9.1.1. 配置
9.2. -
- 9.2.1. Configuration
BasicAuthenticationFilter
DigestAuthenticationFilter
10. Remember-Me認證 -
-
- 10.1. 概述 10.2. 簡單基于散列标記的方法 10.3. 持久化标記方法 10.4. Remember-Me接口和實作
-
- 10.4.1. TokenBasedRememberMeServices 10.4.2. PersistentTokenBasedRememberMeServices
11. 會話管理 -
-
- 11.1. SessionManagementFilter 11.2.
11.3. 同步會話SessionAuthenticationStrategy
12. 匿名認證 -
- 12.1. 概述 12.2. 配置 12.3.
AuthenticationTrustResolver
IV. 授權 -
-
- 13. 驗證架構
-
- 13.1. 驗證 13.2. 處理預調用
-
- 13.2.1. AccessDecisionManager 13.2.2. 基于投票的AccessDecisionManager實作
-
- 13.2.2.1.
13.2.2.2.RoleVoter
13.2.2.3. Custom VotersAuthenticatedVoter
13.3. 處理後決定 -
14. 安全對象實作 -
-
- 14.1. AOP聯盟 (MethodInvocation) 安全攔截器
-
- 14.1.1. 精确的 MethodSecurityIterceptor 配置
14.2. AspectJ (JoinPoint) 安全攔截器
15. 基于表達式的權限控制 -
-
- 15.1. 概述
-
- 15.1.1. 常用内建表達式
15.2. Web 安全表達式 15.3. 方法安全表達式 -
- 15.3.1.
-
- 15.3.1.1. 通路控制使用
和@PreAuthorize
15.3.1.2. 過濾使用@PostAuthorize
和@PreFilter
@PostFilter
和@Pre
注解@Post
-
16. acegi到spring security的轉換方式 -
-
- 16.1. Spring Security是什麼 16.2. 目标 16.3. 步驟 16.4. 總結
V. 進階話題 -
-
- 17. 領域對象安全(ACLs)
-
- 17.1. 概述 17.2. 關鍵概念 17.3. 開始
18. 預認證場景 -
- 18.1. 預認證架構類
-
- 18.1.1. AbstractPreAuthenticatedProcessingFilter 18.1.2. AbstractPreAuthenticatedAuthenticationDetailsSource
-
- 18.1.2.1. J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
18.1.3. PreAuthenticatedAuthenticationProvider 18.1.4. Http403ForbiddenEntryPoint
18.2. 具體實作 -
-
- 18.2.1. 請求頭認證(Siteminder)
-
- 18.2.1.1. Siteminder示例配置
18.2.2. J2EE容器認證
-
19. LDAP認證 -
-
- 19.1. 綜述 19.2. 在Spring Security裡使用LDAP 19.3. 配置LDAP伺服器
-
- 19.3.1. 使用嵌入測試伺服器 19.3.2. 使用綁定認證 19.3.3. 讀取授權
19.4. 實作類 -
- 19.4.1. LdapAuthenticator實作
-
- 19.4.1.1. 常用功能 19.4.1.2. BindAuthenticator 19.4.1.3. PasswordComparisonAuthenticator 19.4.1.4. 活動目錄認證
19.4.2. 連結到LDAP伺服器 19.4.3. LDAP搜尋對象 -
- 19.4.3.1.
FilterBasedLdapUserSearch
19.4.4. LdapAuthoritiesPopulator 19.4.5. Spring Bean配置 19.4.6. LDAP屬性和自定義UserDetails
-
20. JSP标簽庫 -
-
- 20.1. 聲明Taglib 20.2.
标簽 20.3.authorize
标簽 20.4.authentication
标簽accesscontrollist
21. Java認證和授權服務(JAAS)供應器 -
- 21.1. 概述 21.2. 配置
-
- 21.2.1. JAAS CallbackHandler 21.2.2. JAAS AuthorityGranter
22. CAS認證 -
-
- 22.1. 概述 22.2. CAS是如何工作的 22.3. 配置CAS用戶端
23. X.509認證 -
- 23.1. 概述 23.2. 把X.509認證添加到你的web系統中 23.3. 為tomcat配置SSL
24. 替換驗證身份 -
- 24.1. 概述 24.2. 配置
A. 安全資料庫表結構 -
-
- A.1. User表
-
- A.1.1. 組權限
A.2. 持久登陸(Remember-Me)表 A.3. ACL表 -
- A.3.1. Hypersonic SQL
-
- A.3.1.1. PostgreSQL
-
B. 安全命名空間 -
-
- B.1. Web應用安全 -
-
- B.1.1.
-
- B.1.1.1.
B.1.1.2.servlet-api-provision
B.1.1.3.path-type
B.1.1.4.lowercase-comparisons
B.1.1.5.realm
B.1.1.6.entry-point-ref
B.1.1.7.access-decision-manager-ref
B.1.1.8.access-denied-page
B.1.1.9.once-per-request
create-session
B.1.2. -
- B.1.3.1.
B.1.3.2.pattern
B.1.3.3.method
B.1.3.4.access
B.1.3.5.requires-channel
filters
B.1.4. -
- B.1.5.1.
B.1.5.2.login-page
B.1.5.3.login-processing-url
B.1.5.4.default-target-url
B.1.5.5.always-use-default-target
B.1.5.6.authentication-failure-url
B.1.5.7.authentication-success-handler-ref
authentication-failure-handler-ref
B.1.6. -
- B.1.7.1.
B.1.7.2.data-source-ref
B.1.7.3.token-repository-ref
B.1.7.4.services-ref
B.1.7.5.token-repository-ref
屬性 B.1.7.6.key
B.1.7.7.token-validity-seconds
user-service-ref
B.1.8. -
- B.1.8.1.
session-fixation-protection
B.1.9. -
- B.1.9.1.
屬性 B.1.9.2.max-sessions
屬性 B.1.9.3.expired-url
屬性 B.1.9.4.error-if-maximum-exceeded
和session-registry-alias
屬性session-registry-ref
B.1.10. -
- B.1.11.1.
屬性 B.1.11.2.subject-principal-regex
屬性user-service-ref
B.1.12. -
- B.1.13.1.
屬性 B.1.13.2.logout-url
屬性 B.1.13.3.logout-success-url
屬性invalidate-session
B.1.14.
屬性<http>
B.1.3.<access-denied-handler>
元素<intercept-url>
元素 B.1.5.<port-mappings>
元素<form-login>
元素 B.1.7.<http-basic>
元素<remember-me>
元素<session-management>
元素<concurrent-control>
元素 B.1.11.<anonymous>
元素<x509>
元素 B.1.13.<openid-login>
元素<logout>
元素<custom-filter>
B.2. 認證服務 -
-
- B.2.1.
-
- B.2.1.1. <authentication-provider>元素 B.2.1.2. 使用
來引用一個<authentication-provider>
BeanAuthenticationProvider
元素<authentication-manager>
B.3. 方法安全 -
-
- B.3.1.
-
- B.3.1.1.
和secured-annotations
屬性 B.3.1.2. 安全方法使用jsr250-annotations
B.3.1.3.<protect-pointcut>
元素<after-invocation-provider>
B.3.2. LDAP命名空間選項 -
- B.3.2.1. 使用
元素定義LDAP伺服器 B.3.2.2.<ldap-server>
元素 B.3.2.3.<ldap-provider>
元素<ldap-user-service>
元素<global-method-security>
-
元素<http>
-