customer intelligence: using the elk stack to analyze forgerock openam audit data

20
IRM Summit 2014 Customer Intelligence: Using the ELK stack (Elasticsearch, Logstash and Kibana) to analyse ForgeRock OpenAM audit data warren.strange@forgerock .com

Upload: forgerock

Post on 06-May-2015

1.675 views

Category:

Software


11 download

DESCRIPTION

Warren Strange, Principal Systems Engineer, ForgeRock, presents a Breakout Session on the ELK Stack at the 2014 IRM Summit in Phoenix, Arizona.

TRANSCRIPT

Page 1: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

IRM Summit 2014

Customer Intelligence: Using the ELK stack (Elasticsearch,

Logstash and Kibana) to analyse

ForgeRock OpenAM audit data

[email protected]

Page 2: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

IRM Summit 2014

Make pretty pictures for the boss

Page 3: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

3IRM Summit 2014

Coincidence?

Page 4: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

OpenDJ, OpenIDM, OpenAM produce copious amounts of audit data

Analysis of that data is left as an exercise for the reader

Many great SIEM tools

Desire for an Open Source solution for data analysis

Page 5: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

What is the ELK stack?

Elasticsearch: “No SQL” database

Logstash: Log collection and transformation

Kibana: Data visualizer for Elasticsearch

Page 6: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Yes, but what does ELK do?

Collect, analyse and visualize data Any kind of dataGithub (8 Million repos), Soundcloud (30M users), The Guardian (40M documents)

Answer questions:● Where are my users coming from?● What is the traffic in North America vs.

Europe?● Why do I see an employee logging in from

Canada?

Page 7: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Elasticsearch

● NoSQL, REST/json, document oriented, schemaless, “Big data” full text search engine

● Apache 2.0 license ● Sweet spot is rapid full text search / ad hoc queries ● Not a replacement for an RDBMS

● Not transactional, not ACID, etc.

● Built on Apache Lucene project

Page 8: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Logstash

● Swiss army knife of log collection, transformation and forwarding

● JRuby based● Large footprint :-(● lumberjack

● go based collector that feeds into logstash ● Very lightweight, small footprint

Page 9: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Kibana

Page 10: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Logstash flow

Input sourcefiles, database, syslog, etc.

Filtersgrep, regex, geoIP, ...

Outputelasticsearch, file, db, syslog

“Plugin” based architecture. Add new plugins for input, output and filters

Page 11: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Logstash example

Input sourcefile: amAccess.*type: amAccess

FiltersMap IP address to GEO location

Outputelasticsearch:9100

Read from OpenAM access logs

Add Geo Location data

Write the result to Elasticsearch

Page 13: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

input {

file {

type => amAccess

path => "/logs/am/log/amAuthentication.*"

}

}

Input section

Wildcards can be used

Data is tagged with a type. Use this to classify & search by type

Page 14: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

filter { if [type] == "amAccess" { csv { columns => [time,Data,LoginID,ContextID, IPAddr, LogLevel, Domain, LoggedBy, MessageID, ModuleName, NameID,

HostName] separator => " " } date { match => ["time", "yyyy-MM-dd HH:mm:ss"] } geoip { database => "/usr/share/GeoIP/GeoIP.dat" source => ["IPAddr"] } }}

Filter apply to type

Parse the dataas csv

Normalize the date to a common format

Enrich the record with GEO location

Page 15: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

output { stdout { codec => rubydebug } elasticsearch { host => localhost }}

Output

Send the data to Elasticsearch and the stdout

Page 16: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Demo Time

As seen on youtube!

http://youtu.be/tvrYuSLuGik

27 49 views!

Page 17: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

ELK Demo Environment

OpenAM OpenDJ OpenIDM

logstash

elasticsearch:9100

Apache:80/443 +Policy Agent

Log Files

Kibana

Page 18: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Marketing Genius?

Where to hold the next ForgeRock Summit: Europe, USA, or Canada?

Asks you to find out pronto:● What country are customers visiting the ForgeRock website from?● How are they authenticating (forgerock account, or federated?)

Page 19: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

The next IRM summit location:

We have beer!Bring your toque!

Page 20: Customer Intelligence: Using the ELK Stack to Analyze ForgeRock OpenAM Audit Data

Next StepsDelivery Models

Cloud or Appliance?Interested in collaborating?

Share logstash config, kibana reports, etc.Puppet/Chef/Ansible/Docker installers?