Vault - How can I see the raw and cooked messages sent to SYSLOG/SIEM server from the Vault?
Objective
Sometimes, for debugging purposes, we may need to check the raw and cooked messages sent to the SIEM/SYSLOG by the Vault.
This article shows how to proceed in order to obtain this information.
Environment
10.10;11.1;11;11.2;11.3;11.4;11.5;11.6;11.7;12.0;12.1;12.2;11.9;11.8 Privileged Access Manager (PAM, self-hosted) Vault Server;Vault
Procedure
To check the SYSLOG information generated and forwarded by the vault, enable the SYSLOG Vault traces by opening the 'Server Central Administrator' Console and click on the 'Administration / Debug Level / Set Dynamically'.
There you can add the following at the end of the debug level string SYSLOG(1,2). For instance:
PE(1),PERF(1,2),SYSLOG(1,2)
When set the following lines will be shown in the console:
After enabling it, open the PrivateArk Client and login to the Vault. This will generate the following lines in the Vault trace files 'trace.d*':
2022-06-14 09:02:49.419 00002260 CAVSyslogMsgJob[7546] started. PEtId[2364] 2022-06-14 09:02:49.424 00002260 CAVSyslogMsgJob[7546] is sending audit to SYSLOG. PEtId[2364], XML data = <?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<syslog>
<audit_record>
<Rfc5424>no</Rfc5424>
<Vendor>Cyber-Ark</Vendor>
<Product>Vault</Product>
<Version>12.2.0002</Version>
<MessageID>7</MessageID>
<Desc>Logon</Desc>
<Severity>Info</Severity>
<Issuer>Administrator</Issuer>
<Action>Logon</Action>
<SourceUser></SourceUser>
<TargetUser></TargetUser>
<Safe></Safe> <File></File>
<Station>192.168.40.20</Station>
<Location></Location>
<Category></Category>
<RequestId></RequestId>
<Reason></Reason>
<ExtraDetails></ExtraDetails>
<Message>Logon</Message>
<GatewayStation></GatewayStation>
</audit_record>
</syslog>
2022-06-14 09:02:49.425 00002260 CAVSyslogMsgJob[7546] is sending audit to SYSLOG. PEtId[2364], manipulated data = CEF:0|Cyber-Ark|Vault|12.2.0002|7|Logon|5|act=Logon suser=Administrator fname= dvc= shost=192.168.40.20 dhost= duser= externalId= app= reason= cs1Label="Affected User Name" cs1= cs2Label="Safe Name" cs2= cs3Label="Device Type" cs3= cs4Label="Database" cs4= cs5Label="Other info" cs5= cn1Label="Request Id" cn1= cn2Label="Ticket Id" cn2= msg=
2022-06-14 09:02:49.425 00002260 CAVSyslogServerJob[7546] created. CAVSyslogMsgJob[7546], PEtId[2364], ServerThreadpoolNum[0] 2022-06-14 09:02:49.425 00002260 CAVSyslogMsgJob[7546] finished. PEtId[2364] 2022-06-14 09:02:49.425 00002260 CAVSyslogMsgJob[7546] deleted. PEtId[2364]
*The row data is the one between <syslog> and </syslog> and the formatted message appears just afterwards.
*The resulting formatted message depends on the used translator (.xsl) file.