Commit graph

342 commits

Author SHA1 Message Date
Arne Welzel
d2314d2666 files.log: Unroll and introduce uid and id fields
This is a script-only change that unrolls File::Info records into
multiple files.log entries if the same file was seen over different
connections by single worker. Consequently, the File::Info record
gets the commonly used uid and id fields added. These fields are
optional for File::Info - a file may be analyzed without relation
to a network connection (e.g by using Input::add_analysis()).

The existing tx_hosts, rx_hosts and conn_uids fields of Files::Info
are not meaningful after this change and removed by default. Therefore,
files.log will have them removed, too.

The tx_hosts, rx_hosts and conn_uids fields can be revived by using the
policy script frameworks/files/deprecated-txhosts-rxhosts-connuids.zeek
included in the distribution. However, with v6.1 this script will be
removed.
2022-08-16 17:22:20 +02:00
Tim Wojtulewicz
b5b022449e Update zeek-testing-private commit hash after email regex changes
Related to https://github.com/zeek/zeek/pull/2221
2022-08-12 16:44:25 -07:00
Christian Kreibich
3a0a702723 Merge branch 'topic/christian/management-bugfixes'
* topic/christian/management-bugfixes:
  Management framework: bump cluster testsuite
  Management framework: log node set in dispatch requests cleanly
  Management framework: log additional node events
  Management framework: upon deployment, make agent log multiple node results
  Management framework: fix early return condition for get-id-value
2022-08-10 14:18:38 -07:00
Christian Kreibich
20e08f0d38 Management framework: bump cluster testsuite 2022-08-10 11:24:10 -07:00
Robin Sommer
686e740bbe
Merge remote-tracking branch 'origin/topic/awelzel/telemetry-script-land-v0'
* origin/topic/awelzel/telemetry-script-land-v0:
  Introduce telemetry framework
  Bump broker submodule to master.
2022-08-05 17:14:23 +02:00
Arne Welzel
3fe930dbf2 Introduce telemetry framework
Adds base/frameworks/telemetry with wrappers around telemetry.bif
and updates telemetry/Manager to support collecting metrics from
script land.

Add policy/frameworks/telemetry/log for logging of metrics data
into a new telemetry.log and telemetry_histogram.log and add into
local.zeek by default.
2022-08-05 11:43:44 +02:00
Christian Kreibich
6543c21d23 Merge branch 'topic/christian/management-agent-boot-fix'
* topic/christian/management-agent-boot-fix:
  Management framework: bump cluster testsuite
  Management framework: undo the testsuite result mask
  Management framework: additional logging tweaks
  Management framework: additional context in a few log messages
  Management framework: await Supervisor peering before sending agent's hello
  Management framework: remove outdated comment
2022-07-14 15:50:14 -07:00
Christian Kreibich
b68f9bee61 Management framework: bump cluster testsuite 2022-07-12 17:53:35 -07:00
Christian Kreibich
b96d8afa52 Merge branch 'topic/christian/management-default-instance'
* topic/christian/management-default-instance:
  Management framework: bump zeek-client and cluster testsuite
2022-07-01 11:11:46 -07:00
Christian Kreibich
86431f0a44 Management framework: bump zeek-client and cluster testsuite
No Zeek-side changes here, this just pulls in updates and tests for more
flexible cluster configs in the client.
2022-06-30 10:24:57 -07:00
Christian Kreibich
bf9b1ebbbe Add helpers for syncing commit files with external testsuites
This provides "make sync-repos" to check out all locally available testsuites at
the commits indicated in their commit files, and "make sync-commits" to update
the commit files to the HEADs of the local testsuite repos.

