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

On completion, on success, on failure inconsistencies #10

Open
lucamrgs opened this issue Apr 16, 2024 · 1 comment
Open

On completion, on success, on failure inconsistencies #10

lucamrgs opened this issue Apr 16, 2024 · 1 comment

Comments

@lucamrgs
Copy link

lucamrgs commented Apr 16, 2024

Concerns

  • According to the specification, a step handles exceptions in the following way with respect to on_completion, on_success, on_failure, and workflow_exception:
    • Use on_completion only
    • Use on_completion and define workflow_exception
    • Use on_success together with on_failure
    • Use on_success only (without specifying on_failure, nor workflow_exception),
    • Use on_success and define workflow_exception
  • There is no explicit indication on how to behave if an “on_completion only” or “on_success only” step “fails” (without there being a “workflow_exception” defined).
  • There is no explicit indication on how to behave if an on_completion + workflow_exception step “fails”, but this can happen:
    • Throw the workflow_exception
      • but this makes on_completion superfluous: just use on_success without on_failure
    • continue to the next step anyway
      • plausible, but not explicitly mentioned
    • Either of the two, or up to the implementation
      • flexible, but it may create issues in executing a playbook inconsistently with two different CACAO execution implementations
  • The specification says “The determination of a step being successful, failing, or completing is implementation specific and is out of scope for this specification”, but this also favours inconsistent behaviour of how to execute a CACAP playbook in two different playbook execution implementations, or human interpretation.

Possible ways to address

  • Make mandatory use of workflow_exception
  • Add the concept of “workflow execution failure”, as a execution-level exception.
  • add optional “on_exception” property, which overwrites the playbook_exception, for a finer workflow management.
  • Make mandatory use of on_failure if on_success is used (and vice versa).
  • Clarify uses of on_success and on_failure for OpenC2 use-cases
  • Define best practices for uses of on_completion, on_success, on_failure
@jordan2175
Copy link
Contributor

This is currently under discussion

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

No branches or pull requests

2 participants