United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-7083329 : Limited doPrivileged

Details
Type:
Enhancement
Submit Date:
2011-08-25
Status:
Closed
Updated Date:
2014-06-06
Project Name:
JDK
Resolved Date:
2013-05-15
Component:
security-libs
OS:
generic
Sub-Component:
java.security
CPU:
generic
Priority:
P3
Resolution:
Duplicate
Affected Versions:
8
Fixed Versions:
8

Related Reports
Duplicate:
Relates:

Sub Tasks

Description
The basic idea is to allow code to assert a subset of it's privileges without
otherwise preventing the full access control stack walk for other permissions.

For example, some bootstrap jre code asserts a privilege to GET a configuration
file via http....

    AccessController.doPrivileged(anon class..., new URLPermission(url, request
props..., "GET")

   A checkPermission() for a matching URLPermission (done by the http handler)
would stop walking the acc stack at that doPrivileged() and succeed. However, a
non-matching URLPermission or a FilePermission, for example, would match the jre
class's generally assigned privileges and continue walking the full acc stack as
if the limited doPrivileged() had not been invoked.

These limited privileges are also captured by getAccessControlContext() and
thread inheritance.

                                    

Comments
Duplicate of JDK-8014097
                                     
2013-05-15
duplicate bug, not verified
                                     
2013-06-10



Hardware and Software, Engineered to Work Together