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

STOMP-and-n6-related updates, fixes and enhancements, especially adding login-based authentication #2408

Merged
merged 3 commits into from
Sep 27, 2023

Commits on Sep 27, 2023

  1. STOMP bots: several updates, fixes and improvements + some refactoring

    The updates, fixes and improvements regard the *STOMP collector* and
    *STOMP output* bots. Important changes are described below...
    
    From now on, newer versions of the `stomp.py` package are supported --
    including the latest (8.1.0).
    
    Now both STOMP bots coerce the `port` configuration parameter to int --
    so that a string representing an integer number is also acceptable (even
    if not recommended) as a value of that parameter.
    
    In the *STOMP output* bot, a bug has been fixed: `AttributeError` caused
    by attempts to get unset attributes (`ssl_ca_cert` and companions...).
    
    The *STOMP collector*'s reconnection mechanism has been fixed: from now
    on, no reconnection attempts are made after `shutdown()`. Apart from
    that, reconnection is not attempted at all for versions of `stomp.py`
    older than 4.1.21 (as it did not work properly anyway).
    
    Also regarding the *STOMP collector* bot, the following (undocumented
    and unused) attributes of `StompCollectorBot` instances are no longer
    set in `init()`: `ssl_ca_cert`, `ssl_cl_cert`, `ssl_cl_cert_key`.
    
    Various checks have been improved/enhanced. Now, for example, both STOMP
    bot classes implement the `check()` static/class method -- whose role is
    to check ("statically", without the need to run the bot) configuration
    parameters; in particular, it checks whether necessary certificate files
    are accessible. When it comes to runtime (on-initialization) checks, one
    notable improvement is that now also the *STOMP output* bot will raise a
    `MissingDependencyError` if the `stomp.py` version is older than 4.1.8
    (an analogous check has already been implemented by *STOMP collector*).
    
    The code of those bot classes have also been significantly refactored
    -- in particular, several common operations have been factored out and
    placed in a new mix-in class: `intelmq.lib.mixins.StompMixin`; its
    definition resides in a new module: `intelmq.lib.mixins.stomp`.
    zuo committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    e7c1235 View commit details
    Browse the repository at this point in the history
  2. STOMP bots: add support for authentication by username + password

    Each of the *STOMP collector* and *STOMP output* bots obtained the
    following new configuration parameters:
    
    * `auth_by_ssl_client_certificate` (a Boolean flag; it is `True` by
      default -- to keep backward compatibility);
    
    * `username` and `password` -- to be used as STOMP authentication
      credentials (login and passcode), but *only* if the aforementioned
      parameter `auth_by_ssl_client_certificate` is `False`.
    
    If `auth_by_ssl_client_certificate` is `False`, then the (supported also
    previously...) `ssl_client_certificate` and `ssl_client_certificate_key`
    parameters are ignored (i.e., not only left unused, but also there are
    *no checks* whether the files they refer to actually exist).
    zuo committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    700182c View commit details
    Browse the repository at this point in the history
  3. 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*.
    zuo committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    7c59d49 View commit details
    Browse the repository at this point in the history