Replies: 3 comments 3 replies
-
Hi @Digi92 Thank you very much for your idea! Let's start with the last question because it's easy to answer:
We never had this amazing idea! :) When we started the project, we only had rules. Then, we thought about sharing rules over the internet, so we added rule packages via URL. We had never considered importing rules from a file path. Your suggestion makes absolutely sense. After reading your idea, I had two additional ideas, so I think we should enhance the rule packages with the following options: Automatic synchronization
Manual synchronization
With the two manual synchronization options, you can save some resources since you can synchronize the rule package whenever it changes and not every You choose one of these types when you create the package in mosparo, as you do when you create a new rule. What do you think about these four options? Kind regards, zepich |
Beta Was this translation helpful? Give feedback.
-
Hi @zepich, the suggestion for the two automatic options sounds good to me. Regarding the CLI command “mosparo:import-rule-set”: To prevent unnecessary updates, we could also save the last JSON file checksum of a ruleset and check whether the checksum has changed before an update and only perform an update if there is a change. I like the idea of an API endpoint, as this would significantly simplify the integration of rule packages, e.g. via lists such as from StopForumSpam, without having to create a huge JSON file. Additional question now that I think about it. Kind regards |
Beta Was this translation helpful? Give feedback.
-
Hi @Digi92 Thank you very much for your feedback.
From my perspective, for the local rulesets, we can generate the checksum directly from the file instead of using the additional file. The goal of the additional file is not to transfer the whole ruleset file over the internet for every update check. However, since the file is local, we can directly create the checksum of the file and do not need the additional checksum file.
You always manually create a ruleset first before you can import it. When creating the ruleset, you choose between the four options (from a URL, from a file, manually by API, manually by CLI). This will then create the ruleset entry. If you open one of the manual rulesets (by API, by CLI) after creating it, you will not see any content because you have to feed in the content first. Instead, you will see some kind of introduction text and/or some text, like when creating a new repository on GitHub/GitLab, about what you must do next. To import the ruleset by CLI, you must open the CLI and execute the command. Now, what is the idea behind this option? Option 1 (from URL automatic) and Option 2 (from file automatic) require you to have a web or file server running 24/7. But you may not want to have such a server, and/or you do not want the risk of exposing it to the internet. So, how about manual options? That's why I had the idea for these two additional options. The API option is the best because you can control it from everywhere, but it requires you to develop some script to access the API and import the data. What if you do not want to invest this time or if you can't develop at all? The answer is the new CLI command. With the CLI command, you can synchronize the file with rsync/SCP (or some other kind of tool) to your server(s) and then execute the import command when the file is synchronized, either manually or automatically, for example with This gives you an easy option to import the file without installing and maintaining a web/file server for the ruleset file and without developing a tool/script to import the ruleset via API. By choosing the type when creating the ruleset, we can also limit which rulesets are available for the API import functionality, which are for the CLI command, and which are automatically updated (with the existing CLI command).
No, we have almost no API endpoints right now except the endpoints to validate and verify the form data, the API to get the statistical data, and, since v1.3.0, the health check API. Adding API endpoints for a lot of stuff (like managing projects, managing project members, and managing rules) is on our long-term to-do list. Kind regards, zepich |
Beta Was this translation helpful? Give feedback.
-
Hi,
why not support file paths on the server for rule packages as an alternative to a URL?
In the case of self created rule packages, I would currently have to place them in a publicly accessible directory and protect them with a password to prevent unauthorized access.
However, this carries the risk that in the event of a misconfiguration (e.g. accidental removal of password protection) the rule packages become publicly accessible.
Is there a particular reason why this option has not yet been provided?
Kind regards
Digi92
Beta Was this translation helpful? Give feedback.
All reactions