Also adds the commit -> repo sync for the Makefile init target so initialization
always lands on the right version, and removes the corresponding explicit
checkout from the CI repo setup.
2022-06-28 13:20:14 -07:00
Christian Kreibich
9f3dfbdb13 Fix typo in update-timing target for external testsuites
Also includes whitespace tweaks for consistency.
2022-06-28 13:20:03 -07:00
Christian Kreibich
3287b8b793 Merge branch 'topic/christian/management-restart'
* topic/christian/management-restart:
  Management framework: bump external cluster testsuite
  Management framework: bump zeek-client
  Management framework: edit pass over docstrings
  Management framework: node restart support
  Management framework: more consistent Supervisor interaction in the agent
  Management framework: log the controller's startup deployment attempt
  Management framework: bugfix for a get_id_value corner case
  Management framework: minor timeout bugfix
  Management framework: make "result" argument plural in multi-result response events
2022-06-23 12:27:19 -07:00
Christian Kreibich
ec25723283 Management framework: bump external cluster testsuite 2022-06-23 00:02:11 -07:00
Christian Kreibich
54f2f28047 Merge branch 'topic/christian/management-deploy'
* topic/christian/management-deploy: (21 commits)
  Management framework: bump external cluster testsuite
  Management framework: bump zeek-client
  Management framework: rename set_configuration events to stage_configuration
  Management framework: trigger deployment upon when instances are ready
  Management framework: more resilient node shutdown upon deployment
  Management framework: re-trigger deployment upon controller launch
  Management framework: move most deployment handling to internal function
  Management framework: distinguish internally and externally requested deployments
  Management framework: track instances by their Broker IDs
  Management framework: tweak Supervisor event logging
  Management framework: make helper function a local
  Management framework: rename "log_level" to "level"
  Management framework: add "finish" callback to requests
  Management framework: add a helper for rendering result vectors to a string
  Management framework: agents now skip re-deployment of current config
  Management framework: suppress notify_agent_hello upon Supervisor peering
  Management framework: introduce state machine for configs and persist them
  Management framework: introduce deployment API in controller
  Management framework: rename agent "set_configuration" to "deploy"
  Management framework: consistency fixes to the Result record
  ...
2022-06-22 22:59:53 -07:00
Christian Kreibich
661774eb6e Management framework: bump external cluster testsuite 2022-06-22 11:54:58 -07:00
Christian Kreibich
4deacefa4c Merge branch 'topic/christian/management-config-validation'
* topic/christian/management-config-validation:
  Management framework: bump external cluster testsuite
  Management framework: bump zeek-client
  Management framework: add config validation
  Management framework: improvements to port auto-enumeration
  Management framework: control output-to-console in Supervisor
  Management framework: handle no-instances corner case in set-config correctly
2022-06-21 16:59:32 -07:00
Christian Kreibich
09e412c941 Management framework: bump external cluster testsuite 2022-06-19 01:20:22 -07:00
Tim Wojtulewicz
e7a7b2923b Merge remote-tracking branch 'origin/topic/vern/history-tweak'
* origin/topic/vern/history-tweak:
  tie to revised private testing repo
  flip connections that begin with SYN-ACKs if subsequent acks or data seen
2022-06-16 15:57:44 -07:00
Vern Paxson
a94afdec47 tie to revised private testing repo 2022-06-16 14:33:11 -07:00
Christian Kreibich
e7f60d4128 Merge branch 'topic/christian/management-schedule-archiver'
* topic/christian/management-schedule-archiver:
  Management framework: bump external cluster testsuite
  Management framework: make agents support zeek-archiver invocations
  Management framework: fix module naming typo
2022-06-16 11:12:07 -07:00
Christian Kreibich
e92c787987 Management framework: bump external cluster testsuite 2022-06-14 12:32:49 -07:00
Christian Kreibich
216aaa5774 Merge branch 'topic/christian/management-default-listen-interfaces'
* topic/christian/management-default-listen-interfaces:
  Management framework: bump external cluster testsuite
  Management framework: switch default network visibilities
2022-06-14 12:03:08 -07:00
Christian Kreibich
5a5c702967 Management framework: bump external cluster testsuite 2022-06-10 21:56:25 -07:00
Christian Kreibich
763b0c8d10 Merge branch 'topic/christian/management-auto-assign-ports'
* topic/christian/management-auto-assign-ports:
  Management framework: bump zeek-client to pull in relaxed port handling
  Management framework: bump external cluster testsuite
  Management framework: also use send_set_configuration_response_error elsewhere
  Management framework: minor log formatting tweak, for consistency
  Management framework: support auto-assignment of ports in cluster nodes
