Splunk Enterprise Security

How to create an alias for a CIM field in Splunk ES?

jwalzerpitt
Influencer

I am extracting the src and user values from failed login attempts in Shibboleth logs and the value is "failed" so I can set an event type for failed Shib login attempts.

When I check the CIM documentation for fields for Authentication event datasets, I see the value ES expects is "failure".

How do I create an alias for the field action so that "failed" is set to "failure" so ES can then leverage it?

Thx

0 Karma

woodcock
Esteemed Legend

Probably the string failed is in your logs and it is a simple field extraction. If that's the case, then you need to create a calculated field that does:

eval action=if(action=="failed", "failure", action)
0 Karma

lkutch_splunk
Splunk Employee
Splunk Employee
0 Karma

jwalzerpitt
Influencer

Thx for the reply and link to the doc.

It's not so much the field needs an alias, but the value "failed" needs to be set as "failure". I thought that's where the SEDCMD would come into play.

0 Karma

jwalzerpitt
Influencer

Actually digging through Splunk Answers saw a way to use sedcmd and was wondering if this would be a way to handle the issue:

index=foo sourcetype="shibboleth:process" "Login by*" failed
| rex mode=sed field=_raw "s/failed/failure/g" 
| rex field=_raw "-\s\[(?P<src>(?:[0-9]{1,3}\.){3}[0-9]{1,3}).*:\sLogin\sby\s'(?P<user>.*)'\s(?P<action>failure)"

Running this extracts all three fields with correct values. If this looks good, could I then create an event type with this search for failed Shib login attempts?

Thx

0 Karma
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.


Introducing Unified TDIR with the New Enterprise Security 8.2

Read the blog
Get Updates on the Splunk Community!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Your Voice Matters! Help Us Shape the New Splunk Lantern Experience

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Building Momentum: Splunk Developer Program at .conf25

At Splunk, developers are at the heart of innovation. That’s why this year at .conf25, we officially launched ...