module.collections

Collections module

type

object

properties

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

  • isTemplateGeneratedByOspComposer

If the value is set to true, manual editing of this file should be avoided, as the composer will override the value in the next generation.

type

boolean

  • messagingConfiguration

The configuration of the Rabbit MQ used for communication

MessagingConfigurationEntity

  • loggingConfiguration

The configuration of module’s logging

default

moduleLogLevel

INFO

externalLogLevel

WARN

LoggingConfigurationEntity

  • mongoDbConfigurationEntity

Configuration of the Mongo Database this module will connect to.

MongoConfigurationEntity

  • historyIndexes

The indexes to build on the Mongo Database for the history collection. If none are specified, we create by default an index for each of the following properties :

  • collectionId

  • schemaId

  • modified_by

  • modified_at

  • operation

  • diffs

see documentation ↗️

type

array

default

name

collectionId

index

collectionId

1

sparse

False

name

schemaId

index

schemaId

1

sparse

False

name

modified_by

index

modified_by

1

sparse

False

name

modified_at

index

modified_at

1

sparse

False

name

operation

index

operation

1

sparse

False

name

diffs

index

diffs

1

sparse

False

items

IndexConfigurationEntity

  • counterIndexes

The indexes to build on the Mongo Database for the counter collection. If none are specified, we create by default an index for each of the following properties :

  • schemaId

  • counter

see documentation ↗️

type

array

default

name

schemaId

index

schemaId

1

sparse

False

name

counter

index

counter

1

sparse

False

items

IndexConfigurationEntity

  • useUserPreferences

Enable usage of user preferences collection. Currently, users preferences are very limited. Users preferences are a list of attributes linked to a specific user.

The only current usage consist of using one of these attributes to hide the user identity when interacting with a form Journal component ↗️

You need to define a collection in your configuration to enable this feature. This collection must have type set as USERS_PREFERENCES and must be compliant with the following schema ↗️.

see documentation ↗️

type

boolean

default

False

  • useCollectionsRights

Enable usage of collections rights collection. Collections rights allows to restrict the access to the entries of a collection for each individual user. An entry in this collection defines the rights for a specific user, match with the username of the user. If an user has an entry in this collection, the specified rights will be applied. Otherwise, the user will have a full access to every collection.

For each user and collection, you can:

  • give the right to create, read, update and delete entries

  • limit access to specific entries by providing a list of identifiers (MongoDB document ids)

  • limit access to specific properties by providing a list of properties name (must be from collection schema). Updates are only accepted if they modify one or many of the properties defined in this list

  • define filters on collection properties. Only entries that match the given filter are available

Collections rights are handled at multiple levels: users, profiles and services rights. This property is linked to the users level.

You need to define a collection in your configuration to enable this feature. This collection must have type set as USERS_RIGHTS and must be compliant with the following schema ↗️.

A default configuration for these collections is available in a specific configuration branch called origin/osp-collections-rights-configuration.

Learn more about collections rights ↗️

type

boolean

default

False

  • useCollectionsProfilesRights

Enable usage of collections profiles rights collection. Collections profiles rights allows to restrict the access to the entries of a collection for a profile. Profiles correspond to the entries of this collection. Creating a new entry in this collection result in creating a new profile with specific rights. Then, this profile should be linked to an user via an entry in the collections rights collection (needs to be enabled with useCollectionsRights). When rights are present both at the profile level and the user level, we take into account the rights defines in the user level. Therefore, rights set in a user override those set in the profile.

For each profile and collection, you can:

  • give the right to create, read, update and delete entries

  • limit access to specific entries by providing a list of identifiers (MongoDB document ids)

  • limit access to specific properties by providing a list of properties name (must be from collection schema). Updates are only accepted if they modify one or many of the properties defined in this list

  • define filters on collection properties. Only entries that match the given filter are available

Collections rights are handled at multiple levels: users, profiles and services rights. This property is linked to the profiles level.

You need to define a collection in your configuration to enable this feature. This collection must have type set as PROFILES_RIGHTS and must be compliant with the following schema ↗️.

A default configuration for these collections is available in a specific configuration branch called origin/osp-collections-rights-configuration.

Learn more about collections rights ↗️

type

boolean

default

False

  • useCollectionsServicesRights

Enable usage of collections services rights collection. Collections services rights allows to restrict the access to the entries of a collection when a user in active in a service. Services correspond to the entries of this collection. Creating a new entry in this collection result in creating a new service with specific rights. Then, an user, via an entry in the collections rights collection (needs to be enabled with useCollectionsRights), can enter the service. While the user is active, the rights define in the service will override the ones define for the user. A service is also linked to a list of profiles which determines the services a user have access.

For each service and collection, you can:

  • give the right to create, read, update and delete entries

  • limit access to specific entries by providing a list of identifiers (MongoDB document ids)

  • limit access to specific properties by providing a list of properties name (must be from collection schema). Updates are only accepted if they modify one or many of the properties defined in this list

  • define filters on collection properties. Only entries that match the given filter are available

Collections rights are handled at multiple levels: users, profiles and services rights. This property is linked to the services level.

You need to define a collection in your configuration to enable this feature. This collection must have type set as SERVICES and must be compliant with the following schema ↗️.

A default configuration for these collections is available in a specific configuration branch called origin/osp-collections-rights-configuration.

Learn more about collections rights ↗️

type

boolean

default

False

additionalProperties

False

MessagingConfigurationEntity

type

object

properties

  • clientId

The ID of the client, must be different for each module instance.

type

string

  • host

The host of the rabbit MQ provider

type

string

  • bufferSize

The size of the buffer to use when the broker is disconnected (default: 60000).

type

integer

minimum

1

default

60000

  • storeMessagesOnDisk

Flag to indicate to store the message (The path /osp/messages must be mount to a volume).

type

boolean

default

False

additionalProperties

False

LoggingConfigurationEntity

type

object

properties

  • moduleLogLevel

The log level for module’s behavior logging

type

string

enum

TRACE, DEBUG, INFO, WARN, ERROR

default

INFO

  • scriptLogLevel

The log level for module’s internal script behavior logging (if not set the moduleLogLevel will be used)

type

string

enum

TRACE, DEBUG, INFO, WARN, ERROR

  • externalLogLevel

The log level for external libraries logging

type

string

enum

TRACE, DEBUG, INFO, WARN, ERROR

default

WARN

additionalProperties

False

MongoConfigurationEntity

type

object

properties

  • serverUrl

The hostname of the mongodb configuration. (For example: mongodb://<host-1>,…,<host-x>/?replicaSet=<replSet-id>)

type

string

  • databaseName

The name of the database to use

type

string

default

alarms

additionalProperties

False

IndexConfigurationEntity

type

object

properties

  • name

The name of the index

type

string

  • index

The Mongo expression used for indexing. See https://docs.mongodb.com/manual/indexes/ for more information.

  • sparse

Create the indexes only the document when the field exist

type

boolean

default

False

  • partialFilterExpression

Partial filter expression used to filter the elements that are affected by this index

additionalProperties

False