| ²é¿´: 1029 | »Ø¸´: 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. |
» ²ÂÄãϲ»¶
ÓÐûÓдóÉñ°ïÎÒ¿´¿´»ù½ð´úÂë
ÒѾÓÐ10È˻ظ´
½ñÌìÎñί»á¿ªÍêÁË£¬Ã÷Ìì³ö½á¹ûÂð
ÒѾÓÐ13È˻ظ´
·Å°ñǰµÄ²»µ¶¨
ÒѾÓÐ19È˻ظ´
ijЩ»ú¹¹£¬ÒÔЧÂʵÍΪÈÙ£¬ÒÔЧÂʵÍ×÷Ϊ´æÔÚ¸Ð
ÒѾÓÐ10È˻ظ´
2026¹ú×ÔÈ»º¯ÆÀ·Ñµ½ÕË
ÒѾÓÐ23È˻ظ´
ÔÚ¼á±ù»¹¸Ç×ű±º£µÄʱºò£¬ÎÒ¿´µ½ÁËŷŵÄ÷»¨¡£
ÒѾÓÐ8È˻ظ´
½ñÈÕ²»·Å°ñ£¿Íø´«¹ú×ÔȻԤ¼Æ 8 Ô 27 Èտɲé½á¹û
ÒѾÓÐ22È˻ظ´
ʲôʱºò¿ª½±£¿
ÒѾÓÐ13È˻ظ´
Èç¹û´Ë¿ÌÄãÕýÔÚΪ¹ú»ù¸Ðµ½½¹ÂÇ£¬²»·ÁÀ´ÌýÌýÕâÊס¶»ù½ðÖ®Íâ¡·
ÒѾÓÐ8È˻ظ´
ûÓÐÈκÎÏûÏ¢-ÊDz»ÊǾÍÁ¹ÁË
ÒѾÓÐ10È˻ظ´
zcius
ÖÁ×ðľ³æ (ÖªÃû×÷¼Ò)
- ·ÒëEPI: 65
- Ó¦Öú: 5 (Ó×¶ùÔ°)
- ½ð±Ò: 16742.4
- É¢½ð: 810
- ºì»¨: 8
- Ìû×Ó: 8863
- ÔÚÏß: 406.9Сʱ
- ³æºÅ: 1123409
- ×¢²á: 2010-10-15
- רҵ: ¼ÆËã»ú¿ÆÑ§µÄ»ù´¡ÀíÂÛ
¡¾´ð°¸¡¿Ó¦Öú»ØÌû
einsteinjw(½ð±Ò+20, ·ÒëEPI+1): 2012-02-14 12:56:44
sltmac(½ð±Ò+20): 2012-02-24 09:37:58
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









»Ø¸´´ËÂ¥
20