48083
|
1 |
//
|
|
2 |
// Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
|
|
3 |
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4 |
//
|
|
5 |
// This code is free software; you can redistribute it and/or modify it
|
|
6 |
// under the terms of the GNU General Public License version 2 only, as
|
|
7 |
// published by the Free Software Foundation.
|
|
8 |
//
|
|
9 |
// This code is distributed in the hope that it will be useful, but WITHOUT
|
|
10 |
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
11 |
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
12 |
// version 2 for more details (a copy is included in the LICENSE file that
|
|
13 |
// accompanied this code).
|
|
14 |
//
|
|
15 |
// You should have received a copy of the GNU General Public License version
|
|
16 |
// 2 along with this work; if not, write to the Free Software Foundation,
|
|
17 |
// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
18 |
//
|
|
19 |
// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
20 |
// or visit www.oracle.com if you need additional information or have any
|
|
21 |
// questions.
|
|
22 |
//
|
|
23 |
|
|
24 |
grant codeBase "jrt:/jdk.incubator.httpclient" {
|
|
25 |
permission java.lang.RuntimePermission "accessClassInPackage.sun.net";
|
|
26 |
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.util";
|
|
27 |
permission java.lang.RuntimePermission "accessClassInPackage.sun.net.www";
|
|
28 |
permission java.lang.RuntimePermission "accessClassInPackage.jdk.internal.misc";
|
|
29 |
|
|
30 |
// ## why is SP not good enough. Check API @throws signatures and impl
|
|
31 |
permission java.net.SocketPermission "*","connect,resolve";
|
|
32 |
permission java.net.URLPermission "http:*","*:*";
|
|
33 |
permission java.net.URLPermission "https:*","*:*";
|
|
34 |
permission java.net.URLPermission "ws:*","*:*";
|
|
35 |
permission java.net.URLPermission "wss:*","*:*";
|
|
36 |
permission java.net.URLPermission "socket:*","CONNECT"; // proxy
|
|
37 |
|
|
38 |
// For request/response body processors, fromFile, asFile
|
|
39 |
permission java.io.FilePermission "<<ALL FILES>>","read,write,delete";
|
|
40 |
|
|
41 |
// ## look at the different property names!
|
|
42 |
permission java.util.PropertyPermission "jdk.httpclient.HttpClient.log","read"; // name!
|
|
43 |
permission java.util.PropertyPermission "jdk.httpclient.auth.retrylimit","read";
|
|
44 |
permission java.util.PropertyPermission "jdk.httpclient.connectionWindowSize","read";
|
|
45 |
permission java.util.PropertyPermission "jdk.httpclient.enablepush","read";
|
|
46 |
permission java.util.PropertyPermission "jdk.httpclient.hpack.maxheadertablesize","read";
|
|
47 |
permission java.util.PropertyPermission "jdk.httpclient.keepalive.timeout","read";
|
|
48 |
permission java.util.PropertyPermission "jdk.httpclient.maxframesize","read";
|
|
49 |
permission java.util.PropertyPermission "jdk.httpclient.maxstreams","read";
|
|
50 |
permission java.util.PropertyPermission "jdk.httpclient.redirects.retrylimit","read";
|
|
51 |
permission java.util.PropertyPermission "jdk.httpclient.windowsize","read";
|
|
52 |
permission java.util.PropertyPermission "jdk.httpclient.bufsize","read";
|
|
53 |
permission java.util.PropertyPermission "jdk.httpclient.internal.selector.timeout","read";
|
|
54 |
permission java.util.PropertyPermission "jdk.internal.httpclient.debug","read";
|
|
55 |
permission java.util.PropertyPermission "jdk.internal.httpclient.hpack.debug","read";
|
|
56 |
permission java.util.PropertyPermission "jdk.internal.httpclient.hpack.log.level","read";
|
|
57 |
permission java.util.PropertyPermission "test.src","read";
|
|
58 |
|
|
59 |
permission java.net.NetPermission "getProxySelector";
|
|
60 |
|
|
61 |
permission java.security.SecurityPermission "createAccessControlContext";
|
|
62 |
};
|
|
63 |
|
|
64 |
// bootstrap to get the test going, it will do its own restrictions
|
|
65 |
grant codeBase "file:${test.classes}/*" {
|
|
66 |
permission java.security.AllPermission;
|
|
67 |
};
|
|
68 |
|