2022-06-08 13:44:29 -07:00
Christian Kreibich
c0a4bc3ade Management framework: bump external cluster testsuite 2022-06-08 13:29:25 -07:00
Christian Kreibich
ec4015e28c Management framework: bump external cluster testsuite 2022-06-03 10:38:31 -07:00
Christian Kreibich
08d1f93292 Management framework: bump external cluster testsuite 2022-06-03 02:18:35 -07:00
Christian Kreibich
65589c9bcb Merge branch 'topic/christian/management-verify-nodestarts'
* topic/christian/management-verify-nodestarts:
  Management framework: bump external cluster testsuite
  Management framework: bump zeek-client to pull in set-config rendering
  Management framework: enable stdout/stderr reporting
  Management framework: Supervisor extensions for stdout/stderr handling
  Management framework: disambiguate redef field names in agent and controller
  Management framework: move to ResultVec in agent's set_configuration response
  Management framework: tune request timeout granularity and interval
  Management framework: verify node starts when deploying a configuration
  Management framework: a bit of debug-level logging for troubleshooting
2022-05-31 12:59:18 -07:00
Christian Kreibich
c13b367ede Management framework: bump external cluster testsuite 2022-05-31 12:55:21 -07:00
Christian Kreibich
415bbe17d6 Merge branch 'topic/christian/management-cluster-dirs'
* topic/christian/management-cluster-dirs:
  Management framework: bump zeek-client to pull in instance serialization fixes
  Management framework: bump external cluster testsuite
  Management framework: update agent-checkin test to reflect recent changes
  Management framework: place each Zeek process in its own working dir
  Management framework: set defaults for log rotation and persistent state
  Management framework: add spool and state directory config settings
  Management framework: establish stdout/stderr files also for cluster nodes
  Management framework: default to having agents check in with the (local) controller
  Management framework: move role variable from logging into framework-wide config
  Management framework: distinguish supervisor/supervisee when loading agent/controller
  Management framework: simplify agent and controller stdout/stderr files
  Management framework: prefix the management logs with "management-"
  Management framework: comment and layouting tweaks, no functional change
  Management framework: rename env var that labels agents/controllers
  Management framework: increase robustness of agent/controller naming
2022-05-26 16:10:14 -07:00
Christian Kreibich
aeb29413a2 Management framework: bump external cluster testsuite 2022-05-26 13:32:08 -07:00
Tim Wojtulewicz
107f4fdc99 Add --retry to curl invocations in update-traces 2022-05-13 11:54:27 -07:00
Christian Kreibich
8d101f21be Merge branch 'topic/christian/management-consistency-tweaks'
* topic/christian/management-consistency-tweaks:
  Management framework: consistency tweaks in zeek-client, plus test updates
2022-05-06 15:28:48 -07:00
Christian Kreibich
8c76af6ab9 Management framework: consistency tweaks in zeek-client, plus test updates
A minor changeset that reflects zeek-client updates, with some effects on
its output and hence test cases.
2022-05-06 11:22:48 -07:00
Christian Kreibich
7198c847e8 Merge branch 'topic/christian/management-get-config'
* topic/christian/management-get-config:
  Management framework: add get_configuration_request/response transaction
2022-05-05 18:10:46 -07:00
Christian Kreibich
001de561fc Management framework: add get_configuration_request/response transaction
Includes submodule bumps for Broker (to pull in better handling of data
structures that are difficult to unserialize in Python), zeek-client (for the
get-config command), and a commit hash update for the external testsuite.
2022-05-05 16:09:21 -07:00
Christian Kreibich
2d73edb04c Merge branch 'topic/christian/management-print-cmd'
* topic/christian/management-print-cmd:
  Management framework: bump external testsuite
  Management framework: allow selecting cluster nodes in get_id_value
  Management framework: minor tweaks to logging component
  Management framework: bump zeek-client to pull in get-id-value command
  Avoid whitespace around function type strings in JSON rendering
  Management framework: improve handling of node run states
  Management framework: add get_id_value dispatch
  Management framework: allow dispatching "actions" on cluster nodes.
  Management framework: some renaming to avoid the term "data cluster"
  Management framework: allow agents to communicate with cluster nodes
