Splunk Translator - Receive incomplete/mising data for action "rename"
Symptom
Original name [before 'rename' action]: pam_user
Modified name [after 'rename' action]: new_pam_user
Below is a sample output sent by the Vault:
---
2020-05-28 15:45:46.848 00003672 CAVSyslogMsgJob Sending audit to SYSLOG [267] PEtId[1552], manipulated data = <5>1 2020-05-28T05:45:46Z PRODNODEA CEF:0|Cyber-Ark|Vault|10.10.0000|64|Rename User|5|act="Rename User" suser=administrator fname= dvc= shost=x.x.x.x dhost= duser=new_pam_user 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=
---
As seen above, we can only identify the modified name (in red) but not the original name anywhere in the output - this is important especially if the customer wants to trace object change history.
Environment
10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4;14.0 Privileged Access Manager (PAM, self-hosted) Vault Server Vault Server Syslog
Cause
Sample audit record - redundant parameters omitted:
<audit_record>
<Rfc5424>yes</Rfc5424>
<MessageID>64</MessageID>
<Desc>Rename User</Desc>
<Action>Rename User</Action>
<SourceUser>pam_user</SourceUser> --- this is the original name
<TargetUser>new_pam_user</TargetUser> --- this is the modified name
</audit_record>
Reviewing translator file (SplunkCIM.xsl) to see where you're supposed to be receiving the old name (SourceUser):
--- Start of snip from translator ---
</xsl:call-template> cs1Label="Affected User Name" cs1=<xsl:if test="/syslog/audit_record/sourceUser !=''">"<xsl:call-template name="string-replace">
<xsl:with-param name="from" select="'='"/>
<xsl:with-param name="to" select="'\='"/>
<xsl:with-param name="string" select="SourceUser"/>
--- End of snip from translator ---
Based on the above, you're supposed to be seeing the old name at cs1=
Noticed that it has a small letter 's' for sourceUser at the following line:
</xsl:call-template> cs1Label="Affected User Name" cs1=<xsl:if test="/syslog/audit_record/sourceUser !=''">"<xsl:call-template name="string-replace">
Resolution
Modify it to the following:
</xsl:call-template> cs1Label="Affected User Name" cs1=<xsl:if test="/syslog/audit_record/SourceUser !=''">"<xsl:call-template name="string-replace">