module.collections

Collections module

type

object

properties

  • 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 ↗️

Default value is [[{“index”:{“schemaId”:1},”name”:”schemaId”,”sparse”:false,”unique”:false},{“index”:{“counter”:1},”name”:”counter”,”sparse”:false,”unique”:false}]]

type

array

default

index

schemaId

1

name

schemaId

sparse

False

unique

False

index

counter

1

name

counter

sparse

False

unique

False

items

IndexConfigurationEntity

  • experimentalFeatures

These experimental features are not yet stable and may change at any time.

If you are using them, we would appreciate any feedback.

Once a feature is considered stable, it will either be moved to another configuration parameter or enabled permanently.

Default value is [{“enableHotReload”:false}]

default

enableHotReload

False

ExperimentalFeatures

  • 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 ↗️

Default value is [[{“index”:{“collectionId”:1},”name”:”collectionId”,”sparse”:false,”unique”:false},{“index”:{“schemaId”:1},”name”:”schemaId”,”sparse”:false,”unique”:false},{“index”:{“modified_by”:1},”name”:”modified_by”,”sparse”:false,”unique”:false},{“index”:{“modified_at”:1},”name”:”modified_at”,”sparse”:false,”unique”:false},{“index”:{“operation”:1},”name”:”operation”,”sparse”:false,”unique”:false},{“index”:{“diffs”:1},”name”:”diffs”,”sparse”:false,”unique”:false}]]

type

array

default

index

collectionId

1

name

collectionId

sparse

False

unique

False

index

schemaId

1

name

schemaId

sparse

False

unique

False

index

modified_by

1

name

modified_by

sparse

False

unique

False

index

modified_at

1

name

modified_at

sparse

False

unique

False

index

operation

1

name

operation

sparse

False

unique

False

index

diffs

1

name

diffs

sparse

False

unique

False

items

IndexConfigurationEntity

  • isTemplateGeneratedByOspComposer

Name of the playbook that generated this file. If present, the file is managed by the Composer and may be overwritten on regeneration. Used for selective clean. Do not edit or set manually.

type

string

  • loggingConfiguration

The configuration of module’s logging

Default value is [{“externalLogLevel”:”WARN”,”moduleLogLevel”:”INFO”}]

default

externalLogLevel

WARN

moduleLogLevel

INFO

LoggingConfigurationEntity

  • messagingConfiguration

The configuration of the Rabbit MQ used for communication

MessagingConfigurationEntity

  • mongoDbConfigurationEntity

Configuration of the Mongo Database this module will connect to.

MongoConfigurationEntity

  • startupValueErrorTimeout

The delay during which the error are not published when the module is starting or the value configuration has changed.

When a value without an error is publish the delay will be remove immediately. The following errors will not be delayed.

This also concern the uninitialized value.

During this period, any republish request will generate an uninitialized value.

This can be override on the value configuration.

Default value is [{“unit”:”MINUTES”,”value”:1}]

default

unit

MINUTES

value

1

DurationConfigurationEntity

  • 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

  • useAuditLog

Enable usage of Audit collection. This start to audit services and include all data onto the database into a specific collection.

On top of this field, an additional schema has to be provided. A default schema is available on a specific branch origin/feature-audit-log.

Learn more about Audit log ↗️

Default value is [false]

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 ↗️

Default value is [false]

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 ↗️

See web module configuration regarding collection rights retrieval ↗️.

Default value is [false]

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 ↗️

Default value is [false]

type

boolean

default

False

  • 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 ↗️

Default value is [false]

type

boolean

default

False

  • 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

additionalProperties

False

IndexConfigurationEntity

type

object

properties

  • index

The Mongo expression used for indexing. “ + See MongoDB indexes properties documentation ↗️. See MongoDB indexes documentation ↗️.

  • name

The name of the index

type

string

  • partialFilterExpression

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

  • sparse

Create the indexes only the document when the field exist

Default value is [false]

type

boolean

default

False

  • unique

Set the index as unique. This will prevent the insertion of new document if the index is not unique. See MongoDB unique indexes ↗️ for more information.

Default value is [false]

type

boolean

default

False

additionalProperties

False

ExperimentalFeatures

type

object

properties

  • enableHotReload

Flag to enable/disable the hot-reload on the module.

The modules capabilities ↗️ describe which module support it.

Default value is [false]

type

boolean

default

False

additionalProperties

False

LoggingConfigurationEntity

type

object

properties

  • externalLogLevel

The log level for external libraries logging

Default value is [“WARN”]

type

string

enum

TRACE, DEBUG, INFO, WARN, ERROR, DISABLE

default

WARN

  • moduleLogLevel

The log level for module’s behavior logging

Default value is [“INFO”]

type

string

enum

TRACE, DEBUG, INFO, WARN, ERROR, DISABLE

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, DISABLE

additionalProperties

False

MessagingConfigurationEntity

type

object

properties

  • bufferSize

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

Default value is [60000]

type

integer

minimum

1

default

60000

  • 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

  • storeMessagesOnDisk

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

Default value is [false]

type

boolean

default

False

additionalProperties

False

MongoConfigurationEntity

type

object

properties

  • credential

The credential to connect with the database.

See MongoDB user management ↗️ for more information.

CredentialConfigurationEntity

  • databaseName

The name of the database to use. The previous default value was alarms.

type

string

  • serverUrl

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

Depending of your workload, some options can be useful to edit:

  • maxPoolSize: To increase the number of connection available (default: 100)

  • readPreference: To decrease the load on the primary node (default: primary)

See MongoDB documentation ↗️ for more information.

type

string

additionalProperties

False

CredentialConfigurationEntity

type

object

properties

  • authenticationDatabase

The database where the user is defined.

By default, this will be the same database as the one used for the data.

type

string

  • password

The password corresponding to the user.

oneOf

PLAINTEXT

SECRET

  • username

The username as configured on MongoDB

type

string

additionalProperties

False

PLAINTEXT

type

object

properties

  • type

type

string

enum

PLAINTEXT

default

PLAINTEXT

  • password

type

string

additionalProperties

False

SECRET

type

object

properties

  • type

type

string

enum

SECRET

default

SECRET

  • secretPath

type

string

additionalProperties

False

DurationConfigurationEntity

type

object

properties

  • unit

The unit of time expressed

type

string

enum

NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS

  • value

The amount of time expressed with the unit

type

integer

additionalProperties

False