hermes
Settings shared by server and all clients.
Main subsections:
hermes.umask
- Description: Set up the default umask for each file or directory created by the application : cache dirs, cache files and log files. Warning as it is an octal value, it must be prefixed by a
0
.
- Mandatory: No
- Type: integer
- Valid values: 0000 - 0777
- Default value: 0027
hermes.cache
Mandatory section to define cache settings.
hermes.cache.dirpath
- Description: Path of an existing directory where cache files will be stored.
- Mandatory: Yes
- Type: string
hermes.cache.enable_compression
- Description: If
true
, all cache files will be gzipped.
- Mandatory: No
- Type: boolean
- Default value:
true
hermes.cache.backup_count
- Description: At each save, if the file content has changed, Hermes will keep previous cache content up to specified backup_count.
- Mandatory: No
- Type: integer
- Valid values: 0 - 999999
- Default value: 1
hermes.cli_socket
Enable CLI socket that will allow communication between app and its CLI.
hermes.cli_socket.path
- Description: Path to CLI socket file to create/use. When left unspecified, CLI will be disabled.
- Mandatory: No
- Type: string
hermes.cli_socket.owner
- Description: Name of the user that should own the socket file when created, as would be fed to chown.
When left unspecified, it uses the current hermes-server running user.
- Mandatory: No
- Type: string
- Ignored when: dont_manage_sockfile is
true
hermes.cli_socket.group
- Description: Name of the group that should own the socket file when created, as would be fed to chown.
When left unspecified, it uses the current group of hermes-server running user.
- Mandatory: No
- Type: string
- Ignored when: dont_manage_sockfile is
true
hermes.cli_socket.mode
- Description: The permissions to apply to the socket file when created, as would be fed to chmod.
For those used to /usr/bin/chmod remember that modes are octal numbers and should be prefixed by a 0
.
If mode is not specified and the socket file does not exist, the default umask on the system will be used when setting the mode for the newly created socket file.
If mode is not specified and the socket file does exist, the mode of the existing socket file will be used.
- Mandatory: No
- Type: integer
- Default value: 00600
- Valid values: 0 - 07777
- Ignored when: dont_manage_sockfile is
true
hermes.cli_socket.dont_manage_sockfile
- Description: Indicates that Hermes shouldn’t handle the socket file creation, and use the socket file descriptor provided by its parent process (typically SystemD).
The created socket must be a listening AF_UNIX stream socket.
One and only one socket must be provided : Hermes will ensure this by checking that the SystemD env var LISTEN_FDS
is set to 1
, and will fail otherwise.
- Mandatory: No
- Type: boolean
- Default value:
false
hermes.logs
Mandatory section to define log settings.
hermes.logs.logfile
- Description: Path of an existing directory where log files will be stored. When left unspecified, no log file will be stored on disk.
- Mandatory: Yes
- Type: string
hermes.logs.backup_count
- Description: Hermes will rotate its log every day at midnight and keep up to specified backup_count values of previous log files.
- Mandatory: No
- Type: integer
- Default value: 7
- Valid values: 0 - 999999
hermes.logs.verbosity
- Description: Log verbosity.
- Mandatory: No
- Type: string
- Default value: warning
- Valid values:
- critical
- error
- warning
- info
- debug
hermes.logs.long_string_limit
- Description: Define the limit (max size) of string attributes content to show in logs.
If a string attribute content is greater than this limit, it will be truncated to this limit and marked as a LONG_STRING in logs.
Can be set to null
to disable this feature and always show full string content in logs.
- Mandatory: No
- Type: integer
- Default value: 512
- Valid values: [1 - 999999] or
null
hermes.mail
Mandatory section to define mail settings to allow Hermes to notify errors to admins.
The email will contain 3 attachments when possible: previous.txt
, current.txt
, and diff.txt
, containing the previous state, the current state, and the diff between previous and current states.
hermes.mail.server
- Description: DNS name or IP address of SMTP relay.
- Mandatory: Yes
- Type: string
hermes.mail.from
- Description: E-mail address that will be set as from address in the mail syntax
User name <name@example.com>
- Mandatory: Yes
- Type: string
hermes.mail.to
- Description: Recipient address or list of addresses.
- Mandatory: Yes
- Type: string | string[]
hermes.mail.compress_attachments
- Description: Indicate if attachments must be gzipped or sent raw.
- Mandatory: No
- Type: boolean
- Default value:
true
hermes.mail.mailtext_maxsize
- Description: Max size in bytes for mail content. If content size is greater than mailtext_maxsize, then a default fallback message will be set instead.
- Mandatory: No
- Type: integer
- Default value: 1048576 (1 MB)
- Valid values: >= 0
hermes.mail.attachment_maxsize
- Description: Max size in bytes for a single mail attachment. If the attachment size is greater than attachment_maxsize, it will not be attached to the email and a message indicating this will be added to the mail content.
- Mandatory: No
- Type: integer
- Default value: 5242880 (5 MB)
- Valid values: >= 0
hermes.plugins
Mandatory section to declare which plugins must be loaded, with their settings.
It is divided into subsections by plugin type.
hermes.plugins.attributes
Facultative section to declare the attributes plugins to load, and their settings.
It must contain a subsection named with the plugin name containing a facultative settings
subsection with the plugin settings to fill according to the plugin documentation.
Example with the ldapPasswordHash
plugin:
hermes:
# (...)
plugins:
attributes:
ldapPasswordHash:
settings:
default_hash_types:
- SMD5
- SSHA
- SSHA256
- SSHA512
# (...)
hermes.plugins.datasources
Mandatory section on hermes-server
to declare the datasource(s), and their settings. If set on hermes-clients
, it will be silently ignored.
A same datasource plugin can be used for several datasources, so for each datasource needed, you must declare a subsection with your desired datasource name (that will be used in datamodel), containing two mandatory entries:
type
(string): the datasource plugin to use for this datasource.
settings
(subsection): the datasource plugin settings for this datasource according to the plugin documentation.
Example:
hermes:
# (...)
plugins:
datasources:
my_oracle1_datasource:
type: oracle
settings:
login: HERMES_DUMMY
password: "DuMmY_p4s5w0rD"
port: 1234
server: dummy.example.com
sid: DUMMY
my_oracle2_datasource:
type: oracle
settings:
login: HERMES_DUMMY2
password: "DuMmY2_p4s5w0rD"
port: 1234
server: dummy.example.com
sid: DUMMY2
my_ldap_datasource:
type: ldap
settings:
uri: ldaps://dummy.example.com:636
binddn: cn=binddn,dc=example,dc=com
bindpassword: DuMmY_p4s5w0rD
basedn: dc=example,dc=com
# (...)
hermes.plugins.messagebus
Mandatory section to declare the messagebus plugin to load, and its settings. Obviously, you must set up exactly one message bus plugin.
- On
hermes-server
, it will look up for Message bus producer plugin in plugins/messagebus_producers/
directory.
- On
hermes-client
, it will look up for Message bus consumer plugin in plugins/messagebus_consumers/
directory.
It must contain a subsection named with the plugin name containing a facultative settings
subsection with the plugin settings to fill according to the messagebus producers or messagebus consumers plugin documentation.
Example with the sqlite
producer plugin:
hermes:
# (...)
plugins:
messagebus:
sqlite:
settings:
uri: /path/to/hermes/sqlite/message/bus.sqlite
retention_in_days: 30
# (...)
hermes-server
Server settings.
Main subsections:
hermes-server
hermes-server.updateInterval
- Description: Interval between two data updates, in seconds.
- Mandatory: Yes
- Type: integer
- Valid values: >= 0
hermes-server.datamodel
Mandatory subsection used to configure server datamodel.
For each data types needed, a subsection with the desired data type name must be created and configured. The data type name MUST start with an alphanumerical character.
Obviously, at least one data type must be set up.
Note
The declaration order of data types is important to enforce data integrity:
- add/modify events will be processed in the declaration order
- remove events will be processed in the reversed declaration order
So you really should first declare data types that do not depend on any other types, and then types that have dependencies (foreign keys) to those declared above.
hermes-server.datamodel.data-type-name.primarykeyattr
- Description: The name of the datamodel attribute used as primary key. If the primary key is a tuple, you may declare a list of names.
- Mandatory: Yes
- Type: string | string[]
hermes-server.datamodel.data-type-name.toString
- Description: Jinja template to compose the way a data item will be represented in log files.
- Mandatory: No
- Type: string
hermes-server.datamodel.data-type-name.on_merge_conflict
- Description: Behavior if a same attribute has different value on multiple sources.
- Mandatory: No
- Type: string
- Default value: use_cached_entry
- Valid values:
keep_first_value
: use the first value met in source order.
use_cached_entry
: ignore data fetched and keep using cached entry until conflict is solved.
hermes-server.datamodel.data-type-name.foreignkeys
-
Description: Allow to declare foreign keys in a data type, that clients will use to enforce their foreign keys policy. See Foreign keys for details.
The setting is a dict with current data type primary key as key, a dict with two entries as value, refering to the parent data type from_objtype
and its primary key from_attr
.
Although it might seem intuitive, declaring foreign keys will not create any integrity constraint rules automatically.
Warning
Whether for the current data type or for the parent, attributes must be primary keys of their respective types.
In addition, the primary key of the parent cannot be multivalued (a tuple).
These constraints could eventually be relaxed one day, but for now no relevant use case has justified the need.
Example:
foreignkeys:
group_id:
from_objtype: SRVGroups
from_attr: gid
user_id:
from_objtype: SRVUsers
from_attr: uid
-
Mandatory: No
-
Type: dict[string, dict[string, string]]
-
Default value: {}
hermes-server.datamodel.data-type-name.integrity_constraints
-
Description: Integrity constraints between datamodel type, in Jinja.
WARNING: it could be terribly slow, so you should keep it as simple as possible, and focus upon primary keys.
Jinja vars available are:
- _SELF: the current object
- data-type-name_pkeys: a set with every primary key of specified data type.
- data-type-name: a list of dict containing each entry of specified data type.
Example:
integrity_constraints:
- "{{ _SELF.pkey_attr in OTHERDataType_pkeys }}"
-
Mandatory: No
-
Type: string[]
-
Default value: []
hermes-server.datamodel.data-type-name.sources
Mandatory subsection listing the datasource(s) used to fetch current data type data.
For each datasource used, a subsection with its name must be defined and configured.
Obviously, at least one datasource must be set up.
hermes-server.datamodel.data-type-name.sources.datasource-name.fetch
Mandatory subsection to set up the query used to fetch data.
According to datasource plugin used, query and vars may be facultative: configure them according to your datasource plugin documentation.
hermes-server.datamodel.data-type-name.sources.datasource-name.fetch.type
- Description: Indicate to datasource plugin which flavor of query to proceed. Should probably be
fetch
here.
- Mandatory: Yes
- Type: string
- Valid values:
fetch
: Indicate that plugin must fetch data, without altering dataset.
add
: Indicate that plugin will add data to dataset.
delete
: Indicate that plugin will delete data from dataset.
modify
: Indicate that plugin will modify data in dataset.
hermes-server.datamodel.data-type-name.sources.datasource-name.fetch.query
hermes-server.datamodel.data-type-name.sources.datasource-name.fetch.vars
Facultative subsection containing some vars to pass to datasource plugin.
The var name as key, and its value as value. Each value may be a Jinja template.
Jinja vars available are:
- REMOTE_ATTRIBUTES: the list of remote attribute names used in
attrsmapping
. May be useful to generate SQL queries with required data without using wildcards or manually typing the attribute list.
- CACHED_VALUES: the cache of previous query. A list of dictionaries, each dictionary is an entry with attrname as key, and corresponding value as value.
- data-type-name_pkeys: a set with every primary key of specified data type. The var’s datatype must be declared before the current one in the datamodel, otherwise the content of the var will always be empty as its content will be fetched after that of the current datatype.
- data-type-name: a list of dict containing each entry of specified data type. The var’s datatype must be declared before the current one in the datamodel, otherwise the content of the var will always be empty as its content will be fetched after that of the current datatype.
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_one
Facultative subsection to set up a query to run each time an item of current data has been processed without errors.
According to datasource plugin used, query and vars may be facultative: configure them according to your datasource plugin documentation.
Warning
commit_one and commit_all are mutually exclusive: you can set none or one of them, but not both at the same time.
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_one.type
- Description: Indicate to datasource plugin which flavor of query to proceed.
- Mandatory: Yes
- Type: string
- Valid values:
fetch
: Indicate that plugin must fetch data, without altering dataset.
add
: Indicate that plugin will add data to dataset.
delete
: Indicate that plugin will delete data from dataset.
modify
: Indicate that plugin will modify data in dataset.
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_one.query
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_one.vars
Facultative subsection containing some vars to pass to datasource plugin.
The var name as key, and its value as value. Each value may be a Jinja template.
Jinja vars available are:
- REMOTE_ATTRIBUTES: the list of remote attribute names used in
attrsmapping
. May be useful to generate SQL queries with required data without using wildcards or manually typing the attribute list.
- ITEM_CACHED_VALUES: the cache values of current item. A dictionary with attrname as key, and corresponding value as value.
- ITEM_FETCHED_VALUES: the fetched values of current item. A dictionary with attrname as key, and corresponding value as value.
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_all
Facultative subsection to set up a query to run once all data have been processed with no errors.
According to datasource plugin used, query and vars may be facultative: configure them according to your datasource plugin documentation.
Warning
commit_all and commit_one are mutually exclusive: you can set none or one of them, but not both at the same time.
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_all.type
- Description: Indicate to datasource plugin which flavor of query to proceed.
- Mandatory: Yes
- Type: string
- Valid values:
fetch
: Indicate that plugin must fetch data, without altering dataset.
add
: Indicate that plugin will add data to dataset.
delete
: Indicate that plugin will delete data from dataset.
modify
: Indicate that plugin will modify data in dataset.
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_all.query
hermes-server.datamodel.data-type-name.sources.datasource-name.commit_all.vars
Facultative subsection containing some vars to pass to datasource plugin.
The var name as key, and its value as value. Each value may be a Jinja template.
Jinja vars available are:
- REMOTE_ATTRIBUTES: the list of remote attribute names used in
attrsmapping
. May be useful to generate SQL queries with required data without using wildcards or manually typing the attribute list.
- CACHED_VALUES: the cache of previous polling. A list of dictionaries, each dictionary is an entry with attrname as key, and corresponding value as value.
- FETCHED_VALUES: the fetched entries of current polling. A list of dictionaries, each dictionary is an entry with attrname as key, and corresponding value as value.
hermes-server.datamodel.data-type-name.sources.datasource-name.attrsmapping
Mandatory subsection to set up attribute mapping. HERMES attributes as keys, REMOTE attributes (on datasource) as values.
A list of several remote attributes can be defined as a convenience, their non-NULL
values will be combined in a list.
The NULL
values and empty lists won’t be loaded.
A Jinja template could be set as value. If you do so, the whole value must be a
template. You can’t set "{{ ATTRIBUTE.split('separator') }} SOME_NON_JINJA_ATTR"
.
This is required to allow the software to collect the REMOTE_ATTRIBUTES
Jinja vars available are:
- each remote attribute for current data type and datasource with its fetched value, only if its value is not
NULL
and not an empty list.
- ITEM_CACHED_VALUES: the cache values of current item. A dictionary with attrname as key, and corresponding value as value.
hermes-server.datamodel.data-type-name.sources.datasource-name.secrets_attrs
- Description: Define attributes that will contain sensitive data, like passwords.
It will indicate Hermes to not cache them. The attribute names set here must exist as keys in attrsmapping. They’ll be sent to clients unless they’re
defined in local_attrs too. As they’re not cached, they’ll be seen as added EACH TIME the server will be restarted, and the consecutive events will be sent.
- Mandatory: No
- Type: string[]
hermes-server.datamodel.data-type-name.sources.datasource-name.cacheonly_attrs
- Description: Define attributes that will only be stored in cache.
They won’t be sent in events, nor used to diff with cache. The attribute names set here must exist as keys in attrsmapping.
- Mandatory: No
- Type: string[]
hermes-server.datamodel.data-type-name.sources.datasource-name.local_attrs
- Description: Define attributes that won’t be sent to clients, cached or used to diff with cache.
They won’t be sent in events, nor used to diff with cache. The attribute names set here must exist as keys in attrsmapping.
- Mandatory: No
- Type: string[]
hermes-server.datamodel.data-type-name.sources.datasource-name.pkey_merge_constraint
- Description: Constraints on primary keys during merge: will be applied during datasources merge.
As merging will be processed in the datamodel source declaration order in config file, the first source constraint will be ignored (because it will be created and not merged).
Then the first source data will be merged with the second source according to the second’s pkey_merge_constraint
. Then the resulting data will be merged with the third source data according to the third’s pkey_merge_constraint
, etc.
- Mandatory: No
- Type: string
- Default value:
noConstraint
- Valid values:
noConstraint
: don’t apply any merge constraint
mustNotExist
: the primary key in current source must not exist in previous (in datasources declaration order), otherwise the data of current will be discarded
mustAlreadyExist
: the primary key in current source must already exist in previous (in datasources declaration order), otherwise the data of current will be discarded
mustExistInBoth
: the primary key in current source must already exist in previous (in datasources declaration order), otherwise the data of both sources will be discarded
hermes-server.datamodel.data-type-name.sources.datasource-name.merge_constraints
- Description: Advanced merge constraints with Jinja rules.
Warning
Terribly slow, avoid using them as much as possible.
Jinja vars available are:
- _SELF: the data type item in current datasource being currently merged.
- For each datasource declared in current data type:
- datasource-name_pkeys: a set with every primary key of data type item in current datasource.
- datasource-name: the fetched entries of current polling. A list of dictionaries, each dictionary is an entry with attrname as key, and corresponding value as value.
Note
if pkey_merge_constraint is defined, it will be enforced before merge_constraints
, and Jinja vars will contains the resulting values.
- Mandatory: No
- Type: string[]
hermes-client
Settings shared by all clients.
Main subsections:
- Description: Autoremediation policy to use in error queue for events concerning a same object.
Warning
Enabling this feature may break the regular processing order of events: if your data types are only linked by primary keys, it shouldn’t be problematic, but if the links between them are more complex, you really should consider what could go wrong before enabling it.
e.g. with maximum
policy, and trashbin enabled, the autoremediation will delete both events when an added
event is followed by a removed
event. Without error, the object would have been created and stored in trashbin, but in this case it won’t even be created.
See how autoremediation works for more details.
- Mandatory: No
- Type: string
- Default value:
disabled
- Valid values:
disabled
: no autoremediation, events are stacked as is (default).
conservative
: only merge added
and modified
events between them.
- merge an
added
event with a following modified
event.
- merge two successive
modified
events.
maximum
: merge every events that can be merged.
- merge an
added
event with a following modified
event.
- merge two successive
modified
events.
- delete both events when an
added
event is followed by a removed
event.
- merge a
removed
event followed by an added
event in a modified
event.
- delete a
modified
event when it is followed by a removed
event.
hermes-client.foreignkeys_policy
- Description: Set up which event types that will be placed in the error queue if the
object concerning them is the parent (by foreign key) of an object already present
in the error queue.
See Foreign keys for more details.
- Mandatory: No
- Type: string
- Default value:
on_remove_event
- Valid values:
disabled
: No event, policy is disabled.
on_remove_event
: Only on removed events.
on_every_event
: On every events types (added, modified, removed)
hermes-client.errorQueue_retryInterval
- Description: Number of minutes between two attempts of re-processing events in error.
- Mandatory: No
- Type: integer
- Default value: 60 (1 hour)
- Valid values: 1 - 65535
hermes-client.trashbin_purgeInterval
- Description: Number of minutes between two trashbin purge attempts.
- Mandatory: No
- Type: integer
- Default value: 60 (1 hour)
- Valid values: 1 - 65535
- Ignored when: trashbin_retention is
0
/unset
hermes-client.trashbin_retention
- Description: Number of days to keep removed data in trashbin before permanently deleting it.
0
/unset
disable the trashbin: data will be immediately deleted.
- Mandatory: No
- Type: integer
- Default value: 0 (no trashbin)
- Valid values: >= 0
hermes-client.updateInterval
- Description: Number of seconds to sleep once no more events are available on message bus.
- Mandatory: No
- Type: integer
- Default value: 5
- Valid values: >= 0
hermes-client.useFirstInitsyncSequence
- Description: If
true
, indicate to use the first/older initsync sequence available on message bus. If false
, the latest/newer will be used.
- Mandatory: No
- Type: boolean
- Default value:
false
hermes-client.datamodel
Mandatory subsection used to configure client datamodel.
For each data types needed, a subsection with the desired data type name must be created and configured. The data type name MUST start with an alphanumerical character.
Obviously, at least one data type must be set up.
hermes-client.datamodel.data-type-name.hermesType
- Description: Name of corresponding data type on
hermes-server
.
- Mandatory: Yes
- Type: string
hermes-client.datamodel.data-type-name.toString
- Description: Jinja template to compose the way a data item will be represented in log files.
- Mandatory: No
- Type: string
hermes-client.datamodel.data-type-name.attrsmapping
Subsection to set up attribute mapping. CLIENT attributes as keys, REMOTE attributes (identified as HERMES attributes on hermes-server) as values.
A Jinja template could be set as value. If you do so, the value outside the templates will be used as raw string, and not as remote attribute name.
Jinja vars available are:
- each remote attribute for current data type, only if its value is not
NULL
and not an empty list.
Note
If you won’t use their value, it is not necessary to declare a mapping for primary key(s). For some data types, you may omit the attrsmapping, which is equivalent to defining an empty one : therefore it will only contain its primary key(s).