Commit graph

9614 commits

Author SHA1 Message Date
Arne Welzel
22958f7cdf Merge remote-tracking branch 'origin/topic/awelzel/1474-cluster-telemetry'
* origin/topic/awelzel/1474-cluster-telemetry:
  btest/cluster/telemetry: Add smoke testing for telemetry
  cluster/WebSocket: Fetch X-Application-Name header as app label
  cluster/WebSocket: Pass X-Application-Name to dispatcher
  broker/WebSocketShim: Add calls to Telemetry hooks
  cluster/WebSocket: Configure telemetry for WebSocket backends
  broker: Hook up generic cluster telemetry
  cluster: Introduce telemetry component

One bug fix removing static from a variable that shouldn't be static.
2025-06-26 14:54:01 +02:00
Johanna Amann
14e801a709 Merge remote-tracking branch 'origin/topic/johanna/gh-4598'
* origin/topic/johanna/gh-4598:
  Only pass session ticket data in ssl_session_ticket_handshake event
2025-06-26 09:59:16 +01:00
Arne Welzel
771c37b6b2 Merge branch 'rename' of https://github.com/bhaskarbhar/zeek
* 'rename' of https://github.com/bhaskarbhar/zeek:
  Update zeek.bif
  Update init-bare.zeek
  Added Baseline
  Renamed
2025-06-25 19:27:13 +02:00
bhaskarbhar
f9c34f29c7
Update zeek.bif 2025-06-25 22:53:29 +05:30
root
da89e7ee6e Renamed 2025-06-25 21:10:08 +05:30
Arne Welzel
b28e5f261e cluster/WebSocket: Fetch X-Application-Name header as app label 2025-06-25 17:12:59 +02:00
Arne Welzel
2f7d5eaf2a cluster/WebSocket: Pass X-Application-Name to dispatcher
This is going to be used to add labels to telemetry if the
X-Application-Name header is set.
2025-06-25 17:07:29 +02:00
Arne Welzel
6a84237a95 broker/WebSocketShim: Add calls to Telemetry hooks
WebSocket clients with Broker do not use the normal Broker backend, so
we need to add the telemetry invocations explicitly.
2025-06-25 16:59:49 +02:00
Arne Welzel
376e6dba97 cluster/WebSocket: Configure telemetry for WebSocket backends 2025-06-25 16:59:49 +02:00
Arne Welzel
f011e7e667 broker: Hook up generic cluster telemetry 2025-06-25 16:59:49 +02:00
Arne Welzel
4c34274a6c cluster: Introduce telemetry component 2025-06-25 16:59:49 +02:00
Evan Typanski
d3593e0489 Merge remote-tracking branch 'origin/topic/etyp/remove-list'
* origin/topic/etyp/remove-list:
  Remove `list` from Zeek grammar
2025-06-25 10:36:08 -04:00
Christian Kreibich
29b0f844c0 Add a VLAN-aware flow tuple implementation.
This is a first "real" implementation of a custom tuple, adding additional
fields over the standard five-tuple.

Includes test cases.
2025-06-25 13:19:26 +02:00
Christian Kreibich
a5122b5032 Deprecate ConnTuple and related APIs.
Given IP-aware ConnKeys, ConnTuples aren't really required any more. ConnTuple
had two benefits:

- It preserved the original src/dst orientation from the packet headers it was
based on, which IPBasedConnKey now tracks and provides accessor methods for.

- In IPBasedAnalyzer::AnalyzePacket() its instance survived past the std:move()
of the key into NewConn(), which we sidestep by keeping the original src address
and port around until we need after the connection is obtained.
2025-06-25 13:19:26 +02:00
Christian Kreibich
7548dc9e96 Deprecate the old Connection constructor and detail::ConnKey class.
The new key-based Connection constructor replaces the former, and the new
ConnKey class tree replaces the latter.
2025-06-25 13:19:26 +02:00
Christian Kreibich
52d6228b06 Switch to virtualized use of new zeek::ConnKey class tree
This touches quite a few places, but each just swaps out existing
APIs and/or zeek::detail::ConnKey instances.
2025-06-25 13:19:26 +02:00
Christian Kreibich
b8f82ff659 Provide a connkey factory for Zeek's default five-tuples.
Since the base factory is pure virtual this is now the first full
implementation, but still a bit of a special case because it implements Zeek's
default behavior and doesn't add "custom" content to the tuple.
2025-06-25 13:18:08 +02:00
Christian Kreibich
5af8fc242a Add IP-specific ConnKey implementation.
The InitTuple() implementation here is a placeholder for a fuller one following
later, when we do away with the need for ConnTuple.
2025-06-25 13:18:08 +02:00
Christian Kreibich
0c64f6a7b9 Establish plugin infrastructure for ConnKey factories.
ConnKey factories are intermediaries that encapsulate the details of how to
instantiate ConnKeys, which codify the hash input for connection lookups.
2025-06-25 13:18:07 +02:00
Christian Kreibich
d19fdfd17c Add new ConnKey abstraction. 2025-06-25 13:18:07 +02:00
Arne Welzel
4b472f2771 Merge remote-tracking branch 'origin/topic/awelzel/telemetry-endpoint-to-node-rename'
* origin/topic/awelzel/telemetry-endpoint-to-node-rename:
  telemetry: Rename endpoint label to node label
