﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-生命在于运动-随笔分类-Acegi Security 参考文档翻译</title><link>http://www.blogjava.net/burrows/category/28521.html</link><description /><language>zh-cn</language><lastBuildDate>Fri, 11 Jan 2008 11:37:59 GMT</lastBuildDate><pubDate>Fri, 11 Jan 2008 11:37:59 GMT</pubDate><ttl>60</ttl><item><title>3.2. Filters 过滤器 (to be modified)</title><link>http://www.blogjava.net/burrows/archive/2008/01/10/174365.html</link><dc:creator>burrows</dc:creator><author>burrows</author><pubDate>Thu, 10 Jan 2008 09:35:00 GMT</pubDate><guid>http://www.blogjava.net/burrows/archive/2008/01/10/174365.html</guid><wfw:comment>http://www.blogjava.net/burrows/comments/174365.html</wfw:comment><comments>http://www.blogjava.net/burrows/archive/2008/01/10/174365.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/burrows/comments/commentRss/174365.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/burrows/services/trackbacks/174365.html</trackback:ping><description><![CDATA[&nbsp; <strong><span lang="EN-US" style="font-size: 18pt; font-family: Arial; mso-font-kerning: 0pt">3.2. Filters<o:p></o:p></span></strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
<strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 过滤器</strong><br />
&nbsp;
<p style="text-align: left" align="left"><span style="font-size: 10pt">Acegi Security </span><span style="font-size: 10pt; font-family: 宋体">使用很多种过滤器，过滤器的内容将会贯穿本参考文档的剩余部分。</span><span style="font-size: 10pt; font-family: 宋体">你可以选择怎么样在你的</span><span style="font-size: 10pt">web</span><span style="font-size: 10pt; font-family: 宋体">应用程序中使用这些过滤器，你可以使用</span><span style="font-size: 10pt">FilterToBeanProxy</span><span style="font-size: 10pt; font-family: 宋体">或者</span><span style="font-size: 10pt">FilterChainProxy</span><span style="font-size: 10pt; font-family: 宋体">。下面我们就会讨论这两个过滤器。</span></p>
<p style="text-align: left" align="left"><span style="font-size: 10pt; font-family: 宋体">大多数过滤器都是使用</span><span style="font-size: 10pt">FilterToBeanProxy</span><span style="font-size: 10pt; font-family: 宋体">配置，下面是一个</span><span style="font-size: 10pt">web.xml</span><span style="font-size: 10pt; font-family: 宋体">中配置的例子：</span></p>
<p style="text-align: left" align="left"><span style="font-size: 10pt">&lt;filter&gt;</span></p>
<p style="text-indent: 21pt; text-align: left" align="left"><span style="font-size: 10pt">&lt;filter-name&gt;Acegi HTTP Request Security Filter&lt;/filter-name&gt;</span></p>
<p style="text-indent: 21pt; text-align: left" align="left"><span style="font-size: 10pt">&lt;filter-class&gt;org.acegisecurity.util.FilterToBeanProxy&lt;/filter-class&gt;</span></p>
<p style="margin-left: 21pt; text-indent: 21pt; text-align: left" align="left"><span style="font-size: 10pt">&lt;init-param&gt;</span></p>
<p style="margin-left: 21pt; text-indent: 21pt; text-align: left" align="left"><span style="font-size: 10pt">&lt;param-name&gt;targetClass&lt;/param-name&gt;</span></p>
<p style="margin-left: 21pt; text-indent: 21pt; text-align: left" align="left"><span style="font-size: 10pt">&lt;param-value&gt;org.acegisecurity.ClassThatImplementsFilter&lt;/param-value&gt;</span></p>
<p style="text-indent: 21pt; text-align: left" align="left"><span style="font-size: 10pt">&lt;/init-param&gt;</span></p>
<p style="text-align: left" align="left"><span style="font-size: 10pt">&lt;/filter&gt;</span></p>
<span style="font-size: 10pt; font-family: 宋体">请注意，在</span><span style="font-size: 10pt; font-family: 'Times New Roman'">web.xml</span><span style="font-size: 10pt; font-family: 宋体">中配置的过滤器实际上就是</span><span style="font-size: 8.5pt; font-family: Courier">FilterToBeanProxy</span><span style="font-size: 8.5pt; font-family: 宋体">，而不是真正实现该过滤器逻辑的。</span><span style="font-size: 8.5pt; font-family: Courier">FilterToBeanProxy</span><span style="font-size: 8.5pt; font-family: 宋体">的工作就是将过滤器的方法代理给一个</span><span style="font-size: 8.5pt; font-family: Courier">bean</span><span style="font-size: 8.5pt; font-family: 宋体">，而这个</span><span style="font-size: 8.5pt; font-family: Courier">bean</span><span style="font-size: 8.5pt; font-family: 宋体">能够从</span><span style="font-size: 8.5pt; font-family: Courier">Spring</span><span style="font-size: 8.5pt; font-family: 宋体">应用的上下文中取到。这个将能够使</span><span style="font-size: 8.5pt; font-family: Courier">bean</span><span style="font-size: 8.5pt; font-family: 宋体">享受到</span><span style="font-size: 8.5pt; font-family: Courier">Spring</span><span style="font-size: 8.5pt; font-family: 宋体">应用程序上下文的生命周期的支持和配置的灵活性。当然该</span><span style="font-size: 8.5pt; font-family: Courier">bean</span><span style="font-size: 8.5pt; font-family: 宋体">是必须要要实现</span><span style="font-size: 8.5pt; font-family: Courier">javax.servlet.Filter</span><span style="font-size: 8.5pt; font-family: 宋体">的。</span><span style="font-size: 8.5pt; font-family: Courier">FilterToBeanProxy</span><span style="font-size: 8.5pt; font-family: 宋体">仅仅需要一个简单的初始化参数，</span><span style="font-size: 8.5pt; font-family: Courier">targetClass</span><span style="font-size: 8.5pt; font-family: 宋体">或者</span><span style="font-size: 8.5pt; font-family: Courier">targetBean</span><span style="font-size: 8.5pt; font-family: 宋体">。</span><span style="font-size: 8.5pt; font-family: Courier">targetClass</span><span style="font-size: 8.5pt; font-family: 宋体">是用来定位在应用程序上下文中第一个对象的指定类，而</span><span style="font-size: 8.5pt; font-family: Courier">targetBean</span><span style="font-size: 8.5pt; font-family: 宋体">则是通过</span><span style="font-size: 8.5pt; font-family: Courier">bean name</span><span style="font-size: 8.5pt; font-family: 宋体">来定位对象的。就好像标准的</span><span style="font-size: 8.5pt; font-family: Courier">Spring web</span><span style="font-size: 8.5pt; font-family: 宋体">应用程序</span><span style="font-size: 8.5pt; font-family: Courier">FilterToBeanProxy</span><span style="font-size: 8.5pt; font-family: 宋体">能够通过</span><span style="font-size: 8.5pt; font-family: Courier">WebApplicationContextUtils.getWebApplicationContext(ServletContext)</span><span style="font-size: 8.5pt; font-family: 宋体">访问应用程序上下文，所以你该在</span><span style="font-size: 8.5pt; font-family: Courier">web.xml</span><span style="font-size: 8.5pt; font-family: 宋体">中定义一个</span><span style="font-size: 8.5pt; font-family: Courier">ContextLoaderListener</span><span style="font-size: 8.5pt; font-family: 宋体">。</span>
 <img src ="http://www.blogjava.net/burrows/aggbug/174365.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/burrows/" target="_blank">burrows</a> 2008-01-10 17:35 <a href="http://www.blogjava.net/burrows/archive/2008/01/10/174365.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Chapter 3. Supporting Infrastructure (todo)</title><link>http://www.blogjava.net/burrows/archive/2008/01/10/174362.html</link><dc:creator>burrows</dc:creator><author>burrows</author><pubDate>Thu, 10 Jan 2008 09:33:00 GMT</pubDate><guid>http://www.blogjava.net/burrows/archive/2008/01/10/174362.html</guid><wfw:comment>http://www.blogjava.net/burrows/comments/174362.html</wfw:comment><comments>http://www.blogjava.net/burrows/archive/2008/01/10/174362.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/burrows/comments/commentRss/174362.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/burrows/services/trackbacks/174362.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/burrows/archive/2008/01/10/174362.html'>阅读全文</a><img src ="http://www.blogjava.net/burrows/aggbug/174362.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/burrows/" target="_blank">burrows</a> 2008-01-10 17:33 <a href="http://www.blogjava.net/burrows/archive/2008/01/10/174362.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Part I. 概述</title><link>http://www.blogjava.net/burrows/archive/2007/12/29/171597.html</link><dc:creator>burrows</dc:creator><author>burrows</author><pubDate>Sat, 29 Dec 2007 09:38:00 GMT</pubDate><guid>http://www.blogjava.net/burrows/archive/2007/12/29/171597.html</guid><wfw:comment>http://www.blogjava.net/burrows/comments/171597.html</wfw:comment><comments>http://www.blogjava.net/burrows/archive/2007/12/29/171597.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/burrows/comments/commentRss/171597.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/burrows/services/trackbacks/171597.html</trackback:ping><description><![CDATA[&nbsp;&nbsp;&nbsp;&nbsp; 摘要: &nbsp;&nbsp;<a href='http://www.blogjava.net/burrows/archive/2007/12/29/171597.html'>阅读全文</a><img src ="http://www.blogjava.net/burrows/aggbug/171597.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/burrows/" target="_blank">burrows</a> 2007-12-29 17:38 <a href="http://www.blogjava.net/burrows/archive/2007/12/29/171597.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Acegi Security Reference Documentation 翻译readme</title><link>http://www.blogjava.net/burrows/archive/2007/12/29/171592.html</link><dc:creator>burrows</dc:creator><author>burrows</author><pubDate>Sat, 29 Dec 2007 09:24:00 GMT</pubDate><guid>http://www.blogjava.net/burrows/archive/2007/12/29/171592.html</guid><wfw:comment>http://www.blogjava.net/burrows/comments/171592.html</wfw:comment><comments>http://www.blogjava.net/burrows/archive/2007/12/29/171592.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/burrows/comments/commentRss/171592.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/burrows/services/trackbacks/171592.html</trackback:ping><description><![CDATA[<font style="background-color: #d4d0c8">翻译 0.1版本，修改将会贯穿整个生命周期，请指点。翻译成这样只能证明我的勇敢：）<br />
