Describe the bug
On backend method getFindings() of TargetInstance class, we assume that we are operating on a the player who owns the instance, however this causes problems for team instances, because the team players might still need to get the findings for this instance.
To Reproduce
Steps to reproduce the behavior:
- Create a team instance with a finding (say port 80/tcp)
- As an instance owner connect to the service
- Confirm that you got the finding
- As a player from the same team try to connect to the instance service
- No finding is given
Expected behavior
The team player must also be able to get the finding by connecting to the service
Additional context
This was done as a means to improve our findings and reduce the load that they cause on the gateway servers due to findings processing.
- On
backend/commands/CronCommand.php we currently have
foreach ($ti->findings as $f) {
$rules[] = $f->getMatchRule('<' . $ti->name . '_clients>', '<' . $ti->name . '>', $pflogmin, $pflogmax, $ti->player_id);
}
We have to make this ($ti->findings and $f->getMatchRule) respect the fact that the instance might be "team accessible" and thus return findings based on all the players of the team.
Describe the bug
On backend method
getFindings()ofTargetInstanceclass, we assume that we are operating on a the player who owns the instance, however this causes problems for team instances, because the team players might still need to get the findings for this instance.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The team player must also be able to get the finding by connecting to the service
Additional context
This was done as a means to improve our findings and reduce the load that they cause on the gateway servers due to findings processing.
backend/commands/CronCommand.phpwe currently haveWe have to make this (
$ti->findingsand$f->getMatchRule) respect the fact that the instance might be "team accessible" and thus return findings based on all the players of the team.