jdk/src/java.base/share/conf/security/java.policy
author valeriep
Mon, 20 Oct 2014 21:18:48 +0000
changeset 27182 4525d13b8af1
parent 25859 3317bb8137f4
child 27565 729f9700483a
permissions -rw-r--r--
8046002: Move Ucrypto to the open jdk repo Summary: Move Ucrypto related sources, tests to openJDK Reviewed-by: mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     1
// permissions required by each component
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     2
grant codeBase "file:${java.home}/lib/ext/zipfs.jar" {
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     3
        permission java.io.FilePermission "<<ALL FILES>>", "read,write,delete";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     4
        permission java.lang.RuntimePermission "fileSystemProvider";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     5
        permission java.util.PropertyPermission "*", "read";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     6
};
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     8
grant codeBase "file:${java.home}/lib/ext/cldrdata.jar" {
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
     9
        permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    10
        permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    11
        permission java.util.PropertyPermission "*", "read";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    12
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    13
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    14
grant codeBase "file:${java.home}/lib/ext/localedata.jar" {
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    15
        permission java.lang.RuntimePermission "accessClassInPackage.sun.text.*";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    16
        permission java.lang.RuntimePermission "accessClassInPackage.sun.util.*";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    17
        permission java.util.PropertyPermission "*", "read";
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    18
};
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    20
grant codeBase "file:${java.home}/lib/ext/dnsns.jar" {
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    21
        permission java.security.AllPermission;
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    22
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    23
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    24
grant codeBase "file:${java.home}/lib/ext/nashorn.jar" {
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    25
        permission java.security.AllPermission;
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    26
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    27
27182
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    28
grant codeBase "file:${java.home}/lib/ext/ucrypto.jar" {
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    29
        permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    30
        permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    31
        permission java.lang.RuntimePermission "loadLibrary.j2ucrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    32
        // need "com.oracle.security.ucrypto.debug" for debugging
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    33
        permission java.util.PropertyPermission "*", "read";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    34
        permission java.security.SecurityPermission "putProviderProperty.OracleUcrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    35
        permission java.security.SecurityPermission "clearProviderProperties.OracleUcrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    36
        permission java.security.SecurityPermission "removeProviderProperty.OracleUcrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    37
        permission java.io.FilePermission "${java.home}/lib/security/ucrypto-solaris.cfg", "read";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    38
};
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    39
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    40
grant codeBase "file:${java.home}/lib/ext/sunec.jar" {
25408
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    41
        permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    42
        permission java.lang.RuntimePermission "loadLibrary.sunec";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    43
        permission java.util.PropertyPermission "*", "read";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    44
        permission java.security.SecurityPermission "putProviderProperty.SunEC";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    45
        permission java.security.SecurityPermission "clearProviderProperties.SunEC";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    46
        permission java.security.SecurityPermission "removeProviderProperty.SunEC";
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    47
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    48
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    49
grant codeBase "file:${java.home}/lib/ext/sunjce_provider.jar" {
25408
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    50
        permission java.lang.RuntimePermission "accessClassInPackage.sun.misc";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    51
        permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    52
        permission java.util.PropertyPermission "*", "read";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    53
        permission java.security.SecurityPermission "putProviderProperty.SunJCE";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    54
        permission java.security.SecurityPermission "clearProviderProperties.SunJCE";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    55
        permission java.security.SecurityPermission "removeProviderProperty.SunJCE";
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    56
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    57
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    58
grant codeBase "file:${java.home}/lib/ext/sunpkcs11.jar" {
25408
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    59
        permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    60
        permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    61
        permission java.lang.RuntimePermission "loadLibrary.j2pkcs11";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    62
        // needs "security.pkcs11.allowSingleThreadedModules"
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    63
        permission java.util.PropertyPermission "*", "read";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    64
        permission java.security.SecurityPermission "putProviderProperty.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    65
        permission java.security.SecurityPermission "clearProviderProperties.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    66
        permission java.security.SecurityPermission "removeProviderProperty.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    67
        permission java.security.SecurityPermission "getProperty.auth.login.defaultCallbackHandler";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    68
        permission java.security.SecurityPermission "authProvider.*";
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    69
        // Needed for reading PKCS11 config file and NSS library check
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    70
        permission java.io.FilePermission "<<ALL FILES>>", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
// default permissions granted to all domains
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    75
grant {
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    76
        // Allows any thread to stop itself using the java.lang.Thread.stop()
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    77
        // method that takes no argument.
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    78
        // Note that this permission is granted by default only to remain
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    79
        // backwards compatible.
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    80
        // It is strongly recommended that you either remove this permission
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    81
        // from this policy file or further restrict it to code sources
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    82
        // that you specify, because Thread.stop() is potentially unsafe.
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    83
        // See the API specification of java.lang.Thread.stop() for more
2183
8eb97a6368b8 6787130: java.policy file contains stale link to http://java.sun.com/notes
mullan
parents: 2
diff changeset
    84
        // information.
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    85
        permission java.lang.RuntimePermission "stopThread";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    87
        // allows anyone to listen on dynamic ports
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    88
        permission java.net.SocketPermission "localhost:0", "listen";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    90
        // "standard" properies that can be read by anyone
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    92
        permission java.util.PropertyPermission "java.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    93
        permission java.util.PropertyPermission "java.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    94
        permission java.util.PropertyPermission "java.vendor.url", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    95
        permission java.util.PropertyPermission "java.class.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    96
        permission java.util.PropertyPermission "os.name", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    97
        permission java.util.PropertyPermission "os.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    98
        permission java.util.PropertyPermission "os.arch", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    99
        permission java.util.PropertyPermission "file.separator", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   100
        permission java.util.PropertyPermission "path.separator", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   101
        permission java.util.PropertyPermission "line.separator", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   103
        permission java.util.PropertyPermission "java.specification.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   104
        permission java.util.PropertyPermission "java.specification.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   105
        permission java.util.PropertyPermission "java.specification.name", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   107
        permission java.util.PropertyPermission "java.vm.specification.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   108
        permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   109
        permission java.util.PropertyPermission "java.vm.specification.name", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   110
        permission java.util.PropertyPermission "java.vm.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   111
        permission java.util.PropertyPermission "java.vm.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
   112
        permission java.util.PropertyPermission "java.vm.name", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114