public class OgnlSecurityManager extends SecurityManager
Note: Due to potential performance and concurrency issues, try this only if you afraid your app can have an unknown "expression injection" flaw or you afraid you cannot prevent those in your app's internal sandbox comprehensively e.g. you cannot discover and maintain all attack vectors over time because of many dependencies and also their change over time.
This tries to provide an option to you to enable a security manager that disables any sensitive action e.g. exec and exit even if attacker had a successful "expression injection" in any unknown way into your app. However, also honors previous security manager and policies if any set, as parent, and rolls back to them after method execution finished.
inCheck| Constructor and Description |
|---|
OgnlSecurityManager(SecurityManager parentSecurityManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPermission(Permission perm) |
void |
checkPermission(Permission perm,
Object context) |
Long |
enter() |
void |
leave(long token) |
checkAccept, checkAccess, checkAccess, checkAwtEventQueueAccess, checkConnect, checkConnect, checkCreateClassLoader, checkDelete, checkExec, checkExit, checkLink, checkListen, checkMemberAccess, checkMulticast, checkMulticast, checkPackageAccess, checkPackageDefinition, checkPrintJobAccess, checkPropertiesAccess, checkPropertyAccess, checkRead, checkRead, checkRead, checkSecurityAccess, checkSetFactory, checkSystemClipboardAccess, checkTopLevelWindow, checkWrite, checkWrite, classDepth, classLoaderDepth, currentClassLoader, currentLoadedClass, getClassContext, getInCheck, getSecurityContext, getThreadGroup, inClass, inClassLoaderpublic OgnlSecurityManager(SecurityManager parentSecurityManager)
public void checkPermission(Permission perm)
checkPermission in class SecurityManagerpublic void checkPermission(Permission perm, Object context)
checkPermission in class SecurityManagerpublic Long enter()
public void leave(long token)
throws SecurityException
SecurityExceptionCopyright © 1997–2021 OpenSymphony. All rights reserved.