Package io.axoniq.dataprotection.api
Annotation Type PersonalData
-
@Retention(RUNTIME) @Target({ANNOTATION_TYPE,FIELD}) @Repeatable(PersonalDataContainer.class) public @interface PersonalData
Field annotation that marks the field as containing personal data. This triggers the Axon Data Protection Module to encrypt this fields when it processes an instance of the class declaring the field. The annotation can also be used as a meta-annotation on some other application-specific annotation.For use in Scala programs, there is a
personalDatatype alias for this annotation, defined in the package object of the api package. This alias has thescala.annotation.meta.fieldmeta-annotation which allows it to be directly used on Scala class parameters, including case classes.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringgroupGet the name of the group of personal data fields that this field belong to.booleanreencryptDetermines whether we should perform encryption if a field is already encrypted.StringreplacementDefines a string to be used by theReplacementValueProviderto determine the behaviour in case the decryption key is unavailable.ScopescopeGet theScopeof the annotation.
-
-
-
Element Detail
-
group
String group
Get the name of the group of personal data fields that this field belong to. This is useful if multiple keys are used on a single class. The group links the field to a particular key, since theDataSubjectIdannotation has this same field.Optional. If left empty this defaults to the default group, identified by the empty string.
- Returns:
- the group
- Default:
- ""
-
-
-
replacement
String replacement
Defines a string to be used by theReplacementValueProviderto determine the behaviour in case the decryption key is unavailable. By default, the value of this annotation will be used in literal form forStringfields and will be ignored forbyte[], but custom implementations ofReplacementValueProvidermay do otherwise.- Returns:
- the replacement
- Default:
- ""
-
-
-
reencrypt
boolean reencrypt
Determines whether we should perform encryption if a field is already encrypted. By default this is false, resulting in idempotent behaviour of theFieldEncrypter.encrypt(Object)method. In some cases, it is desirable to make this true to deliberately perform 'double-encryption'.- Returns:
- the reencrypt value
- Default:
- false
-
-