]> git.ipfire.org Git - dbl.git/log
dbl.git
3 weeks agoexporters: Don't fail if exporting for the first time master
Michael Tremer [Thu, 19 Mar 2026 16:23:49 +0000 (16:23 +0000)] 
exporters: Don't fail if exporting for the first time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
3 weeks agodbl: Allow to for optimization
Michael Tremer [Sun, 15 Mar 2026 13:35:59 +0000 (13:35 +0000)] 
dbl: Allow to for optimization

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoexporters: Add link to the allocation
Michael Tremer [Fri, 13 Mar 2026 11:53:04 +0000 (11:53 +0000)] 
exporters: Add link to the allocation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoexporters: Configure allocated SIDs
Michael Tremer [Fri, 13 Mar 2026 11:48:09 +0000 (11:48 +0000)] 
exporters: Configure allocated SIDs

  https://github.com/sidallocation/sidallocation.org/issues/37
  https://github.com/sidallocation/sidallocation.org/commit/0e1c905f5e8eb8cc0d68aa91cc03783077c44efa

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Allow trusted users to accept their own reports
Michael Tremer [Tue, 10 Mar 2026 15:43:57 +0000 (15:43 +0000)] 
reports: Allow trusted users to accept their own reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agousers: Treat all emails as auto-generated
Michael Tremer [Tue, 10 Mar 2026 15:42:11 +0000 (15:42 +0000)] 
users: Treat all emails as auto-generated

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Don't encourage people to reply to refusal emails
Michael Tremer [Tue, 10 Mar 2026 15:36:26 +0000 (15:36 +0000)] 
reports: Don't encourage people to reply to refusal emails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Automatically close any reports from trusted reporters
Michael Tremer [Tue, 10 Mar 2026 15:24:44 +0000 (15:24 +0000)] 
reports: Automatically close any reports from trusted reporters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agousers: Create a group for trusted reporters
Michael Tremer [Tue, 10 Mar 2026 15:24:33 +0000 (15:24 +0000)] 
users: Create a group for trusted reporters

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Minor code cleanup
Michael Tremer [Tue, 10 Mar 2026 15:24:15 +0000 (15:24 +0000)] 
reports: Minor code cleanup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Improve wording in emails
Michael Tremer [Tue, 10 Mar 2026 15:07:16 +0000 (15:07 +0000)] 
reports: Improve wording in emails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Include the domain name in subject on report emails
Michael Tremer [Tue, 10 Mar 2026 15:02:43 +0000 (15:02 +0000)] 
reports: Include the domain name in subject on report emails

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Improve wording on opening email
Michael Tremer [Tue, 10 Mar 2026 15:02:29 +0000 (15:02 +0000)] 
reports: Improve wording on opening email

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoapi: Don't show own username on duplicate reports
Michael Tremer [Tue, 10 Mar 2026 15:02:03 +0000 (15:02 +0000)] 
api: Don't show own username on duplicate reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoapi: Allow to disable the email notification on reports
Michael Tremer [Tue, 10 Mar 2026 15:01:42 +0000 (15:01 +0000)] 
api: Allow to disable the email notification on reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Include the URL to the report in the API response
Michael Tremer [Tue, 10 Mar 2026 14:51:42 +0000 (14:51 +0000)] 
reports: Include the URL to the report in the API response

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
4 weeks agoreports: Import util
Michael Tremer [Mon, 9 Mar 2026 17:44:51 +0000 (17:44 +0000)] 
reports: Import util

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Fix the domains query endpoint
Michael Tremer [Wed, 4 Mar 2026 12:49:04 +0000 (12:49 +0000)] 
api: Fix the domains query endpoint

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoratelimiter: Don't send headers if the ratelimiter has been disabled
Michael Tremer [Wed, 4 Mar 2026 12:25:24 +0000 (12:25 +0000)] 
ratelimiter: Don't send headers if the ratelimiter has been disabled

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoratelimiter: Use the correct variable to fetch the API key
Michael Tremer [Wed, 4 Mar 2026 12:25:07 +0000 (12:25 +0000)] 
ratelimiter: Use the correct variable to fetch the API key

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Add ratelimiting to the searches
Michael Tremer [Tue, 3 Mar 2026 17:03:36 +0000 (17:03 +0000)] 
api: Add ratelimiting to the searches

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoratelimiter: Change limit for the entire class after auth
Michael Tremer [Tue, 3 Mar 2026 16:56:36 +0000 (16:56 +0000)] 
ratelimiter: Change limit for the entire class after auth

