Ir para o conteúdo

careserver.xml

careserver.xml is the configuration of the recording service of the Edge Gateway: where the recordings are written, how the video is encoded, and how the service reaches the Mediation Controller.

Property Value
Component Edge Gateway
Path /etc/ipdiva/careserver/careserver.xml
Owner and permissions ipdivacarerecord:carerecord, 440
Package ipdiva-care-recordingserver, which ships a template (/usr/local/ipdiva/share/careserver/careserver.xml) copied on installation if the file is absent; on upgrade, a file never modified is replaced by the new template, a modified file is kept
Format XML

Structure

A single <careserver> element. The file is read by the recording service of the Edge Gateway, but not by it alone: each recorded session reads it again in its own process, the recorder of the Edge Gateway (RDP sessions in agentless mode, VNC sessions and virtual machine consoles) reads its directories and its encoding values, and the web recording service reads the web* elements.

Section Holds
<careserver> The listening address of the service, the recording directories, and how the service identifies its Edge Gateway.
Encoding of the recordings The video encoding of the recordings of sessions.
Web recording The video encoding of the web recordings.
<xmlrpc-connect> The local services of the Edge Gateway instances, through which the service reaches the Mediation Controller.
<ssl> The TLS of the listening port: certificate and its password, certification authorities, versions and cipher suites.

Two settings are documented elsewhere

The minimum TLS version of <ssl> is a recommendation of the security guide: see TLS 1.2 and 1.3. The certificate and the permissions of this file are covered by Edge Gateway certificate and private key.

Parameters

The tables list every element and every attribute that the recording service reads. Two columns give a value:

  • Default value: the value written in the file as installed. A dash marks an element absent from the installed file; set at installation marks a value that the installation writes from what it has collected.
  • If the element is absent: the value that the recording service uses when it does not find the element.

<careserver>

Elements placed directly under <careserver>.

Element Default value If the element is absent Effect
listen 0.0.0.0:8443 — Address and port on which the service accepts, over TLS, the connections of the session recorders. The service may listen on a port below 1024.
archivesdirectory /var/lib/ipdiva/carerecord/archives /var/lib/care3/archives (recording service and recorder of the Edge Gateway); /var/lib/ipdiva/carerecord/archives (web recording) Directory into which a recording is moved at the end of the session (video and preview image). The Apache site of the Edge Gateway publishes /var/lib/ipdiva/carerecord/archives under /archives: this path is fixed and does not follow the value set here.
recordingdirectory /var/lib/ipdiva/carerecord/recording /var/lib/care3/recording (recording service and recorder of the Edge Gateway); /var/lib/ipdiva/carerecord/recording (web recording) Working directory of the recordings in progress: the video is written there during the session, then moved to archivesdirectory. The hourly cleanup of the recordings of ended sessions works on /var/lib/ipdiva/carerecord/recording, a fixed path that does not follow the value set here.

Encoding of the recordings

Video encoding of session recordings. The video is H.264: during the session, it is cut into HLS segments (MPEG-TS) that a care.m3u8 playlist makes available to live playback; at the end, the complete recording is kept as MP4 and the segments are deleted. Two cases: a session recorded by an agent, the Windows recording agent included, is encoded by the agent itself, with the gopsize and captureinterval values that the service sends it when the session opens; an RDP session in agentless mode, a VNC session or a virtual machine console is recorded by the Edge Gateway itself (OpenH264 encoder, Constrained Baseline profile). A key image (I-frame) is complete; the images that follow it up to the next one only encode their differences with the previous image (P-frames).

