Getting information about who performing event

Hello,

We have requirement witch need to track who is changing something in our system, for example - who create order, currently, we have tried to capture the Eventmetadata in event processor and from this get Claims. However, there are empty both on local machines and also on our hosted test environment.
Example how we tried to do this:

    [EventProcessor(Guid)]
    public void Process(SomeEvent @event, EventMetadata eventMetadata)
    {
        var userClaims = eventMetadata?.OriginalContext?.Claims;
        ...............
    }

Yeah, this is a known bug. We aren’t persisting the claims in the OriginalContext.

This won’t be fixed though in this format as we can’t just persist claims because of GDPR (this could be personal data).

I suggest that you add a unique identifier for the user to the event that can be resolved to the person on the read side via a lookup.

Just to tag on to that: This is one specific instance of the more general principle: “If you are interested in it you should put it in your command and event(s) explicitly”.

Also know as “If you liked it then you shou’da put’a ring on it”.

For this specific case - as it might be personal data you should also model it so that data can go away (in case of deletion/retraction/etc).