We are accessing the limit variables outside of this function, so we
will have to reset limit. This is slightly annoying, but we cannot
perform any authentication checks in __init__().

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoratelimiter: Purge any outdated data from the ratelimiter table
Michael Tremer [Tue, 3 Mar 2026 16:51:20 +0000 (16:51 +0000)] 
ratelimiter: Purge any outdated data from the ratelimiter table

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoratelimiter: Allow to configure different limits for authenticated users
Michael Tremer [Tue, 3 Mar 2026 16:43:26 +0000 (16:43 +0000)] 
ratelimiter: Allow to configure different limits for authenticated users

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoauth: Allow to mark some API keys to never be ratelimited
Michael Tremer [Tue, 3 Mar 2026 16:37:44 +0000 (16:37 +0000)] 
auth: Allow to mark some API keys to never be ratelimited

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoratelimiter: Use the API key as bucket for authenticated users
Michael Tremer [Tue, 3 Mar 2026 16:36:55 +0000 (16:36 +0000)] 
ratelimiter: Use the API key as bucket for authenticated users

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Implement a basic rate limiter
Michael Tremer [Tue, 3 Mar 2026 16:23:38 +0000 (16:23 +0000)] 
api: Implement a basic rate limiter

This code is borrowed from Pakfire.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agolists: Don't store the amount of pending reports any more
Michael Tremer [Tue, 3 Mar 2026 15:59:27 +0000 (15:59 +0000)] 
lists: Don't store the amount of pending reports any more

This is not very reliable and we don't show the number anyways

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoreports: Validate the name when creating reports
Michael Tremer [Tue, 3 Mar 2026 15:53:43 +0000 (15:53 +0000)] 
reports: Validate the name when creating reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Add a middleware that ads timing information about the request
Michael Tremer [Tue, 3 Mar 2026 15:49:59 +0000 (15:49 +0000)] 
api: Add a middleware that ads timing information about the request

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Generate a RSS feed with the latest reports
Michael Tremer [Tue, 3 Mar 2026 15:41:46 +0000 (15:41 +0000)] 
api: Generate a RSS feed with the latest reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoreports: Fix fetching closed reports
Michael Tremer [Tue, 3 Mar 2026 14:56:30 +0000 (14:56 +0000)] 
reports: Fix fetching closed reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Don't try to search for a list if none exists
Michael Tremer [Tue, 3 Mar 2026 14:53:39 +0000 (14:53 +0000)] 
api: Don't try to search for a list if none exists

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Fix incorrect excpetion class name
Michael Tremer [Tue, 3 Mar 2026 14:41:13 +0000 (14:41 +0000)] 
api: Fix incorrect excpetion class name

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agousers: Make User objects comparable
Michael Tremer [Tue, 3 Mar 2026 14:41:01 +0000 (14:41 +0000)] 
users: Make User objects comparable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Remove the deprecated calls to fetch reports
Michael Tremer [Tue, 3 Mar 2026 14:36:34 +0000 (14:36 +0000)] 
api: Remove the deprecated calls to fetch reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Don't accept any repeat reports by the same user
Michael Tremer [Tue, 3 Mar 2026 14:35:17 +0000 (14:35 +0000)] 
api: Don't accept any repeat reports by the same user

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Create the reports search endpoint
Michael Tremer [Tue, 3 Mar 2026 14:34:55 +0000 (14:34 +0000)] 
api: Create the reports search endpoint

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoauth: Actually check the API keys
Michael Tremer [Tue, 3 Mar 2026 14:34:20 +0000 (14:34 +0000)] 
auth: Actually check the API keys

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agolists: Return reports as an iterator
Michael Tremer [Tue, 3 Mar 2026 11:39:42 +0000 (11:39 +0000)] 
lists: Return reports as an iterator

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agolists: Allow searching for reports by a certain reporter
Michael Tremer [Tue, 3 Mar 2026 11:37:19 +0000 (11:37 +0000)] 
lists: Allow searching for reports by a certain reporter

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Send 409 if someone is trying to close a closed report
Michael Tremer [Tue, 3 Mar 2026 11:33:31 +0000 (11:33 +0000)] 
api: Send 409 if someone is trying to close a closed report

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Allow to post a comment when closing the report
Michael Tremer [Tue, 3 Mar 2026 11:32:55 +0000 (11:32 +0000)] 
api: Allow to post a comment when closing the report

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoreports: Implement some basic permissions check
Michael Tremer [Tue, 3 Mar 2026 11:26:14 +0000 (11:26 +0000)] 
reports: Implement some basic permissions check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Add a handler to post comments to reports
Michael Tremer [Tue, 3 Mar 2026 11:02:35 +0000 (11:02 +0000)] 
api: Add a handler to post comments to reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoreports: Add a simple check function if a report has been closed
Michael Tremer [Tue, 3 Mar 2026 11:01:59 +0000 (11:01 +0000)] 
reports: Add a simple check function if a report has been closed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoauth: Fix name of database field
Michael Tremer [Tue, 3 Mar 2026 10:58:20 +0000 (10:58 +0000)] 
auth: Fix name of database field

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoauth: Log when API keys have been used last
Michael Tremer [Mon, 2 Mar 2026 18:35:23 +0000 (18:35 +0000)] 
auth: Log when API keys have been used last

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Require authentication to close reports
Michael Tremer [Mon, 2 Mar 2026 18:32:44 +0000 (18:32 +0000)] 
api: Require authentication to close reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Use type annotations for users
Michael Tremer [Mon, 2 Mar 2026 18:30:08 +0000 (18:30 +0000)] 
api: Use type annotations for users

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Rename the authentication function
Michael Tremer [Mon, 2 Mar 2026 18:27:53 +0000 (18:27 +0000)] 
api: Rename the authentication function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Deprecate the old reports endpoints in the lists handler
Michael Tremer [Mon, 2 Mar 2026 17:57:20 +0000 (17:57 +0000)] 
api: Deprecate the old reports endpoints in the lists handler

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Create a new endpoint to submit reports
Michael Tremer [Mon, 2 Mar 2026 17:56:29 +0000 (17:56 +0000)] 
api: Create a new endpoint to submit reports