Element Default value If the element is absent Effect
gopsize 10 10 (20 if the value cannot be read) GOP size: number of images between two key images (I-frames). A smaller value makes seeking in the recording more precise and the files larger. Since each HLS segment starts with a key image, it lasts at least gopsize × captureinterval (2.5 seconds with the default values). Sent to the recorder of the session when the session opens, the Windows recording agent included. No effect on the recordings made by the Edge Gateway itself, whose interval is fixed at 10 images.
captureinterval 250 250 Interval between two screen captures, in milliseconds: the video has 1000 / value images per second (4 with the default value). Sent to the recorder of the session when the session opens, the Windows recording agent included; also used by the recorder of the Edge Gateway.
hlslistsize 20 20 Number of segments kept in the HLS playlist of a recording in progress, the one read by live playback: a sliding window over the last segments, about 50 seconds with the default values. Read again for each new session; not sent to the Windows recording agent. No effect when recordings are encrypted: the playlist then keeps every segment, and they form the recording that is kept.

These values trade quality for volume

Lowering an interval or a GOP size makes the recording more precise and the files larger, on a disk that also receives all the other recordings. Change one value at a time and measure the result on a real session before applying it to a production Edge Gateway.

Web recording

Encoding of web recordings, done on the Edge Gateway by the web recording service (cleanroom-webrecord). The browser sends JPEG captures; the service re-encodes them into an H.264 video (OpenH264 encoder), cut into HLS segments during the session then kept as MP4, like session recordings. An element present but not an integer prevents this service from starting.

Element Default value If the element is absent Effect
webgopsize 5 2 GOP size of the video of a web recording: number of images between two key images (I-frames), the others being P-frames. With webfakeframespersec, it sets the minimum length of an HLS segment (5 images at 2 images per second, that is 2.5 seconds with the default values).
webhlslistsize 20 2 Number of segments kept in the HLS playlist of a web recording in progress, the one read by live playback: a sliding window over the last segments, about 50 seconds with the default values. No effect when recordings are encrypted.
webcaptureinterval 10000 5000 Interval, in milliseconds, that the service gives the browser before it sends the next capture. The frame rate of the video does not depend on it: it is webfakeframespersec.
webfakeframespersec 2 2 Frame rate of the video of a web recording, in images per second: each JPEG capture received is repeated until the next one to reach this rate.

<xmlrpc-connect>

Edge Gateway services that the recording service queries. Read again at each request: a change applies without restart.

Element Default value If the element is absent Effect
element http://127.0.0.1:9080 http://127.0.0.1:9080 when <xmlrpc-connect> is absent HTTP address of the local service of an Edge Gateway instance, one <element> per address; the pairing of the Edge Gateway adds the address of each instance. The service tries them in random order and keeps the first that reports itself connected; through it, it obtains the name and organisation of the Edge Gateway and its access to the Mediation Controller, for direct recordings and network filtering. With no address, these requests fail. Also read by the recorder of the Edge Gateway.

<ssl>

TLS of the listening port (listen): certificate, trust, cipher suites and protocol versions. The TLS context is built only when cert is set. A certificate that cannot be loaded, a missing ca-dir or dh-file, an unknown curve or a cipher list refused by OpenSSL prevents the start of the service. If the file named by ca-file does not exist, the service stops configuring TLS at that point: certificate, cipher suites, revocation lists and verification are not loaded. Each recorded session reloads this section in its own process.

