Skip to content

Commit 9c22ca2

Browse files
authored
docs: recommend use of appropriately scoped trust roots (#4006)
* docs: recommend use of appropriately scoped trust roots This change adds an important note to the documentation for `log4j2.trustStoreLocation` and the `TrustStore` plugin, advising users to configure trust stores with trust roots that are appropriate for their communication scope. The recommendation is grounded in public guidance from [NIST SP 800-52 Rev. 2: *Guidelines for the Selection, Configuration, and Use of Transport Layer Security (TLS) Implementations*](https://csrc.nist.gov/pubs/sp/800/52/r2/final), which advises minimizing trust anchors to those necessary for the intended connections. * fix: rename partial
1 parent 5ee7890 commit 9c22ca2

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

src/site/antora/modules/ROOT/pages/manual/appenders/network.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ xref:plugin-reference.adoc#org-apache-logging-log4j_log4j-core_org-apache-loggin
167167
The trust store is meant to contain the CA certificates you are willing to trust when a remote party presents its certificate.
168168
It determines whether the remote authentication credentials (and thus the connection) should be trusted.
169169
170+
include::partial$manual/trust-store-guideline.adoc[]
171+
170172
[#TrustStoreConfiguration-attributes]
171173
.`TrustStore` configuration attributes
172174
[cols="1m,1,1,5"]

src/site/antora/modules/ROOT/partials/manual/systemproperties/properties-transport-security.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ The username used in HTTP Basic authentication.
130130
131131
The location of the trust store.
132132
133+
include::partial$manual/trust-store-guideline.adoc[]
134+
133135
[id=log4j2.trustStorePassword]
134136
== `log4j2.trustStorePassword`
135137
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
////
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
////
17+
18+
[IMPORTANT]
19+
====
20+
Log4j Core typically does not communicate with external organizations; therefore, the default trust store provided by the Java Runtime Environment is often not appropriate.
21+
22+
When configuring a trust store for Log4j Core, follow established best practices. For example,
23+
https://csrc.nist.gov/pubs/sp/800/52/r2/final[NIST SP 800-52 Rev. 2] (§4.5.2) recommends using a trust store that contains only the CA certificates required for the intended communication scope, such as a private or enterprise CA. This reduces exposure to unintended or compromised CA certificates included in the default trust store.
24+
====

0 commit comments

Comments
 (0)