This makes the API slightly cleaner and moves all report things
together.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: auth: The impersonation is tied to the key and not the user
Michael Tremer [Mon, 2 Mar 2026 17:55:30 +0000 (17:55 +0000)] 
api: auth: The impersonation is tied to the key and not the user

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Use the authenticated user to create reports
Michael Tremer [Mon, 2 Mar 2026 17:44:31 +0000 (17:44 +0000)] 
api: Use the authenticated user to create reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Check if the API key user actually exists, too
Michael Tremer [Mon, 2 Mar 2026 17:44:09 +0000 (17:44 +0000)] 
api: Check if the API key user actually exists, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agolists: Whenever a list is updated, we refresh the timestamp
Michael Tremer [Mon, 2 Mar 2026 17:32:58 +0000 (17:32 +0000)] 
lists: Whenever a list is updated, we refresh the timestamp

Further down in the code, we will compare timestamps which have not been
manifested in the database, yet, and are therefore unknown.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agosources: Fail if we are trying to import some HTML
Michael Tremer [Mon, 2 Mar 2026 17:17:49 +0000 (17:17 +0000)] 
sources: Fail if we are trying to import some HTML

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoapi: Implement API authentication for users
Michael Tremer [Mon, 2 Mar 2026 17:14:51 +0000 (17:14 +0000)] 
api: Implement API authentication for users

This patch also implements that we can impersonate users so that the
webapp does not require an API key for each single user.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
5 weeks agoauth: Add UID and permission to impersonate to API keys
Michael Tremer [Mon, 2 Mar 2026 17:02:25 +0000 (17:02 +0000)] 
auth: Add UID and permission to impersonate to API keys

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agoreports: Create a separate table for comments
Michael Tremer [Fri, 27 Feb 2026 17:28:16 +0000 (17:28 +0000)] 
reports: Create a separate table for comments