Element Default value If the element is absent Effect
cert CERT no TLS context Certificate and private key of the service: PKCS#12 when the file ends in .p12, PEM when it ends in .pem. The pairing of the Edge Gateway sets /etc/ipdiva/gateway/ssl/care_<edge-gateway>.p12; until then, the delivered value CERT prevents the start of the service. The same certificate, converted to PEM, serves the Apache site isoweb.
pkcs12 — — Former name of cert, read only when cert is absent.
key — — Former name of cert, read only when cert and pkcs12 are absent.
password PASSWORD built-in passwords tried Password of the certificate, set by the pairing of the Edge Gateway. For a PEM file, several values separated by ; are tried in turn. Also used to convert the certificate for the Apache site isoweb.
ca-file — — File of certification authorities trusted by the service.
calist — — Former name of ca-file; when present, it takes precedence over it.
ca-dir /etc/ipdiva/gateway/ssl/ca — Directory of certification authorities: every file it contains, subdirectories included, is loaded. A missing directory prevents the start of the service.
allowed-ca-file — — File of the certification authorities allowed to sign the certificates of the recorders: a certificate whose issuer is not in it is refused.
crl-file — — Certificate revocation list, loaded when the service starts. A list that cannot be loaded is reported in the log.
crl-dir — — Directory of revocation lists: every file it contains is loaded when the service starts.
dh-file — — Diffie-Hellman parameters. A missing file prevents the start of the service.
ecdh-curve — — Elliptic curve used for the ECDH key exchange, by its OpenSSL short name. An unknown name prevents the start of the service.
cipherlist !ADH:
!AECDH:
!MD5:
kEECDH+AES:
kEDH+AES:
AES256+RSA:
3DES+RSA
OpenSSL default Cipher suites up to TLS 1.2, in the OpenSSL syntax. A list refused by OpenSSL prevents the start of the service.
cipherlist-tls1.3 TLS_CHACHA20_POLY1305_SHA256:
TLS_AES_256_GCM_SHA384:
TLS_AES_128_GCM_SHA256
OpenSSL default Cipher suites of TLS 1.3, separated by :. A list refused by OpenSSL prevents the start of the service.
honorServerCipherOrder — true true: the order of the cipher suites of the service prevails over that of the recorder.
min-version tls1.2 tls1.1 Minimum version of the protocol: tls1, tls1.1, tls1.2 or tls1.3. Any other value is reported in the log and leaves no minimum.
max-version empty no maximum Maximum version of the protocol, with the same values as min-version. Empty: no maximum.
version — — Former setting: ignored, with an error in the log, when min-version or max-version is present. Otherwise it sets the lowest version accepted (tls1, tls1.1, tls1.2, tls1.3, also written tlsv1.2…).
verify-cert true true true: the certificate presented by a recorder is verified, and a recorder without a certificate is refused unless no-fail-if-no-peer-cert is true. false: no verification. A direct recording request is always refused without a certificate, whose common name identifies the machine.
no-fail-if-no-peer-cert true false true (with verify-cert at true): a recorder without a certificate is not refused.
verify-depth — 0 Maximum depth of the certificate chain accepted. 0 keeps the OpenSSL default.
accept-expired-cert — false true: an expired certificate of a recorder is accepted, and logged.
session-cache — false true: enables the cache of TLS sessions.
secure-renegociation — force force: behaviour of OpenSSL; no: disables the session tickets; allowUnsecure: allows the unsecure legacy renegotiation. Case-sensitive; any other value is reported in the log and ignored.

Applying a change

Restart the recording service:

1
systemctl restart ipdivacarerecord.service

Some elements do not wait for this restart, or need another one:

  • <xmlrpc-connect> is read again at each request: a change applies at once;
  • each new recorded session reads the file again: hlslistsize, <ssl> and the values that the recorder of the Edge Gateway reads apply from the next session.

The web* elements apply when the web recording service is restarted:

1
systemctl restart cleanroom-webrecord.service

A new certificate in <ssl> applies to the web server of the Edge Gateway only once it has been extracted again and Apache reloaded:

1
2
/usr/local/ipdiva/bin/isoweb_extract_cert.py
systemctl reload apache2

The restart interrupts the recordings in progress

A recording being written is cut: what was already captured stays, the rest is lost. Check that no session is being recorded before restarting.

Upgrade

The file is kept on upgrade. If you modified it, the upgrade asks whether to keep your version or to install the new one: the version not chosen is kept next to it, as careserver.xml.dpkg-old (your former version) or careserver.xml.dpkg-dist (the new version).

The pairing of the Edge Gateway also rewrites the file, for its first instance: it sets the certificate and its password in it (cert and password of <ssl>) and adds the address of the instance to <xmlrpc-connect>.