Repository navigation
feat(sdk): run injectors and collectors without the platform (#383) - #384
Open
Christophe Melchior (Kakudou) wants to merge 17 commits into
Open
Christophe Melchior (Kakudou) wants to merge 17 commits into
Christophe Melchior (Kakudou) wants to merge 17 commits into
Conversation
…ign flags, RED Tests
…ign flags, GREEN Tests
…ed JSON list, RED Tests
…ed JSON list, GREEN Tests
…the platform health-check, RED Tests
…the platform health-check, GREEN Tests
… a recorded call, RED Tests
… a recorded call, GREEN Tests
… does, GREEN Tests
…egacy names, RED Tests
…egacy names, GREEN Tests
…eplay them offline, RED Tests
…eplay them offline, GREEN Tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
seam/port_iomodels that mirror the platform DTOs key for key. The sent bodies are validated before they are written.--dev,--out, help). The configuration is relaxed under--dev, and flags the SDK doesn't own are left alone.NeedsPlatformErrorfor the calls that need a live platform.ContractValidator, matched to the platform health-check by fixtures taken fromHealthCheckUtilsTest. A single-trace route.LEGACY_SIGNATURE_TYPESfor reading the old names.--record/--replay): readable JSON, secrets masked, fail-closed sockets,lint_tape.docs/how_to_dev_mode.md.Testing Instructions
End to end: chain the nmap injector into the Elastic collector, with no platform and no RabbitMQ. Needs the injectors (OpenAEV-Platform/injectors#530) and collectors (OpenAEV-Platform/collectors#681) PRs.
Setup: check out the three repos side by side on
feat/isolate-run, then make one venv per side:Write the inject message, then fill in what stderr lists. That's an asset whose
seen_ipis a host you are allowed to scan, not loopback, becauseinjector_commondrops loopback targets.Chain through a file, then through a pipe:
Expected results:
0.pending.jsonholds one DETECTION and one PREVENTION expectation, carryingstart_date,end_date,source_ipv4_addressandtarget_ipv4_address.elastic.jsonholds the bulk update for those same ids, plus the traces of the matching alerts. The file run and the pipe run give the same results.Record once, then replay offline: add
--record nmap.tape.jsonand--record elastic.tape.jsonto the pipe. Then run it again with--replayinstead, with Elasticsearch unreachable andnmapoff the PATH. The replay should exit0 · 0and write the same calls, apart fromstart_dateandend_date.lint_tape("elastic.tape.json", secrets=["<your api key>"])should return[].Related issues
Checklist
Further comments