graylog2-server icon indicating copy to clipboard operation
graylog2-server copied to clipboard

POC: Use stream categories and permissions for aggregation event definitions

Open kingzacko1 opened this issue 1 year ago • 2 comments

Adds a pseudo-SearchUser class EventProcessorSearchUser to use when adding streams to event processor searches. The class is used to respect stream permissions of the event definition owner when adding streams to event definitions with no streams assigned or with stream categories that need to be mapped to stream IDs.

/nocl just a POC for now

Description

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Refactoring (non-breaking change)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [ ] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have read the CONTRIBUTING document.
  • [ ] I have added tests to cover my changes.

kingzacko1 avatar Aug 15 '24 15:08 kingzacko1

@danotorrey did you create an event definition with a user other than admin? I think it needs to have ownership checks hitting the DB before those warnings pop up.

kingzacko1 avatar Aug 19 '24 13:08 kingzacko1

@kingzacko1 I just tested with an event definition created by another user and still did not see the error. We can take a look after the high five if you have some time.

danotorrey avatar Aug 19 '24 14:08 danotorrey

I'm closing this for now. We will likely handle something like this in a more sweeping change to event definitions as a whole.

kingzacko1 avatar Oct 30 '24 15:10 kingzacko1