| ²é¿´: 889 | »Ø¸´: 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. |
» ²ÂÄãϲ»¶
£¨µ÷¼Á£©Ò»Ö¾Ô¸±¨¿¼¹þ¶û±õ¹¤Òµ´óѧ0857×ÊÔ´Óë»·¾³×¨Òµ378·Ö¿¼Éú
ÒѾÓÐ6È˻ظ´
262Çóµ÷¼Á
ÒѾÓÐ7È˻ظ´
²ÄÁÏר˶322·Ö
ÒѾÓÐ10È˻ظ´
²ÄÁϵ÷¼Á
ÒѾÓÐ8È˻ظ´
085600£¬320·ÖÇóµ÷¼Á
ÒѾÓÐ8È˻ظ´
Ò»Ö¾Ô¸ ½ÄÏ´óѧ 085602 »¯¹¤×¨Ë¶ 338·ÖÇóµ÷¼Á
ÒѾÓÐ11È˻ظ´
Çóµ÷¼Á
ÒѾÓÐ6È˻ظ´
086000µ÷¼Á
ÒѾÓÐ3È˻ظ´
Çóµ÷¼Á
ÒѾÓÐ4È˻ظ´
0703µ÷¼Á£¬Ò»Ö¾Ô¸Ìì½ò´óѧ319·Ö
ÒѾÓÐ4È˻ظ´
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














»Ø¸´´ËÂ¥