You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2ea2bd8
Browse filesBrowse the repository at this point in the historyBrowse files
docs: administration: transport-security: document Windows store (#2862)
- Add a Windows certificate store section: when the store is used,
the default Root store, Disallowed store filtering, and the
reload before each new connection that fails the connection on
error.
- Add a Missing root certificates section: the background chain
lookup, its limits and log messages, and the
FLB_WINDOWS_AUTO_ROOT_UPDATE switch.
- Note the system store reload and the Windows failure case in
Certificate reload.
- Windows store: a named store set with tls.windows.certstore_name
is loaded in addition to tls.ca_file or tls.ca_path, and
certificates from both are trusted.
- For that combination, the missing root lookup doesn't run, and a
failed store reload keeps the certificates loaded before.
Refs fluent/fluent-bit#12824
Signed-off-by: Eric D. Schabell <eric@schabell.org>
Copy file name to clipboardExpand all lines: administration/transport-security.md
+28-1Lines changed: 28 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -231,6 +231,31 @@ pipeline:
231
231
{% endtab %}
232
232
{% endtabs %}
233
233
234
+
## Windows certificate store
235
+
236
+
This section applies to Windows builds compiled with Microsoft Visual C++, which include the official Windows packages.
237
+
238
+
On Windows, when Fluent Bit connects to a server with TLS, for example from an output plugin, and neither `tls.ca_file` nor `tls.ca_path` is set, it verifies the server certificate against the Windows certificate store. Inputs that set `tls.verify_client_cert` without `tls.ca_file` or `tls.ca_path` verify client certificates against the same store. By default, Fluent Bit loads the current user's `Root` store. For outputs, `tls.windows.certstore_name` and `tls.windows.use_enterprise_store` select a different store or store location. If an output sets `tls.windows.certstore_name` together with `tls.ca_file` or `tls.ca_path`, Fluent Bit loads the named store in addition to the CA file or directory and trusts certificates from both. For that output, Fluent Bit doesn't run the [missing root certificate](#missing-root-certificates) lookup, and if a store reload fails, new connections keep using the certificates that were loaded before.
239
+
240
+
Fluent Bit doesn't load certificates that are also in the Windows `Disallowed` store. If it can't check a certificate against the `Disallowed` store, it logs a warning and skips that certificate. If it can't open the `Disallowed` store, it logs `cannot open Windows Disallowed store: <code>` and loads no certificates from the Windows store. Because Fluent Bit reloads the store before each new connection, every new connection then fails, even with `tls.verify` off. If the output sets `tls.windows.certstore_name`, the output fails to start instead.
241
+
242
+
Fluent Bit reloads the Windows store before each new TLS connection, so certificates added to or removed from the store apply to new connections without a restart. Each successful reload logs `reloaded TLS certificate configuration` at the `info` level. If a reload fails for any reason, Fluent Bit logs `detected certificate file changes but reload failed` and the new connection fails.
243
+
244
+
### Missing root certificates
245
+
246
+
When `tls.verify` is on and the peer certificate doesn't chain to a trusted certificate in the loaded store, Fluent Bit asks Windows to build the certificate chain in a background thread. Whether Windows retrieves a missing root certificate depends on its automatic root certificate update settings and network access. Fluent Bit doesn't add certificates to any store itself. Fluent Bit turns off Authority Information Access (AIA) retrieval for this lookup, so Windows doesn't download missing intermediate certificates, and the server must send them.
247
+
248
+
The connection that started the lookup still fails. If Windows installs the missing root certificate in a store that Fluent Bit loads, such as the default `Root` store, Fluent Bit picks it up when it reloads the store, so a later attempt can succeed. Fluent Bit runs at most one lookup at a time for each TLS configuration, and starts at most one per minute for each configuration. It waits for a running lookup to finish before it releases the TLS configuration, for example at shutdown.
249
+
250
+
Fluent Bit logs the following messages:
251
+
252
+
-`scheduled Windows certificate chain lookup`, at the `debug` level, when a lookup starts.
253
+
-`Windows resolved the peer certificate chain`, at the `info` level, when Windows built a chain it trusts. This doesn't guarantee that Fluent Bit trusts the chain, because Fluent Bit only uses the store it loads. Fluent Bit logs this message when the next connection starts after the lookup finishes.
254
+
-`Windows certificate chain lookup returned 0x<status>`, at the `debug` level, when the lookup finished without a trusted chain.
255
+
-`could not start Windows certificate chain lookup`, as a warning, when the lookup can't start.
256
+
257
+
To turn off these lookups, set the environment variable `FLB_WINDOWS_AUTO_ROOT_UPDATE` to `off` before you start Fluent Bit. Any value other than `on`, `true`, or `yes`, in any letter case, turns them off.
258
+
234
259
## Certificate reload
235
260
236
261
Automatic certificate reload is available in Fluent Bit version 5.1 and greater.
@@ -245,7 +270,9 @@ For `tls.ca_path`, Fluent Bit inspects the directory itself rather than each cer
245
270
246
271
Sessions that are already established keep the context they were created with. A long-lived connection continues to use the previous certificate until it's reconnected.
247
272
248
-
If the new files can't be loaded, for example because a certificate and key were written separately and Fluent Bit read them mid-update, it logs `detected certificate file changes but reload failed` and keeps the previous context. Connections continue to work with the certificate that was already loaded, and the next session retries the reload.
273
+
On Windows and macOS, when Fluent Bit uses the system certificate store for a TLS connection that doesn't set `tls.ca_file` or `tls.ca_path`, it also reloads the store before each new TLS connection. See [Windows certificate store](#windows-certificate-store).
274
+
275
+
If the new files can't be loaded, for example because a certificate and key were written separately and Fluent Bit read them mid-update, it logs `detected certificate file changes but reload failed` and keeps the previous context. Connections continue to work with the certificate that was already loaded, and the next session retries the reload. On Windows, when Fluent Bit uses the Windows certificate store, any failed reload, whatever the cause, fails the new connection instead.
0 commit comments