-
Notifications
You must be signed in to change notification settings - Fork 0
Ribbon2 Messanger
Stanislav Nepochatov edited this page Oct 21, 2024
·
4 revisions
Message module serves as holder for messages and related data. Module hasn't any REST API method it only relies on message bus.
Message module keeps it's own copy of directories for additional validation.
Example:
{
"messenger": {
"enablePermissionCaching": true,
"permissionCacheExpiry": 5,
"permissions": [
{
"key": "canReadMessage",
"description": "Allows user to read message",
"defaultValue": true
},
{
"key": "canCreateMessage",
"description": "Allows user to create message",
"defaultValue": false
},
{
"key": "canUpdateMessage",
"description": "Allows user to update message",
"defaultValue": false
},
{
"key": "canDeleteMessage",
"description": "Allows user to delete message",
"defaultValue": false
}
]
},
"db": {
"jdbcUrl": "jdbc:postgresql://localhost:5432/ribbon2-messenger",
"driver": "org.postgresql.ds.PGSimpleDataSource",
"username": "ribbon2",
"password": "ribbon2"
}
}
List of params:
-
messenger.enablePermissionCaching
- flag to enable permission caching. By enabling this mode system will cache success checks of permissions from directory module in order to reduce inter module communications (can be overridden byMESSENGER_ENABLE_PERMISSION_CACHIMG
env variable); -
messenger.permissionCacheExpiry
- period of cache validity in minutes. WARNING: in case of rapid access edit it will result delay in applying changes (can be overridden byMESSENGER_PERMISSION_CACHE_EXPIRY
env variable); -
messenger.permissions
- list of the permissions which should be created for proper work of the module. Those permission will be sent to directory module by call; -
db.*
- self-explainatory database settings. Settings can be overridden by following variables:DB_JDBC_URL
,DB_USERNAME
andDB_PASSWORD
;
Message module can be started like normal Java application or in Docker image. Project contains ready-to-use Dockerfile.
During startup message module doesn't create any additional entities.