The event model in Content Services is a library packaged as a JAR file, which is part of the repository (i.e. alfresco.war). The library contains the event model and the databind helpers used to help the clients to marshall and unmarshall the events.
The event model is based on the CloudEvents specification. CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems. For more information see CloudEvents Primer.
The Content Services event payload (i.e. the part of transmitted data that is the actual intended message) consist of two parts. The CloudEvent attributes and the Content Services event attributes.
{ CloudEvent standard attributes... "data": { Content Services custom event attributes... } }
Basic configuration of the event system is in the repository.properties file:
### Repo events2 # # Type and aspect filters which should be excluded. # Note: System folder node types are added by default. repo.event2.filter.nodeTypes=sys:*, fm:*, cm:thumbnail, cm:failedThumbnail, cm:rating, rma:rmsite include_subtypes repo.event2.filter.nodeAspects=sys:* repo.event2.filter.childAssocTypes=rn:rendition # # Comma separated list of users which should be excluded # Note: username's case-sensitivity depends on the {user.name.caseSensitive} setting repo.event2.filter.users=System, null repo.event2.filter.nodeProperties= repo.event2.mapper.enabled= repo.event2.mapper.overrideDefaultProperties= repo.event2.mapper.overrideReplacementText= # # Topic name repo.event2.topic.endpoint=amqp:topic:alfresco.repo.event2
The following table describes the configuration properties for protecting users' sensitive data:
Property | Description |
---|---|
repo.event2.filter.nodeProperties | Allows to specify properties that should be filtered out.
Filtering always happens before mapping. Default value: `` |
repo.event2.mapper.enabled | Allows to disable property mapping entirely. Default value: true |
repo.event2.mapper.overrideReplacementText | Allows to change the text displayed in events instead of default:
SENSITIVE_DATA_REMOVED. Note: By default, the values of properties usr:salt,
usr:passwordHash,
usr:password, and trx:password are
replaced with the SENSITIVE_DATA_REMOVED
text.
Default value: `` |
repo.event2.mapper.overrideDefaultProperties | Allows to override the default list of properties whose values are
replaced, instead of using the default: usr:salt,
usr:passwordHash, usr:password,
and trx:password. Default value: `` |
The following table lists example configurations of these properties and their corresponding results:
Example Configuration | Result |
---|---|
-Drepo.event2.mapper.enabled=false | No property mapping is performed. |
-Drepo.event2.mapper.overrideDefaultProperties=usr:* -Drepo.event2.mapper.overrideReplacementText=HIDDEN_BY_SECURITY_MEASURES | All the values of properties from user model are replaced with the
HIDDEN_BY_SECURITY_MEASURES text. The value of property trx:password is not replaced as the default configuration has been overriden to only map usr:*. |
-Drepo.event2.filter.nodeProperties=usr:salt,usr:passwordHash,usr:password,trx:password | The properties usr:salt, usr:passwordHash, usr:password, and trx:password are filtered out completely before any mapping occurs and are not present in ActiveMQ. |
-Drepo.event2.filter.nodeProperties=trx:* | The properties trx:* are filtered out. The properties usr:salt, usr:passwordHash, and usr:password are mapped due to default configuration. |
Any custom configuration, to for example the default event filtering, can be done in alfresco-global.properties.
It is possible to disable the events from being triggered and sent to ActiveMQ by setting repo.event2.enabled=false. This setting prevents any behaviors from being bound to the node creation/update/delete and permission changes.