author | dfuchs |
Fri, 04 Aug 2017 10:54:48 +0100 | |
changeset 46093 | 5d86e010d558 |
parent 42460 | 7133f144981a |
permissions | -rw-r--r-- |
36131 | 1 |
// Policy 2 |
2 |
grant { |
|
3 |
// permissions common to all tests |
|
37791
ae33107fd8b3
8155928: Remove hardcoded port numbers from httpclient/Security.java test
michaelm
parents:
36131
diff
changeset
|
4 |
permission java.util.PropertyPermission "*", "read"; |
36131 | 5 |
permission java.io.FilePermission "${test.classes}${/}-", "read,write,delete"; |
6 |
permission java.net.NetPermission "getDefaultHttpClient"; |
|
7 |
permission java.lang.RuntimePermission "modifyThread"; |
|
8 |
permission java.util.logging.LoggingPermission "control", ""; |
|
9 |
permission java.net.SocketPermission "localhost:1024-", "accept,listen"; |
|
10 |
permission java.io.FilePermission "${test.src}${/}docs${/}-", "read"; |
|
11 |
permission java.lang.RuntimePermission "createClassLoader"; |
|
12 |
||
13 |
||
14 |
// permissions specific to this test |
|
15 |
permission java.net.URLPermission "http://127.0.0.1:*/files/*", "GET"; |
|
16 |
}; |
|
17 |
||
18 |
// For proxy only. Not being tested |
|
19 |
grant codebase "file:${test.classes}/proxydir/-" { |
|
20 |
permission java.net.SocketPermission "localhost:1024-", "accept,listen,connect"; |
|
21 |
permission java.net.SocketPermission "127.0.0.1:1024-", "connect,resolve"; |
|
22 |
}; |
|
23 |
||
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
24 |
grant codeBase "jrt:/jdk.incubator.httpclient" { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
25 |
permission java.lang.RuntimePermission "accessClassInPackage.sun.net"; |
46093
5d86e010d558
8185794: java/net/httpclient/security/Driver.java fails in timeout
dfuchs
parents:
42460
diff
changeset
|
26 |
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.util"; |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
27 |
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
28 |
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
29 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
30 |
// ## why is SP not good enough. Check API @throws signatures and impl |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
31 |
permission java.net.SocketPermission "*","connect,resolve"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
32 |
permission java.net.URLPermission "http:*","*:*"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
33 |
permission java.net.URLPermission "https:*","*:*"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
34 |
permission java.net.URLPermission "ws:*","*:*"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
35 |
permission java.net.URLPermission "wss:*","*:*"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
36 |
permission java.net.URLPermission "socket:*","CONNECT"; // proxy |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
37 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
38 |
// For request/response body processors, fromFile, asFile |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
39 |
permission java.io.FilePermission "<<ALL FILES>>","read,write"; // delete??? |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
40 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
41 |
permission java.util.PropertyPermission "jdk.httpclient.*","read"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
42 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
43 |
// ## these permissions do not appear in the NetPermission spec!!! JDK bug? |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
44 |
permission java.net.NetPermission "getSSLContext"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
45 |
permission java.net.NetPermission "setSSLContext"; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
46 |
}; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
37791
diff
changeset
|
47 |