public class SecurityPolicyWriter extends CombinerSecurityManager
It should be installed from the command line using the following system property:
-Djava.security.manager=org.apache.river.tool.SecurityPolicyWriter
The policy file generated will be specific to the runtime where it is generated. Users should edit the files after generation if they wish to deploy the policy else where, replacing file path characters etc.
Note that the file generated will not contain the ProtectionDomain
of the jar file containing this SecurityManager, neither will it contain
Java platform jars.
The following properties should be set to obtain CodeSource signer Certificate Aliases.
System Property | Explanation |
org.apache.river.tool.SecurityPolicyWriter.Directory | Directory to create policy files in. |
javax.net.ssl.trustStore | The location of the KeyStore, if no location is specified, then the cacerts file in the lib/security subdirectory of the JDK installation directory is used. If specified, the location is treated as a URL. If no protocol is specified in the URL or it is an unknown protocol, then, the location is treated as a file name. |
javax.net.ssl.trustStoreType | The KeyStore type, If no keystore type is specified, then the type returned by KeyStore.getDefaultType() is used. |
javax.net.ssl.trustStorePassword | The KeyStore password, if no password is specified, then no password is used when loading the keystore. |
KeyStore
inCheck
Constructor and Description |
---|
SecurityPolicyWriter() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
checkPermission(ProtectionDomain pd,
Permission p) |
checkPermission, checkPermission, clearCache, getSecurityContext
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, getThreadGroup, inClass, inClassLoader
protected boolean checkPermission(ProtectionDomain pd, Permission p)
checkPermission
in class CombinerSecurityManager
Copyright © 2016–2018. All rights reserved.