test/jdk/java/net/httpclient/security/0.policy
author dfuchs
Thu, 16 Nov 2017 19:56:44 +0000
branchhttp-client-branch
changeset 55821 fa0fc03c0853
parent 47216 71c04702a3d5
child 55856 038e64c3d92a
permissions -rw-r--r--
http-client-branch: HttpClient uses ProxySelector.getDefault() by default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36131
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     1
// Policy: 0
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     2
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     3
grant {
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     4
    // permissions common to all tests
37791
ae33107fd8b3 8155928: Remove hardcoded port numbers from httpclient/Security.java test
michaelm
parents: 36131
diff changeset
     5
    permission java.util.PropertyPermission "*", "read";
36131
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     6
    permission java.io.FilePermission "${test.classes}${/}-", "read,write,delete";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     7
    permission java.net.NetPermission "getDefaultHttpClient";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     8
    permission java.lang.RuntimePermission "modifyThread";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
     9
    permission java.util.logging.LoggingPermission "control", "";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    10
    permission java.net.SocketPermission "localhost:1024-", "accept,listen";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    11
    permission java.io.FilePermission "${test.src}${/}docs${/}-", "read";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    12
    permission java.lang.RuntimePermission "createClassLoader";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    13
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    14
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    15
    // permissions specific to this test
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    16
};
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    17
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    18
// For proxy only. Not being tested
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    19
grant codebase "file:${test.classes}/proxydir/-" {
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    20
    permission java.net.SocketPermission "localhost:1024-", "accept,listen,connect";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    21
    permission java.net.SocketPermission "127.0.0.1:1024-", "connect,resolve";
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    22
};
379db4b2f95d 8087112: HTTP API and HTTP/1.1 implementation
michaelm
parents:
diff changeset
    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";
55821
fa0fc03c0853 http-client-branch: HttpClient uses ProxySelector.getDefault() by default
dfuchs
parents: 47216
diff changeset
    46
    permission java.net.NetPermission "getProxySelector";
42460
7133f144981a 8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents: 37791
diff changeset
    47
};
7133f144981a 8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents: 37791
diff changeset
    48