jdk/test/java/net/httpclient/security/8.policy
changeset 42460 7133f144981a
parent 37791 ae33107fd8b3
child 46093 5d86e010d558
--- a/jdk/test/java/net/httpclient/security/8.policy	Fri Dec 09 17:01:03 2016 +0530
+++ b/jdk/test/java/net/httpclient/security/8.policy	Fri Dec 09 11:35:02 2016 +0000
@@ -21,3 +21,26 @@
     permission java.net.SocketPermission "127.0.0.1:1024-", "connect,resolve";
 };
 
+grant codeBase "jrt:/jdk.incubator.httpclient" {
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.net";
+    permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www";
+    permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc";
+
+    // ## why is SP not good enough. Check API @throws signatures and impl
+    permission java.net.SocketPermission "*","connect,resolve";
+    permission java.net.URLPermission "http:*","*:*";
+    permission java.net.URLPermission "https:*","*:*";
+    permission java.net.URLPermission "ws:*","*:*";
+    permission java.net.URLPermission "wss:*","*:*";
+    permission java.net.URLPermission "socket:*","CONNECT";  // proxy
+
+    // For request/response body processors, fromFile, asFile
+    permission java.io.FilePermission "<<ALL FILES>>","read,write";  // delete???
+
+    permission java.util.PropertyPermission "jdk.httpclient.*","read";
+
+    // ## these permissions do not appear in the NetPermission spec!!! JDK bug?
+    permission java.net.NetPermission "getSSLContext";
+    permission java.net.NetPermission "setSSLContext";
+};
+