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

[backend/frontend] Adapt code base to manage the installation of multiples agents #2208

Draft
wants to merge 26 commits into
base: release/current
Choose a base branch
from

Conversation

savacano28
Copy link
Contributor

@savacano28 savacano28 commented Jan 14, 2025

Proposed changes

  • Hostname to lowercase to make uniform and unique
  • SQL migration : migrate agents to same endpoint (hostname + platform + arch)
  • New method to register an endpoint/agent : Endpoint (hostname + platform + arch) exists ? Then Agent (assetId + executor + executedByUser + deploymentMode + privilege) exists ?
  • Injects are now launched by agent and no more by asset

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality
  • For bug fix -> I implemented a test that covers the bug

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@savacano28 savacano28 added the filigran team use to identify PR from the Filigran team label Jan 14, 2025
@savacano28 savacano28 changed the title [backend/frontend] Adapt code base to manage the instalation of multiples agents [backend/frontend] Adapt code base to manage the installation of multiples agents Jan 14, 2025
@savacano28 savacano28 linked an issue Jan 14, 2025 that may be closed by this pull request
@savacano28 savacano28 removed their assignment Jan 16, 2025
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 12.95337% with 168 lines in your changes missing coverage. Please review.

Project coverage is 37.43%. Comparing base (1eaeb50) to head (be25ebb).
Report is 6 commits behind head on release/current.

Files with missing lines Patch % Lines
...xecutors/tanium/service/TaniumExecutorService.java 2.89% 67 Missing ⚠️
...rowdstrike/service/CrowdStrikeExecutorService.java 4.25% 45 Missing ⚠️
...io/openbas/execution/ExecutionExecutorService.java 0.00% 23 Missing ⚠️
.../main/java/io/openbas/service/EndpointService.java 55.17% 10 Missing and 3 partials ⚠️
...ain/java/io/openbas/rest/injector/InjectorApi.java 0.00% 6 Missing ⚠️
...src/main/java/io/openbas/service/AgentService.java 14.28% 6 Missing ⚠️
...caldera/service/CalderaExecutorContextService.java 0.00% 2 Missing ⚠️
...ike/service/CrowdStrikeExecutorContextService.java 0.00% 2 Missing ⚠️
...openbas/service/OpenBASExecutorContextService.java 0.00% 2 Missing ⚠️
...s/tanium/service/TaniumExecutorContextService.java 0.00% 2 Missing ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #2208      +/-   ##
=====================================================
+ Coverage              34.55%   37.43%   +2.88%     
- Complexity              1590     1780     +190     
=====================================================
  Files                    586      591       +5     
  Lines                  17991    19044    +1053     
  Branches                1169     1329     +160     
=====================================================
+ Hits                    6217     7130     +913     
- Misses                 11471    11575     +104     
- Partials                 303      339      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@damgouj damgouj force-pushed the issue/1860 branch 2 times, most recently from 079be07 to 60b0d8a Compare January 30, 2025 09:44
@savacano28 savacano28 force-pushed the issue/1860 branch 3 times, most recently from 81fcedb to 2375826 Compare February 5, 2025 10:21
savacano28 and others added 14 commits February 5, 2025 11:47
# Conflicts:
#	openbas-api/src/main/java/io/openbas/service/AgentService.java
#	openbas-model/src/main/java/io/openbas/database/repository/AgentRepository.java

# Conflicts:
#	openbas-api/src/main/java/io/openbas/execution/ExecutionExecutorService.java
#	openbas-model/src/main/java/io/openbas/database/model/ExecutionTraceStatus.java
# Conflicts:
#	openbas-api/src/main/java/io/openbas/executors/tanium/service/TaniumExecutorService.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I can choose the level of privilege of my agent
2 participants