That way, we may have multiple comments on a report.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agoapi: Move /search into its own section
Michael Tremer [Fri, 27 Feb 2026 16:52:50 +0000 (16:52 +0000)] 
api: Move /search into its own section

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agoapi: Don't list the index redirection as an endpoint
Michael Tremer [Fri, 27 Feb 2026 16:52:36 +0000 (16:52 +0000)] 
api: Don't list the index redirection as an endpoint

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Manifest timestamps before optimizing
Michael Tremer [Fri, 27 Feb 2026 14:05:52 +0000 (14:05 +0000)] 
lists: Manifest timestamps before optimizing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Don't pull dead domains when optimizing
Michael Tremer [Fri, 27 Feb 2026 13:43:28 +0000 (13:43 +0000)] 
lists: Don't pull dead domains when optimizing

Since we have millions of dead domains, we must be more efficient here
and not pull them since we already know that they will completely
delisted.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Don't optimize the list if not necessary
Michael Tremer [Fri, 27 Feb 2026 13:42:51 +0000 (13:42 +0000)] 
lists: Don't optimize the list if not necessary

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agoexporters: Optimize the list before exporting it
Michael Tremer [Fri, 27 Feb 2026 13:42:20 +0000 (13:42 +0000)] 
exporters: Optimize the list before exporting it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Store the timestamp when we optimized the list
Michael Tremer [Fri, 27 Feb 2026 13:42:01 +0000 (13:42 +0000)] 
lists: Store the timestamp when we optimized the list

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Remove dead domains from the exports again
Michael Tremer [Fri, 27 Feb 2026 12:59:38 +0000 (12:59 +0000)] 
lists: Remove dead domains from the exports again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agoexporters: Check if an export actually needs an update
Michael Tremer [Fri, 27 Feb 2026 12:10:05 +0000 (12:10 +0000)] 
exporters: Check if an export actually needs an update

This allows us to export only if we actually have any changes which will
take a lot of load away from the server.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Implement showing false-positives
Michael Tremer [Fri, 27 Feb 2026 11:44:08 +0000 (11:44 +0000)] 
lists: Implement showing false-positives

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agosources: Make them sortable
Michael Tremer [Fri, 27 Feb 2026 11:41:49 +0000 (11:41 +0000)] 
sources: Make them sortable

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Only export blocked domains
Michael Tremer [Fri, 27 Feb 2026 11:32:32 +0000 (11:32 +0000)] 
lists: Only export blocked domains

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Perform whitelist check only if anything is actually whitelisted
Michael Tremer [Fri, 27 Feb 2026 11:22:29 +0000 (11:22 +0000)] 
lists: Perform whitelist check only if anything is actually whitelisted

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agochecker: Make it possible to manually check a domain again
Michael Tremer [Fri, 27 Feb 2026 11:12:32 +0000 (11:12 +0000)] 
checker: Make it possible to manually check a domain again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agolists: Mark domains as listed for faster search
Michael Tremer [Fri, 27 Feb 2026 10:50:53 +0000 (10:50 +0000)] 
lists: Mark domains as listed for faster search

The query that is determining which domains are whitelisted has always
been very slow and there is no feasible way to accellerate it using
indexes, etc.

Therefore we will download all whitelisted domains and all potentially
blockable domains and perform the check in the Python application. That
way, we can later mark any delisted domains and fetch the entire list of
domains reasonably fast.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agodomains: Add a field to mark a domain as listed
Michael Tremer [Fri, 27 Feb 2026 10:50:05 +0000 (10:50 +0000)] 
domains: Add a field to mark a domain as listed

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agosources: Ignore if the server suddenly closes the connection
Michael Tremer [Fri, 27 Feb 2026 09:21:52 +0000 (09:21 +0000)] 
sources: Ignore if the server suddenly closes the connection

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
6 weeks agoapi: Redirect to the API documentation
Michael Tremer [Wed, 25 Feb 2026 15:48:57 +0000 (15:48 +0000)] 
api: Redirect to the API documentation

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agosources: Convert modification timestamps to UTC
Michael Tremer [Fri, 20 Feb 2026 17:56:47 +0000 (17:56 +0000)] 
sources: Convert modification timestamps to UTC

The asyncpg driver does not seem to like offset-aware and offset-unaware
timestamps.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agolists: Update domains in batches of 100
Michael Tremer [Fri, 20 Feb 2026 16:37:03 +0000 (16:37 +0000)] 
lists: Update domains in batches of 100

