24小时热门版块排行榜    

查看: 842  |  回复: 1
本帖产生 1 个 翻译EPI ,点击这里进行查看

einsteinjw

银虫 (小有名气)

[求助] 急求帮助我翻译成中文

The java.security.AccessController class is part of Java’s security mechanism; it is
responsible for enforcing the applicable security policy. This class’s static doPrivileged() method executes a code block with a relaxed security policy. The doPrivileged() method stops permissions from being checked further down the call chain. Consequently, any method that invokes doPrivileged() must assume responsibility for enforcing its own security on the code block supplied to doPrivileged(). Likewise, code in the doPrivileged() method must not leak sensitive information or capabilities. For example, suppose that a web application must maintain a sensitive password file for a web service and also run untrusted code. The application could then enforce a security policy preventing the majority of its own code—as well as all untrusted code—from accessing the sensitive file. Because it must also provide mechanisms for adding and changing passwords, it can call the doPrivileged() method to temporarily allow untrusted code to access the sensitive file for the purpose of managing passwords. In this case, any privileged block must prevent any information about passwords from being accessible to untrusted code.

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zcius

至尊木虫 (知名作家)

【答案】应助回帖

einsteinjw(金币+20, 翻译EPI+1): 2012-02-14 12:56:44
sltmac(金币+20): 2012-02-24 09:37:58
Java.security.AccessController 类是 Java 安全机制的一部分的;它负责执行可用的安全策略。该类静态的 doPrivileged() 方法执行宽松安全策略的代码段。DoPrivileged() 方法阻止调用链上的许可检查。因此,调用doPrivileged() 的任何方法必须自己负责提供给 doPrivileged() 的代码段的安全。同样,doPrivileged() 方法中的代码不能泄漏敏感信息或功能。例如,假设 web 应用程序必须维护一个web 服务的敏感的密码文件的,还要运行不信任的代码,则应用程序可以执行一个安全策略,防止自己的大部分代码以及所有不信任的代码访问敏感的密码文件。由于必须提供添加和修改密码的机制,还得能调用 doPrivileged() 方法,暂时允许不信任的代码访问敏感的密码文件,管理密码。在此情况下,任何特权的模块必须防止不信任的代码访问密码信息。
2楼2012-02-14 05:38:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 einsteinjw 的主题更新
信息提示
请填处理意见