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

1. Scanning frequencies can be scheduled (e.g. once, daily, weekly, monthly) or run ad-hoc #3065

Open
3 tasks done
Tracked by #3056
madelondohmen opened this issue Jun 12, 2024 · 9 comments · May be fixed by #3406
Open
3 tasks done
Tracked by #3056
Assignees

Comments

@madelondohmen
Copy link
Contributor

madelondohmen commented Jun 12, 2024

About this feature

Milestone item

1 scanning frequencies.

Detailed description

Add detailed description of the new feature you'd like to propose. If this feature is related to a problem, what problem does it solve?

Scope

  • Item1
  • Item2

Out of scope

  • Item1
  • Item2

Related tickets

@madelondohmen madelondohmen self-assigned this Jun 12, 2024
@madelondohmen madelondohmen moved this to Backlog in KAT - Z-CERT MVP Jun 12, 2024
@madelondohmen madelondohmen removed their assignment Jun 12, 2024
@madelondohmen madelondohmen moved this from Backlog to To Do in KAT - Z-CERT MVP Jun 12, 2024
@madelondohmen madelondohmen changed the title Scanning frequencies can be scheduled (e.g. once, daily, weekly, monthly) or run ad-hoc 1. Scanning frequencies can be scheduled (e.g. once, daily, weekly, monthly) or run ad-hoc Jun 12, 2024
@underdarknl underdarknl moved this from To Do to In Progress in KAT - Z-CERT MVP Jul 3, 2024
@jpbruinsslot
Copy link
Contributor

Can the scope and requirements for this ticket be fleshed out?

@underdarknl
Copy link
Contributor

underdarknl commented Aug 19, 2024

Per boefje variant the user can select an interval in which the boefje (for the given organisation) needs to be scheduled per OOI that it consumes.
The same goes for Scheduled reports.

@jpbruinsslot
Copy link
Contributor

@underdarknl does this mean:

A: a user defines an interval schedule on a boefje detail page for that particular boefje to run?
B: a user defines an interval schedule for a boefje and ooi combination?

@underdarknl
Copy link
Contributor

It means Case A.
The boefje itself will carry a default interval in its boefje.json, which can be overwritten by the user on a 'per organisation' basis.

Scanning individual assets with the same boefje on different interval's is not part of the MVP.

@jpbruinsslot
Copy link
Contributor

jpbruinsslot commented Aug 26, 2024

Implementation suggestion:

katalogus pov:

  • boefje.json with optional interval

rocky pov:

  • update interval of plugin
    • PATCH associated schedule for plugin in scheduler
    • update boefje.json ?

scheduler pov:

  • cold start
    • when the schedulers start it will gather all enabled plugins
    • for every plugin with a defined interval create a schedule
  • enabled/disabled plugins
    • whenever a plugin gets enabled with a defined interval create a schedule
    • whenever a plugin gets disabled with a defined interval remove (disabled) its associated schedule

@jpbruinsslot jpbruinsslot added this to KAT Aug 26, 2024
@github-project-automation github-project-automation bot moved this to Incoming features / Need assessment in KAT Aug 26, 2024
@jpbruinsslot jpbruinsslot moved this from Incoming features / Need assessment to To be discussed in KAT Aug 26, 2024
@underdarknl
Copy link
Contributor

related: #1317

@underdarknl
Copy link
Contributor

The boefje.json is stored per install, and as such should not be changed when dealing with a new interval.
The specific boefje settings are stored per organisation (eg, is it enabled, what other settings are needed), and should be updated.

@jpbruinsslot jpbruinsslot linked a pull request Aug 27, 2024 that will close this issue
9 tasks
@jpbruinsslot
Copy link
Contributor

blocked by unimplemented boefje.json

@jpbruinsslot jpbruinsslot linked a pull request Sep 2, 2024 that will close this issue
9 tasks
@jpbruinsslot
Copy link
Contributor

jpbruinsslot commented Sep 3, 2024

From discussion meet held on 3 September 2024:

  • an interval setting (cron expression) is being added to a boefje manifest
    • When a boefje is enabled that has a interval setting a Schedule is created for that boefje
    • That specific boefje (without associated ooi's!) will be put on the queue
    • The task runner will run that boefje.
  • a field (cron expression) that defines the interval of a boefje is added to the katalogus, this field can be updated
    • when updated in katalogus, also needs to be updated in the scheduler through a PUT request to the scheduler

@underdarknl underdarknl moved this from Blocked to Review in KAT Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Review
Status: Review
Development

Successfully merging a pull request may close this issue.

4 participants