-
Enhancement
-
Resolution: Duplicate
-
P3
-
8
-
None
-
generic
-
generic
-
Not verified
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.
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.
- duplicates
-
JDK-8014097 add doPrivileged methods with limited privilege scope
- Closed
- relates to
-
JDK-8046130 JEP 140: Limited doPrivileged
- Closed