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

Problems with template definition shall be returned to user on job creation #3610

Open
Tracked by #3521
de-jcup opened this issue Nov 14, 2024 · 0 comments
Open
Tracked by #3521
Assignees

Comments

@de-jcup
Copy link
Member

de-jcup commented Nov 14, 2024

Situation

Currently the user has no direct feedback when something is wrong with his template definition, instead only when the SecHub job starts/a PDS job starts, those jobs will fail and an error happens (because internally it is checked correctly inside scan domain and fail with a dedicated configuration failure exception).

But the user has no direct feedback and will only see that there was a technical/internal problem with the job.

Wanted

When a user defines template data we can have following situations:

  • no template defined by administrator -> not possible to handle
  • mandatory template variables are missing
  • additional/wrong template variable names are used
  • the validation setup of the template definition does not accept user input

When a job shall be created at scheduler an error shall be returned instead and job has to be created!

Solution

Inside the scheduler domain we check if at least one dataTemplate definition exists inside configuration (we use the existing resolver class for this).

If there is a template data setup found, the scheduler will send an event REQUEST_SECHUB_CONFIGURATION_VALIDATION . The scan domain will receive and handle the event.
as a result there will be a list of error messages (or none).

The event will be handled synchronous. If the error messages are not empty an exception with user info will happen. Also a dedicated HTTP error code (TBD) will be returned.

The go client shall be able to handle this accordingly (but this will be done in another issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant