Chris Beck
0bc1329fcf
fixups after deployment
2025-12-06 21:03:48 -07:00
Chris Beck
0cca1f8da3
remove admin-netcat thing
2025-12-06 20:43:49 -07:00
Chris Beck
c62bac4a1d
refactor suppression reason overall
2025-12-06 19:47:58 -07:00
Chris Beck
12f0c99ef9
factor out common loop that tests a sequence of limiters
2025-12-06 19:45:33 -07:00
Chris Beck
225b308a26
factor out unnecessary inputs to log handler (ts_sec)
2025-12-06 19:36:52 -07:00
Chris Beck
63ab1a62d3
rejigger collected_at timestamp
2025-12-06 19:32:55 -07:00
Chris Beck
77a0767db5
add CollectedAt to message, get rid of backfilling timestamps with Utc::now()
2025-12-06 19:30:01 -07:00
Chris Beck
7791af162c
cargo fmt, fix limiter set evaluate semantics
2025-12-06 19:24:39 -07:00
Chris Beck
20604b1d08
fixups to signal trust set update set
2025-12-06 10:46:46 -07:00
Chris Beck
b0d1c1bd92
refactor signal trust set API
2025-12-06 10:21:11 -07:00
Chris Beck
f8e214cc8d
refactor to move functions onto signal-trust-set
2025-12-06 10:18:01 -07:00
Chris Beck
133a367a36
rename struct to signal trust set
2025-12-06 10:12:33 -07:00
Chris Beck
6ed38cb1fd
refactor admin_signal_uuids container
2025-12-06 10:09:54 -07:00
Chris Beck
5779edb610
rename admin safety numbers to admin_signal_uuids
2025-12-06 09:57:40 -07:00
Chris Beck
ac6beaf8e4
add conf-test on top-level config
2025-12-06 09:52:55 -07:00
Chris Beck
393d68e5ef
remove unnecessary dependencies, put prefix on log handler when flattening
2025-12-06 09:50:33 -07:00
Chris Beck
64bc606201
enable conf serde and test the toml format with our current schema
2025-12-06 03:26:30 -07:00
Chris Beck
0de84bcd60
factor out last async mutex
2025-12-06 02:53:10 -07:00
Chris Beck
ae3761bffe
make rate limiters thread-safe with fine-grained locks, remove hard locks at higher levels
2025-12-06 02:34:36 -07:00
Chris Beck
9b47963f16
improve the multi rate limiter for correctness (tracking evicted elements)
2025-12-06 02:11:41 -07:00
Chris Beck
fed5f7e468
make RateThreshold always >= or < than, and make multiratelimiter respect this
...
require comparators to be explicit
2025-12-06 00:13:42 -07:00
Chris Beck
9d650c3df2
source locaiton rate limiter is a set of multirate limiters
2025-12-05 23:59:39 -07:00
Chris Beck
4e9704def2
flatten logfilter into route
2025-12-05 23:51:05 -07:00
Chris Beck
928a1aba78
simplify an import
2025-12-05 23:47:31 -07:00
Chris Beck
4f84cacc7b
rejigger concurrent map api into lazy map
2025-12-05 23:39:45 -07:00
Chris Beck
d2d9754df0
commit a rustfmt toml and merge imports
2025-12-05 23:22:16 -07:00
Chris Beck
5a12cd1bde
move rate_limiter_set to its own module
2025-12-05 23:16:33 -07:00
Chris Beck
761877e35e
move rate limiter module to top-level
2025-12-05 23:12:24 -07:00
Chris Beck
def80bfe64
rearrange code in route.rs for readability
2025-12-05 22:46:15 -07:00
Chris Beck
107bd2a2de
improve prefix used with log alerts (summary is only the offending log message)
2025-12-05 22:24:17 -07:00
Chris Beck
04ad4035f9
alternative summary specification
2025-12-05 22:16:31 -07:00
Chris Beck
7a163f3962
rename verified signal message to admin message, reformat
2025-12-05 22:07:22 -07:00
Chris Beck
010a5a9336
rename AdminMessage to SignalAlert message which is less confusing
2025-12-05 22:05:58 -07:00
Chris Beck
f3b66541ed
simplify log_format code
2025-12-05 21:56:47 -07:00
Chris Beck
3b5e191d75
avoid allocations when formatting log messages, factor out humantime crate
2025-12-05 21:43:26 -07:00
Chris Beck
aaeb5b3b28
pre-allocate strings when formatting logs
2025-12-05 20:51:04 -07:00
Chris Beck
f969c20e71
move log-message formatting code to its own module
2025-12-05 20:42:22 -07:00
Chris Beck
166aaaf167
respect destination override for outbound messages
2025-12-05 20:35:16 -07:00
Chris Beck
74baa63f50
simplify code that locks log buffer for reading
2025-12-05 20:27:55 -07:00
Chris Beck
3c88ba80a5
rename read_all -> with_read_lock
2025-12-05 20:07:43 -07:00
Chris Beck
2085064d89
rename module jsonrpc to signal_jsonrpc
2025-12-05 19:46:22 -07:00
Chris Beck
1b0a2717e8
move circular_buffer module to root level
2025-12-05 19:43:46 -07:00
Chris Beck
35b274bbd3
clippy
2025-12-05 19:42:30 -07:00
Chris Beck
f899d391b9
introduce log_buffer type to cleanup concurrency & correctness
...
also cargo fmt
2025-12-05 19:40:33 -07:00
Chris Beck
a214b8e474
introduce and use new route framework
...
in this change:
* new "concurrent map" API using RwLock<HashMap> optimized for
frequent reads.
* we no longer have a concurrent map of log handlers, we instead
have a log handler containing a concurrent map from origins to
circular buffers
* we have a general concept of a "Limit" now which replaces AlertRule
* A route consists of a filter, plus any number of limits, which
can be per-origin limits or global limits
* The set of routes is disjunctive, while the filters and limits are conjunctive
* Limits can also apply per source location
* Different types of rate limiters are unified under the "Limiter"
abstraction
* The log handler also has a set of overall limiters that can be applied
at the end
* This means we can relatively easily express disjunctions of conjunctions
I think the route structure will also be relatively easy to express in toml
2025-12-05 19:10:37 -07:00
Chris Beck
ffa1246e51
listen on udp and tcp for json logs as well
2025-12-05 15:12:20 -07:00
Chris Beck
a42aad48f4
also allow json logs to be sent over a TCP stream, with multiple messages using json_lines ofrmat for framing
2025-12-05 14:49:21 -07:00
Chris Beck
0a5023ce6b
fixup to syslog parsing around EOF handling, add tests
2025-12-05 14:31:02 -07:00
Chris Beck
e5a18b0630
fix to eof handling on non-transparent message
2025-12-05 14:13:49 -07:00
Chris Beck
914a9910c2
support syslog over TCP as well
2025-12-05 12:45:41 -07:00