The asyncpg driver does not support an infinite amount of arguments in a
single query.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agolists: Actually update all sources
Michael Tremer [Fri, 20 Feb 2026 16:36:55 +0000 (16:36 +0000)] 
lists: Actually update all sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agochecker: Fix running in async mode
Michael Tremer [Fri, 20 Feb 2026 15:57:35 +0000 (15:57 +0000)] 
checker: Fix running in async mode

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agolists: Fix updating sources
Michael Tremer [Fri, 20 Feb 2026 15:45:12 +0000 (15:45 +0000)] 
lists: Fix updating sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoMake the entire application async
Michael Tremer [Fri, 20 Feb 2026 15:40:03 +0000 (15:40 +0000)] 
Make the entire application async

This was needed because we seem to have some issues with the API
starting the next request or trying to access the database after the
session has been closed. Instead we will now have a single database
session per task which can be managed easier and will only be closed
after the entire task has completed.

As another benefit, we are now able to run many requests simultaneously.
So far this has not been a big bottleneck, but some operations (like
closing a report) can take a moment and would therefore have been
blocking other requests.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoMove the configuration file to /etc/dbl/dbl.conf
Michael Tremer [Fri, 20 Feb 2026 13:20:40 +0000 (13:20 +0000)] 
Move the configuration file to /etc/dbl/dbl.conf

That way, we can have some companion files with credentials, etc.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agousers: Deliver emails over SMTP instead of piping them into sendmail
Michael Tremer [Tue, 17 Feb 2026 16:14:41 +0000 (16:14 +0000)] 
users: Deliver emails over SMTP instead of piping them into sendmail

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoexporters: Move our Suricata SID range
Michael Tremer [Mon, 16 Feb 2026 19:39:05 +0000 (19:39 +0000)] 
exporters: Move our Suricata SID range

This is not perfectly unique, but it should be hopefully okay.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agosources: Abort if we are importing our own canary
Michael Tremer [Mon, 16 Feb 2026 19:30:57 +0000 (19:30 +0000)] 
sources: Abort if we are importing our own canary

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoexports: Add a canary domain to all exports
Michael Tremer [Mon, 16 Feb 2026 19:28:15 +0000 (19:28 +0000)] 
exports: Add a canary domain to all exports

This is so that we can identify when we are reading back our own data.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoreports: Don't remember what got notified
Michael Tremer [Mon, 16 Feb 2026 19:04:50 +0000 (19:04 +0000)] 
reports: Don't remember what got notified

It is more useful to always receive an email with all open reports.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoreports: Obfuscate names when sending them over email
Michael Tremer [Mon, 16 Feb 2026 18:59:37 +0000 (18:59 +0000)] 
reports: Obfuscate names when sending them over email

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agosources: Gracefully skip if a source has given us an empty file
Michael Tremer [Mon, 16 Feb 2026 17:03:49 +0000 (17:03 +0000)] 
sources: Gracefully skip if a source has given us an empty file

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
7 weeks agoreports: Fix wrong database field when fetching multiple reports
Michael Tremer [Mon, 16 Feb 2026 17:03:33 +0000 (17:03 +0000)] 
reports: Fix wrong database field when fetching multiple reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoapi: Implement closing reports
Michael Tremer [Sun, 8 Feb 2026 18:32:09 +0000 (18:32 +0000)] 
api: Implement closing reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agolists: Fix fetching open/closed reports
Michael Tremer [Sun, 25 Jan 2026 15:20:27 +0000 (15:20 +0000)] 
lists: Fix fetching open/closed reports

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoexporters: Fix syntax error in Suricata rules
Michael Tremer [Sun, 25 Jan 2026 14:38:47 +0000 (14:38 +0000)] 
exporters: Fix syntax error in Suricata rules

Reported-by: Matthias Fischer <matthias.fischer@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoapi: Allow to search for reports for a specific name
Michael Tremer [Sat, 24 Jan 2026 15:38:59 +0000 (15:38 +0000)] 
api: Allow to search for reports for a specific name

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoapi: Don't perform search if the query is not a valid hostname
Michael Tremer [Sat, 24 Jan 2026 15:38:29 +0000 (15:38 +0000)] 
api: Don't perform search if the query is not a valid hostname

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
2 months agoapi: domains: Revert the domain dump to something simple again
Michael Tremer [Wed, 14 Jan 2026 18:31:21 +0000 (18:31 +0000)] 
api: domains: Revert the domain dump to something simple again

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>