<br />
这次翻译是因为我在学习这个，就随手翻译记录下来了，看到哪翻到哪了。多少有些地方掌握不好语义，而且0.1版本肯定还没有校验的，经不起考验的。<br />
<br />
在翻译过程中遇到颇多的术语，鉴于本人知识面比较狭窄，语文表达能力比较薄弱。有些地方就强行翻译了，多数地方还是用的原文。<br />
<br />
我希望我能够翻译一篇大家都能理解，并且没有歧义的东西出来。能够不出现偏差的结果就是我的梦想了。所以就会出现一些英文，那些是我一时还没有找到合适的语言来表达的。还有一些可能是一时犯懒就没翻译的，<br />
<br />
犯懒部分的内容一般会是很容易理解的；还有一种情况可能没有翻译的就是英文表达的太完美了，我不忍心破坏。我将会在以后的日子里慢慢的完善Acegi Security 参考文档的翻译。诚然也会写我工作中的使用，绝对入门。因为我现在还是freshman。<br />
<br />
一些术语：<br />
Authentication， 身份验证，确认用户，有时候也能表达登陆，基于身份的验证，证明系统存在这个principal<br />
Authorization，&nbsp;&nbsp;&nbsp; 授权验证，<font style="background-color: #d4d0c8">确认已经登陆用户的权限</font><font style="background-color: #d4d0c8">确认已经登陆用户的权限，证明是否有足够的权限<br />
Application Context&nbsp; 应用程序上下文，<font style="background-color: #d4d0c8">ApplicationContext可以访问</font><br />
<br />
<br />
术语部分将会逐步添加。<br />
所有原文请参考：<font style="background-color: #d4d0c8">http://www.acegisecurity.org/guide/springsecurity.html</font><br />
</font><br />
<br />
<br />
</font>
<img src ="http://www.blogjava.net/burrows/aggbug/171592.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/burrows/" target="_blank">burrows</a> 2007-12-29 17:24 <a href="http://www.blogjava.net/burrows/archive/2007/12/29/171592.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Acegi Security Reference Documentation 前言</title><link>http://www.blogjava.net/burrows/archive/2007/12/29/171587.html</link><dc:creator>burrows</dc:creator><author>burrows</author><pubDate>Sat, 29 Dec 2007 09:12:00 GMT</pubDate><guid>http://www.blogjava.net/burrows/archive/2007/12/29/171587.html</guid><wfw:comment>http://www.blogjava.net/burrows/comments/171587.html</wfw:comment><comments>http://www.blogjava.net/burrows/archive/2007/12/29/171587.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/burrows/comments/commentRss/171587.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/burrows/services/trackbacks/171587.html</trackback:ping><description><![CDATA[<p><font style="background-color: #d4d0c8">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Acegi Security为J2EE-based企业应用软件提供了一个全面而充分的安全解决方案。当你研究完这篇参考指南后，你会发现我们提供给你的是一个非常有用和高配置的安全系统。安全是永不停息的目标，采用全面的、系统范围的方法是非常重要的。在安全周期中，我们建议你采用&#8220;安全层次&#8221;（layers of security），如此一来，每个层次都会得到它应有的保护，通过继承的层次关系来增加相应的权限。每个层次的安全定义的越紧凑，你的应用系统将会越健壮和安全。</font></p>
<p><font style="background-color: #d4d0c8">在底层，你需要处理诸如transport security 和系统身份验证(system identification)，这样能够减轻(mitigate)man-in-the-middle attacks(怀疑就是减少应用程序受到攻击).下一步，一般来说你需要一个防火墙，也许是用VPNs或者IP安全措施来保证只有通过授权的系统能够连接。在公司的环境下，你也许需要布置一个DMZ把公共服务期和后台数据库、应用服务器隔离。你的操作体统同样是一个非常重要的部分<br />
addressing issues such as running processes as<br />
non-privileged users and maximising file system security. An operating system will usually also be<br />
configured with its own firewall. Hopefully somewhere along the way you'll be trying to prevent<br />
denial of service and brute force attacks against the system. An intrusion detection system will also be<br />
especially useful for monitoring and responding to attacks, with such systems able to take protective<br />
action such as blocking offending TCP/IP addresses in real-time. Moving to the higher layers, your<br />
Java Virtual Machine will hopefully be configured to minimize the permissions granted to different<br />
Java types, and then your application will add its own problem domain-specific security configuration.<br />
Acegi Security makes this latter area - application security - much easier.<br />
Of course, you will need to properly address all security layers mentioned above, together with<br />
managerial factors that encompass every layer. A non-exhaustive list of such managerial factors<br />
would include security bulletin monitoring, patching, personnel vetting, audits, change control,<br />
engineering management systems, data backup, disaster recovery, performance benchmarking, load<br />
monitoring, centralised logging, incident response procedures etc.<br />
With Acegi Security being focused on helping you with the enterprise application security layer, you<br />
will find that there are as many different requirements as there are business problem domains. A<br />
banking application has different needs from an ecommerce application. An ecommerce application<br />
has different needs from a corporate sales force automation tool. These custom requirements make<br />
application security interesting, challenging and rewarding.</font></p>
<p><font style="background-color: #d4d0c8">该参考文档已经为Acegi Security1.0.0版本重新设计改写。请阅读第一部分，全面的设计架构，其他部分就是按照传统的参考文档写的，有需要的时候可以参考。<br />
我们希望你能从参考文档中得到帮助，同样我们也欢迎你的建议和意见。<br />
稍后，欢迎来到Acegi Security 社区。<br />
</font></p>
<img src ="http://www.blogjava.net/burrows/aggbug/171587.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/burrows/" target="_blank">burrows</a> 2007-12-29 17:12 <a href="http://www.blogjava.net/burrows/archive/2007/12/29/171587.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>