-
Notifications
You must be signed in to change notification settings - Fork 24
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
Validation of documents and protocols #397
Comments
design proposalWe propose to implement the functionality as following: Use slog for logging
Use two directories for failuresIf a document file itself cannot be fully downloaded, e.g. we only get 23 bytes, it does not make sense to safe it. So this failure will only be logged, but no file safed. If we have the main document but anything does wrong with the validation, e.g. the schema or the checksum or the openpgp signature, we consider the document UNSAFE. In case that unsafe mode is explicitly enabled, we write the files in the directory If forwarding goes wrong, the document is written to the directory forwarding uses in-memory queueIf forwarding is configured, documents will be held in an internal, size limited queue in memory. (The size will probably be made configurable). Downloads and validation continues concurrently and blocks when the queue is full. This is to protect against congestion and too high memory usage. Forwarding tries each document from the queue once concurrently and saves it to disk if forwarding fails. Failure is logged. |
@tschmidtb51 does this match your expectations? |
@s-l-teichmann Please see my remarks inline:
✔️
👁️ Please make sure to increase the version number according to semver as our build requirements change.
✔️
✔️
✔️
👁️ According to the Unix log file naming (e.g. redis, nginx, etc.): Shouldn't that be csaf_downloader.log 🤔
✔️
✔️
👁️ Generally, ok. However, the folder name
✔️
👁️ Please make the size configurable and set it to a reasonable default 😄 IMHO this must be >50MiB as the current default limit in the validator is 50 MiB...
✔️
✔️ Here is an explanation of the signs: ✔️ Ok |
Also a function has to be added that outputs the number of downloaded CSAF/signature/SHA256/SHA512 files (according to the error class and in total). |
@tschmidtb51 thanks for the rewiew. A few responses:
|
Answers inline:
✔️
✔️
👁️ I'm currently not aware of that - it was just a feeling from my look into
✔️
The CSAF standard already suggested a (theoretical) soft limit, which has been overtaken by practice... 50 MiB for a single file seems to be a reasonable approach so far... |
My colleagues mentioned that according to the XDG Base Directory Specification user-specific logs should default to We also have to consider Windows... (Nevertheless, I don't see an issue here to let Linux be the driver in this decision.) |
where to place the log fileFrom the proposal:
Being relative to the downloading directory (as originally suggested)
Thanks for the hint, we know about the XDG specifications in general. Still if you want the location you can set an absolute path to it.
As far as I remember there are also recommendations for Windows to place files, but again if we consider it output of a specific command, it feels more adequate to put them in a subfolder as part of a created or updated output. That shall work well on Windows as well. |
To quickly resolve the issue and following your suggestion:
|
We have understood
Will or will not be? (As we were suggesting without command line option.) We have understood will be and act accordingly |
Correct. I corrected my spelling mistake.
will is correct. |
All validation errors need to be logged within a configurable file.
A new function should be added that counts and returns the number of found, downloaded and potentially skipped files.
These options need to be configurable via a config file and as command line parameters.
The text was updated successfully, but these errors were encountered: