Sending events to a SIEM¶
Bastion can forward its events to a syslog server: a SIEM, a SOC collector or any log concentrator. This section lists every message that can be sent this way, word for word, so that a parser can be written for each of them. This page describes what is sent, how to enable it, the structure of a received line, and how its fields map to two standard schemas.
What is sent¶
Four families of messages can leave the platform. Each one has its own switch, and its own page listing its messages.
| Family | Content | Enabled by | Severity |
|---|---|---|---|
| Organisation events | The event log of an organisation: connections, resource launches, configuration changes, password rotations, notifications | Allow the organizations to send their events via syslog (system console), and Send platform events via syslog in the general options of the organisation | err (3) |
| Session events | What is traced during a recorded session: SSH commands, processes, windows, keystrokes, SFTP operations, file transfers, URLs, MCP calls, alerts | Allow the organizations to send their events via syslog (system console), and Send video events to syslog in the general options of the organisation | info (6) |
| System console events | Connections to the system console and configuration changes made in it | Send platform events via syslog (system console) | err (3) |
| Technical messages | Operating messages of the platform: external vaults, workflows, scheduled tasks | No switch: they are always sent once forwarding is enabled | info to err |
Forwarding to the remote server is a single setting for the four families
The remote server, the protocol and the certificate are set once, in the logger settings of the system console. The switches above decide which messages are written to the syslog of the Mediation Controller; the remote server receives all of them.
Enabling the sending¶
- In the system console, open the logger settings.
- Tick Send events to a remote syslog, then fill in Remote syslog server and Protocol (see Transport).
- To send the system console events, tick Send platform events via syslog.
- To let organisations send their events, tick Allow the organisations to send their events via syslog.
- In the administration console of each organisation concerned, open the general options and, in the Syslog frame, tick Send platform events via syslog (organisation events) and/or Send video events to syslog (session events).
In a cluster, the forwarding configuration is propagated to every node: each node sends the events it processes, under its own host name.
Transport¶
| Protocol | Port used when none is given | Encryption |
|---|---|---|
| TLS (default) | 6514 |
Yes |
| TCP | 1468 |
No |
| UDP | 514 |
No |
- Remote syslog server takes a host name, optionally followed by
:and a port (siem.domain.local:6514). Without a port, the port of the table applies: note that it is 1468 in TCP, not 514. - In TLS, the server certificate is checked against the name entered in Remote syslog server: it is the only name accepted. Enter the name carried by the certificate of the collector, and supply the certification authority that issued it in the TLS block of the logger settings.
- Forwarding is performed by the
rsyslogservice of the Mediation Controller, which sends only the messages of Bastion: the other logs of the machine stay local.
In TLS, the certification authority is required
The certificate of the collector is validated only against the certification authorities
supplied in the TLS block of the logger settings. When none is supplied, no connection
succeeds: the Mediation Controller refuses the collector (certificate invalid: signer not
found in the journal of the rsyslog service), and the events produced meanwhile are lost.
They are not sent again once the connection is restored.
Structure of a received line¶
The messages are forwarded in the traditional syslog format (RFC 3164), without structured data:
1 | |
| Element | Value |
|---|---|
PRI |
Facility syslog (5) × 8 + severity: <43> for err, <44> for warning, <46> for info |
TIMESTAMP |
Local time of the Mediation Controller, in the form Oct 2 15:22:01: neither year nor time zone |
HOSTNAME |
Host name of the Mediation Controller node that sends the message |
TAG |
Cleanroom-<organization> for organisation and session events, Cleanroom for system console events (see below) |
MESSAGE |
The text of the event, followed by its context fields depending on the family |
The message of each family has its own shape:
| Family | Message after the tag |
|---|---|
| Organisation events | <text> org:<organization>, user:<login>@<domain>, ip:<address> |
| Session events | <login>@<domain> <event> (no organisation or address fields) |
| System console: configuration | <text> ip:<address> (two spaces before ip:) |
| System console: connections | Ipdiva Safe: <text> ip:<address>, written right after the tag |
| Technical messages | The text, written right after the tag |
Some messages are written right after the tag, without a space
The tag is followed by the message without any separator. Organisation, session and
system console configuration messages start with a space, so the tag stands alone. The
other ones stick to it: a connection to the system console arrives as
CleanroomIpdiva Safe: Connecting to system console ip:192.0.2.10, and a technical
message as Cleanroom-operationsBitwarden: …. A parser must therefore recognise the tag by
its beginning (Cleanroom), not by a fixed value.
An organisation or session event is sent twice
Each organisation or session event is written once under the tag
Cleanroom-<organization>, and once more under the tag Cleanroom. The two lines carry the
same message. Keep the one tagged Cleanroom-<organization>, which names the organisation.
Timestamp and tag length
The timestamp carries neither year nor time zone: synchronise the clocks (NTP) and set the
time zone of the Mediation Controller on the collector side. The tag is limited to
32 characters: beyond 22 characters, the name of the organisation is truncated in the tag,
but remains complete in the org: field.
Language of the messages¶
The text of an event is composed at the time it is sent, in the language of the console that produced it:
- organisation and session events: the language of the administration console of the organisation, French or English (French when nothing is set);
- system console events: the language of the system console.
Neither the identifier of the event nor its kind of action is transmitted: a parser recognises an event by its text. This is why the tables of this section give each message in both languages. Fix the console language of the organisations concerned before writing parsers, and write them for that language.
The text is the one displayed by the console, unchanged: it can contain HTML markup
(<br/>) or entities ( before a colon, in French).
Parsing the messages¶
The patterns below cover the context fields. Each one is given in two forms with the same named
fields: a regular expression with named groups (PCRE syntax, accepted by most collectors), and a
grok pattern for Logstash or an Elasticsearch ingest pipeline. The text of the event (text) is
then compared to the tables of each family.
Organisation events¶
| Regular expression (PCRE, named groups) | |
|---|---|
1 | |
| Grok pattern (Logstash, Elasticsearch ingest pipeline) | |
|---|---|
1 | |
- The login can itself contain an
@(email address): the domain is what follows the last@. - A domain name can contain spaces (
Corporate LDAP). - The address can be empty, for an event produced by the platform itself (scheduled task, automatic rotation).
Session events¶
| Regular expression (PCRE, named groups) | |
|---|---|
1 | |
| Grok pattern (Logstash, Elasticsearch ingest pipeline) | |
|---|---|
1 | |
The event part is then compared to the templates of session events.
A few templates do not follow this form, and are recognised directly from the table:
- some follow the login without a space (
idle_time received:); - the start of a recording places the account after the text
(
Recording in progress <user>@<domain>); - the resumption of a web session and the access to a URL carry the login without its domain
(
<user> web session resume,<user> URL access:<url>).
A control character in a traced value is replaced by # followed by its octal code on three
digits: a carriage return arrives as #015 (SSH command: "export …#015").
System console events¶
| Regular expression (PCRE, named groups) | |
|---|---|
1 | |
| Grok pattern (Logstash, Elasticsearch ingest pipeline) | |
|---|---|
1 | |
Mapping to standard schemas¶
Bastion does not emit Elastic Common Schema (ECS) or OCSF events: the mapping below is the one to apply in the parser to normalise its messages.
| Element of the line | ECS field | OCSF attribute |
|---|---|---|
Fixed value CyberElements |
observer.vendor |
metadata.product.vendor_name |
Fixed value Bastion |
observer.product |
metadata.product.name |
TIMESTAMP |
@timestamp |
time |
HOSTNAME |
host.hostname |
device.hostname |
Severity of PRI |
log.syslog.severity.code, log.level |
severity_id |
Facility of PRI |
log.syslog.facility.code |
— |
TAG |
log.syslog.appname |
metadata.log_name |
| Text of the event | message |
message |
org: (or end of the tag) |
organization.name |
actor.user.org.name |
user: |
user.name |
actor.user.name |
Domain after @ |
user.domain |
actor.user.domain |
ip: |
source.ip |
src_endpoint.ip |
For the OCSF Authentication (3002) and Account Change (3001) classes, the user concerned is carried
by the user attribute, required by these classes: user.name, user.domain, user.org.name
instead of actor.user.*.
The kind of the event is deduced from its text: each table of this section gives the
corresponding ECS (event.category, event.type, event.outcome) and OCSF (class) values,
according to the kind of action that produces the message:
| Kind of action | ECS | OCSF |
|---|---|---|
| Connection | authentication / start / success |
Authentication (3002), activity Logon |
| Connection failure | authentication / start / failure |
Authentication (3002), activity Logon, status Failure |
| Disconnection | authentication / end / success |
Authentication (3002), activity Logoff |
| OTP enrolment | iam / change |
Account Change (3001), activity MFA Factor Enable |
| OTP failure | authentication / info / failure |
Authentication (3002), status Failure |
| Password | iam / change |
Account Change (3001), activity Password Change |
| Resource launch | session / start |
Base Event (0) — no OCSF class describes a privileged session launch |
| Session join | session / start |
Base Event (0) |
| Forced session join | session / start |
Base Event (0) |
| Help request | session / info |
Base Event (0) |
| Invitation | session / info |
Base Event (0) |
| Invitation withdrawal | session / info |
Base Event (0) |
| Session pause | session / info |
Base Event (0) |
| Session resume | session / info |
Base Event (0) |
| Session termination | session / end |
Base Event (0) |
| Closing | session / end |
Base Event (0) |
| Access request | iam / info |
User Access Management (3005) |
| Association | iam / change |
User Access Management (3005), activity Assign Privileges |
| Dissociation | iam / change |
User Access Management (3005), activity Revoke Privileges |
| Creation | configuration / creation |
Entity Management (3004), activity Create |
| Modification | configuration / change |
Entity Management (3004), activity Update |
| Deletion | configuration / deletion |
Entity Management (3004), activity Delete |
| Application | configuration / change |
Entity Management (3004), activity Update |
| Export | configuration / access |
Entity Management (3004), activity Read |
| Notification | email / info |
Email Activity (4009), activity Send |
| Email address retrieval failure | email / info / failure |
Base Event (0) |
| Service start | process / start |
Process Activity (1007), activity Launch |
| Service stop | process / end |
Process Activity (1007), activity Terminate |
| Service restart | process / change |
Process Activity (1007) |
| Other | configuration / info |
Base Event (0) |
Example: connection to the administration console
An administrator connects to the administration console of the operations organisation,
whose console is in English:
1 | |
| Value | ECS field | OCSF attribute |
|---|---|---|
Oct 2 15:22:01 (local time of the Mediation Controller) |
@timestamp |
time (in milliseconds since the epoch) |
mediation-controller |
host.hostname |
device.hostname |
3 (err) |
log.syslog.severity.code |
severity_id, according to the conversion chosen in the parser |
Cleanroom-operations |
log.syslog.appname |
metadata.log_name |
CyberElements |
observer.vendor |
metadata.product.vendor_name |
Bastion |
observer.product |
metadata.product.name |
Connecting to the administration console |
message |
message |
operations |
organization.name |
user.org.name |
adm-console |
user.name |
user.name |
local |
user.domain |
user.domain |
192.0.2.10 |
source.ip |
src_endpoint.ip |
authentication / start / success |
event.category / event.type / event.outcome |
— |
1.3.0 |
— | metadata.version |
3002 (Authentication) / 3 (Identity & Access Management) |
— | class_uid / category_uid |
1 (Logon) / 300201 |
— | activity_id / type_uid |
1 (Success) |
— | status_id |
Security of the stream¶
Session events carry what the user types and runs: keystroke sequences, SSH command lines, MCP call arguments. A password typed in a session can therefore reach the collector. Use TLS, and restrict access to these events on the SIEM side as you would restrict access to the session recordings.