Skip to content

Commit 59f598c

Browse files
Sebastian WagnerBirger Schacht
authored andcommitted
DOC: Enhance API and Manager documentation
Make the installation steps much more verbose and clear - Split into deb/rpm packages and pip - explain all steps in detail for the pip-installation - add missing information, like positions. - api: link to permissions section - use the same structure for both pages
1 parent a47af9a commit 59f598c

File tree

2 files changed

+60
-16
lines changed

2 files changed

+60
-16
lines changed

docs/user/intelmq-api.rst

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,55 @@
33
SPDX-License-Identifier: AGPL-3.0-or-later
44
55
###########
6-
Intelmq Api
6+
IntelMQ API
77
###########
88

9-
intelmq-api is a `hug <http://hug.rest>`_ based API for the `intelmq <https://github.com/certtools/intelmq/>`_ project.
9+
`intelmq-api` is a `hug <http://hug.rest>`_ based API for the `IntelMQ <https://github.com/certtools/intelmq/>`_ project.
10+
11+
.. contents::
1012

1113
**********************************
1214
Installing and running intelmq-api
1315
**********************************
1416

15-
``intelmq-api`` requires the IntelMQ package to be installed on the system (it uses ``intelmqctl`` to control the botnet).
17+
`intelmq-api` requires the IntelMQ package to be installed on the system (it uses ``intelmqctl`` to control the botnet).
1618

1719
You can install the ``intelmq-api`` package using your preferred system package installation mechanism or using the ``pip`` Python package installer.
18-
We provide packages for the ``intelmq-api`` for the same operating systems as we do for the ``intelmq`` package itself.
20+
We provide packages for the `intelmq-api` for the same operating systems as we do for the `intelmq` package itself.
21+
For the list of supported distributions, please see the intelmq :doc:`installation` page.
22+
1923
Our repository page gives `installation instructions for various operating systems <https://software.opensuse.org/download.html?project=home:sebix:intelmq&package=intelmq-api>`_.
24+
No additional set-up steps are needed if you use these packages.
2025

