Skip to content

Commit 111e8e1

Browse files
author
Sebastian Wagner
committed
Merge branch 'maintenance' into develop
2 parents b0cba12 + 0260aa7 commit 111e8e1

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ CHANGELOG
9898
### Documentation
9999
- Various formatting fixes (by Sebastian Wagner).
100100
- Removed the malwaredomains feed from the feeds list because the upstream data source (malwaredomains.com) does not exist anymore (PR#2026 by Birger Schacht, fixes #2024).
101+
- Update Docker installation instructions (PR#2035 by Sebastian Waldbauer).
101102

102103
### Packaging
103104
- intelmq-update-database crontab: Add missing `recordedfuture_iprisk` update call (by Sebastian Wagner).
@@ -108,6 +109,7 @@ CHANGELOG
108109
- `intelmq.tests.bots.collectors.mail.test_collector_attach`: Test text attachment (by Sebastian Wagner).
109110

110111
### Tools
112+
- `intelmqctl`: Also honour parameters from environment variables (PR#2068 by Sebastian Wagner, fixes #2063).
111113

112114
### Contrib
113115

docs/user/bots.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3279,7 +3279,12 @@ Trusted Introducer Lookup Expert
32793279
32803280
**Configuration Parameters**
32813281
3282-
* **order**: Possible values are 'domain', 'asn'
3282+
* **order**: Possible values are 'domain', 'asn'. You can set multiple values, so first match wins.
3283+
* If 'domain' is set, it will lookup the `source.fqdn` field. It will go from high-order to low-order, i.e. 1337.super.example.com -> super.example.com -> example.com -> `.com`
3284+
* If 'asn' is set, it will lookup `source.asn`.
3285+
3286+
After a match, the abuse contact will be fetched from the trusted introducer teams list and will be stored in the event as `source.abuse_contact`.
3287+
If there is no match, the event will not be enriched and will be sent to the next configured step.
32833288
32843289
32853290
.. _intelmq.bots.experts.tuency.expert:

docs/user/configuration-management.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,16 @@ Miscellaneous
129129
* **false** - duplicates the messages into each queue
130130
* When using AMQP as message broker, take a look at the :ref:`multithreading` section and the ``instances_threads`` parameter.
131131

132-
* **broker** - select which broker intelmq can use. Use the following values:
133-
* **redis** - Redis allows some persistence but is not so fast as ZeroMQ (in development). But note that persistence has to be manually activated. See http://redis.io/topics/persistence
134-
135132
* **rate_limit** - time interval (in seconds) between messages processing. int value.
136133

137134
* **ssl_ca_certificate** - trusted CA certificate for IMAP connections (supported by some bots).
138135

136+
* **source_pipeline_broker** & **destination_pipeline_broker** - select which broker IntelMQ should use. There are two options
137+
* **redis** (default) - Please note that persistence has to be `manually activated <http://redis.io/topics/persistence>`_.
138+
* **amqp** - The AMQP pipeline is currently beta but there are no known issues. A popular AMQP broker is `RabbitMQ <https://www.rabbitmq.com/>`_. See :ref:`aqmp pipeline broker` for more details.
139+
140+
* As these parameters can be set per bot, this allows usage of different broker systems and hosts, as well as switching between them on the same IntelMQ instance.
141+
139142
* **source_pipeline_host** - broker IP, FQDN or Unix socket that the bot will use to connect and receive messages.
140143

141144
* **source_pipeline_port** - broker port that the bot will use to connect and receive messages. Can be empty for Unix socket.
@@ -290,6 +293,8 @@ In case of errors during processing, and the optional path ``"_on_error"`` is sp
290293
Other destination queues can be explicitly addressed by the bots, e.g. bots with filtering capabilities. Some expert bots are capable of sending messages to paths, this feature is explained in their documentation, e.g. the :ref:`intelmq.bots.experts.filter.expert` expert and the :ref:`intelmq.bots.experts.sieve.expert` expert.
291294
The named queues need to be explicitly addressed by the bot (e.g. filtering) or the core (``_on_error``) to be used. Setting arbitrary paths has no effect.
292295

296+
.. _aqmp pipeline broker:
297+
293298
AMQP (Beta)
294299
-----------
295300

intelmq/bin/intelmqctl.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,14 +1017,20 @@ def load_defaults_configuration(self, silent=False):
10171017
for option, value in utils.get_global_settings().items():
10181018
setattr(self.parameters, option, value)
10191019

1020-
# TODO: Rewrite variables with env. variables ( CURRENT IMPLEMENTATION NOT FINAL )
1021-
# "destination_pipeline_host": "127.0.0.1",
1022-
# "source_pipeline_host": "127.0.0.1",
1023-
if os.getenv('INTELMQ_IS_DOCKER', None):
1024-
pipeline_host = os.getenv('INTELMQ_PIPELINE_HOST')
1025-
if pipeline_host:
1026-
setattr(self.parameters, 'destination_pipeline_host', pipeline_host)
1027-
setattr(self.parameters, 'source_pipeline_host', pipeline_host)
1020+
# copied from intelmq.lib.bot, should be refactored to e.g. intelmq.lib.config
1021+
intelmq_environment = [elem for elem in os.environ if elem.startswith('INTELMQ_')]
1022+
for elem in intelmq_environment:
1023+
option = elem[8:].lower()
1024+
value = os.environ[elem]
1025+
# do some conversions:
1026+
if value == 'True':
1027+
value = True
1028+
elif value == 'False':
1029+
value = False
1030+
elif value.isnumeric():
1031+
value = int(value)
1032+
1033+
setattr(self.parameters, option, value)
10281034

10291035
def run(self):
10301036
results = None

0 commit comments

Comments
 (0)