counteractive / o365beat

Elastic Beat for fetching and shipping Office 365 audit events
Other
66 stars 27 forks source link

User Data Enhancement #35

Closed Michael-vdL closed 4 years ago

Michael-vdL commented 4 years ago

Just a suggestion: In the o365beat.yml file, it might be prudent to change UserKey to the user id field. UserId in O365 relates to the user.email and user.name (Typically)

My suggestion is:

convert:

This is for UserId directly to ECS (as I believe that is the primary case for this beats) but it could be modified by adding UserName and UserDomain as fields then converting to ECS in the conversion processor. I am still new to ELK so I am not sure how to modify the mappings. I have been doing these in Logstash but it is clear they would fit here.

chris-counteractive commented 4 years ago

Thank you for the issue! I appreciate another perspective, and there are certainly multiple reasonable ways to parse the API output into ECS. A few thoughts:

Happy to have more discussion on any of the above. Thanks again!

Von-dy commented 4 years ago

I agree with the UserKey to user.id not being a great fit. My initial argument was from a personal assumption that ECS user.id is expecting something more of a UUID rather than something a human understands. But they are certainly both unique IDs from a user perspective. The only thing users really gain is the ability to put more fields into ECS format which Elastic seems to think that when ECS is concerned, the more the merrier.

I definitely see your reasoning for Domain vs DNS domain. For us, they are the same at the moment, but we are standing up a new AD and O365 environment which will be domain joined. In a few months, I will have the answer to that question.

Thank you for the response.

chris-counteractive commented 4 years ago

Added a dissect processor in de5ef6481f0638cb237b28ce6ccd6dc885e9178 to pull out user.name and user.domain, it'll be in the next release and it's easy enough to add yourself (no upgrade required as it doesn't change the beat). It's a nice and reasonable ECS addition, we'll reconsider if we get reports of confusion or collisions with AD domains. Thanks again for the issue and discussion.