Java permission reference

This page applies to Apigee and Apigee hybrid.

View Apigee Edge documentation.

What you need to know about Java permission policies

If you are developing JavCallout policy, you need to know which permission policies are in effect in the Apigee JVM and how they will affect your code. For example, your custom Java code does not have unlimited access to the file system. However, in the case of file system access, you can read certain files, such as policy resource files. But most other file system access is blocked. This topic lists all of JDK permission types and their respective targets or actions. For each target or action, we specify the permission policy and any exceptions that you need to know about.

To learn more about the JDK permission types and what each permission allows, see Permissions in the Java Development Kit (JDK).

Permission TypeTarget or Action NamePermission Granted
java.awt.AWTPermission
accessClipboardNO
accessEventQueueNO
accessSystemTrayNO
createRobotNO
fullScreenExclusiveNO
listenToAllAWTEventsNO
readDisplayPixelsNO
replaceKeyboardFocusManagerNO
setAppletStubNO
setWindowsAlwaysOnTopNO
showWindowWithoutWarningBannerNO
toolkitModalityNO
watchMousePointerNO
java.io.FilePermission

A java.io.FilePermission represents access to a file or directory. A FilePermission consists of a pathname and a set of actions valid for that pathname.
readYES but restrictions apply. See Restrictions.
writeNO
executeNO
deleteNO
readLinkYES
java.io.SerializablePermission

A SerializablePermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.
enableSubclassImplementationYES
enableSubstitutionNO
java.lang.management.ManagementPermission

Methods defined in the management interface for the Java platform
controlNO
monitorNO
java.lang.reflect.ReflectPermission

For reflective operations. A ReflectPermission is a named permission and has no actions
suppressAccessChecksNO
newProxyInPackage.{package name}NO
java.lang.RuntimePermission

Contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.
createClassLoaderNO
getClassLoaderYES
setContextClassLoaderYES
enableContextClassLoaderOverrideYES
closeClassLoaderNO
setSecurityManagerNO
createSecurityManagerNO
getenv.{variable name}NO
exitVM.{exit status}NO
shutdownHooksNO
setFactoryNO
setIONO
modifyThreadYES
stopThreadYES
modifyThreadGroupYES
getProtectionDomainYES
getFileSystemAttributesNO
readFileDescriptorYES
writeFileDescriptorNO
loadLibrary.{library name}NO
accessClassInPackage. {package name}YES
defineClassInPackage. {package name}NO
accessDeclaredMembersNO
queuePrintJobNO
getStackTraceNO
setDefaultUncaughtExceptionHandlerNO
preferencesNO
usePolicyNO
java.net.NetPermission

A NetPermission contains a name but no actions list; you either have the named permission or you don't.
setDefaultAuthenticatorNO
requestPasswordAuthenticationNO
specifyStreamHandlerYES
setProxySelectorNO
getProxySelectorNO
setCookieHandlerNO
getCookieHandlerNO
setResponseCacheNO
getResponseCacheNO
getNetworkInformationNO
java.net.SocketPermission

Represents access to a network via sockets. A SocketPermission consists of a host specification and a set of "actions" specifying ways to connect to that host.
host = (hostname | IPaddress)[:portrange]
portrange = portnumber | -portnumber | portnumber-[portnumber]

The possible ways to connect to the host are

accept
connect
listen
resolve

The "listen" action is only meaningful when used with "localhost". The "resolve" (resolve host/ip name service lookups) action is implied when any of the other actions are present.
resolveYES
connect

YES but restrictions apply. See Restrictions.

Apigee restricts access to sitelocal, anylocal, loopback, and linklocal addresses, as well as private IPv4 ranges defined in RFC1918.

listen,
accept
NO
java.net.URLPermission

Represents permission to access a resource or set of resources defined by a given url, and for a given set of user-settable request methods and request headers. The name of the permission is the url string. The actions string is a concatenation of the request methods and headers. The range of method and header names is not restricted by this class.
YES
LinkPermission

The Permission class for link creation operations.
hardNO
symbolicNO
java.security.SecurityPermission

A SecurityPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.
The target name is the name of a security configuration parameter (see below). Currently the SecurityPermission object is used to guard access to the Policy, Security, Provider, Signer, and Identity objects.
createAccessControlContextNO
getDomainCombinerNO
getPolicyNO
setPolicyNO
createPolicy.{policy type}NO
getProperty.{key}NO
setProperty.{key}NO
insertProviderNO
removeProvider.{provider name}NO
clearProviderProperties.{provider name}NO
putProviderProperty.{provider name}NO
removeProviderProperty.{provider name}NO
SQLPermissionsetLogNO
callAbortNO
setSyncFactoryNO
setNetworkTimeoutNO
deregisterDriverNO
java.util.logging.LoggingPermission

A SecurityManager will check the java.util.logging.LoggingPermission object when code running with a SecurityManager calls one of the logging control methods (such as Logger.setLevel).
controlNO
java.util.PropertyPermission
The name is the name of the property ("java.home", "os.name", etc). The naming convention follows the hierarchical property naming convention. Also, an asterisk may appear at the end of the name, following a ".", or by itself, to signify a wildcard match. For example: "java.*" or "*" is valid, "*java" or "a*b" is not valid.

The actions to be granted are passed to the constructor in a string containing a list of zero or more comma-separated keywords.
readYES
writeNO
javax.xml.ws.WebServicePermission
publishEndpointNO
javax.xml.bind.JAXBPermissionsetDatatypeConverterNO
javax.sound.sampled.AudioPermission

Access rights to the audio system resources.
playNO
recordNO
javax.security.auth.PrivateCredentialPermission

Protect access to private Credentials belonging to a particular Subject. The Subject is represented by a Set of Principals. The target name of this Permission specifies a Credential class name, and a Set of Principals. The only valid value for this Permission's actions is, "read".
CredentialClass {PrincipalClass "PrincipalName"}*NO
javax.security.auth.kerberos.ServicePermission

Protect Kerberos services and the credentials necessary to access those services.
initiateNO
acceptNO
javax.security.auth.kerberos.DelegationPermission

Used to restrict the usage of the Kerberos delegation model; ie, forwardable and proxiable tickets.

The target name of this Permission specifies a pair of kerberos service principals. The first is the subordinate service principal being entrusted to use the Ticket Granting Ticket (TGT). The second service principal designates the target service the subordinate service principal is to interact with on behalf of the initiating KerberosPrincipal.
initiateNO
acceptNO
javax.security.auth.AuthPermission

Currently the AuthPermission object is used to guard access to the Subject, SubjectDomainCombiner, LoginContext and Configuration objects.
doAsNO
doAsPrivilegedNO
getSubjectNO
getSubjectFromDomainCombinerNO
setReadOnlyNO
modifyPrincipalsNO
modifyPublicCredentialsNO
modifyPrivateCredentialsNO
refreshCredentialNO
destroyCredentialNO
createLoginContext.{name}NO
getLoginConfigurationNO
setLoginConfigurationNO
createLoginConfiguration.{configuration type}NO
refreshLoginConfigurationNO
javax.net.ssl.SSLPermission
setHostnameVerifierNO
getSSLSessionContextNO
setDefaultSSLContextNO
javax.management.MBeanPermission

Permission controlling access to MBeanServer operations. If a security manager has been set using System.setSecurityManager(java.lang.SecurityManager), most operations on the MBeanServer require that the caller's permissions imply an MBeanPermission appropriate for the operation.

action className#member[objectName]

If you have an MBeanPermission, it allows operations only if all four of the items match.
addNotificationListenerNO
getAttributeNO
getClassLoaderNO
getClassLoaderForNO
getClassLoaderRepositoryNO
getDomainsNO
getMBeanInfoNO
getObjectInstanceNO
instantiateNO
invokeNO
isInstanceOfNO
queryMBeansNO
queryNamesNO
registerMBeanNO
removeNotificationListenerNO
setAttributeNO
unregisterMBeanNO
javax.management.MBeanServerPermission
createMBeanServerNO
findMBeanServerNO
newMBeanServerNO
releaseMBeanServerNO
javax.management.MBeanTrustPermission

This permission represents "trust" in a signer or codebase.
registerNO
*NO
javax.management.remote.SubjectDelegationPermission
NO