codekingpro/portable-devtools
115k
1#
2# This is the "master security properties file".
3#
4# 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#
26# If this properties file fails to load, the JDK implementation will throw
27# an unspecified error when initializing the java.security.Security class.
28# Properties in this file are typically parsed only once. If any of the
29# properties are modified, applications should be restarted to ensure the
30# changes are properly reflected.
31
32# In this file, various security properties are set for use by
33# java.security classes. This is where users can statically register
34# Cryptography Package Providers ("providers" for short). The term
35# "provider" refers to a package or set of packages that supply a
36# concrete implementation of a subset of the cryptography aspects of
37# the Java Security API. A provider may, for example, implement one or
38# more digital signature algorithms or message digest algorithms.
39#
40# Each provider must implement a subclass of the Provider class.
41# To register a provider in this master security properties file,
42# specify the provider and priority in the format
43#
44# security.provider.<n>=<provName | className>
45#
46# This declares a provider, and specifies its preference
47# order n. The preference order is the order in which providers are
48# searched for requested algorithms (when no specific provider is
49# requested). The order is 1-based; 1 is the most preferred, followed
50# by 2, and so on.
51#
52# <provName> must specify the name of the Provider as passed to its super
53# class java.security.Provider constructor. This is for providers loaded
54# through the ServiceLoader mechanism.
55#
56# <className> must specify the subclass of the Provider class whose
57# constructor sets the values of various properties that are required
58# for the Java Security API to look up the algorithms or other
59# facilities implemented by the provider. This is for providers loaded
60# through classpath.
61#
62# Note: Providers can be dynamically registered instead by calls to
63# either the addProvider or insertProviderAt method in the Security
64# class.
65
66#
67# List of providers and their preference orders (see above):
68#
69security.provider.1=SUN
70security.provider.2=SunRsaSign
71security.provider.3=SunEC
72security.provider.4=SunJSSE
73security.provider.5=SunJCE
74security.provider.6=SunJGSS
75security.provider.7=SunSASL
76security.provider.8=XMLDSig
77security.provider.9=SunPCSC
78security.provider.10=JdkLDAP
79security.provider.11=JdkSASL
80security.provider.12=SunMSCAPI
81security.provider.13=SunPKCS11
82
83#
84# A list of preferred providers for specific algorithms. These providers will
85# be searched for matching algorithms before the list of registered providers.
86# Entries containing errors (parsing, etc) will be ignored. Use the
87# -Djava.security.debug=jca property to debug these errors.
88#
89# The property is a comma-separated list of serviceType.algorithm:provider
90# entries. The serviceType (example: "MessageDigest") is optional, and if
91# not specified, the algorithm applies to all service types that support it.
92# The algorithm is the standard algorithm name or transformation.
93# Transformations can be specified in their full standard name
94# (ex: AES/CBC/PKCS5Padding), or as partial matches (ex: AES, AES/CBC).
95# The provider is the name of the provider. Any provider that does not
96# also appear in the registered list will be ignored.
97#
98# There is a special serviceType for this property only to group a set of
99# algorithms together. The type is "Group" and is followed by an algorithm
100# keyword. Groups are to simplify and lessen the entries on the property
101# line. Current groups are:
102# Group.SHA2 = SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224, SHA-512/256
103# Group.HmacSHA2 = HmacSHA224, HmacSHA256, HmacSHA384, HmacSHA512
104# Group.SHA2RSA = SHA224withRSA, SHA256withRSA, SHA384withRSA, SHA512withRSA
105# Group.SHA2DSA = SHA224withDSA, SHA256withDSA, SHA384withDSA, SHA512withDSA
106# Group.SHA2ECDSA = SHA224withECDSA, SHA256withECDSA, SHA384withECDSA, \
107# SHA512withECDSA
108# Group.SHA3 = SHA3-224, SHA3-256, SHA3-384, SHA3-512
109# Group.HmacSHA3 = HmacSHA3-224, HmacSHA3-256, HmacSHA3-384, HmacSHA3-512
110#
111# Example:
112# jdk.security.provider.preferred=AES/GCM/NoPadding:SunJCE, \
113# MessageDigest.SHA-256:SUN, Group.HmacSHA2:SunJCE
114#
115#jdk.security.provider.preferred=
116
117
118#
119# Sun Provider SecureRandom seed source.
120#
121# Select the primary source of seed data for the "NativePRNG", "SHA1PRNG"
122# and "DRBG" SecureRandom implementations in the "Sun" provider.
123# (Other SecureRandom implementations might also use this property.)
124#
125# On Unix-like systems (for example, Linux/MacOS), the
126# "NativePRNG", "SHA1PRNG" and "DRBG" implementations obtains seed data from
127# special device files such as file:/dev/random.
128#
129# On Windows systems, specifying the URLs "file:/dev/random" or
130# "file:/dev/urandom" will enable the native Microsoft CryptoAPI seeding
131# mechanism for SHA1PRNG and DRBG.
132#
133# By default, an attempt is made to use the entropy gathering device
134# specified by the "securerandom.source" Security property. If an
135# exception occurs while accessing the specified URL:
136#
137# NativePRNG:
138# a default value of /dev/random will be used. If neither
139# are available, the implementation will be disabled.
140# "file" is the only currently supported protocol type.
141#
142# SHA1PRNG and DRBG:
143# the traditional system/thread activity algorithm will be used.
144#
145# The entropy gathering device can also be specified with the System
146# property "java.security.egd". For example:
147#
148# % java -Djava.security.egd=file:/dev/random MainClass
149#
150# Specifying this System property will override the
151# "securerandom.source" Security property.
152#
153# In addition, if "file:/dev/random" or "file:/dev/urandom" is
154# specified, the "NativePRNG" implementation will be more preferred than
155# DRBG and SHA1PRNG in the Sun provider.
156#
157securerandom.source=file:/dev/random
158
159#
160# A list of known strong SecureRandom implementations.
161#
162# To help guide applications in selecting a suitable strong
163# java.security.SecureRandom implementation, Java distributions should
164# indicate a list of known strong implementations using the property.
165#
166# This is a comma-separated list of algorithm and/or algorithm:provider
167# entries.
168#
169securerandom.strongAlgorithms=Windows-PRNG:SunMSCAPI,DRBG:SUN
170
171#
172# Sun provider DRBG configuration and default instantiation request.
173#
174# NIST SP 800-90Ar1 lists several DRBG mechanisms. Each can be configured
175# with a DRBG algorithm name, and can be instantiated with a security strength,
176# prediction resistance support, etc. This property defines the configuration
177# and the default instantiation request of "DRBG" SecureRandom implementations
178# in the SUN provider. (Other DRBG implementations can also use this property.)
179# Applications can request different instantiation parameters like security
180# strength, capability, personalization string using one of the
181# getInstance(...,SecureRandomParameters,...) methods with a
182# DrbgParameters.Instantiation argument, but other settings such as the
183# mechanism and DRBG algorithm names are not currently configurable by any API.
184#
185# Please note that the SUN implementation of DRBG always supports reseeding.
186#
187# The value of this property is a comma-separated list of all configurable
188# aspects. The aspects can appear in any order but the same aspect can only
189# appear at most once. Its BNF-style definition is:
190#
191# Value:
192# aspect { "," aspect }
193#
194# aspect:
195# mech_name | algorithm_name | strength | capability | df
196#
197# // The DRBG mechanism to use. Default "Hash_DRBG"
198# mech_name:
199# "Hash_DRBG" | "HMAC_DRBG" | "CTR_DRBG"
200#
201# // The DRBG algorithm name. The "SHA-***" names are for Hash_DRBG and
202# // HMAC_DRBG, default "SHA-256". The "AES-***" names are for CTR_DRBG,
203# // default "AES-128" when using the limited cryptographic or "AES-256"
204# // when using the unlimited.
205# algorithm_name:
206# "SHA-224" | "SHA-512/224" | "SHA-256" |
207# "SHA-512/256" | "SHA-384" | "SHA-512" |
208# "AES-128" | "AES-192" | "AES-256"
209#
210# // Security strength requested. Default "128"
211# strength:
212# "112" | "128" | "192" | "256"
213#
214# // Prediction resistance and reseeding request. Default "none"
215# // "pr_and_reseed" - Both prediction resistance and reseeding
216# // support requested
217# // "reseed_only" - Only reseeding support requested
218# // "none" - Neither prediction resistance not reseeding
219# // support requested
220# pr:
221# "pr_and_reseed" | "reseed_only" | "none"
222#
223# // Whether a derivation function should be used. only applicable
224# // to CTR_DRBG. Default "use_df"
225# df:
226# "use_df" | "no_df"
227#
228# Examples,
229# securerandom.drbg.config=Hash_DRBG,SHA-224,112,none
230# securerandom.drbg.config=CTR_DRBG,AES-256,192,pr_and_reseed,use_df
231#
232# The default value is an empty string, which is equivalent to
233# securerandom.drbg.config=Hash_DRBG,SHA-256,128,none
234#
235securerandom.drbg.config=
236
237#
238# Class to instantiate as the javax.security.auth.login.Configuration
239# provider.
240#
241login.configuration.provider=sun.security.provider.ConfigFile
242
243#
244# Default login configuration file
245#
246#login.config.url.1=file:${user.home}/.java.login.config
247
248#
249# Class to instantiate as the system Policy. This is the name of the class
250# that will be used as the Policy object. The system class loader is used to
251# locate this class.
252#
253policy.provider=sun.security.provider.PolicyFile
254
255# The default is to have a single system-wide policy file,
256# and a policy file in the user's home directory.
257#
258policy.url.1=file:${java.home}/conf/security/java.policy
259policy.url.2=file:${user.home}/.java.policy
260
261# Controls whether or not properties are expanded in policy and login
262# configuration files. If set to false, properties (${...}) will not
263# be expanded in policy and login configuration files. If commented out or
264# set to an empty string, the default value is "false" for policy files and
265# "true" for login configuration files.
266#
267policy.expandProperties=true
268
269# Controls whether or not an extra policy or login configuration file is
270# allowed to be passed on the command line with -Djava.security.policy=somefile
271# or -Djava.security.auth.login.config=somefile. If commented out or set to
272# an empty string, the default value is "false".
273#
274policy.allowSystemProperty=true
275
276# whether or not we look into the IdentityScope for trusted Identities
277# when encountering a 1.1 signed JAR file. If the identity is found
278# and is trusted, we grant it AllPermission. Note: the default policy
279# provider (sun.security.provider.PolicyFile) does not support this property.
280#
281policy.ignoreIdentityScope=false
282
283#
284# Default keystore type.
285#
286keystore.type=pkcs12
287
288#
289# Controls compatibility mode for JKS and PKCS12 keystore types.
290#
291# When set to 'true', both JKS and PKCS12 keystore types support loading
292# keystore files in either JKS or PKCS12 format. When set to 'false' the
293# JKS keystore type supports loading only JKS keystore files and the PKCS12
294# keystore type supports loading only PKCS12 keystore files.
295#
296keystore.type.compat=true
297
298#
299# List of comma-separated packages that start with or equal this string
300# will cause a security exception to be thrown when passed to the
301# SecurityManager::checkPackageAccess method unless the corresponding
302# RuntimePermission("accessClassInPackage."+package) has been granted.
303#
304package.access=sun.misc.,\
305 sun.reflect.
306
307#
308# List of comma-separated packages that start with or equal this string
309# will cause a security exception to be thrown when passed to the
310# SecurityManager::checkPackageDefinition method unless the corresponding
311# RuntimePermission("defineClassInPackage."+package) has been granted.
312#
313# By default, none of the class loaders supplied with the JDK call
314# checkPackageDefinition.
315#
316package.definition=sun.misc.,\
317 sun.reflect.
318
319#
320# Determines whether this properties file can be appended to
321# or overridden on the command line via -Djava.security.properties
322#
323security.overridePropertiesFile=true
324
325#
326# Determines the default key and trust manager factory algorithms for
327# the javax.net.ssl package.
328#
329ssl.KeyManagerFactory.algorithm=SunX509
330ssl.TrustManagerFactory.algorithm=PKIX
331
332#
333# The Java-level namelookup cache policy for successful lookups:
334#
335# any negative value: caching forever
336# any positive value: the number of seconds to cache an address for
337# zero: do not cache
338#
339# default value is forever (FOREVER). For security reasons, this
340# caching is made forever when a security manager is set. When a security
341# manager is not set, the default behavior in this implementation
342# is to cache for 30 seconds.
343#
344# NOTE: setting this to anything other than the default value can have
345# serious security implications. Do not set it unless
346# you are sure you are not exposed to DNS spoofing attack.
347#
348#networkaddress.cache.ttl=-1
349
350#
351# The Java-level namelookup cache stale policy:
352#
353# any positive value: the number of seconds to use the stale names
354# zero: do not use stale names
355# negative values are ignored
356#
357# default value is 0 (NEVER).
358#
359#networkaddress.cache.stale.ttl=0
360
361# The Java-level namelookup cache policy for failed lookups:
362#
363# any negative value: cache forever
364# any positive value: the number of seconds to cache negative lookup results
365# zero: do not cache
366#
367# In some Microsoft Windows networking environments that employ
368# the WINS name service in addition to DNS, name service lookups
369# that fail may take a noticeably long time to return (approx. 5 seconds).
370# For this reason the default caching policy is to maintain these
371# results for 10 seconds.
372#
373networkaddress.cache.negative.ttl=10
374
375#
376# Properties to configure OCSP for certificate revocation checking
377#
378
379# Enable OCSP
380#
381# By default, OCSP is not used for certificate revocation checking.
382# This property enables the use of OCSP when set to the value "true".
383#
384# NOTE: SocketPermission is required to connect to an OCSP responder.
385#
386# Example,
387# ocsp.enable=true
388
389#
390# Location of the OCSP responder
391#
392# By default, the location of the OCSP responder is determined implicitly
393# from the certificate being validated. This property explicitly specifies
394# the location of the OCSP responder. The property is used when the
395# Authority Information Access extension (defined in RFC 5280) is absent
396# from the certificate or when it requires overriding.
397#
398# Example,
399# ocsp.responderURL=http://ocsp.example.net:80
400
401#
402# Subject name of the OCSP responder's certificate
403#
404# By default, the certificate of the OCSP responder is that of the issuer
405# of the certificate being validated. This property identifies the certificate
406# of the OCSP responder when the default does not apply. Its value is a string
407# distinguished name (defined in RFC 2253) which identifies a certificate in
408# the set of certificates supplied during cert path validation. In cases where
409# the subject name alone is not sufficient to uniquely identify the certificate
410# then both the "ocsp.responderCertIssuerName" and
411# "ocsp.responderCertSerialNumber" properties must be used instead. When this
412# property is set then those two properties are ignored.
413#
414# Example,
415# ocsp.responderCertSubjectName=CN=OCSP Responder, O=XYZ Corp
416
417#
418# Issuer name of the OCSP responder's certificate
419#
420# By default, the certificate of the OCSP responder is that of the issuer
421# of the certificate being validated. This property identifies the certificate
422# of the OCSP responder when the default does not apply. Its value is a string
423# distinguished name (defined in RFC 2253) which identifies a certificate in
424# the set of certificates supplied during cert path validation. When this
425# property is set then the "ocsp.responderCertSerialNumber" property must also
426# be set. When the "ocsp.responderCertSubjectName" property is set then this
427# property is ignored.
428#
429# Example,
430# ocsp.responderCertIssuerName=CN=Enterprise CA, O=XYZ Corp
431
432#
433# Serial number of the OCSP responder's certificate
434#
435# By default, the certificate of the OCSP responder is that of the issuer
436# of the certificate being validated. This property identifies the certificate
437# of the OCSP responder when the default does not apply. Its value is a string
438# of hexadecimal digits (colon or space separators may be present) which
439# identifies a certificate in the set of certificates supplied during cert path
440# validation. When this property is set then the "ocsp.responderCertIssuerName"
441# property must also be set. When the "ocsp.responderCertSubjectName" property
442# is set then this property is ignored.
443#
444# Example,
445# ocsp.responderCertSerialNumber=2A:FF:00
446
447#
448# Policy for failed Kerberos KDC lookups:
449#
450# When a KDC is unavailable (network error, service failure, etc), it is
451# put inside a secondary list and accessed less often for future requests. The
452# value (case-insensitive) for this policy can be:
453#
454# tryLast
455# KDCs in the secondary list are always tried after those not on the list.
456#
457# tryLess[:max_retries,timeout]
458# KDCs in the secondary list are still tried by their order in the
459# configuration, but with smaller max_retries and timeout values.
460# max_retries and timeout are optional numerical parameters (default 1 and
461# 5000, which means once and 5 seconds). Please note that if any of the
462# values defined here are more than what is defined in krb5.conf, it will be
463# ignored.
464#
465# Whenever a KDC is detected as available, it is removed from the secondary
466# list. The secondary list is reset when krb5.conf is reloaded. You can add
467# refreshKrb5Config=true to a JAAS configuration file so that krb5.conf is
468# reloaded whenever a JAAS authentication is attempted.
469#
470# Example,
471# krb5.kdc.bad.policy = tryLast
472# krb5.kdc.bad.policy = tryLess:2,2000
473#
474krb5.kdc.bad.policy = tryLast
475
476#
477# Kerberos cross-realm referrals (RFC 6806)
478#
479# OpenJDK's Kerberos client supports cross-realm referrals as defined in
480# RFC 6806. This allows to setup more dynamic environments in which clients
481# do not need to know in advance how to reach the realm of a target principal
482# (either a user or service).
483#
484# When a client issues an AS or a TGS request, the "canonicalize" option
485# is set to announce support of this feature. A KDC server may fulfill the
486# request or reply referring the client to a different one. If referred,
487# the client will issue a new request and the cycle repeats.
488#
489# In addition to referrals, the "canonicalize" option allows the KDC server
490# to change the client name in response to an AS request. For security reasons,
491# RFC 6806 (section 11) FAST scheme is enforced.
492#
493# Disable Kerberos cross-realm referrals. Value may be overwritten with a
494# System property (-Dsun.security.krb5.disableReferrals).
495sun.security.krb5.disableReferrals=false
496
497# Maximum number of AS or TGS referrals to avoid infinite loops. Value may
498# be overwritten with a System property (-Dsun.security.krb5.maxReferrals).
499sun.security.krb5.maxReferrals=5
500
501#
502# This property contains a list of disabled EC Named Curves that can be included
503# in the jdk.[tls|certpath|jar].disabledAlgorithms properties. To include this
504# list in any of the disabledAlgorithms properties, add the property name as
505# an entry.
506#jdk.disabled.namedCurves=
507
508#
509# Algorithm restrictions for certification path (CertPath) processing
510#
511# In some environments, certain algorithms or key lengths may be undesirable
512# for certification path building and validation. For example, "MD2" is
513# generally no longer considered to be a secure hash algorithm. This section
514# describes the mechanism for disabling algorithms based on algorithm name
515# and/or key length. This includes algorithms used in certificates, as well
516# as revocation information such as CRLs and signed OCSP Responses.
517# The syntax of the disabled algorithm string is described as follows:
518# DisabledAlgorithms:
519# " DisabledAlgorithm { , DisabledAlgorithm } "
520#
521# DisabledAlgorithm:
522# AlgorithmName [Constraint] { '&' Constraint } | IncludeProperty
523#
524# AlgorithmName:
525# (see below)
526#
527# Constraint:
528# KeySizeConstraint | CAConstraint | DenyAfterConstraint |
529# UsageConstraint
530#
531# KeySizeConstraint:
532# keySize Operator KeyLength
533#
534# Operator:
535# <= | < | == | != | >= | >
536#
537# KeyLength:
538# Integer value of the algorithm's key length in bits
539#
540# CAConstraint:
541# jdkCA
542#
543# DenyAfterConstraint:
544# denyAfter YYYY-MM-DD
545#
546# UsageConstraint:
547# usage [TLSServer] [TLSClient] [SignedJAR]
548#
549# IncludeProperty:
550# include <security property>
551#
552# The "AlgorithmName" is the standard algorithm name of the disabled
553# algorithm. See the Java Security Standard Algorithm Names Specification
554# for information about Standard Algorithm Names. Matching is
555# performed using a case-insensitive sub-element matching rule. (For
556# example, in "SHA1withECDSA" the sub-elements are "SHA1" for hashing and
557# "ECDSA" for signatures.) If the assertion "AlgorithmName" is a
558# sub-element of the certificate algorithm name, the algorithm will be
559# rejected during certification path building and validation. For example,
560# the assertion algorithm name "DSA" will disable all certificate algorithms
561# that rely on DSA, such as NONEwithDSA, SHA1withDSA. However, the assertion
562# will not disable algorithms related to "ECDSA".
563#
564# The "IncludeProperty" allows a implementation-defined security property that
565# can be included in the disabledAlgorithms properties. These properties are
566# to help manage common actions easier across multiple disabledAlgorithm
567# properties.
568# There is one defined security property: jdk.disabled.namedCurves
569# See the property for more specific details.
570#
571#
572# A "Constraint" defines restrictions on the keys and/or certificates for
573# a specified AlgorithmName:
574#
575# KeySizeConstraint:
576# keySize Operator KeyLength
577# The constraint requires a key of a valid size range if the
578# "AlgorithmName" is of a key algorithm. The "KeyLength" indicates
579# the key size specified in number of bits. For example,
580# "RSA keySize <= 1024" indicates that any RSA key with key size less
581# than or equal to 1024 bits should be disabled, and
582# "RSA keySize < 1024, RSA keySize > 2048" indicates that any RSA key
583# with key size less than 1024 or greater than 2048 should be disabled.
584# This constraint is only used on algorithms that have a key size.
585#
586# CAConstraint:
587# jdkCA
588# This constraint prohibits the specified algorithm only if the
589# algorithm is used in a certificate chain that terminates at a marked
590# trust anchor in the lib/security/cacerts keystore. If the jdkCA
591# constraint is not set, then all chains using the specified algorithm
592# are restricted. jdkCA may only be used once in a DisabledAlgorithm
593# expression.
594# Example: To apply this constraint to SHA-1 certificates, include
595# the following: "SHA1 jdkCA"
596#
597# DenyAfterConstraint:
598# denyAfter YYYY-MM-DD
599# This constraint prohibits a certificate with the specified algorithm
600# from being used after the date regardless of the certificate's
601# validity. JAR files that are signed and timestamped before the
602# constraint date with certificates containing the disabled algorithm
603# will not be restricted. The date is processed in the UTC timezone.
604# This constraint can only be used once in a DisabledAlgorithm
605# expression.
606# Example: To deny usage of RSA 2048 bit certificates after Feb 3 2020,
607# use the following: "RSA keySize == 2048 & denyAfter 2020-02-03"
608#
609# UsageConstraint:
610# usage [TLSServer] [TLSClient] [SignedJAR]
611# This constraint prohibits the specified algorithm for
612# a specified usage. This should be used when disabling an algorithm
613# for all usages is not practical. 'TLSServer' restricts the algorithm
614# in TLS server certificate chains when server authentication is
615# performed. 'TLSClient' restricts the algorithm in TLS client
616# certificate chains when client authentication is performed.
617# 'SignedJAR' constrains use of certificates in signed jar files.
618# The usage type follows the keyword and more than one usage type can
619# be specified with a whitespace delimiter.
620# Example: "SHA1 usage TLSServer TLSClient"
621#
622# When an algorithm must satisfy more than one constraint, it must be
623# delimited by an ampersand '&'. For example, to restrict certificates in a
624# chain that terminate at a distribution provided trust anchor and contain
625# RSA keys that are less than or equal to 1024 bits, add the following
626# constraint: "RSA keySize <= 1024 & jdkCA".
627#
628# All DisabledAlgorithms expressions are processed in the order defined in the
629# property. This requires lower keysize constraints to be specified
630# before larger keysize constraints of the same algorithm. For example:
631# "RSA keySize < 1024 & jdkCA, RSA keySize < 2048".
632#
633# Note: The algorithm restrictions do not apply to trust anchors or
634# self-signed certificates.
635#
636# Note: This property is currently used by Oracle's PKIX implementation. It
637# is not guaranteed to be examined and used by other implementations.
638#
639# Example:
640# jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
641#
642#
643jdk.certpath.disabledAlgorithms=MD2, MD5, SHA1 jdkCA & usage TLSServer, \
644 RSA keySize < 1024, DSA keySize < 1024, EC keySize < 224, \
645 SHA1 usage SignedJAR & denyAfter 2019-01-01
646
647#
648# Legacy cryptographic algorithms and key lengths.
649#
650# In some environments, a certain algorithm or key length may be undesirable.
651#
652# Tools such as keytool and jarsigner may emit warnings when these legacy
653# algorithms are used. See the man pages for those tools for more information.
654#
655# The syntax is the same as the "jdk.certpath.disabledAlgorithms" and
656# "jdk.jar.disabledAlgorithms" security properties.
657#
658# Note: This property is currently used by the JDK Reference
659# implementation. It is not guaranteed to be examined and used by other
660# implementations.
661
662jdk.security.legacyAlgorithms=SHA1, \
663 RSA keySize < 2048, DSA keySize < 2048, \
664 DES, DESede, MD5, RC2, ARCFOUR
665
666#
667# Algorithm restrictions for signed JAR files
668#
669# In some environments, certain algorithms or key lengths may be undesirable
670# for signed JAR validation. For example, "MD2" is generally no longer
671# considered to be a secure hash algorithm. This section describes the
672# mechanism for disabling algorithms based on algorithm name and/or key length.
673# JARs signed with any of the disabled algorithms or key sizes will be treated
674# as unsigned.
675#
676# The syntax of the disabled algorithm string is described as follows:
677# DisabledAlgorithms:
678# " DisabledAlgorithm { , DisabledAlgorithm } "
679#
680# DisabledAlgorithm:
681# AlgorithmName [Constraint] { '&' Constraint }
682#
683# AlgorithmName:
684# (see below)
685#
686# Constraint:
687# KeySizeConstraint | DenyAfterConstraint
688#
689# KeySizeConstraint:
690# keySize Operator KeyLength
691#
692# DenyAfterConstraint:
693# denyAfter YYYY-MM-DD
694#
695# Operator:
696# <= | < | == | != | >= | >
697#
698# KeyLength:
699# Integer value of the algorithm's key length in bits
700#
701# Note: This property is currently used by the JDK Reference
702# implementation. It is not guaranteed to be examined and used by other
703# implementations.
704#
705# See "jdk.certpath.disabledAlgorithms" for syntax descriptions.
706#
707jdk.jar.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \
708 DSA keySize < 1024, SHA1 denyAfter 2019-01-01
709
710#
711# Disabled message digest algorithms for use with plaintext
712# HTTP Digest authentication (java.net.HttpURLConnection).
713# This includes HTTPS Digest authentication to proxies.
714# This may be overridden by setting the networking (or system)
715# property "http.auth.digest.reEnabledAlgorithms" to a comma
716# separated list of algorithms to be allowed.
717#
718http.auth.digest.disabledAlgorithms = MD5, SHA-1
719
720#
721# Algorithm restrictions for Secure Socket Layer/Transport Layer Security
722# (SSL/TLS/DTLS) processing
723#
724# In some environments, certain algorithms or key lengths may be undesirable
725# when using SSL/TLS/DTLS. This section describes the mechanism for disabling
726# algorithms during SSL/TLS/DTLS security parameters negotiation, including
727# protocol version negotiation, cipher suites selection, named groups
728# selection, signature schemes selection, peer authentication and key
729# exchange mechanisms.
730#
731# Disabled algorithms will not be negotiated for SSL/TLS connections, even
732# if they are enabled explicitly in an application.
733#
734# For PKI-based peer authentication and key exchange mechanisms, this list
735# of disabled algorithms will also be checked during certification path
736# building and validation, including algorithms used in certificates, as
737# well as revocation information such as CRLs and signed OCSP Responses.
738# This is in addition to the jdk.certpath.disabledAlgorithms property above.
739#
740# See the specification of "jdk.certpath.disabledAlgorithms" for the
741# syntax of the disabled algorithm string.
742#
743# Note: The algorithm restrictions do not apply to trust anchors or
744# self-signed certificates.
745#
746# Note: This property is currently used by the JDK Reference implementation.
747# It is not guaranteed to be examined and used by other implementations.
748#
749# Example:
750# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048, \
751# rsa_pkcs1_sha1, secp224r1
752jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \
753 MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
754 ECDH
755
756#
757# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
758# processing in JSSE implementation.
759#
760# In some environments, a certain algorithm may be undesirable but it
761# cannot be disabled because of its use in legacy applications. Legacy
762# algorithms may still be supported, but applications should not use them
763# as the security strength of legacy algorithms are usually not strong enough
764# in practice.
765#
766# During SSL/TLS security parameters negotiation, legacy algorithms will
767# not be negotiated unless there are no other candidates.
768#
769# The syntax of the legacy algorithms string is described as this Java
770# BNF-style:
771# LegacyAlgorithms:
772# " LegacyAlgorithm { , LegacyAlgorithm } "
773#
774# LegacyAlgorithm:
775# AlgorithmName (standard JSSE algorithm name)
776#
777# See the specification of security property "jdk.certpath.disabledAlgorithms"
778# for the syntax and description of the "AlgorithmName" notation.
779#
780# Per SSL/TLS specifications, cipher suites have the form:
781# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
782# or
783# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
784#
785# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
786# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
787# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
788# algorithm for HMAC.
789#
790# The LegacyAlgorithm can be one of the following standard algorithm names:
791# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
792# 2. JSSE key exchange algorithm name, e.g., RSA
793# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
794# 4. JSSE message digest algorithm name, e.g., SHA
795#
796# See SSL/TLS specifications and the Java Security Standard Algorithm Names
797# Specification for information about the algorithm names.
798#
799# Note: If a legacy algorithm is also restricted through the
800# jdk.tls.disabledAlgorithms property or the
801# java.security.AlgorithmConstraints API (See
802# javax.net.ssl.SSLParameters.setAlgorithmConstraints()),
803# then the algorithm is completely disabled and will not be negotiated.
804#
805# Note: This property is currently used by the JDK Reference implementation.
806# It is not guaranteed to be examined and used by other implementations.
807# There is no guarantee the property will continue to exist or be of the
808# same syntax in future releases.
809#
810# Example:
811# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
812#
813jdk.tls.legacyAlgorithms=NULL, anon, RC4, DES, 3DES_EDE_CBC
814
815#
816# The pre-defined default finite field Diffie-Hellman ephemeral (DHE)
817# parameters for Transport Layer Security (SSL/TLS/DTLS) processing.
818#
819# In traditional SSL/TLS/DTLS connections where finite field DHE parameters
820# negotiation mechanism is not used, the server offers the client group
821# parameters, base generator g and prime modulus p, for DHE key exchange.
822# It is recommended to use dynamic group parameters. This property defines
823# a mechanism that allows you to specify custom group parameters.
824#
825# The syntax of this property string is described as this Java BNF-style:
826# DefaultDHEParameters:
827# DefinedDHEParameters { , DefinedDHEParameters }
828#
829# DefinedDHEParameters:
830# "{" DHEPrimeModulus , DHEBaseGenerator "}"
831#
832# DHEPrimeModulus:
833# HexadecimalDigits
834#
835# DHEBaseGenerator:
836# HexadecimalDigits
837#
838# HexadecimalDigits:
839# HexadecimalDigit { HexadecimalDigit }
840#
841# HexadecimalDigit: one of
842# 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
843#
844# Whitespace characters are ignored.
845#
846# The "DefinedDHEParameters" defines the custom group parameters, prime
847# modulus p and base generator g, for a particular size of prime modulus p.
848# The "DHEPrimeModulus" defines the hexadecimal prime modulus p, and the
849# "DHEBaseGenerator" defines the hexadecimal base generator g of a group
850# parameter. It is recommended to use safe primes for the custom group
851# parameters.
852#
853# If this property is not defined or the value is empty, the underlying JSSE
854# provider's default group parameter is used for each connection.
855#
856# If the property value does not follow the grammar, or a particular group
857# parameter is not valid, the connection will fall back and use the
858# underlying JSSE provider's default group parameter.
859#
860# Note: This property is currently used by OpenJDK's JSSE implementation. It
861# is not guaranteed to be examined and used by other implementations.
862#
863# Example:
864# jdk.tls.server.defaultDHEParameters=
865# { \
866# FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 \
867# 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD \
868# EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 \
869# E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED \
870# EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 \
871# FFFFFFFF FFFFFFFF, 2}
872
873#
874# TLS key limits on symmetric cryptographic algorithms
875#
876# This security property sets limits on algorithms key usage in TLS 1.3.
877# When the amount of data encrypted exceeds the algorithm value listed below,
878# a KeyUpdate message will trigger a key change. This is for symmetric ciphers
879# with TLS 1.3 only.
880#
881# The syntax for the property is described below:
882# KeyLimits:
883# " KeyLimit { , KeyLimit } "
884#
885# KeyLimit:
886# AlgorithmName Action Length
887#
888# AlgorithmName:
889# A full algorithm transformation.
890#
891# Action:
892# KeyUpdate
893#
894# Length:
895# The amount of encrypted data in a session before the Action occurs
896# This value may be an integer value in bytes, or as a power of two, 2^29.
897#
898# KeyUpdate:
899# The TLS 1.3 KeyUpdate handshake process begins when the Length amount
900# is fulfilled.
901#
902# Note: This property is currently used by OpenJDK's JSSE implementation. It
903# is not guaranteed to be examined and used by other implementations.
904#
905jdk.tls.keyLimits=AES/GCM/NoPadding KeyUpdate 2^37, \
906 ChaCha20-Poly1305 KeyUpdate 2^37
907
908#
909# Cryptographic Jurisdiction Policy defaults
910#
911# Import and export control rules on cryptographic software vary from
912# country to country. By default, Java provides two different sets of
913# cryptographic policy files[1]:
914#
915# unlimited: These policy files contain no restrictions on cryptographic
916# strengths or algorithms
917#
918# limited: These policy files contain more restricted cryptographic
919# strengths
920#
921# The default setting is determined by the value of the "crypto.policy"
922# Security property below. If your country or usage requires the
923# traditional restrictive policy, the "limited" Java cryptographic
924# policy is still available and may be appropriate for your environment.
925#
926# If you have restrictions that do not fit either use case mentioned
927# above, Java provides the capability to customize these policy files.
928# The "crypto.policy" security property points to a subdirectory
929# within <java-home>/conf/security/policy/ which can be customized.
930# Please see the <java-home>/conf/security/policy/README.txt file or consult
931# the Java Security Guide/JCA documentation for more information.
932#
933# YOU ARE ADVISED TO CONSULT YOUR EXPORT/IMPORT CONTROL COUNSEL OR ATTORNEY
934# TO DETERMINE THE EXACT REQUIREMENTS.
935#
936# [1] Please note that the JCE for Java SE, including the JCE framework,
937# cryptographic policy files, and standard JCE providers provided with
938# the Java SE, have been reviewed and approved for export as mass market
939# encryption item by the US Bureau of Industry and Security.
940#
941# Note: This property is currently used by the JDK Reference implementation.
942# It is not guaranteed to be examined and used by other implementations.
943#
944crypto.policy=unlimited
945
946#
947# The policy for the XML Signature secure validation mode. Validation of
948# XML Signatures that violate any of these constraints will fail.
949# The mode can be enabled or disabled by setting the property
950# "org.jcp.xml.dsig.secureValidation" to Boolean.TRUE or Boolean.FALSE with
951# the javax.xml.crypto.XMLCryptoContext.setProperty() method, or by setting
952# the system property "org.jcp.xml.dsig.secureValidation" to "true" or
953# "false". Any other value for the system property is also treated as "false".
954# If the system property is set, it supersedes the XMLCryptoContext property
955# value.
956#
957# The secure validation mode is enabled by default.
958#
959# Policy:
960# Constraint {"," Constraint }
961# Constraint:
962# AlgConstraint | MaxTransformsConstraint | MaxReferencesConstraint |
963# ReferenceUriSchemeConstraint | KeySizeConstraint | OtherConstraint
964# AlgConstraint
965# "disallowAlg" Uri
966# MaxTransformsConstraint:
967# "maxTransforms" Integer
968# MaxReferencesConstraint:
969# "maxReferences" Integer
970# ReferenceUriSchemeConstraint:
971# "disallowReferenceUriSchemes" String { String }
972# KeySizeConstraint:
973# "minKeySize" KeyAlg Integer
974# OtherConstraint:
975# "noDuplicateIds" | "noRetrievalMethodLoops"
976#
977# For AlgConstraint, Uri is the algorithm URI String that is not allowed.
978# See the XML Signature Recommendation for more information on algorithm
979# URI Identifiers. For KeySizeConstraint, KeyAlg is the standard algorithm
980# name of the key type (ex: "RSA"). If the MaxTransformsConstraint,
981# MaxReferencesConstraint or KeySizeConstraint (for the same key type) is
982# specified more than once, only the last entry is enforced.
983#
984# Note: This property is currently used by the JDK Reference implementation.
985# It is not guaranteed to be examined and used by other implementations.
986#
987jdk.xml.dsig.secureValidationPolicy=\
988 disallowAlg http://www.w3.org/TR/1999/REC-xslt-19991116,\
989 disallowAlg http://www.w3.org/2001/04/xmldsig-more#rsa-md5,\
990 disallowAlg http://www.w3.org/2001/04/xmldsig-more#hmac-md5,\
991 disallowAlg http://www.w3.org/2001/04/xmldsig-more#md5,\
992 disallowAlg http://www.w3.org/2000/09/xmldsig#sha1,\
993 disallowAlg http://www.w3.org/2000/09/xmldsig#dsa-sha1,\
994 disallowAlg http://www.w3.org/2000/09/xmldsig#rsa-sha1,\
995 disallowAlg http://www.w3.org/2007/05/xmldsig-more#sha1-rsa-MGF1,\
996 disallowAlg http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1,\
997 maxTransforms 5,\
998 maxReferences 30,\
999 disallowReferenceUriSchemes file http https,\
1000 minKeySize RSA 1024,\
1001 minKeySize DSA 1024,\
1002 minKeySize EC 224,\
1003 noDuplicateIds,\
1004 noRetrievalMethodLoops
1005
1006#
1007# Support for the here() function
1008#
1009# This security property determines whether the here() XPath function is
1010# supported in XML Signature generation and verification.
1011#
1012# If this property is set to false, the here() function is not supported.
1013# Generating an XML Signature that uses the here() function will throw an
1014# XMLSignatureException. Validating an existing XML Signature that uses the
1015# here() function will also throw an XMLSignatureException.
1016#
1017# The default value for this property is true.
1018#
1019# Note: This property is currently used by the JDK Reference implementation.
1020# It is not guaranteed to be examined and used by other implementations.
1021#
1022#jdk.xml.dsig.hereFunctionSupported=true
1023
1024#
1025# Deserialization JVM-wide filter factory
1026#
1027# A filter factory class name is used to configure the JVM-wide filter factory.
1028# The class must be public, must have a public zero-argument constructor, implement the
1029# java.util.function.BinaryOperator<java.io.ObjectInputFilter> interface, provide its
1030# implementation and be accessible via the application class loader.
1031# A builtin filter factory is used if no filter factory is defined.
1032# See java.io.ObjectInputFilter.Config for more information.
1033#
1034# If the system property jdk.serialFilterFactory is also specified, it supersedes
1035# the security property value defined here.
1036#
1037#jdk.serialFilterFactory=<classname>
1038
1039#
1040# Deserialization JVM-wide filter
1041#
1042# A filter, if configured, is used by the filter factory to provide the filter used by
1043# java.io.ObjectInputStream during deserialization to check the contents of the stream.
1044# A filter is configured as a sequence of patterns, each pattern is either
1045# matched against the name of a class in the stream or defines a limit.
1046# Patterns are separated by ";" (semicolon).
1047# Whitespace is significant and is considered part of the pattern.
1048#
1049# If the system property jdk.serialFilter is also specified, it supersedes
1050# the security property value defined here.
1051#
1052# If a pattern includes a "=", it sets a limit.
1053# If a limit appears more than once the last value is used.
1054# Limits are checked before classes regardless of the order in the
1055# sequence of patterns.
1056# If any of the limits are exceeded, the filter status is REJECTED.
1057#
1058# maxdepth=value - the maximum depth of a graph
1059# maxrefs=value - the maximum number of internal references
1060# maxbytes=value - the maximum number of bytes in the input stream
1061# maxarray=value - the maximum array length allowed
1062#
1063# Other patterns, from left to right, match the class or package name as
1064# returned from Class.getName.
1065# If the class is an array type, the class or package to be matched is the
1066# element type.
1067# Arrays of any number of dimensions are treated the same as the element type.
1068# For example, a pattern of "!example.Foo", rejects creation of any instance or
1069# array of example.Foo.
1070#
1071# If the pattern starts with "!", the status is REJECTED if the remaining
1072# pattern is matched; otherwise the status is ALLOWED if the pattern matches.
1073# If the pattern contains "/", the non-empty prefix up to the "/" is the
1074# module name;
1075# if the module name matches the module name of the class then
1076# the remaining pattern is matched with the class name.
1077# If there is no "/", the module name is not compared.
1078# If the pattern ends with ".**" it matches any class in the package and all
1079# subpackages.
1080# If the pattern ends with ".*" it matches any class in the package.
1081# If the pattern ends with "*", it matches any class with the pattern as a
1082# prefix.
1083# If the pattern is equal to the class name, it matches.
1084# Otherwise, the status is UNDECIDED.
1085#
1086#jdk.serialFilter=pattern;pattern
1087
1088#
1089# RMI Registry Serial Filter
1090#
1091# The filter pattern uses the same format as jdk.serialFilter.
1092# This filter can override the builtin filter if additional types need to be
1093# allowed or rejected from the RMI Registry or to decrease limits but not
1094# to increase limits.
1095# If the limits (maxdepth, maxrefs, or maxbytes) are exceeded, the object is rejected.
1096#
1097# Each non-array type is allowed or rejected if it matches one of the patterns,
1098# evaluated from left to right, and is otherwise allowed. Arrays of any
1099# component type, including subarrays and arrays of primitives, are allowed.
1100#
1101# Array construction of any component type, including subarrays and arrays of
1102# primitives, are allowed unless the length is greater than the maxarray limit.
1103# The filter is applied to each array element.
1104#
1105# Note: This property is currently used by the JDK Reference implementation.
1106# It is not guaranteed to be examined and used by other implementations.
1107#
1108# The built-in filter allows subclasses of allowed classes and
1109# can approximately be represented as the pattern:
1110#
1111#sun.rmi.registry.registryFilter=\
1112# maxarray=1000000;\
1113# maxdepth=20;\
1114# java.lang.String;\
1115# java.lang.Number;\
1116# java.lang.reflect.Proxy;\
1117# java.rmi.Remote;\
1118# sun.rmi.server.UnicastRef;\
1119# sun.rmi.server.RMIClientSocketFactory;\
1120# sun.rmi.server.RMIServerSocketFactory;\
1121# java.rmi.server.UID
1122#
1123# RMI Distributed Garbage Collector (DGC) Serial Filter
1124#
1125# The filter pattern uses the same format as jdk.serialFilter.
1126# This filter can override the builtin filter if additional types need to be
1127# allowed or rejected from the RMI DGC.
1128#
1129# Note: This property is currently used by the JDK Reference implementation.
1130# It is not guaranteed to be examined and used by other implementations.
1131#
1132# The builtin DGC filter can approximately be represented as the filter pattern:
1133#
1134#sun.rmi.transport.dgcFilter=\
1135# java.rmi.server.ObjID;\
1136# java.rmi.server.UID;\
1137# java.rmi.dgc.VMID;\
1138# java.rmi.dgc.Lease;\
1139# maxdepth=5;maxarray=10000
1140
1141#
1142# JCEKS Encrypted Key Serial Filter
1143#
1144# This filter, if configured, is used by the JCEKS KeyStore during the
1145# deserialization of the encrypted Key object stored inside a key entry.
1146# If not configured or the filter result is UNDECIDED (i.e. none of the patterns
1147# matches), the filter configured by jdk.serialFilter will be consulted.
1148#
1149# If the system property jceks.key.serialFilter is also specified, it supersedes
1150# the security property value defined here.
1151#
1152# The filter pattern uses the same format as jdk.serialFilter. The default
1153# pattern allows java.lang.Enum, java.security.KeyRep, java.security.KeyRep$Type,
1154# and javax.crypto.spec.SecretKeySpec and rejects all the others.
1155jceks.key.serialFilter = java.base/java.lang.Enum;java.base/java.security.KeyRep;\
1156 java.base/java.security.KeyRep$Type;java.base/javax.crypto.spec.SecretKeySpec;!*
1157
1158# The iteration count used for password-based encryption (PBE) in JCEKS
1159# keystores. Values in the range 10000 to 5000000 are considered valid.
1160# If the value is out of this range, or is not a number, or is unspecified;
1161# a default of 200000 is used.
1162#
1163# If the system property jdk.jceks.iterationCount is also specified, it
1164# supersedes the security property value defined here.
1165#
1166#jdk.jceks.iterationCount = 200000
1167
1168#
1169# PKCS12 KeyStore properties
1170#
1171# The following properties, if configured, are used by the PKCS12 KeyStore
1172# implementation during the creation of a new keystore. Several of the
1173# properties may also be used when modifying an existing keystore. The
1174# properties can be overridden by a KeyStore API that specifies its own
1175# algorithms and parameters.
1176#
1177# If an existing PKCS12 keystore is loaded and then stored, the algorithm and
1178# parameter used to generate the existing Mac will be reused. If the existing
1179# keystore does not have a Mac, no Mac will be created while storing. If there
1180# is at least one certificate in the existing keystore, the algorithm and
1181# parameters used to encrypt the last certificate in the existing keystore will
1182# be reused to encrypt all certificates while storing. If the last certificate
1183# in the existing keystore is not encrypted, all certificates will be stored
1184# unencrypted. If there is no certificate in the existing keystore, any newly
1185# added certificate will be encrypted (or stored unencrypted if algorithm
1186# value is "NONE") using the "keystore.pkcs12.certProtectionAlgorithm" and
1187# "keystore.pkcs12.certPbeIterationCount" values defined here. Existing private
1188# and secret key(s) are not changed. Newly set private and secret key(s) will
1189# be encrypted using the "keystore.pkcs12.keyProtectionAlgorithm" and
1190# "keystore.pkcs12.keyPbeIterationCount" values defined here.
1191#
1192# In order to apply new algorithms and parameters to all entries in an
1193# existing keystore, one can create a new keystore and add entries in the
1194# existing keystore into the new keystore. This can be achieved by calling the
1195# "keytool -importkeystore" command.
1196#
1197# If a system property of the same name is also specified, it supersedes the
1198# security property value defined here.
1199#
1200# If the property is set to an illegal value, an iteration count that is not