21-
The ``intelmq-api`` packages ship a configuration file in ``${PREFIX}/etc/intelmq/api-config.json``, a virtualhost configuration file for Apache 2 in ``${PREFIX}/etc/intelmq/api-apache.conf`` and a sudoers configuration file in ``${PREFIX}/etc/intelmq/api-sudoers.conf``.
22-
The value of ``${PREFIX}`` depends on your installation method- with distribution packages it is simply ``/``, when using pip (as root) it is ``/usr/local/lib/pythonX.Y/dist-packages/`` (where ``X.Y`` is your Python version.
23-
Some distribution packages already create a symlink to the sudoers file in the sudoers.d configuration directory and a symlink in the relevant Apache configuration directory to the Apache configuration file, so it should be easy to enable that (i.e. by using ``a2ensite intelmq-api`` on Debian based systems).
26+
The `intelmq-api` provides the route ``/api`` for managing the IntelMQ installation.
2427

25-
But for development purposes and testing you can also run ``intelmq-api`` directly using ``hug``:
28+
For development purposes and testing you can also run `intelmq-api` directly using ``hug``:
2629

2730
.. code-block:: bash
2831
2932
hug -m intelmq_api.serve
3033
34+
Installation using pip
35+
^^^^^^^^^^^^^^^^^^^^^^
36+
37+
The `intelmq-api` packages ship a configuration file in ``${PREFIX}/etc/intelmq/api-config.json``, a positions configuration for the manager in ``{PREFIX}/etc/intelmq/manager/positions.conf``, a virtualhost configuration file for Apache 2 in ``${PREFIX}/etc/intelmq/api-apache.conf`` and a sudoers configuration file in ``${PREFIX}/etc/intelmq/api-sudoers.conf``.
38+
The value of ``${PREFIX}`` depends on your environment and is something like ``/usr/local/lib/pythonX.Y/dist-packages/`` (where ``X.Y`` is your Python version).
39+
40+
The file ``${PREFIX}/etc/intelmq/api-apache.conf`` needs to be placed in the correct place for your Apache 2 installation.
41+
- On Debian and Ubuntu, move the file to ``/etc/apache2/conf-available.d/manager-apache.conf`` and then execute ``a2enconf manager-apache``.
42+
- On CentOS, RHEL and Fedora, move the file to ``/etc/httpd/conf.d/``.
43+
- On openSUSE, move the file to ``/etc/apache2/conf.d/``.
44+
Don't forget to reload your webserver afterwards.
45+
46+
- The file ``${PREFIX}/etc/intelmq/api-config.json`` needs to be moved to ``/etc/intelmq/api-config.json``.
47+
- The file ``${PREFIX}/etc/intelmq/manager/positions.conf`` needs to be moved to ``/etc/intelmq/manager/positions.conf``.
48+
- Last but not least move the file ``${PREFIX}/etc/intelmq/api-sudoers.conf`` to ``/etc/sudoers.d/01_intelmq-api`` and adapt the webserver user name in this file. Set the file permissions to ``0o440``.
49+
50+
Afterwards continue with the section Permissions below.
3151

32-
The ``intelmq-api`` provides the route ``/api`` for managing the ``intelmq`` installation.
52+
IntelMQ 2.3.1 comes with a tool ``intelmqsetup`` which performs these set-up steps automatically.
53+
Please note that the tool is very new and may not detect all situations correctly. Please report us any bugs you are observing.
54+
The tools is idempotent, you can execute it multiple times.
3355

3456
***********************
3557
Configuring intelmq-api

docs/user/intelmq-manager.rst

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,34 @@ IntelMQ Manager
55
**IntelMQ Manager** is a graphical interface to manage configurations for IntelMQ.
66
Its goal is to provide an intuitive tool to allow non-programmers to specify the data flow in IntelMQ.
77

8+
.. contents::
9+
810
************
911
Installation
1012
************
1113

12-
For the `intelmq-manager` webinterface any operating system that can serve html pages is supported.
14+
For the `intelmq-manager` webinterface any operating system that can serve HTML pages is supported.
1315
`intelmq-manager` can be installed via Python pip or via the operating systems package manager.
14-
For the list of supported distributions, please see the intelmq :doc:`installation` page.
16+
We provide packages for the `intelmq-manager` for the same operating systems as we do for the `intelmq` package itself.
17+
For the list of supported distributions, please see the IntelMQ :doc:`installation` page.
18+
19+
Our repository page gives `installation instructions for various operating systems <https://software.opensuse.org/download.html?project=home:sebix:intelmq&package=intelmq-manager>`_.
20+
No additional set-up steps are needed if you use these packages.
21+
22+
To use the `intelmq-manager` webinterface, you have to have a working `intelmq` installation which provides access to the :doc:`intelmq-api`.
1523

16-
The packages install the html files in ``${PREFIX}/usr/share/intelmq-manager/html``.
17-
The value of ``${PREFIX}`` depends on your installation method- with distribution packages it is simply ``/``, when using pip (as root) it is ``/usr/local/lib/pythonX.Y/dist-packages/`` (where ``X.Y`` is your Python version).
24+
When using distribution packages, the webserver configuration (which is also shown below) for Apache will be automatically installed and the HTML files are stored under ``/usr/share/intelmq-manager/html``.
25+
The webinterface is then available at ``http://localhost/intelmq-manager``.
1826

19-
To use the ``intelmq-manager`` webinterface, you have to have a working ``intelmq`` installation which provides access to the ``intelmq-api``.
27+
Installation using pip
28+
^^^^^^^^^^^^^^^^^^^^^^
2029

21-
``intelmq-manager`` ships with a default configuration for the Apache webserver:
30+
For installation via pip, the situation is more complex.
31+
The packages install the HTML files in ``${PREFIX}/usr/share/intelmq-manager/html``.
32+
The value of ``${PREFIX}`` depends on your environment and is something like ``/usr/local/lib/pythonX.Y/dist-packages/`` (where ``X.Y`` is your Python version).
33+
You can either move the files to ``/usr/share/intelmq-manager/html`` or adapt the path in the webserver configuration, see below.
34+
35+
`intelmq-manager` ships with a default configuration for the Apache webserver (in ``${PREFIX}/etc/intelmq/manager-apache.conf``):
2236

2337
.. code-block::
2438
@@ -31,7 +45,15 @@ To use the ``intelmq-manager`` webinterface, you have to have a working ``intelm
3145
</IfModule>
3246
</Directory>
3347
34-
Some distribution packages already create a symlink in the relevant apache configuration directory to the apache configuration file, so it should be easy to enable that (i.e. by using ``a2enconf intelmq-manager`` on Debian based systems).
48+
This file needs to be placed in the correct place for your Apache 2 installation.
49+
- On Debian and Ubuntu, move the file to ``/etc/apache2/conf-available.d/manager-apache.conf`` and then execute ``a2enconf manager-apache``.
50+
- On CentOS, RHEL and Fedora, move the file to ``/etc/httpd/conf.d/``.
51+
- On openSUSE, move the file to ``/etc/apache2/conf.d/``.
52+
Don't forget to reload your webserver afterwards.
53+
54+
IntelMQ 2.3.1 comes with a tool ``intelmqsetup`` which performs these set-up steps automatically.
55+
Please note that the tool is very new and may not detect all situations correctly. Please report us any bugs you are observing.
56+
The tools is idempotent, you can execute it multiple times.
3557

3658
***********************
3759
Security considerations

0 commit comments

Comments
 (0)