I’m using data-protection module for encrypting the sensitive data. I have two user and their personal data. I want to group them by userid to encrypt sensitive information of an user by their userId.
This is my event
public class SentFriendRequestEvent {
@DataSubjectId(group = "SENDER")
private final String playerId;
@DeepPersonalData
private final UserInformation playerUserInformation;
private final DeviceInformation deviceInformation;
@DataSubjectId(group = "RECIPIENT")
private final String recipientPlayerId;
@DeepPersonalData
private final UserInformation recipientUserInformation;
I don’t see any group
attribute for @DeepPersonalData
annotation.
How can I ensure recipientUserInformation
is encrypted using recipientPlayerId
?
How can I ensure playerUserInformation
is encrypted using playerId
?
Is there any other way to achieve this?