Repository navigation
support systemd-journal log prefix in authelia filter - #4262
Merged
Merged
Conversation
… (line starts with some default date format)
sebres
force-pushed
the
add-authelia-filter
branch
from
November 3, 2026 19:20
d759626 to
81f3c37
Compare
Contributor
|
Thx! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to gh-4259 (and gh-4005) addressing the review comment regarding
systemd-journalprefix handling inconfig/filter.d/authelia.conf.Details
config/filter.d/authelia.conf:before = common.confand set_daemon = autheliasologtype = fileis inherited from[DEFAULT], allowing Fail2Ban to switch automatically tologtype = journalwhenbackend = systemdis used.^\s*in[lt_file]with^<__prefix_line>(where__prefix_line = \s*in[lt_file]), keeping the compiled regex identical forlogtype = file.[lt_short]and[lt_journal]sections reusing<lt_file/failregex>with the standard journal prefix (hostname authelia[pid]:).^<lt_short/__prefix_line>to[lt_json]so structured JSON logs also match when prefixed by journal metadata.fail2ban/tests/files/logs/authelia:logtype = journal(including a negative test case for successful authentication) and JSON format with a journal prefix.Checklist
failregexfor filterXwith sample log lines (and# failJSON) withinfail2ban/tests/files/logs/Xfile