blob: c37bb480eb68bcb66cba7eebc0bbd407956fac58 [file] [log] [blame]
duke6e45e102007-12-01 00:00:00 +00001#
2# This is the "master security properties file".
3#
mullan68000592012-07-03 14:56:58 -04004# An alternate java.security properties file may be specified
5# from the command line via the system property
6#
7# -Djava.security.properties=<URL>
8#
9# This properties file appends to the master security properties file.
10# If both properties files specify values for the same key, the value
11# from the command-line properties file is selected, as it is the last
12# one loaded.
13#
14# Also, if you specify
15#
16# -Djava.security.properties==<URL> (2 equals),
17#
18# then that properties file completely overrides the master security
19# properties file.
20#
21# To disable the ability to specify an additional properties file from
22# the command line, set the key security.overridePropertiesFile
23# to false in the master security properties file. It is set to true
24# by default.
25
duke6e45e102007-12-01 00:00:00 +000026# In this file, various security properties are set for use by
27# java.security classes. This is where users can statically register
28# Cryptography Package Providers ("providers" for short). The term
29# "provider" refers to a package or set of packages that supply a
30# concrete implementation of a subset of the cryptography aspects of
31# the Java Security API. A provider may, for example, implement one or
32# more digital signature algorithms or message digest algorithms.
33#
34# Each provider must implement a subclass of the Provider class.
35# To register a provider in this master security properties file,
36# specify the Provider subclass name and priority in the format
37#
38# security.provider.<n>=<className>
39#
40# This declares a provider, and specifies its preference
41# order n. The preference order is the order in which providers are
42# searched for requested algorithms (when no specific provider is
43# requested). The order is 1-based; 1 is the most preferred, followed
44# by 2, and so on.
45#
46# <className> must specify the subclass of the Provider class whose
47# constructor sets the values of various properties that are required
48# for the Java Security API to look up the algorithms or other
49# facilities implemented by the provider.
50#
51# There must be at least one provider specification in java.security.
52# There is a default provider that comes standard with the JDK. It
53# is called the "SUN" provider, and its Provider subclass
54# named Sun appears in the sun.security.provider package. Thus, the
55# "SUN" provider is registered via the following:
56#
57# security.provider.1=sun.security.provider.Sun
58#
59# (The number 1 is used for the default provider.)
60#
61# Note: Providers can be dynamically registered instead by calls to
62# either the addProvider or insertProviderAt method in the Security
63# class.
64
65#
66# List of providers and their preference orders (see above):
67#
68security.provider.1=sun.security.provider.Sun
69security.provider.2=sun.security.rsa.SunRsaSign
vinnieed355ab2009-08-11 16:52:26 +010070security.provider.3=sun.security.ec.SunEC
71security.provider.4=com.sun.net.ssl.internal.ssl.Provider
72security.provider.5=com.sun.crypto.provider.SunJCE
73security.provider.6=sun.security.jgss.SunProvider
74security.provider.7=com.sun.security.sasl.Provider
75security.provider.8=org.jcp.xml.dsig.internal.dom.XMLDSigRI
76security.provider.9=sun.security.smartcardio.SunPCSC
duke6e45e102007-12-01 00:00:00 +000077
78#
79# Select the source of seed data for SecureRandom. By default an
weijun0f0fb6a2009-12-24 13:56:19 +080080# attempt is made to use the entropy gathering device specified by
duke6e45e102007-12-01 00:00:00 +000081# the securerandom.source property. If an exception occurs when
weijun0f0fb6a2009-12-24 13:56:19 +080082# accessing the URL then the traditional system/thread activity
83# algorithm is used.
duke6e45e102007-12-01 00:00:00 +000084#
85# On Solaris and Linux systems, if file:/dev/urandom is specified and it
86# exists, a special SecureRandom implementation is activated by default.
87# This "NativePRNG" reads random bytes directly from /dev/urandom.
88#
89# On Windows systems, the URLs file:/dev/random and file:/dev/urandom
90# enables use of the Microsoft CryptoAPI seed functionality.
91#
92securerandom.source=file:/dev/urandom
93#
94# The entropy gathering device is described as a URL and can also
95# be specified with the system property "java.security.egd". For example,
96# -Djava.security.egd=file:/dev/urandom
weijun0f0fb6a2009-12-24 13:56:19 +080097# Specifying this system property will override the securerandom.source
duke6e45e102007-12-01 00:00:00 +000098# setting.
99
100#
101# Class to instantiate as the javax.security.auth.login.Configuration
102# provider.
103#
104login.configuration.provider=com.sun.security.auth.login.ConfigFile
105
106#
107# Default login configuration file
108#
109#login.config.url.1=file:${user.home}/.java.login.config
110
111#
112# Class to instantiate as the system Policy. This is the name of the class
113# that will be used as the Policy object.
114#
115policy.provider=sun.security.provider.PolicyFile
116
117# The default is to have a single system-wide policy file,
118# and a policy file in the user's home directory.
119policy.url.1=file:${java.home}/lib/security/java.policy
120policy.url.2=file:${user.home}/.java.policy
121
122# whether or not we expand properties in the policy file
123# if this is set to false, properties (${...}) will not be expanded in policy
124# files.
125policy.expandProperties=true
126
127# whether or not we allow an extra policy to be passed on the command line
128# with -Djava.security.policy=somefile. Comment out this line to disable
129# this feature.
130policy.allowSystemProperty=true
131
132# whether or not we look into the IdentityScope for trusted Identities
133# when encountering a 1.1 signed JAR file. If the identity is found
134# and is trusted, we grant it AllPermission.
135policy.ignoreIdentityScope=false
136
137#
138# Default keystore type.
139#
140keystore.type=jks
141
142#
duke6e45e102007-12-01 00:00:00 +0000143# List of comma-separated packages that start with or equal this string
144# will cause a security exception to be thrown when
145# passed to checkPackageAccess unless the
146# corresponding RuntimePermission ("accessClassInPackage."+package) has
147# been granted.
ewendeli69845692013-01-28 11:07:07 +0100148package.access=sun.,\
149 com.sun.xml.internal.bind.,\
150 com.sun.xml.internal.org.jvnet.staxex.,\
151 com.sun.xml.internal.ws.,\
152 com.sun.imageio.,\
153 com.sun.istack.internal.,\
154 com.sun.jmx.defaults.,\
155 com.sun.jmx.remote.util.,\
mchung1cdf5492013-01-28 15:53:29 -0800156 com.sun.proxy.,\
ewendeli69845692013-01-28 11:07:07 +0100157 com.sun.org.apache.xerces.internal.utils.,\
158 com.sun.org.apache.xalan.internal.utils.,\
159 com.sun.org.glassfish.external.,\
160 com.sun.org.glassfish.gmbal.,\
161 jdk.internal.
duke6e45e102007-12-01 00:00:00 +0000162
163#
164# List of comma-separated packages that start with or equal this string
165# will cause a security exception to be thrown when
166# passed to checkPackageDefinition unless the
167# corresponding RuntimePermission ("defineClassInPackage."+package) has
168# been granted.
169#
mullanee9229d2012-02-22 15:38:24 -0500170# by default, none of the class loaders supplied with the JDK call
171# checkPackageDefinition.
duke6e45e102007-12-01 00:00:00 +0000172#
ewendeli69845692013-01-28 11:07:07 +0100173package.definition=sun.,\
174 com.sun.xml.internal.bind.,\
175 com.sun.xml.internal.org.jvnet.staxex.,\
176 com.sun.xml.internal.ws.,\
177 com.sun.imageio.,\
178 com.sun.istack.internal.,\
179 com.sun.jmx.defaults.,\
180 com.sun.jmx.remote.util.,\
mchung1cdf5492013-01-28 15:53:29 -0800181 com.sun.proxy.,\
ewendeli69845692013-01-28 11:07:07 +0100182 com.sun.org.apache.xerces.internal.utils.,\
183 com.sun.org.apache.xalan.internal.utils.,\
184 com.sun.org.glassfish.external.,\
185 com.sun.org.glassfish.gmbal.,\
186 jdk.internal.
duke6e45e102007-12-01 00:00:00 +0000187
188#
189# Determines whether this properties file can be appended to
190# or overridden on the command line via -Djava.security.properties
191#
192security.overridePropertiesFile=true
193
194#
weijun0f0fb6a2009-12-24 13:56:19 +0800195# Determines the default key and trust manager factory algorithms for
duke6e45e102007-12-01 00:00:00 +0000196# the javax.net.ssl package.
197#
198ssl.KeyManagerFactory.algorithm=SunX509
199ssl.TrustManagerFactory.algorithm=PKIX
200
201#
202# The Java-level namelookup cache policy for successful lookups:
203#
204# any negative value: caching forever
205# any positive value: the number of seconds to cache an address for
206# zero: do not cache
207#
208# default value is forever (FOREVER). For security reasons, this
209# caching is made forever when a security manager is set. When a security
210# manager is not set, the default behavior in this implementation
211# is to cache for 30 seconds.
212#
213# NOTE: setting this to anything other than the default value can have
weijun0f0fb6a2009-12-24 13:56:19 +0800214# serious security implications. Do not set it unless
duke6e45e102007-12-01 00:00:00 +0000215# you are sure you are not exposed to DNS spoofing attack.
216#
weijun0f0fb6a2009-12-24 13:56:19 +0800217#networkaddress.cache.ttl=-1
duke6e45e102007-12-01 00:00:00 +0000218
219# The Java-level namelookup cache policy for failed lookups:
220#
221# any negative value: cache forever
222# any positive value: the number of seconds to cache negative lookup results
223# zero: do not cache
224#
225# In some Microsoft Windows networking environments that employ
226# the WINS name service in addition to DNS, name service lookups
227# that fail may take a noticeably long time to return (approx. 5 seconds).
228# For this reason the default caching policy is to maintain these
weijun0f0fb6a2009-12-24 13:56:19 +0800229# results for 10 seconds.
duke6e45e102007-12-01 00:00:00 +0000230#
231#
232networkaddress.cache.negative.ttl=10
233
234#
235# Properties to configure OCSP for certificate revocation checking
236#
237
weijun0f0fb6a2009-12-24 13:56:19 +0800238# Enable OCSP
duke6e45e102007-12-01 00:00:00 +0000239#
240# By default, OCSP is not used for certificate revocation checking.
241# This property enables the use of OCSP when set to the value "true".
242#
243# NOTE: SocketPermission is required to connect to an OCSP responder.
244#
245# Example,
246# ocsp.enable=true
weijun0f0fb6a2009-12-24 13:56:19 +0800247
duke6e45e102007-12-01 00:00:00 +0000248#
249# Location of the OCSP responder
250#
251# By default, the location of the OCSP responder is determined implicitly
252# from the certificate being validated. This property explicitly specifies
253# the location of the OCSP responder. The property is used when the
254# Authority Information Access extension (defined in RFC 3280) is absent
255# from the certificate or when it requires overriding.
256#
257# Example,
258# ocsp.responderURL=http://ocsp.example.net:80
weijun0f0fb6a2009-12-24 13:56:19 +0800259
duke6e45e102007-12-01 00:00:00 +0000260#
261# Subject name of the OCSP responder's certificate
262#
263# By default, the certificate of the OCSP responder is that of the issuer
264# of the certificate being validated. This property identifies the certificate
weijun0f0fb6a2009-12-24 13:56:19 +0800265# of the OCSP responder when the default does not apply. Its value is a string
266# distinguished name (defined in RFC 2253) which identifies a certificate in
267# the set of certificates supplied during cert path validation. In cases where
duke6e45e102007-12-01 00:00:00 +0000268# the subject name alone is not sufficient to uniquely identify the certificate
269# then both the "ocsp.responderCertIssuerName" and
270# "ocsp.responderCertSerialNumber" properties must be used instead. When this
271# property is set then those two properties are ignored.
272#
273# Example,
274# ocsp.responderCertSubjectName="CN=OCSP Responder, O=XYZ Corp"
275
276#
277# Issuer name of the OCSP responder's certificate
278#
279# By default, the certificate of the OCSP responder is that of the issuer
280# of the certificate being validated. This property identifies the certificate
281# of the OCSP responder when the default does not apply. Its value is a string
282# distinguished name (defined in RFC 2253) which identifies a certificate in
weijun0f0fb6a2009-12-24 13:56:19 +0800283# the set of certificates supplied during cert path validation. When this
284# property is set then the "ocsp.responderCertSerialNumber" property must also
285# be set. When the "ocsp.responderCertSubjectName" property is set then this
duke6e45e102007-12-01 00:00:00 +0000286# property is ignored.
287#
288# Example,
289# ocsp.responderCertIssuerName="CN=Enterprise CA, O=XYZ Corp"
weijun0f0fb6a2009-12-24 13:56:19 +0800290
duke6e45e102007-12-01 00:00:00 +0000291#
292# Serial number of the OCSP responder's certificate
293#
294# By default, the certificate of the OCSP responder is that of the issuer
295# of the certificate being validated. This property identifies the certificate
296# of the OCSP responder when the default does not apply. Its value is a string
297# of hexadecimal digits (colon or space separators may be present) which
298# identifies a certificate in the set of certificates supplied during cert path
299# validation. When this property is set then the "ocsp.responderCertIssuerName"
300# property must also be set. When the "ocsp.responderCertSubjectName" property
301# is set then this property is ignored.
302#
303# Example,
304# ocsp.responderCertSerialNumber=2A:FF:00
weijun0f0fb6a2009-12-24 13:56:19 +0800305
306#
307# Policy for failed Kerberos KDC lookups:
308#
309# When a KDC is unavailable (network error, service failure, etc), it is
310# put inside a blacklist and accessed less often for future requests. The
311# value (case-insensitive) for this policy can be:
312#
313# tryLast
314# KDCs in the blacklist are always tried after those not on the list.
315#
316# tryLess[:max_retries,timeout]
317# KDCs in the blacklist are still tried by their order in the configuration,
318# but with smaller max_retries and timeout values. max_retries and timeout
319# are optional numerical parameters (default 1 and 5000, which means once
320# and 5 seconds). Please notes that if any of the values defined here is
321# more than what is defined in krb5.conf, it will be ignored.
322#
323# Whenever a KDC is detected as available, it is removed from the blacklist.
324# The blacklist is reset when krb5.conf is reloaded. You can add
325# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
326# reloaded whenever a JAAS authentication is attempted.
327#
328# Example,
329# krb5.kdc.bad.policy = tryLast
330# krb5.kdc.bad.policy = tryLess:2,2000
331krb5.kdc.bad.policy = tryLast
332
xuelei42dd6452010-11-01 07:57:46 -0700333# Algorithm restrictions for certification path (CertPath) processing
334#
335# In some environments, certain algorithms or key lengths may be undesirable
336# for certification path building and validation. For example, "MD2" is
337# generally no longer considered to be a secure hash algorithm. This section
338# describes the mechanism for disabling algorithms based on algorithm name
339# and/or key length. This includes algorithms used in certificates, as well
340# as revocation information such as CRLs and signed OCSP Responses.
341#
342# The syntax of the disabled algorithm string is described as this Java
343# BNF-style:
344# DisabledAlgorithms:
345# " DisabledAlgorithm { , DisabledAlgorithm } "
346#
347# DisabledAlgorithm:
348# AlgorithmName [Constraint]
349#
350# AlgorithmName:
351# (see below)
352#
353# Constraint:
354# KeySizeConstraint
355#
356# KeySizeConstraint:
357# keySize Operator DecimalInteger
358#
359# Operator:
360# <= | < | == | != | >= | >
361#
362# DecimalInteger:
363# DecimalDigits
364#
365# DecimalDigits:
366# DecimalDigit {DecimalDigit}
367#
368# DecimalDigit: one of
369# 1 2 3 4 5 6 7 8 9 0
370#
371# The "AlgorithmName" is the standard algorithm name of the disabled
372# algorithm. See "Java Cryptography Architecture Standard Algorithm Name
373# Documentation" for information about Standard Algorithm Names. Matching
374# is performed using a case-insensitive sub-element matching rule. (For
375# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
376# "ECDSA" for signatures.) If the assertion "AlgorithmName" is a
377# sub-element of the certificate algorithm name, the algorithm will be
378# rejected during certification path building and validation. For example,
379# the assertion algorithm name "DSA" will disable all certificate algorithms
380# that rely on DSA, such as NONEwithDSA, SHA1withDSA. However, the assertion
381# will not disable algorithms related to "ECDSA".
382#
383# A "Constraint" provides further guidance for the algorithm being specified.
384# The "KeySizeConstraint" requires a key of a valid size range if the
385# "AlgorithmName" is of a key algorithm. The "DecimalInteger" indicates the
386# key size specified in number of bits. For example, "RSA keySize <= 1024"
387# indicates that any RSA key with key size less than or equal to 1024 bits
388# should be disabled, and "RSA keySize < 1024, RSA keySize > 2048" indicates
389# that any RSA key with key size less than 1024 or greater than 2048 should
390# be disabled. Note that the "KeySizeConstraint" only makes sense to key
391# algorithms.
392#
393# Note: This property is currently used by Oracle's PKIX implementation. It
394# is not guaranteed to be examined and used by other implementations.
395#
396# Example:
397# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
398#
399#
xuelei7b2dfe72012-12-28 00:48:12 -0800400jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
xuelei42dd6452010-11-01 07:57:46 -0700401
402# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
403# (SSL/TLS) processing
404#
405# In some environments, certain algorithms or key lengths may be undesirable
406# when using SSL/TLS. This section describes the mechanism for disabling
407# algorithms during SSL/TLS security parameters negotiation, including cipher
408# suites selection, peer authentication and key exchange mechanisms.
409#
410# For PKI-based peer authentication and key exchange mechanisms, this list
411# of disabled algorithms will also be checked during certification path
412# building and validation, including algorithms used in certificates, as
413# well as revocation information such as CRLs and signed OCSP Responses.
414# This is in addition to the jdk.certpath.disabledAlgorithms property above.
415#
416# See the specification of "jdk.certpath.disabledAlgorithms" for the
417# syntax of the disabled algorithm string.
418#
419# Note: This property is currently used by Oracle's JSSE implementation.
420# It is not guaranteed to be examined and used by other implementations.
421#
422# Example:
423# jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize < 2048
424