Anonymization with Lagom

Hello guys,

I was just wondering how do we handle the anonmizing in Lagom. I believe this is a common problem with any event sourcing system.

Let’s say one of our services is “user-svc” which contains the information such as user’s name, bank account number and so on.

And when we want to create the preprod environment so we can test or bugfix with the real world data from production, we want to do this by replicating the production environment.

But at the same, we shouldn’t let our developers to be able to see the real username and email addresses and so on.

What’s the best way to do this in Lagom? How would you tackle this problem?

Thanks,

We don’t have such a feature (yet).

This is something to be implemented on the akka-persistence plugin instead. What we need here is a way to start a process that reads each event from the journal and re-write it back.

@james has an open PR for the akka-persistence-jdbc plugin that does something similar. I suggest you to take a look and get some inspiration from there.
(https://github.com/dnvriend/akka-persistence-jdbc/pull/180)

Another option if you’re starting from scratch and not trying to deal with existing data would be to store all of the personal data in some other table and have events that only reference it by ID.