This content has been marked as final. Show 5 replies
user3957847 wrote:You don't have to. It's called by a lot of key methods in the core API, and the user can decide to put security policies in place.
Ok, but say I'm a malicious programmer: I'll NEVER introduce security manager in my code!
Or, if I introduced it, I'd allow every malicious operation I'll want to do..You don't make that call. The user does, with his policy configuration.
The key thing to keep in mind is that the person creating a program and the person on running the program or on whose behalf the program is run are often not the same.
Here is a sample flow.
1. Person A create a program and for sensitive operation invoke the Security Manager (SM)
2. Person B deploys the program in step 1. They may choose to run it with/without SM depending upon their risk analysis.
3. Person B, deploys a policy for the program that might allow User A some operation, while not allowing the same operation to user B.
While the default SM and the default Java Policy file is geared towards code source, there is support for subject based policy. Hope this helps.