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# Additional TLS-specific syntax supported by this property:
744#
745# - TLS cipher suites can be disabled with this property using one or more
746# "*" wildcard characters. For example, "TLS_RSA_*" disables all cipher
747# suites that start with "TLS_RSA_". Only cipher suites starting with
748# "TLS_" are allowed to have wildcard characters.
749#
750# - TLS protocol specific usage constraints are supported by this property:
751#
752# UsageConstraint:
753# usage UsageType { UsageType }
754#
755# UsageType:
756# HandshakeSignature | CertificateSignature
757#
758# HandshakeSignature restricts the use of the algorithm in TLS handshake
759# signatures. CertificateSignature restricts the use of the algorithm in
760# certificate signatures. An algorithm with this constraint cannot include
761# other usage types defined in the jdk.certpath.disabledAlgorithms
762# property. The usage type follows the keyword and more than one usage type
763# can be specified with a whitespace delimiter.
764# Example: "rsa_pkcs1_sha1 usage HandshakeSignature"
765#
766# Note: The algorithm restrictions do not apply to trust anchors or
767# self-signed certificates.
768#
769# Note: This property is currently used by the JDK Reference implementation.
770# It is not guaranteed to be examined and used by other implementations.
771#
772# Example:
773# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048, \
774# rsa_pkcs1_sha1, secp224r1, TLS_RSA_*
775jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, DTLSv1.0, RC4, DES, \
776 MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
777 ECDH, TLS_RSA_*, rsa_pkcs1_sha1 usage HandshakeSignature, \
778 ecdsa_sha1 usage HandshakeSignature, dsa_sha1 usage HandshakeSignature
779
780#
781# Algorithm restrictions for Java Crypto API services
782#
783# In some environments, certain algorithms may be undesirable for certain
784# cryptographic services. For example, "MD2" is generally no longer considered
785# to be a secure hash algorithm. This section describes the mechanism for
786# disabling algorithms at the JCA/JCE level based on service name and algorithm
787# name.
788#
789# If a system property of the same name is also specified, it supersedes the
790# security property value defined here.
791#
792# The syntax of the disabled services string is described as follows:
793# "DisabledService {, DisabledService}"
794#
795# DisabledService:
796# Service.AlgorithmName
797#
798# Service: (one of the following, more services may be added later)
799# Cipher | KeyStore | MessageDigest | Signature
800#
801# AlgorithmName:
802# (see below)
803#
804# The "AlgorithmName" is the standard algorithm name of the disabled
805# service. See the Java Security Standard Algorithm Names Specification
806# for information about Standard Algorithm Names. Matching is
807# performed using a case-insensitive exact matching rule. For Cipher service,
808# its algorithm is the transformation string.
809#
810# Note: If the property value contains entries with invalid syntax or
811# unsupported services at the time of checking, an ExceptionInInitializerError
812# with a cause of IllegalArgumentException will be thrown.
813#
814# Note: The restriction is applied in the various getInstance(...) methods
815# of the supported Service classes, i.e. Cipher, KeyStore, MessageDigest,
816# and Signature. If the algorithm is disabled, a NoSuchAlgorithmException will
817# be thrown by the getInstance methods of Cipher, MessageDigest, and Signature
818# and a KeyStoreException by the getInstance methods of KeyStore.
819#
820# Note: This property is currently used by the JDK Reference implementation.
821# It is not guaranteed to be examined and used by other implementations.
822#
823# Example:
824# jdk.crypto.disabledAlgorithms=Cipher.RSA/ECB/PKCS1Padding, MessageDigest.MD2
825#
826#jdk.crypto.disabledAlgorithms=
827
828#
829# Legacy algorithms for Secure Socket Layer/Transport Layer Security (SSL/TLS)
830# processing in JSSE implementation.
831#
832# In some environments, a certain algorithm may be undesirable but it
833# cannot be disabled because of its use in legacy applications. Legacy
834# algorithms may still be supported, but applications should not use them
835# as the security strength of legacy algorithms are usually not strong enough
836# in practice.
837#
838# During SSL/TLS security parameters negotiation, legacy algorithms will
839# not be negotiated unless there are no other candidates.
840#
841# The syntax of the legacy algorithms string is described as this Java
842# BNF-style:
843# LegacyAlgorithms:
844# " LegacyAlgorithm { , LegacyAlgorithm } "
845#
846# LegacyAlgorithm:
847# AlgorithmName (standard JSSE algorithm name)
848#
849# See the specification of security property "jdk.certpath.disabledAlgorithms"
850# for the syntax and description of the "AlgorithmName" notation.
851#
852# Per SSL/TLS specifications, cipher suites have the form:
853# SSL_KeyExchangeAlg_WITH_CipherAlg_MacAlg
854# or
855# TLS_KeyExchangeAlg_WITH_CipherAlg_MacAlg
856#
857# For example, the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA uses RSA as the
858# key exchange algorithm, AES_128_CBC (128 bits AES cipher algorithm in CBC
859# mode) as the cipher (encryption) algorithm, and SHA-1 as the message digest
860# algorithm for HMAC.
861#
862# The LegacyAlgorithm can be one of the following standard algorithm names:
863# 1. JSSE cipher suite name, e.g., TLS_RSA_WITH_AES_128_CBC_SHA
864# 2. JSSE key exchange algorithm name, e.g., RSA
865# 3. JSSE cipher (encryption) algorithm name, e.g., AES_128_CBC
866# 4. JSSE message digest algorithm name, e.g., SHA
867#
868# See SSL/TLS specifications and the Java Security Standard Algorithm Names
869# Specification for information about the algorithm names.
870#
871# Note: If a legacy algorithm is also restricted through the
872# jdk.tls.disabledAlgorithms property or the
873# java.security.AlgorithmConstraints API (See
874# javax.net.ssl.SSLParameters.setAlgorithmConstraints()),
875# then the algorithm is completely disabled and will not be negotiated.
876#
877# Note: This property is currently used by the JDK Reference implementation.
878# It is not guaranteed to be examined and used by other implementations.
879# There is no guarantee the property will continue to exist or be of the
880# same syntax in future releases.
881#
882# Example:
883# jdk.tls.legacyAlgorithms=DH_anon, DES_CBC, SSL_RSA_WITH_RC4_128_MD5
884#
885jdk.tls.legacyAlgorithms=NULL, anon, RC4, DES, 3DES_EDE_CBC
886
887#
888# The pre-defined default finite field Diffie-Hellman ephemeral (DHE)
889# parameters for Transport Layer Security (SSL/TLS/DTLS) processing.
890#
891# In traditional SSL/TLS/DTLS connections where finite field DHE parameters
892# negotiation mechanism is not used, the server offers the client group
893# parameters, base generator g and prime modulus p, for DHE key exchange.
894# It is recommended to use dynamic group parameters. This property defines
895# a mechanism that allows you to specify custom group parameters.
896#
897# The syntax of this property string is described as this Java BNF-style:
898# DefaultDHEParameters:
899# DefinedDHEParameters { , DefinedDHEParameters }
900#
901# DefinedDHEParameters:
902# "{" DHEPrimeModulus , DHEBaseGenerator "}"
903#
904# DHEPrimeModulus:
905# HexadecimalDigits
906#
907# DHEBaseGenerator:
908# HexadecimalDigits
909#
910# HexadecimalDigits:
911# HexadecimalDigit { HexadecimalDigit }
912#
913# HexadecimalDigit: one of
914# 0 1 2 3 4 5 6 7 8 9 A B C D E F a b c d e f
915#
916# Whitespace characters are ignored.
917#
918# The "DefinedDHEParameters" defines the custom group parameters, prime
919# modulus p and base generator g, for a particular size of prime modulus p.
920# The "DHEPrimeModulus" defines the hexadecimal prime modulus p, and the
921# "DHEBaseGenerator" defines the hexadecimal base generator g of a group
922# parameter. It is recommended to use safe primes for the custom group
923# parameters.
924#
925# If this property is not defined or the value is empty, the underlying JSSE
926# provider's default group parameter is used for each connection.
927#
928# If the property value does not follow the grammar, or a particular group
929# parameter is not valid, the connection will fall back and use the
930# underlying JSSE provider's default group parameter.
931#
932# Note: This property is currently used by OpenJDK's JSSE implementation. It
933# is not guaranteed to be examined and used by other implementations.
934#
935# Example:
936# jdk.tls.server.defaultDHEParameters=
937# { \
938# FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 \
939# 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD \
940# EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245 \
941# E485B576 625E7EC6 F44C42E9 A637ED6B 0BFF5CB6 F406B7ED \
942# EE386BFB 5A899FA5 AE9F2411 7C4B1FE6 49286651 ECE65381 \
943# FFFFFFFF FFFFFFFF, 2}
944
945#
946# TLS key limits on symmetric cryptographic algorithms
947#
948# This security property sets limits on algorithms key usage in TLS 1.3.
949# When the amount of data encrypted exceeds the algorithm value listed below,
950# a KeyUpdate message will trigger a key change. This is for symmetric ciphers
951# with TLS 1.3 only.
952#
953# The syntax for the property is described below:
954# KeyLimits:
955# " KeyLimit { , KeyLimit } "
956#
957# WeakKeyLimit:
958# AlgorithmName Action Length
959#
960# AlgorithmName:
961# A full algorithm transformation.
962#
963# Action:
964# KeyUpdate
965#
966# Length:
967# The amount of encrypted data in a session before the Action occurs
968# This value may be an integer value in bytes, or as a power of two, 2^29.
969#
970# KeyUpdate:
971# The TLS 1.3 KeyUpdate handshake process begins when the Length amount
972# is fulfilled.
973#
974# Note: This property is currently used by OpenJDK's JSSE implementation. It
975# is not guaranteed to be examined and used by other implementations.
976#
977jdk.tls.keyLimits=AES/GCM/NoPadding KeyUpdate 2^37, \
978 ChaCha20-Poly1305 KeyUpdate 2^37
979
980#
981# Cryptographic Jurisdiction Policy defaults
982#
983# Import and export control rules on cryptographic software vary from
984# country to country. By default, Java provides two different sets of
985# cryptographic policy files[1]:
986#
987# unlimited: These policy files contain no restrictions on cryptographic
988# strengths or algorithms
989#
990# limited: These policy files contain more restricted cryptographic
991# strengths
992#
993# The default setting is determined by the value of the "crypto.policy"
994# Security property below. If your country or usage requires the
995# traditional restrictive policy, the "limited" Java cryptographic
996# policy is still available and may be appropriate for your environment.
997#
998# If you have restrictions that do not fit either use case mentioned
999# above, Java provides the capability to customize these policy files.
1000# The "crypto.policy" security property points to a subdirectory
1001# within <java-home>/conf/security/policy/ which can be customized.
1002# Please see the <java-home>/conf/security/policy/README.txt file or consult
1003# the Java Security Guide/JCA documentation for more information.
1004#
1005# YOU ARE ADVISED TO CONSULT YOUR EXPORT/IMPORT CONTROL COUNSEL OR ATTORNEY
1006# TO DETERMINE THE EXACT REQUIREMENTS.
1007#
1008# [1] Please note that the JCE for Java SE, including the JCE framework,
1009# cryptographic policy files, and standard JCE providers provided with
1010# the Java SE, have been reviewed and approved for export as mass market
1011# encryption item by the US Bureau of Industry and Security.
1012#
1013# Note: This property is currently used by the JDK Reference implementation.
1014# It is not guaranteed to be examined and used by other implementations.
1015#
1016crypto.policy=unlimited
1017
1018#
1019# The policy for the XML Signature secure validation mode. Validation of
1020# XML Signatures that violate any of these constraints will fail.
1021# The mode can be enabled or disabled by setting the property
1022# "org.jcp.xml.dsig.secureValidation" to Boolean.TRUE or Boolean.FALSE with
1023# the javax.xml.crypto.XMLCryptoContext.setProperty() method, or by setting
1024# the system property "org.jcp.xml.dsig.secureValidation" to "true" or
1025# "false". Any other value for the system property is also treated as "false".
1026# If the system property is set, it supersedes the XMLCryptoContext property
1027# value.
1028#
1029# The secure validation mode is enabled by default.
1030#
1031# Policy:
1032# Constraint {"," Constraint }
1033# Constraint:
1034# AlgConstraint | MaxTransformsConstraint | MaxReferencesConstraint |
1035# ReferenceUriSchemeConstraint | KeySizeConstraint | OtherConstraint
1036# AlgConstraint
1037# "disallowAlg" Uri
1038# MaxTransformsConstraint:
1039# "maxTransforms" Integer
1040# MaxReferencesConstraint:
1041# "maxReferences" Integer
1042# ReferenceUriSchemeConstraint:
1043# "disallowReferenceUriSchemes" String { String }
1044# KeySizeConstraint:
1045# "minKeySize" KeyAlg Integer
1046# OtherConstraint:
1047# "noDuplicateIds" | "noRetrievalMethodLoops"
1048#
1049# For AlgConstraint, Uri is the algorithm URI String that is not allowed.
1050# See the XML Signature Recommendation for more information on algorithm
1051# URI Identifiers. For KeySizeConstraint, KeyAlg is the standard algorithm
1052# name of the key type (ex: "RSA"). If the MaxTransformsConstraint,
1053# MaxReferencesConstraint or KeySizeConstraint (for the same key type) is
1054# specified more than once, only the last entry is enforced.
1055#
1056# Note: This property is currently used by the JDK Reference implementation.
1057# It is not guaranteed to be examined and used by other implementations.
1058#
1059jdk.xml.dsig.secureValidationPolicy=\
1060 disallowAlg http://www.w3.org/TR/1999/REC-xslt-19991116,\
1061 disallowAlg http://www.w3.org/2001/04/xmldsig-more#rsa-md5,\
1062 disallowAlg http://www.w3.org/2001/04/xmldsig-more#hmac-md5,\
1063 disallowAlg http://www.w3.org/2001/04/xmldsig-more#md5,\
1064 disallowAlg http://www.w3.org/2000/09/xmldsig#sha1,\
1065 disallowAlg http://www.w3.org/2000/09/xmldsig#dsa-sha1,\
1066 disallowAlg http://www.w3.org/2000/09/xmldsig#rsa-sha1,\
1067 disallowAlg http://www.w3.org/2007/05/xmldsig-more#sha1-rsa-MGF1,\
1068 disallowAlg http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1,\
1069 maxTransforms 5,\
1070 maxReferences 30,\
1071 disallowReferenceUriSchemes file http https,\
1072 minKeySize RSA 1024,\
1073 minKeySize DSA 1024,\
1074 minKeySize EC 224,\
1075 noDuplicateIds,\
1076 noRetrievalMethodLoops
1077
1078#
1079# Support for the here() function
1080#
1081# This security property determines whether the here() XPath function is
1082# supported in XML Signature generation and verification.
1083#
1084# If this property is set to false, the here() function is not supported.
1085# Generating an XML Signature that uses the here() function will throw an
1086# XMLSignatureException. Validating an existing XML Signature that uses the
1087# here() function will also throw an XMLSignatureException.
1088#
1089# The default value for this property is true.
1090#
1091# Note: This property is currently used by the JDK Reference implementation.
1092# It is not guaranteed to be examined and used by other implementations.
1093#
1094#jdk.xml.dsig.hereFunctionSupported=true
1095
1096#
1097# Deserialization JVM-wide filter factory
1098#
1099# A filter factory class name is used to configure the JVM-wide filter factory.
1100# The class must be public, must have a public zero-argument constructor, implement the
1101# java.util.function.BinaryOperator<java.io.ObjectInputFilter> interface, provide its
1102# implementation and be accessible via the application class loader.
1103# A builtin filter factory is used if no filter factory is defined.
1104# See java.io.ObjectInputFilter.Config for more information.
1105#
1106# If the system property jdk.serialFilterFactory is also specified, it supersedes
1107# the security property value defined here.
1108#
1109#jdk.serialFilterFactory=<classname>
1110
1111#
1112# Deserialization JVM-wide filter
1113#
1114# A filter, if configured, is used by the filter factory to provide the filter used by
1115# java.io.ObjectInputStream during deserialization to check the contents of the stream.
1116# A filter is configured as a sequence of patterns, each pattern is either
1117# matched against the name of a class in the stream or defines a limit.
1118# Patterns are separated by ";" (semicolon).
1119# Whitespace is significant and is considered part of the pattern.
1120#
1121# If the system property jdk.serialFilter is also specified, it supersedes
1122# the security property value defined here.
1123#
1124# If a pattern includes a "=", it sets a limit.
1125# If a limit appears more than once the last value is used.
1126# Limits are checked before classes regardless of the order in the
1127# sequence of patterns.
1128# If any of the limits are exceeded, the filter status is REJECTED.
1129#
1130# maxdepth=value - the maximum depth of a graph
1131# maxrefs=value - the maximum number of internal references
1132# maxbytes=value - the maximum number of bytes in the input stream
1133# maxarray=value - the maximum array length allowed
1134#
1135# Other patterns, from left to right, match the class or package name as
1136# returned from Class.getName.
1137# If the class is an array type, the class or package to be matched is the
1138# element type.
1139# Arrays of any number of dimensions are treated the same as the element type.
1140# For example, a pattern of "!example.Foo", rejects creation of any instance or
1141# array of example.Foo.
1142#
1143# If the pattern starts with "!", the status is REJECTED if the remaining
1144# pattern is matched; otherwise the status is ALLOWED if the pattern matches.
1145# If the pattern contains "/", the non-empty prefix up to the "/" is the
1146# module name;
1147# if the module name matches the module name of the class then
1148# the remaining pattern is matched with the class name.
1149# If there is no "/", the module name is not compared.
1150# If the pattern ends with ".**" it matches any class in the package and all
1151# subpackages.
1152# If the pattern ends with ".*" it matches any class in the package.
1153# If the pattern ends with "*", it matches any class with the pattern as a
1154# prefix.
1155# If the pattern is equal to the class name, it matches.
1156# Otherwise, the status is UNDECIDED.
1157#
1158#jdk.serialFilter=pattern;pattern
1159
1160#
1161# RMI Registry Serial Filter
1162#
1163# The filter pattern uses the same format as jdk.serialFilter.
1164# This filter can override the builtin filter if additional types need to be
1165# allowed or rejected from the RMI Registry or to decrease limits but not
1166# to increase limits.
1167# If the limits (maxdepth, maxrefs, or maxbytes) are exceeded, the object is rejected.
1168#
1169# Each non-array type is allowed or rejected if it matches one of the patterns,
1170# evaluated from left to right, and is otherwise allowed. Arrays of any
1171# component type, including subarrays and arrays of primitives, are allowed.
1172#
1173# Array construction of any component type, including subarrays and arrays of
1174# primitives, are allowed unless the length is greater than the maxarray limit.
1175# The filter is applied to each array element.
1176#
1177# Note: This property is currently used by the JDK Reference implementation.
1178# It is not guaranteed to be examined and used by other implementations.
1179#
1180# The built-in filter allows subclasses of allowed classes and
1181# can approximately be represented as the pattern:
1182#
1183#sun.rmi.registry.registryFilter=\
1184# maxarray=1000000;\
1185# maxdepth=20;\
1186# java.lang.String;\
1187# java.lang.Number;\
1188# java.lang.reflect.Proxy;\
1189# java.rmi.Remote;\
1190# sun.rmi.server.UnicastRef;\
1191# sun.rmi.server.RMIClientSocketFactory;\
1192# sun.rmi.server.RMIServerSocketFactory;\
1193# java.rmi.server.UID
1194#
1195# RMI Distributed Garbage Collector (DGC) Serial Filter
1196#
1197# The filter pattern uses the same format as jdk.serialFilter.
1198# This filter can override the builtin filter if additional types need to be
1199# allowed or rejected from the RMI DGC.
1200#
