/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
* See the License for the specific language governing permissions and | |
* limitations under the License. | |
*/ | |
// Sample file that our policy file parser should be able to process. | |
// Grants given to all applications. | |
grant { | |
//java.security.AllPermission; | |
//java.io.FilePermission "${serviceArchive}" "read"; | |
java.io.FilePermission "-" "read"; | |
java.net.SocketPermission "*" "connect,listen,accept,resolve"; | |
// Required for VFSFileManager | |
java.util.PropertyPermission "java.io.tmpdir" "read"; | |
java.util.PropertyPermission "os.*" "read"; | |
java.util.PropertyPermission "path.*" "read"; | |
java.lang.RuntimePermission "getClassLoader"; | |
java.lang.RuntimePermission "setContextClassLoader"; | |
/* net.jini.security.Security requires createSecurityManager, but we | |
don't grant 'setSecurityManager'. */ | |
java.lang.RuntimePermission "createSecurityManager"; | |
java.lang.RuntimePermission "getProtectionDomain"; | |
java.lang.RuntimePermission "setFactory"; | |
java.lang.RuntimePermission "modifyThread"; | |
java.lang.RuntimePermission "modifyThreadGroup"; | |
java.security.SecurityPermission "getDomainCombiner"; | |
java.security.SecurityPermission "createAccessControlContext"; | |
java.security.SecurityPermission "getPolicy"; | |
// BasicProxyPreparer requirements: | |
javax.security.auth.AuthPermission "getSubject"; | |
// Should not be required once UmbrellaGrantPolicy is implemented. | |
// TODO: Config file parser doesn't recognize \" | |
net.jini.security.GrantPermission "delim=| java.lang.RuntimePermission |accessClassInPackage.com.sun.proxy|"; | |
net.jini.security.policy.UmbrellaGrantPermission; | |
com.sun.jini.thread.ThreadPoolPermission "getSystemThreadPool"; | |
com.sun.jini.thread.ThreadPoolPermission "getUserThreadPool"; | |
com.sun.jini.discovery.internal.EndpointInternalsPermission "set"; | |
com.sun.jini.discovery.internal.EndpointInternalsPermission "get"; | |
java.lang.reflect.ReflectPermission "suppressAccessChecks"; | |
net.jini.export.ExportPermission "exportRemoteInterface.*"; | |
net.jini.discovery.DiscoveryPermission "*"; | |
java.lang.RuntimePermission "shutdownHooks"; | |
java.util.PropertyPermission "*" "read"; | |
java.lang.RuntimePermission "accessClassInPackage.com.sun.proxy"; | |
// Only in client configuration - apps can call System.exit() | |
java.lang.RuntimePermission "exitVM.*"; | |
} | |
classloader { | |
// Variables required to set up the application classloader. | |
//For a privileged application deployer, parent=containerClassLoader; | |
parent systemClassLoader; | |
jars { | |
commons-vfs2-2.0.jar, | |
commons-logging-1.1.1.jar, | |
jsk-platform-${jsk-version}.jar, | |
jsk-lib-${jsk-version}.jar, | |
jsk-resources-${jsk-version}.jar, | |
river-container-core-1.0-SNAPSHOT.jar(org.apache.river.container.liaison.Strings, | |
org.apache.river.container.liaison.VirtualFileSystemConfiguration, | |
org.apache.river.container.liaison.VirtualFileSystemConfiguration$MyConfigurationFile, | |
"META-INF/services/*") | |
} | |
codebase {jsk-dl-${jsk-version}.jar} | |
} | |
configuration { | |
// Anything on the left-hand side of '=' is set into the application config | |
// as a "special variable, accessible through '$name'. | |
discoveryGroup=defaultDiscoveryGroup; | |
// For privileged deployer, include | |
// context=context; | |
} |