If I understand AccessController.doPrivileged correctly, it is saying that untrusted code should be able to invoke methods requiring permissions (such as System.getPro
Check out these links and scroll down to using the doPrivileged API.
Java 6: http://docs.oracle.com/javase/6/docs/technotes/guides/security/doprivileged.html
Java 7: http://docs.oracle.com/javase/7/docs/technotes/guides/security/doprivileged.html
When the AccessController checkPermission method is invoked by the most recent caller, the basic algorithm for deciding whether to allow or deny the requested access is as follows:
If the code for any caller in the call chain does not have the requested permission, AccessControlException is thrown, unless the following is true - a caller whose code is granted the said permission has been marked as "privileged" (see below) and all parties subsequently called by this caller (directly or indirectly) all have the said permission