2022-04-18 16:40:49 -07:00
Christian Kreibich
e2d0db73a5 Management framework: bump external testsuite 2022-04-18 13:11:03 -07:00
Tim Wojtulewicz
c299301372 Update zeek-testing-private hash [nomail] [skip ci] 2022-03-22 13:12:12 -07:00
Christian Kreibich
40fa1a0769 Merge branch 'topic/christian/controller-renaming'
* topic/christian/controller-renaming:
  Bump external cluster testsuite to reflect Management framework reorg
  Bump zeek-client to reflect Management framework reorg
  Reorg of the cluster controller to new "Management framework" layout
2022-02-10 18:10:08 -08:00
Christian Kreibich
59fa19424d Bump external cluster testsuite to reflect Management framework reorg 2022-02-09 18:09:46 -08:00
Christian Kreibich
9a7d5c986e Merge branch 'topic/christian/cluster-controller-get-nodes'
* topic/christian/cluster-controller-get-nodes:
  Bump external cluster testsuite
  Bump zeek-client for the get-nodes command
  Add ClusterController::API::get_nodes_request/response event pair
  Support optional listening ports for cluster nodes
  Don't auto-publish Supervisor response events in the cluster agent
  Make members of the ClusterController::Types::State enum all-caps
  Be more conservative with triggering request timeout events
  Move redefs of ClusterController::Request::Request to their places of use
  Simplify ClusterController::API::set_configuration_request/response
2022-02-03 13:19:34 -08:00
Johanna Amann
b1415dd364 Merge remote-tracking branch 'origin/topic/johanna/gh-1952'
* origin/topic/johanna/gh-1952:
  Match DPD TLS signature on one-sided connections.

Fixes GH-1952
2022-02-03 11:24:34 +00:00
Christian Kreibich
3b79c36146 Bump external cluster testsuite 2022-02-02 23:00:37 -08:00
Johanna Amann
95f1565498 Match DPD TLS signature on one-sided connections.
This commit changes DPD matching for TLS connections. A one-sided match
is enough to enable DPD now.

This commit also removes DPD for SSLv2 connections. SSLv2 connections do
basically no longer happen in the wild. SSLv2 is also really finnicky to
identify correctly - there is very little data required to match it, and
basically all matches today will be false positives. If DPD for SSLv2 is
still desired, the optional signature in policy/protocols/ssl/dpd-v2.sig
can be loaded.

Fixes GH-1952
2022-02-01 16:51:21 +00:00
Robin Sommer
964293209b
Merge remote-tracking branch 'origin/topic/robin/gh1844-host'
* origin/topic/robin/gh1844-host:
  Fix host header normalization in intel framework.
  Switch to recording unmodified HTTP header.
2022-01-10 14:43:30 +01:00
Christian Kreibich
e0e779ade1 Bump the zeek-testing-cluster testsuite 2022-01-04 16:17:33 -08:00
Christian Kreibich
e9bdaebc70 Add Github action job for cluster tests
This job runs in sequence after the image build one, using its resulting image.
The actual tests live in the external zeek-testing-cluster testsuite, which
the new job clones and runs.

To specify a version of the testsuite to use, testing/external/ has a new
commit-hash.zeek-testing-cluster file that tracks the testsuite's relevant
commit ref
2021-12-21 14:52:28 -08:00
Robin Sommer
a7427e95bf
Switch to recording unmodified HTTP header.
We used to attempt to remove any port specification before recording
HTTP host headers in logs. Doing so would (1) remove potentially useful
information, (2) not match what the documentation seemed to suggest, and
(3) fail for IP6 addresses containing colons.

We now record the original HOST header as is.

Addresses #1844.
2021-12-21 21:54:47 +01:00