Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests drop privileges too late, e.g. causing TestMISPFeedOutputBot failure #1489

Closed
bernhardreiter opened this issue Jan 15, 2020 · 8 comments
Labels
bug Indicates an unexpected problem or unintended behavior component: tests documentation Indicates a need for improvements or additions to documentation
Milestone

Comments

@bernhardreiter
Copy link
Contributor

Trying to run the test for the bots/outputs/misp/output_feed.py which fails on me.

/opt/dev_intelmq# INTELMQ_TEST_EXOTIC=1 python3 -m unittest intelmq.tests.bots.outputs.misp.test_output_feed -v
test_bot_name (intelmq.tests.bots.outputs.misp.test_output_feed.TestMISPFeedOutputBot) ... ok
test_event (intelmq.tests.bots.outputs.misp.test_output_feed.TestMISPFeedOutputBot) ... ERROR
ERROR

======================================================================
ERROR: test_event (intelmq.tests.bots.outputs.misp.test_output_feed.TestMISPFeedOutputBot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/dev_intelmq/intelmq/tests/bots/outputs/misp/test_output_feed.py", line 50, in test_event
    self.run_bot()
  File "/opt/dev_intelmq/intelmq/lib/test.py", line 267, in run_bot
    self.prepare_bot(parameters=parameters)
  File "/opt/dev_intelmq/intelmq/lib/test.py", line 234, in prepare_bot
    self.bot = self.bot_reference(self.bot_id)
  File "/opt/dev_intelmq/intelmq/lib/bot.py", line 1179, in __init__
    super().__init__(bot_id=bot_id)
  File "/opt/dev_intelmq/intelmq/lib/bot.py", line 158, in __init__
    self.init()
  File "/opt/dev_intelmq/intelmq/bots/outputs/misp/output_feed.py", line 51, in init
    if (self.output_dir / '.current').exists():
  File "/usr/lib/python3.7/pathlib.py", line 1339, in exists
    self.stat()
  File "/usr/lib/python3.7/pathlib.py", line 1161, in stat
    return self._accessor.stat(self)
PermissionError: [Errno 13] Permission denied: '/tmp/tmplgfpsol_/.current'

======================================================================
ERROR: tearDownClass (intelmq.tests.bots.outputs.misp.test_output_feed.TestMISPFeedOutputBot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/dev_intelmq/intelmq/tests/bots/outputs/misp/test_output_feed.py", line 54, in tearDownClass
    cls.directory.cleanup()
  File "/usr/lib/python3.7/tempfile.py", line 948, in cleanup
    _rmtree(self.name)
  File "/usr/lib/python3.7/shutil.py", line 487, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/usr/lib/python3.7/shutil.py", line 485, in rmtree
    fd = os.open(path, os.O_RDONLY)
PermissionError: [Errno 13] Permission denied: '/tmp/tmplgfpsol_'

----------------------------------------------------------------------
Ran 2 tests in 0.007s

FAILED (errors=2)
root@vm1:/opt/dev_intelmq# ls -al /tmp/tmplgfpsol_
total 8
drwx------  2 root root 4096 Jan 15 10:02 .
drwxrwxrwt 12 root root 4096 Jan 15 10:02 ..

Tested with
bb205e9 (HEAD -> develop, origin/develop, origin/HEAD)
On Debian Buster with PyMISP 2e7215bbec6c2fa1d527e09be99d4280fdda3fd1

@Rafiot

@Rafiot
Copy link
Member

Rafiot commented Jan 15, 2020

Well, the intelmq user isn't allowed to write in that directory, not sure what else I can tell you there ;)

@bernhardreiter
Copy link
Contributor Author

@Rafiot Thanks for responding and for the hint!

Note that I had called it as root (as suggested by https://github.com/certtools/intelmq/blob/develop/docs/Developers-Guide.md#run-the-tests ) and and the directory is read and writable by root. So there is no obvious reason that I could see.

I did not analyse further though.

I also don't know if the test has problems in other settings, because the current continuous build does not run the tests that need "exotic" libraries if I remember correctly. I'll take it that the test runs fine for you, that's good.

Detail, its Python 3.7.3

@bernhardreiter
Copy link
Contributor Author

bernhardreiter commented Jan 15, 2020

Okay, the test runner switches to user intelmq, but only after creating the tmpdirectory.
That is a new feature to be introduced by 2.1.2.

@wagner-certat : What's the rationale behind dropping priviledges, wouldn't it be better to fail loudly and stop hard in the case of anything of intelmq gettings started by root?
(Could not find it in the relevant commit 853ba5b )

At first thought I'd say that failing hard is better in this situation.
(And administrators can always create an intelmq user.)

@bernhardreiter bernhardreiter changed the title TestMISPFeedOutputBot failure tests drop priviledges too late, e.g. causing TestMISPFeedOutputBot failure Jan 15, 2020
@bernhardreiter
Copy link
Contributor Author

When dropping priviledges earlier, the test start but one fails see below

--- a/intelmq/lib/test.py
+++ b/intelmq/lib/test.py
@@ -129,6 +129,11 @@ def setUpClass(cls):
         """
         Set default values and save original functions.
         """
+        if not utils.drop_privileges():
+            logger.error('Running intelmqctl as root is highly discouraged!')
+            sys.exit(1)
+            
+
         cls.bot_id = 'test-bot'
         cls.bot_name = None
         cls.bot = None
INTELMQ_TEST_EXOTIC=1 python3 -m unittest intelmq.tests.bots.outputs.misp.test_output_feed 
.F
======================================================================
FAIL: test_event (intelmq.tests.bots.outputs.misp.test_output_feed.TestMISPFeedOutputBot)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/dev_intelmq/intelmq/tests/bots/outputs/misp/test_output_feed.py", line 50, in test_event
    self.run_bot()
  File "/opt/dev_intelmq/intelmq/lib/test.py", line 316, in run_bot
    self.assertNotRegexpMatchesLog("(ERROR.*?){%d}" % (self.allowed_error_count + 1))
  File "/opt/dev_intelmq/intelmq/lib/test.py", line 480, in assertNotRegexpMatchesLog
    self.assertNotRegex(self.loglines_buffer, pattern)
AssertionError: Regex matched: 'ERROR' matches '(ERROR.*?){1}' in '2020-01-15 12:35:58,864 - test-bot - INFO - MISPFeedOutputBot initialized with id test-bot and intelmq 2.2.0.alpha.1 and python 3.7.3 (default, Apr  3 2019, 05:39:12) as process 1575.\n2020-01-15 12:35:58,864 - test-bot - INFO - Bot is starting.\n2020-01-15 12:35:58,865 - test-bot - INFO - Bot initialization completed.\n2020-01-15 12:35:58,872 - test-bot - ERROR - Bot has found a problem.\nTraceback (most recent call last):\n  File "/opt/dev_intelmq/intelmq/lib/bot.py", line 267, in start\n    self.process()\n  File "/opt/dev_intelmq/intelmq/bots/outputs/misp/output_feed.py", line 102, in process\n    feed_output = self.current_event.to_feed(with_meta=False)\n  File "/usr/local/lib/python3.7/dist-packages/pymisp/mispevent.py", line 833, in to_feed\n    to_return = super()._to_feed()\n  File "/usr/local/lib/python3.7/dist-packages/pymisp/abstract.py", line 209, in _to_feed\n    raise PyMISPError(\'Unable to export in the feed format, _fields_for_feed is missing.\')\npymisp.exceptions.PyMISPError: Unable to export in the feed format, _fields_for_feed is missing.\n2020-01-15 12:35:58,873 - test-bot - INFO - Bot stopped.\n'

----------------------------------------------------------------------
Ran 2 tests in 0.013s

FAILED (failures=1)

@bernhardreiter
Copy link
Contributor Author

@Rafiot there seems to be something else wrong with the test (see last message)
pymisp.exceptions.PyMISPError: Unable to export in the feed format, _fields_for_feed is missing.

@ghost
Copy link

ghost commented Jan 15, 2020

Why you want to run the tests with root privileges? Same applies for normal operation too.

And we drop root privileges mostly because of security reasons in case the user started intelmq as root. Further, the users' will get problems with file permissions for files (pid and log files) created as root when starting it properly.

@bernhardreiter
Copy link
Contributor Author

bernhardreiter commented Jan 15, 2020

@wagner-certat I don't want to run tests with root priviledges, I just missunderstood https://github.com/certtools/intelmq/blob/develop/docs/Developers-Guide.md#run-the-tests I was thinking it was suggesting it (because there is only a 'It may be necessary to switch the user'), then I've looked in the source and found the new drop_privileges feature. Next I found out that
it allows to continue to run when started as root and tests are not ready for this.

My suggestion is to

  • make any intelmq starting fail hard with root priviledges (rrename, rework drop_priviledges)
  • use the check also for tests
  • improve phrasing in the Dev Guide

In addition it there seems to be an unrelated problem in TestMISPFeedOutputBot
which was discovered. (Only for the tested combination, which is both current master for intelmq and pymisp).

@ghost ghost changed the title tests drop priviledges too late, e.g. causing TestMISPFeedOutputBot failure tests drop privileges too late, e.g. causing TestMISPFeedOutputBot failure Mar 18, 2020
@ghost ghost added bug Indicates an unexpected problem or unintended behavior component: tests documentation Indicates a need for improvements or additions to documentation labels Mar 18, 2020
@ghost ghost added this to the 2.1.3 milestone Mar 18, 2020
@ghost
Copy link

ghost commented Mar 20, 2020

  • intelmqctl will now also fail if dropping privs did not work
  • The bots test cases will now automatically change to the intelmq user if root is detected. This prevents the situation which caused this discovery.
  • Further, I rephrased the testing section in the dev guide.

@ghost ghost self-assigned this Mar 20, 2020
@ghost ghost modified the milestones: 2.1.3, 2.2.0 Mar 20, 2020
@ghost ghost closed this as completed in c71a59f Mar 20, 2020
ghost pushed a commit that referenced this issue Mar 20, 2020
ghost pushed a commit that referenced this issue Mar 20, 2020
rephrase how to run the tests and advise to not run them as root

fixes #1489
CSIRT-CZ pushed a commit to CZ-NIC/intelmq that referenced this issue Jun 18, 2020
2.2.0 Feature release

Dropped support for Python 3.4.

 ### Core
- `__init__`: Changes to the path-handling, see [User Guide, section _/opt and LSB paths_](docs/User-Guide.md#opt-and-lsb-paths) for more information
  - The environment variable `INTELMQ_ROOT_DIR` can be used to set custom root directories instead of `/opt/intelmq/` (certtools#805) in case of non LSB-path installations.
  - The environment variable `ROOT_DIR` can be used to set custom root directories instead of `/` (certtools#805) in case of LSB-path installations.
- `intelmq.lib.exceptions`: Added `MissingDependencyError` for show error messages about a missing library and how to install it (certtools#1471).
  - Added optional parameter `installed` to show the installed version.
  - Added optional parameter `additional_text` to show arbitrary text.
- Adding more type annotations for core libraries.
- `intelmq.lib.pipeline.Pythonlist.sleep`: Drop deprecated method.
- `intelmq.lib.utils`: `write_configuration`: Append a newline at end of configuration/file to allow proper comparisons & diffs.
- `intelmq.lib.test`: `BotTestCase` drops privileges upon initialization (certtools#1489).
- `intelmq.lib.bot`:
  - New class `OutputBot`:
    - Method `export_event` to format/export events according to the parameters given by the user.
  - `ParserBot`: New methods `parse_json_stream` and `recover_line_json_stream`.
  - `ParserBot.recover_line_json`: Fix format by adding a list around the line data.
  - `Bot.send_message`: In debugging log level, the path to which the message is sent is now logged too.

 ### Bots
- Bots with dependencies: Use of `intelmq.lib.exceptions.MissingDependencyError`.

 #### Collectors
- `intelmq.bots.collectors.misp.collector`: Deprecate parameter `misp_verify` in favor of generic parameter `http_verify_cert`.
- `intelmq.bots.collectors.tcp.collector`: Drop compatibility with Python 3.4.
- `intelmq.bots.collectors.stomp.collector`:
  - Check the stomp.py version and show an error message if it does not match.
  - For stomp.py versions `>= 5.0.0` redirect the `stomp.PrintingListener` output to debug logging.
- `intelmq.bots.collectors.microsoft.collector_azure`: Support current Python library `azure-storage-blob>= 12.0.0`, configuration is incompatible and needs manual change. See NEWS file and bot's documentation for more details.
- `intelmq.bots.collectors.amqp.collector_amqp`: Require `pika` minimum version 1.0.
- `intelmq.bots.collectors.github_api.collector_github_contents_api`: Added (PR#1481).

 #### Parsers
- `intelmq.bots.parsers.autoshun.parser`: Drop compatibility with Python 3.4.
- `intelmq.bots.parsers.html_table.parser`: Drop compatibility with Python 3.4.
- `intelmq.bots.parsers.shadowserver.parser`: Add support for MQTT and Open-IPP feeds (PR#1512, PR#1544).
- `intelmq.bots.parsers.taichung.parser`:
  - Migrate to `ParserBot`.
  - Also parse geolocation information if available.
- `intelmq.bots.parsers.cymru.parser_full_bogons`:
  - Migrate to `ParserBot`.
  - Add last updated information in raw.
- `intelmq.bots.parsers.anubisnetworks.parser`: Add new parameter `use_malware_familiy_as_classification_identifier`.
- `intelmq.bots.parsers.microsoft.parser_ctip`: Compatibility for new CTIP data format used provided by the Azure interface.
- `intelmq.bots.parsers.cymru.parser_cap_program`: Support for `openresolver` type.
- `intelmq.bots.parsers.github_feed.parser`: Added (PR#1481).
- `intelmq.bots.parsers.urlvir.parser`: Removed, as the feed is discontinued (certtools#1537).

 #### Experts
- `intelmq.bots.experts.csv_converter`: Added as converter to CSV.
- `intelmq.bots.experts.misp`: Added (PR#1475).
- `intelmq.bots.experts.modify`: New parameter `maximum_matches`.

 #### Outputs
- `intelmq.bots.outputs.amqptopic`:
  - Use `OutputBot` and `export_event`.
  - Allow formatting the routing key with event data by the new parameter `format_routing_key` (boolean).
- `intelmq.bots.outputs.file`: Use `OutputBot` and `export_event`.
- `intelmq.bots.outputs.files`: Use `OutputBot` and `export_event`.
- `intelmq.bots.outputs.misp.output_feed`: Added, creates a MISP Feed (PR#1473).
- `intelmq.bots.outputs.misp.output_api`: Added, pushes to MISP via the API (PR#1506, PR#1536).
- `intelmq.bots.outputs.elasticsearch.output`: Dropped ElasticSearch version 5 compatibility, added version 7 compatibility (certtools#1513).

 ### Documentation
- Document usage of the `INTELMQ_ROOT_DIR` environment variable.
- Added document on MISP integration possibilities.
- Feeds:
  - Added "Full Bogons IPv6" feed.
  - Remove discontinued URLVir Feeds (certtools#1537).

 ### Packaging
- `setup.py` do not try to install any data to `/opt/intelmq/` as the behavior is inconsistent on various systems and with `intelmqsetup` we have a tool to create the structure and files anyway.
- `debian/rules`:
  - Provide a blank state file in the package.
- Patches:
  - Updated `fix-intelmq-paths.patch`.

 ### Tests
- Travis: Use `intelmqsetup` here too.
  - Install required build dependencies for the Debian package build test.
  - This version is no longer automatically tested on Python `<` 3.5.
  - Also run the tests on Python 3.8.
  - Run the Debian packaging tests on Python 3.5 and the code-style test on 3.8.
- Added tests for the new bot `intelmq.bots.outputs.misp.output_feed` (certtools#1473).
- Added tests for the new bot `intelmq.bots.experts.misp.expert` (certtools#1473).
- Added tests for `intelmq.lib.exceptions`.
- Added tests for `intelmq.lib.bot.OutputBot` and `intelmq.lib.bot.OutputBot.export_event`.
- Added IPv6 tests for `intelmq.bots.parsers.cymru.parser_full_bogons`.
- Added tests for `intelmq.lib.bot.ParserBot`'s new methods `parse_json_stream` and `recover_line_json_stream`.
- `intelmq.tests.test_conf`: Set encoding to UTF-8 for reading the `feeds.yaml` file.

 ### Tools
- `intelmqctl`:
  - `upgrade-config`:
    - Allow setting the state file location with the `--state-file` parameter.
    - Do not require a second run anymore, if the state file is newly created (certtools#1491).
    - New parameter `no_backup`/`--no-backup` to skip creation of `.bak` files for state and configuration files.
  - Only require `psutil` for the `IntelMQProcessManager`, not for process manager independent calls like `upgrade-config` or `check`.
  - Add new command `debug` to output some information for debugging. Currently implemented:
    - paths
    - environment variables
  - `IntelMQController`: New argument `--no-file-logging` to disable logging to file.
  - If dropping privileges does not work, `intelmqctl` will now abort (certtools#1489).
- `intelmqsetup`:
  - Add argument parsing and an option to skip setting file ownership, possibly not requiring root permissions.
  - Call `intelmqctl upgrade-config` and add argument for the state file path (certtools#1491).
- `intelmq_generate_misp_objects_templates.py`: Tool to create a MISP object template (certtools#1470).
- `intelmqdump`: New parameter `-t` or `--truncate` to optionally give the maximum length of `raw` data to show, 0 for no truncating.

 ### Contrib
- Added `development-tools`.
- ElasticSearch: Dropped version 5 compatibility, added version 7 compatibility (certtools#1513).
- Malware Name Mapping Downloader:
  - New parameter `--mwnmp-ignore-adware`.
  - The parameter `--add-default` supports an optional parameter to define the default value.

 ### Known issues
- Bots started with IntelMQ-Manager stop when the webserver is restarted. (certtools#952).
- Corrupt dump files when interrupted during writing (certtools#870).
CSIRT-CZ pushed a commit to CZ-NIC/intelmq that referenced this issue Jun 22, 2020
2.2.0 Feature release

Dropped support for Python 3.4.

 ### Core
- `__init__`: Changes to the path-handling, see [User Guide, section _/opt and LSB paths_](docs/User-Guide.md#opt-and-lsb-paths) for more information
  - The environment variable `INTELMQ_ROOT_DIR` can be used to set custom root directories instead of `/opt/intelmq/` (certtools#805) in case of non LSB-path installations.
  - The environment variable `ROOT_DIR` can be used to set custom root directories instead of `/` (certtools#805) in case of LSB-path installations.
- `intelmq.lib.exceptions`: Added `MissingDependencyError` for show error messages about a missing library and how to install it (certtools#1471).
  - Added optional parameter `installed` to show the installed version.
  - Added optional parameter `additional_text` to show arbitrary text.
- Adding more type annotations for core libraries.
- `intelmq.lib.pipeline.Pythonlist.sleep`: Drop deprecated method.
- `intelmq.lib.utils`: `write_configuration`: Append a newline at end of configuration/file to allow proper comparisons & diffs.
- `intelmq.lib.test`: `BotTestCase` drops privileges upon initialization (certtools#1489).
- `intelmq.lib.bot`:
  - New class `OutputBot`:
    - Method `export_event` to format/export events according to the parameters given by the user.
  - `ParserBot`: New methods `parse_json_stream` and `recover_line_json_stream`.
  - `ParserBot.recover_line_json`: Fix format by adding a list around the line data.
  - `Bot.send_message`: In debugging log level, the path to which the message is sent is now logged too.

 ### Bots
- Bots with dependencies: Use of `intelmq.lib.exceptions.MissingDependencyError`.

 #### Collectors
- `intelmq.bots.collectors.misp.collector`: Deprecate parameter `misp_verify` in favor of generic parameter `http_verify_cert`.
- `intelmq.bots.collectors.tcp.collector`: Drop compatibility with Python 3.4.
- `intelmq.bots.collectors.stomp.collector`:
  - Check the stomp.py version and show an error message if it does not match.
  - For stomp.py versions `>= 5.0.0` redirect the `stomp.PrintingListener` output to debug logging.
- `intelmq.bots.collectors.microsoft.collector_azure`: Support current Python library `azure-storage-blob>= 12.0.0`, configuration is incompatible and needs manual change. See NEWS file and bot's documentation for more details.
- `intelmq.bots.collectors.amqp.collector_amqp`: Require `pika` minimum version 1.0.
- `intelmq.bots.collectors.github_api.collector_github_contents_api`: Added (PR#1481).

 #### Parsers
- `intelmq.bots.parsers.autoshun.parser`: Drop compatibility with Python 3.4.
- `intelmq.bots.parsers.html_table.parser`: Drop compatibility with Python 3.4.
- `intelmq.bots.parsers.shadowserver.parser`: Add support for MQTT and Open-IPP feeds (PR#1512, PR#1544).
- `intelmq.bots.parsers.taichung.parser`:
  - Migrate to `ParserBot`.
  - Also parse geolocation information if available.
- `intelmq.bots.parsers.cymru.parser_full_bogons`:
  - Migrate to `ParserBot`.
  - Add last updated information in raw.
- `intelmq.bots.parsers.anubisnetworks.parser`: Add new parameter `use_malware_familiy_as_classification_identifier`.
- `intelmq.bots.parsers.microsoft.parser_ctip`: Compatibility for new CTIP data format used provided by the Azure interface.
- `intelmq.bots.parsers.cymru.parser_cap_program`: Support for `openresolver` type.
- `intelmq.bots.parsers.github_feed.parser`: Added (PR#1481).
- `intelmq.bots.parsers.urlvir.parser`: Removed, as the feed is discontinued (certtools#1537).

 #### Experts
- `intelmq.bots.experts.csv_converter`: Added as converter to CSV.
- `intelmq.bots.experts.misp`: Added (PR#1475).
- `intelmq.bots.experts.modify`: New parameter `maximum_matches`.

 #### Outputs
- `intelmq.bots.outputs.amqptopic`:
  - Use `OutputBot` and `export_event`.
  - Allow formatting the routing key with event data by the new parameter `format_routing_key` (boolean).
- `intelmq.bots.outputs.file`: Use `OutputBot` and `export_event`.
- `intelmq.bots.outputs.files`: Use `OutputBot` and `export_event`.
- `intelmq.bots.outputs.misp.output_feed`: Added, creates a MISP Feed (PR#1473).
- `intelmq.bots.outputs.misp.output_api`: Added, pushes to MISP via the API (PR#1506, PR#1536).
- `intelmq.bots.outputs.elasticsearch.output`: Dropped ElasticSearch version 5 compatibility, added version 7 compatibility (certtools#1513).

 ### Documentation
- Document usage of the `INTELMQ_ROOT_DIR` environment variable.
- Added document on MISP integration possibilities.
- Feeds:
  - Added "Full Bogons IPv6" feed.
  - Remove discontinued URLVir Feeds (certtools#1537).

 ### Packaging
- `setup.py` do not try to install any data to `/opt/intelmq/` as the behavior is inconsistent on various systems and with `intelmqsetup` we have a tool to create the structure and files anyway.
- `debian/rules`:
  - Provide a blank state file in the package.
- Patches:
  - Updated `fix-intelmq-paths.patch`.

 ### Tests
- Travis: Use `intelmqsetup` here too.
  - Install required build dependencies for the Debian package build test.
  - This version is no longer automatically tested on Python `<` 3.5.
  - Also run the tests on Python 3.8.
  - Run the Debian packaging tests on Python 3.5 and the code-style test on 3.8.
- Added tests for the new bot `intelmq.bots.outputs.misp.output_feed` (certtools#1473).
- Added tests for the new bot `intelmq.bots.experts.misp.expert` (certtools#1473).
- Added tests for `intelmq.lib.exceptions`.
- Added tests for `intelmq.lib.bot.OutputBot` and `intelmq.lib.bot.OutputBot.export_event`.
- Added IPv6 tests for `intelmq.bots.parsers.cymru.parser_full_bogons`.
- Added tests for `intelmq.lib.bot.ParserBot`'s new methods `parse_json_stream` and `recover_line_json_stream`.
- `intelmq.tests.test_conf`: Set encoding to UTF-8 for reading the `feeds.yaml` file.

 ### Tools
- `intelmqctl`:
  - `upgrade-config`:
    - Allow setting the state file location with the `--state-file` parameter.
    - Do not require a second run anymore, if the state file is newly created (certtools#1491).
    - New parameter `no_backup`/`--no-backup` to skip creation of `.bak` files for state and configuration files.
  - Only require `psutil` for the `IntelMQProcessManager`, not for process manager independent calls like `upgrade-config` or `check`.
  - Add new command `debug` to output some information for debugging. Currently implemented:
    - paths
    - environment variables
  - `IntelMQController`: New argument `--no-file-logging` to disable logging to file.
  - If dropping privileges does not work, `intelmqctl` will now abort (certtools#1489).
- `intelmqsetup`:
  - Add argument parsing and an option to skip setting file ownership, possibly not requiring root permissions.
  - Call `intelmqctl upgrade-config` and add argument for the state file path (certtools#1491).
- `intelmq_generate_misp_objects_templates.py`: Tool to create a MISP object template (certtools#1470).
- `intelmqdump`: New parameter `-t` or `--truncate` to optionally give the maximum length of `raw` data to show, 0 for no truncating.

 ### Contrib
- Added `development-tools`.
- ElasticSearch: Dropped version 5 compatibility, added version 7 compatibility (certtools#1513).
- Malware Name Mapping Downloader:
  - New parameter `--mwnmp-ignore-adware`.
  - The parameter `--add-default` supports an optional parameter to define the default value.

 ### Known issues
- Bots started with IntelMQ-Manager stop when the webserver is restarted. (certtools#952).
- Corrupt dump files when interrupted during writing (certtools#870).
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component: tests documentation Indicates a need for improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants