Skip to content

Commit 7c59d49

Browse files
committed
doc: add/update/improve stuff related to STOMP bots and *n6*
The changes include also those regarding *feeds* (values of certain properties of the CERT.PL's "N6 Stomp Stream" feed entry have been updated/improved) and the *changelog*.
1 parent 700182c commit 7c59d49

File tree

4 files changed

+58
-15
lines changed

4 files changed

+58
-15
lines changed

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,65 @@ CHANGELOG
1111
------------------
1212

1313
### Configuration
14+
- Add new optional configuration parameters for `intelmq.bots.collectors.stomp.collector`
15+
and `intelmq.bots.outputs.stomp.output` (PR#2408 by Jan Kaliszewski):
16+
- `auth_by_ssl_client_certificate` (Boolean, default: *true*; if *false* then
17+
`ssl_client_certificate` and `ssl_client_certificate_key` will be ignored);
18+
- `username` (STOMP authentication login, default: "guest"; to be used only
19+
if `auth_by_ssl_client_certificate` is *false*);
20+
- `password` (STOMP authentication passcode, default: "guest"; to be used only
21+
if `auth_by_ssl_client_certificate` is *false*).
1422

1523
### Core
1624
- `intelmq.lib.message`: For invalid message keys, add a hint on the failure to the exception: not allowed by configuration or not matching regular expression (PR#2398 by Sebastian Wagner).
1725
- `intelmq.lib.exceptions.InvalidKey`: Add optional parameter `additional_text` (PR#2398 by Sebastian Wagner).
26+
- `intelmq.lib.mixins`: Add a new class, `StompMixin` (defined in a new submodule: `stomp`),
27+
which provides certain common STOMP-bot-specific operations, factored out from
28+
`intelmq.bots.collectors.stomp.collector` and `intelmq.bots.outputs.stomp.output`
29+
(PR#2408 by Jan Kaliszewski).
1830

1931
### Development
2032

2133
### Data Format
2234

2335
### Bots
2436
#### Collectors
37+
- `intelmq.bots.collectors.stomp.collector` (PR#2408 by Jan Kaliszewski):
38+
- Add support for authentication based on STOMP login and passcode,
39+
introducing 3 new configuration parameters (see above: *Configuration*).
40+
- Update the code to support new versions of `stomp.py`, including the latest (`8.1.0`);
41+
fixes [#2342](https://github.com/certtools/intelmq/issues/2342).
42+
- Fix the reconnection behavior: do not attempt to reconnect after `shutdown`. Also,
43+
never attempt to reconnect if the version of `stomp.py` is older than `4.1.21` (it
44+
did not work properly anyway).
45+
- Add coercion of the `port` config parameter to `int`.
46+
- Add implementation of the `check` hook (verifying, in particular, accessibility
47+
of necessary file(s)).
48+
- Remove undocumented and unused attributes of `StompCollectorBot` instances:
49+
`ssl_ca_cert`, `ssl_cl_cert`, `ssl_cl_cert_key`.
50+
- Minor fixes/improvements and some refactoring (see also above: *Core*...).
2551

2652
#### Parsers
2753

2854
#### Experts
2955

3056
#### Outputs
57+
- `intelmq.bots.outputs.stomp.output` (PR#2408 by Jan Kaliszewski):
58+
- Add support for authentication based on STOMP login and passcode,
59+
introducing 3 new configuration parameters (see above: *Configuration*).
60+
- Update the code to support new versions of `stomp.py`, including the latest (`8.1.0`).
61+
- Fix `AttributeError` caused by attempts to get unset attributes of `StompOutputBot`
62+
(`ssl_ca_cert` et consortes).
63+
- Add coercion of the `port` config parameter to `int`.
64+
- Add implementation of the `check` hook (verifying, in particular, accessibility
65+
of necessary file(s)).
66+
- Add `stomp.py` version check (raise `MissingDependencyError` if not `>=4.1.8`).
67+
- Minor fixes/improvements and some refactoring (see also above: *Core*...).
3168

3269
### Documentation
3370
- Add a readthedocs configuration file to fix the build fail (PR#2403 by Sebastian Wagner).
71+
- Update/fix/improve the stuff related to the STOMP bots and integration with the *n6*'s
72+
Stream API (PR#2408 by Jan Kaliszewski).
3473

3574
### Packaging
3675

docs/user/bots.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -945,12 +945,15 @@ Install the `stomp.py` library from PyPI:
945945
**Configuration Parameters**
946946

947947
* **Feed parameters** (see above)
948-
* `exchange`: exchange point
948+
* `exchange`: STOMP *destination* to subscribe to, e.g. "/exchange/my.org/*.*.*.*"
949949
* `port`: 61614
950-
* `server`: hostname e.g. "n6stream.cert.pl"
950+
* `server`: hostname, e.g. "n6stream.cert.pl"
951951
* `ssl_ca_certificate`: path to CA file
952-
* `ssl_client_certificate`: path to client cert file
953-
* `ssl_client_certificate_key`: path to client cert key file
952+
* `auth_by_ssl_client_certificate`: Boolean, default: true (note: set to false for new *n6* auth)
953+
* `ssl_client_certificate`: path to client cert file, used only if `auth_by_ssl_client_certificate` is true
954+
* `ssl_client_certificate_key`: path to client cert key file, used only if `auth_by_ssl_client_certificate` is true
955+
* `username`: STOMP *login* (e.g., *n6* user login), used only if `auth_by_ssl_client_certificate` is false
956+
* `password`: STOMP *passcode* (e.g., *n6* user API key), used only if `auth_by_ssl_client_certificate` is false
954957

955958

956959
.. _intelmq.bots.collectors.twitter.collector_twitter:
@@ -4305,7 +4308,7 @@ Also you will need a so called "exchange point".
43054308
43064309
**Configuration Parameters**
43074310
4308-
* `exchange`: The exchange to push at
4311+
* `exchange`: STOMP *destination* to push at, e.g. "/exchange/_push"
43094312
* `heartbeat`: default: 60000
43104313
* `message_hierarchical_output`: Boolean, default: false
43114314
* `message_jsondict_as_string`: Boolean, default: false
@@ -4314,8 +4317,11 @@ Also you will need a so called "exchange point".
43144317
* `server`: Host or IP address of the STOMP server
43154318
* `single_key`: Boolean or string (field name), default: false
43164319
* `ssl_ca_certificate`: path to CA file
4317-
* `ssl_client_certificate`: path to client cert file
4318-
* `ssl_client_certificate_key`: path to client cert key file
4320+
* `auth_by_ssl_client_certificate`: Boolean, default: true (note: set to false for new *n6* auth)
4321+
* `ssl_client_certificate`: path to client cert file, used only if `auth_by_ssl_client_certificate` is true
4322+
* `ssl_client_certificate_key`: path to client cert key file, used only if `auth_by_ssl_client_certificate` is true
4323+
* `username`: STOMP *login* (e.g., *n6* user login), used only if `auth_by_ssl_client_certificate` is false
4324+
* `password`: STOMP *passcode* (e.g., *n6* user API key), used only if `auth_by_ssl_client_certificate` is false
43194325
43204326
43214327
.. _intelmq.bots.outputs.tcp.output:

docs/user/n6-integrations.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ n6 is maintained and developed by `CERT.pl <https://www.cert.pl/>`_.
1111

1212
Information about n6 can be found here:
1313

14-
- Website: `n6.cert.pl <https://n6.cert.pl/en/>`_
14+
- Website: `cert.pl/en/n6 <https://cert.pl/en/n6/>`_
1515
- Source Code: `github.com/CERT-Polska/n6 <https://github.com/CERT-Polska/n6/>`_
1616
- n6 documentation: `n6.readthedocs.io <https://n6.readthedocs.io/>`_
17-
- n6sdk developer documentation: `n6sdk.readthedocs.io <https://n6sdk.readthedocs.io/>`_
1817

1918
.. image:: /_static/n6/n6-schemat2.png
2019
:alt: n6 schema

intelmq/etc/feeds.yaml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,20 +1158,19 @@ providers:
11581158
module: intelmq.bots.collectors.stomp.collector
11591159
parameters:
11601160
exchange: "{insert your exchange point as given by CERT.pl}"
1161-
ssl_client_certificate_key: "{insert path to client cert key file for
1162-
CERT.pl's n6}"
11631161
ssl_ca_certificate: "{insert path to CA file for CERT.pl's n6}"
1162+
auth_by_ssl_client_certificate: false
1163+
username: "{insert n6 user's login}"
1164+
password: "{insert n6 user's API key}"
11641165
port: '61614'
1165-
ssl_client_certificate: "{insert path to client cert file for CERTpl's
1166-
n6}"
11671166
server: n6stream.cert.pl
11681167
name: __FEED__
11691168
provider: __PROVIDER__
11701169
parser:
11711170
module: intelmq.bots.parsers.n6.parser_n6stomp
11721171
parameters:
1173-
revision: 2018-01-20
1174-
documentation: https://n6.cert.pl/en/
1172+
revision: 2023-09-23
1173+
documentation: https://n6.readthedocs.io/usage/streamapi/
11751174
public: false
11761175
AlienVault:
11771176
OTX:

0 commit comments

Comments
 (0)