-
Notifications
You must be signed in to change notification settings - Fork 816
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
[backend] Change external reference resolution for OpenBAS integration #7233
Conversation
@@ -176,19 +175,11 @@ export const getScenarioResult = async (id: string) => { | |||
} | |||
const httpClient = buildXTmOpenBasHttpClient(); | |||
try { | |||
const { data: scenario } = await httpClient.get(`/scenarios/external_reference/${id}`); | |||
if (!scenario || !scenario.scenario_id) { | |||
const { data: exercise } = await httpClient.get(`/scenarios/external_reference/${id}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to understand: this openBAS API has changed its signature and returns now an exercise instead of a scenario, right ?
So if openBAS and openCTI are not both updated to the latest version, this code will fail I guess ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, we need to have a good synchronisation between the two products
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we write somewhere which version of octi is compatible with which version of obas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are thinking about a robuste plan to handle this.
Good point :)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7233 +/- ##
=======================================
Coverage 67.54% 67.55%
=======================================
Files 561 561
Lines 68754 68745 -9
Branches 5837 5837
=======================================
- Hits 46441 46440 -1
+ Misses 22313 22305 -8 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested locally
Proposed changes
OpenCTI should get the latest ended simulation based on scenarios instead of the latest simulation based on the first scenario.
Related issues
Testing
OpenBAS PR -> OpenBAS-Platform/openbas#1048