////
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
////
:jsse-default-keystores: https://docs.oracle.com/en/java/javase/21/security/java-secure-socket-extension-jsse-reference-guide.html#GUID-7D9F43B8-AABF-4C5B-93E6-3AFB18B66150

[id=log4j.configuration.allowedProtocols]
== `log4j.configuration.allowedProtocols`

[cols="1h,5"]
|===
| Env. variable | `LOG4J_CONFIGURATION_ALLOWED_PROTOCOLS`
| Type          | Comma-separated list of https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/net/URL.html[`URL`] protocols
| Default value | `file, https, jar`
|===

A comma separated list of https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/net/URL.html[`URL`] protocols that may be used to load any kind of configuration source.

To completely prevent accessing the configuration via the Java `URL` class specify a value of `_none`.

NOTE:: Since Log4j does not use `URL` to access `file:` resources, this protocol can not be effectively disabled.

[id=log4j.transportSecurity.trustStore.location]
== `log4j.transportSecurity.trustStore.location`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_TRUST_STORE_LOCATION`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/nio/file/Path.html[`Path`] or https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/net/URI.html[`URI`]

| Default value
| see link:{jsse-default-keystores}[Default Java trust store]
|===

The location of the trust store.

[id=log4j.transportSecurity.trustStore.password]
== `log4j.transportSecurity.trustStore.password`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_TRUST_STORE_PASSWORD`

| Type          | `String`

| Default value | `null`
|===

The password for the trust store.

[id=log4j.transportSecurity.trustStore.passwordFile]
== `log4j.transportSecurity.trustStore.passwordFile`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_TRUST_STORE_PASSWORD_FILE`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/nio/file/Path.html[`Path`]

| Default value | `null`
|===

The name of a file that contains the password for the trust store.

[id=log4j.transportSecurity.trustStore.passwordEnvVar]
== `log4j.transportSecurity.trustStore.passwordEnvVar`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_TRUST_STORE_PASSWORD_ENV_VAR`

| Type
| `String`

| Default value
| `null`
|===

The name of the environment variable that contains password for the trust store.

[id=log4j.transportSecurity.trustStore.type]
== `log4j.transportSecurity.trustStore.type`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_TRUST_STORE_TYPE`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/specs/security/standard-names.html#keystore-types[`KeyStore` type]

| Default value
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/security/KeyStore.html#getDefaultType()[Default Java `KeyStore` type]
|===

The type of trust store.

[id=log4j.transportSecurity.trustStore.keyManagerFactory.algorithm]
== `log4j.transportSecurity.trustStore.keyManagerFactory.algorithm`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_TRUST_STORE_KEY_MANAGER_FACTORY_ALGORITHM`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/specs/security/standard-names.html#keymanagerfactory-algorithms[`KeyManagerFactory` type]

| Default value
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/javax/net/ssl/KeyManagerFactory.html#getDefaultAlgorithm()[Default Java `KeyManagerFactory` algorithm]
|===

Name of the https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/javax/net/ssl/KeyManagerFactory.html[`KeyManagerFactory`] implementation to use for the trust store.

[id=log4j.transportSecurity.verifyHostName]
== `log4j.transportSecurity.verifyHostName`

[cols="1h,5"]
|===
| Env. variable | `LOG4J_TRANSPORT_SECURITY_VERIFY_HOST_NAME`
| Type          | `boolean`
| Default value | `false`
|===

If `true` enables verification of the name of the TLS server.

[id=log4j.transportSecurity.keyStore.location]
== `log4j.transportSecurity.keyStore.location`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_KEY_STORE_LOCATION`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/nio/file/Path.html[`Path`] or
https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/net/URI.html[`URI`]

| Default value
| see link:{jsse-default-keystores}[Default Java key store]
|===

The location of the private key store.

[id=log4j.transportSecurity.keyStore.password]
== `log4j.transportSecurity.keyStore.password`

[cols="1h,5"]
|===
| Env. variable | `LOG4J_TRANSPORT_SECURITY_KEY_STORE_PASSWORD`
| Type          | `String`
| Default value | `null`
|===

The password for the private key store.

[id=log4j.transportSecurity.keyStore.passwordFile]
== `log4j.transportSecurity.keyStore.passwordFile`

[cols="1h,5"]
|===
| Env. variable | `LOG4J_TRANSPORT_SECURITY_KEY_STORE_PASSWORD_FILE`
| Type          | https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/nio/file/Path.html[`Path`]
| Default value | `null`
|===

The name of a file that contains the password for the private key store.

[id=log4j.transportSecurity.keyStore.passwordEnvVar]
== `log4j.transportSecurity.keyStore.passwordEnvVar`

[cols="1h,5"]
|===
| Env. variable | `LOG4J_TRANSPORT_SECURITY_KEY_STORE_PASSWORD_ENV_VAR`
| Type          | `String`
| Default value | `null`
|===

The name of the environment variable that contains the password for the private key store.

[id=log4j.transportSecurity.keyStore.type]
== `log4j.transportSecurity.keyStore.type`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_KEY_STORE_TYPE`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/specs/security/standard-names.html#keystore-types[`KeyStore` type]

| Default value
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/java/security/KeyStore.html#getDefaultType()[Default Java `KeyStore` type]
|===

The type of private key store.
https://docs.oracle.com/en/java/javase/{java-target-version}/docs/specs/security/standard-names.html#keystore-types[`KeyStore`].

[id=log4j.transportSecurity.keyStore.keyManagerFactory.algorithm]
== `log4j.transportSecurity.keyStore.keyManagerFactory.algorithm`

[cols="1h,5"]
|===
| Env. variable
| `LOG4J_TRANSPORT_SECURITY_KEY_STORE_KEY_MANAGER_FACTORY_ALGORITHM`

| Type
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/specs/security/standard-names.html#keymanagerfactory-algorithms[`KeyManagerFactory` type]

| Default value
| https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/javax/net/ssl/KeyManagerFactory.html#getDefaultAlgorithm()[Default Java `KeyManagerFactory` algorithm]
|===

Name of the https://docs.oracle.com/en/java/javase/{java-target-version}/docs/api/java.base/javax/net/ssl/KeyManagerFactory.html[`KeyManagerFactory`] implementation to use for the private key store.
See https://docs.oracle.com/en/java/javase/{java-target-version}/docs/specs/security/standard-names.html#keymanagerfactory-algorithms[`KeyManagerFactory` types].
