jdk/src/java.base/share/conf/security/java.policy
author chegar
Wed, 03 Dec 2014 14:22:58 +0000
changeset 27565 729f9700483a
parent 27182 4525d13b8af1
child 28849 ccf9d86e52ec
permissions -rw-r--r--
8049367: Modular Run-Time Images Reviewed-by: chegar, dfuchs, ihse, joehw, mullan, psandoz, wetmore Contributed-by: alan.bateman@oracle.com, alex.buckley@oracle.com, bradford.wetmore@oracle.com, chris.hegarty@oracle.com, erik.joelsson@oracle.com, james.laskey@oracle.com, jonathan.gibbons@oracle.com, karen.kinnear@oracle.com, magnus.ihse.bursie@oracle.com, mandy.chung@oracle.com, mark.reinhold@oracle.com, paul.sandoz@oracle.com, sundararajan.athijegannathan@oracle.com
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
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
     2
grant codeBase "jrt:/jdk.zipfs" {
24364
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
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
     8
grant codeBase "jrt:/jdk.localedata" {
24364
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
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
    14
grant codeBase "jrt:/jdk.naming.dns" {
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    15
        permission java.security.AllPermission;
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    16
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    17
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
    18
grant codeBase "jrt:/jdk.scripting.nashorn" {
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    19
        permission java.security.AllPermission;
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    20
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    21
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
    22
grant codeBase "jrt:/jdk.crypto.ucrypto" {
27182
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    23
        permission java.lang.RuntimePermission "accessClassInPackage.sun.security.*";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    24
        permission java.lang.RuntimePermission "accessClassInPackage.sun.nio.ch";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    25
        permission java.lang.RuntimePermission "loadLibrary.j2ucrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    26
        // need "com.oracle.security.ucrypto.debug" for debugging
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    27
        permission java.util.PropertyPermission "*", "read";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    28
        permission java.security.SecurityPermission "putProviderProperty.OracleUcrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    29
        permission java.security.SecurityPermission "clearProviderProperties.OracleUcrypto";
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    30
        permission java.security.SecurityPermission "removeProviderProperty.OracleUcrypto";
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
    31
        permission java.io.FilePermission "${java.home}/conf/security/ucrypto-solaris.cfg", "read";
27182
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    32
};
4525d13b8af1 8046002: Move Ucrypto to the open jdk repo
valeriep
parents: 25859
diff changeset
    33
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
    34
grant codeBase "jrt:/jdk.crypto.ec" {
25408
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    35
        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
    36
        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
    37
        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
    38
        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
    39
        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
    40
        permission java.security.SecurityPermission "removeProviderProperty.SunEC";
24364
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    41
};
da8afb112f5d 8040059: Change default policy for extensions to no permission
mchung
parents: 22339
diff changeset
    42
27565
729f9700483a 8049367: Modular Run-Time Images
chegar
parents: 27182
diff changeset
    43
grant codeBase "jrt:/jdk.crypto.pkcs11" {
25408
27563093d2d2 8043406: Change default policy for JCE providers to run with as few privileges as possible
valeriep
parents: 24364
diff changeset
    44
        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
    45
        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
    46
        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
    47
        // 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
    48
        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
    49
        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
    50
        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
    51
        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
    52
        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
    53
        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
    54
        // 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
    55
        permission java.io.FilePermission "<<ALL FILES>>", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
// default permissions granted to all domains
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    60
grant {
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    61
        // Allows any thread to stop itself using the java.lang.Thread.stop()
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    62
        // method that takes no argument.
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    63
        // Note that this permission is granted by default only to remain
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    64
        // backwards compatible.
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    65
        // It is strongly recommended that you either remove this permission
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    66
        // from this policy file or further restrict it to code sources
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    67
        // that you specify, because Thread.stop() is potentially unsafe.
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    68
        // 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
    69
        // information.
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    70
        permission java.lang.RuntimePermission "stopThread";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    72
        // allows anyone to listen on dynamic ports
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    73
        permission java.net.SocketPermission "localhost:0", "listen";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    75
        // "standard" properies that can be read by anyone
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    77
        permission java.util.PropertyPermission "java.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    78
        permission java.util.PropertyPermission "java.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    79
        permission java.util.PropertyPermission "java.vendor.url", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    80
        permission java.util.PropertyPermission "java.class.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    81
        permission java.util.PropertyPermission "os.name", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    82
        permission java.util.PropertyPermission "os.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    83
        permission java.util.PropertyPermission "os.arch", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    84
        permission java.util.PropertyPermission "file.separator", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    85
        permission java.util.PropertyPermission "path.separator", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    86
        permission java.util.PropertyPermission "line.separator", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
22339
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    88
        permission java.util.PropertyPermission "java.specification.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    89
        permission java.util.PropertyPermission "java.specification.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    90
        permission java.util.PropertyPermission "java.specification.name", "read";
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.vm.specification.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    93
        permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    94
        permission java.util.PropertyPermission "java.vm.specification.name", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    95
        permission java.util.PropertyPermission "java.vm.version", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    96
        permission java.util.PropertyPermission "java.vm.vendor", "read";
e91bfaf4360d 8011786: Better applet networking
michaelm
parents: 2183
diff changeset
    97
        permission java.util.PropertyPermission "java.vm.name", "read";
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
};
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99