2025-06-25 09:33:55 +02:00
Arne Welzel
eea194ddd8 telemetry: Rename endpoint label to node label
Using a label named "endpoint" is not intuitive and requires explaining to
users that it's really just the Cluster::node value. Change the label to
"node", so that we don't need to do the explaining.

This probably breaks some existing users of the Prometheus metrics, but after
looking more at metrics recently, "endpoint" really is a thorn in my eye.
2025-06-25 09:33:01 +02:00
bhaskarbhar
04d6fa3cb7 Add get_tags_by_category BIF method 2025-06-24 13:47:49 -07:00
Arne Welzel
fbeb3adfe6 Merge remote-tracking branch 'origin/topic/awelzel/dns-naming-authority-pointer'
* origin/topic/awelzel/dns-naming-authority-pointer:
  DNS: Implement NAPTR RR support
  DNS: Move extract_char_string() helper around
2025-06-24 17:44:17 +02:00
Arne Welzel
4f1fc296b6 DNS: Implement NAPTR RR support
My phone is sending NAPTR queries and we reported an unknown RR type 35
in weird.log for the response, so figured I'd just add it.
2025-06-24 17:43:27 +02:00
Johanna Amann
9d06a13828 Only pass session ticket data in ssl_session_ticket_handshake event
This commit fixes the parsing of the data field in the SSL analyzer. So
far, this field contained two extra bytes at the beginning, which
contain the length of the following data.

Now, the data passed to the event only contains the actual value of the
session ticket.

The Spicy analyzer already contains the correct handling of this field,
and does not need to be updated. A test that uses the event and
exhibited the bug was added.
2025-06-24 16:33:14 +01:00
Arne Welzel
cab4ebf513 Merge remote-tracking branch 'origin/topic/awelzel/4586-zeromq-ipv6'
* origin/topic/awelzel/4586-zeromq-ipv6:
  cluster/zeromq: Short-circuit DoPublishLogWrite() when not initialized
  cluster/zeromq: Hook up and enable IPV6 by default
  cluster/zeromq/connect: Make failures fatal
  cluster/zeromq: Move log_push creation to DoInit()
2025-06-24 17:16:58 +02:00
Arne Welzel
1afd497c0c cluster/zeromq: Short-circuit DoPublishLogWrite() when not initialized
After moving the log_push initialization from the constructor to the
DoInit() method, it's now possible that DoPublishLogWrites() is invoked
even if DoInit() was never called. Handle this by short-circuiting. This
is sort of an error, but can happen during tests if scripts are loaded
somewhat arbitrarily.
2025-06-24 17:12:45 +02:00
Arne Welzel
89c0b0faf3 cluster/zeromq: Hook up and enable IPV6 by default
ZeroMQ's IPv6 support isn't enabled by default, resulting in
"No such device" errors when attempting to listen on an IPv6
address. This change adds a ipv6 option to the ZeroMQ module
and enables it by default. Further, adds a test configuring
everything to listen on IPv6 ::1 as well, and one test to provoke
the original error. This also regularizes some error messages.

The addr_to_uri() calls weren't actually needed, but they apparently do
not hurt and the result is easier on the eyes, so use them :-)
2025-06-24 17:12:45 +02:00
Johanna Amann
72bd683c23 Merge remote-tracking branch 'origin/topic/johanna/default-canonifier-only-first-timestamp'
* origin/topic/johanna/default-canonifier-only-first-timestamp:
  Default canonifier change to only remove first timestamp in line
  Align SMB timestamp calculation between operating systems
2025-06-24 14:02:04 +01:00
Tim Wojtulewicz
d6e25a2e22 Switch IPv6_Hdr_Chain to a vector of objects instead of pointers 2025-06-23 10:41:23 -07:00
Tim Wojtulewicz
7e6d3a6b39 Remove unneeded include dirs in zeromq CMakeLists.txt 2025-06-23 10:39:13 -07:00
Tim Wojtulewicz
6aa5145782 Deprecate BRO_PLUGIN_INSTALL_PATH constant 2025-06-23 08:35:25 -07:00
Tim Wojtulewicz
37be47328e Make constants in IP::ParseResult uppercase, deprecate the old ones 2025-06-23 08:35:25 -07:00
Tim Wojtulewicz
a27dee6370 Fix comparison against CapLen results in IPTunnel 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
311a744a20 Fix clang-tidy cppcoreguidelines-virtual-class-destructor warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
e84c99fb14 Fix clang-tidy cppcoreguidelines-macro-usage warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
74bf987b82 Fix clang-tidy modernize-use-using warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
6f79a6381f Fix clang-tidy modernize-use-transparent-functors warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
e613e7c304 Fix clang-tidy modernize-use-override warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
edf3ceb52c Fix clang-tidy modernize-use-nullptr warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
f15cab4a2b Fix clang-tidy modernize-use-equals-delete warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
cb78d2202f Fix clang-tidy modernize-use-emplace warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
fb55c8856e Fix clang-tidy modernize-use-default-member-init warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
a05b4abdf7 Fix clang-tidy modernize-use-bool-literals warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
ed202b36b2 Fix clang-tidy modernize-return-braced-init-list warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
157c488b9d Fix clang-tidy modernize-type-traits warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
23184af21c Fix clang-tidy modernize-redundnat-void-arg warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
d19486d039 Fix clang-tidy modernize-pass-by-value warnings in headers 2025-06-23 08:35:24 -07:00
Tim Wojtulewicz
c0e275604f Fix clang-tidy modernize-loop-convert warnings in headers 2025-06-23 08:35:24 -07:00