minvws / nl-kat-coordination

Repo nl-kat-coordination for minvws
European Union Public License 1.2
121 stars 55 forks source link

Save and fetch settings at once now that Katalogus DB saves settings as JSON #447

Open Donnype opened 1 year ago

underdarknl commented 7 months ago

The settings form should be rendered in the same way as the questionOOI's are rendered. Using the jsonschema 2 form javascript code.

underdarknl commented 2 weeks ago

@TwistMeister what refinement would you want on this issue? Lets explore and make sure we implement this.

One of the issues i can still see is that if we request the user to complete the whole jsonschema as a form (as we do with the questionOOI's), and then validate that input against the jsonschema (as we should), we break the option for a user to leave some required fields empty. Leaving fields empty comes in useful when they will be filled out by using Env-vars on a system-level. Currently we have kind of the same issue where a user cannot enable a Boefje that has a required setting (eg, shodan's API-key), even if the system-admin has that shodan-key setup as an env-var system-wide.

My guess would be that we need to offer an override option for the user to select, allowing them to bypass required fields with their understanding that the plugin will only work if that missing setting is then configured via the Env-vars instead of the plugin settings in the KAT-alaogus. This would require a json-schema validator that has this option, eg, disabling specific checks, or we need to rewrite the json-schema for that validation round and remove the required stanza's.