SlideShare a Scribd company logo
1 of 29
Download to read offline
FreeRADIUS and eduroam logging
Matthew Ntewton
We need all the logs.
Do we need all the logs?
Just keep authentiaton logs, right?
Keep fewer logs.
– where possible
v2: Matih EAP Identty
authorize {
if (EAP-Message =~ /^0x02 . . . . . . 01/) {
linelog
}
...
}
v4: &session-state:
recv Access-Request {
if (!&session-state:) {
linelog
}
...
}
recv Access-Request {
if (!&session-state:) {
update session-state {
Tmp-Integer64-1 := "%{expr:(%c*1000) + (%C/1000)}"
}
linelog
}
...
}
server inner-tunnel {
send Access-Accept {
update outer.session-state {
User-Name := &User-Name
}
}
}
send Access-Accept {
update {
control:Tmp-String-1 := “accept”
session-state:Tmp-Integer64-2 := "%{expr:(%c*1000) + (%C/1000)}"
}
update control {
Tmp-Integer64-1 := "%{expr:&session-state:Tmp-Integer64-2 -
&session-state:Tmp-Integer64-1}"
}
linelog
}
default server
recv Access-Request → check session-state, log request
send Access-Accept → log accept
send Access-Reject → log reject
inner-tunnel
send Access-Accept → update session-state
send Access-Reject → update session-state
%T → tme in ISO8601 date format
control:Tmp-String-1 → “request”, “accept” or “reject”
session-state:Module-Failure-Message → inner reject reason
request:User-Name → outer User-Name
request:Calling-Staton-Id → Calling-Staton-Id
request:Operator-Name → operator name
session-state:User-Name → inner User-Name
control:Tmp-Integer64-1 → total auth tme in ms
input {
file {
path => "/path/to/radius/detail/file"
start_positon => "beginning"
type => radiusdetail
codec => multline {
pattern => "^t"
negate => false
what => "previous"
}
}
}
if ("%{redis:LPUSH radius:event '{"tmestamp":"%T", 
"type":"%{control:Tmp-String-1}", 
"Outer-User-Name":"%{jsonquote:%{User-Name}}", 
"User-Name":"%{jsonquote:%{session-state:User-Name}}", 
"Calling-Staton-Id":"%{jsonquote:%{Calling-Staton-Id}}", 
"latency":"%{control:Tmp-Integer64-1}" %}'}") {
noop
}
input {
redis {
host => "localhost"
port => "6379"
data_type => "list"
key => "radius:event"
threads => 2
codec => "json"
type => "radius"
}
}
authorize {
uri = "${..connect_uri}/radius/_doc/"
method = 'post'
body = 'json'
force_to = 'plain'
data = '{"tmestamp":"%T", 
"type":"%{control:Tmp-String-1}", 
"Outer-User-Name":"%{jsonquote:%{User-Name}}", 
"Calling-Staton-Id":"%{jsonquote:%{Calling-Staton-Id}}", 
"Called-Staton-Id":"%{jsonquote:%{Called-Staton-Id}}"}', 
"latency":"%{control:Tmp-Integer64-1}"
}
{ "_index" : "radius",
"_type" : "_doc",
"_id" : "Dcr4XWIBag7SnI-grLNi",
"_version" : 1,
"result" : "created",
"_shards": { "total":2,
"successful":1,
"failed":0 },
"_seq_no" : 4578,
"_primary_term" : 3 }
rest
map json &REST-HTTP-Body {
&Tmp-String-2 := "$.result"
&Tmp-Integer-1 := "$._shards.total"
&Tmp-Integer-2 := "$._shards.successful"
&Tmp-Integer-3 := "$._shards.failed"
}
if (&control:Tmp-String-2 != "created" ) {
...
}
https://wiki.freeradius.org/guide/eduroam
FreeRADIUS, eduroam logging and Elasticsearch

More Related Content

What's hot

NS-2 Tutorial
NS-2 TutorialNS-2 Tutorial
NS-2 Tutorial
code453
 
Multithreaded programming
Multithreaded programmingMultithreaded programming
Multithreaded programming
Sonam Sharma
 
Владимир Перепелица "Модули"
Владимир Перепелица "Модули"Владимир Перепелица "Модули"
Владимир Перепелица "Модули"
Media Gorod
 

What's hot (18)

Improved alerting with Prometheus and Alertmanager
Improved alerting with Prometheus and AlertmanagerImproved alerting with Prometheus and Alertmanager
Improved alerting with Prometheus and Alertmanager
 
Ns 2 Network Simulator An Introduction
Ns 2 Network Simulator An IntroductionNs 2 Network Simulator An Introduction
Ns 2 Network Simulator An Introduction
 
Working with NS2
Working with NS2Working with NS2
Working with NS2
 
I know what your packet did last hop using packet histories to troubleshoot...
I know what your packet did last hop  using  packet histories to troubleshoot...I know what your packet did last hop  using  packet histories to troubleshoot...
I know what your packet did last hop using packet histories to troubleshoot...
 
Information gathering using windows command line utility
Information gathering using windows command line utilityInformation gathering using windows command line utility
Information gathering using windows command line utility
 
Taming Cloud APIs with Swift
Taming Cloud APIs with SwiftTaming Cloud APIs with Swift
Taming Cloud APIs with Swift
 
DPNHTW
DPNHTWDPNHTW
DPNHTW
 
Monitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachineMonitoring with Syslog and EventMachine
Monitoring with Syslog and EventMachine
 
libpcap
libpcaplibpcap
libpcap
 
Prometheus Storage
Prometheus StoragePrometheus Storage
Prometheus Storage
 
RabbitMQ for Perl mongers
RabbitMQ for Perl mongersRabbitMQ for Perl mongers
RabbitMQ for Perl mongers
 
NS-2 Tutorial
NS-2 TutorialNS-2 Tutorial
NS-2 Tutorial
 
OpenCanary and Canary Tokens
OpenCanary and Canary TokensOpenCanary and Canary Tokens
OpenCanary and Canary Tokens
 
Multithreaded programming
Multithreaded programmingMultithreaded programming
Multithreaded programming
 
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
OSMC 2014: Monitoring VoIP Systems | Sebastian DammOSMC 2014: Monitoring VoIP Systems | Sebastian Damm
OSMC 2014: Monitoring VoIP Systems | Sebastian Damm
 
Network simulator 2
Network simulator 2Network simulator 2
Network simulator 2
 
Владимир Перепелица "Модули"
Владимир Перепелица "Модули"Владимир Перепелица "Модули"
Владимир Перепелица "Модули"
 
Vapor – Swift is not only for iOS anymore
Vapor – Swift is not only for iOS anymoreVapor – Swift is not only for iOS anymore
Vapor – Swift is not only for iOS anymore
 

Similar to FreeRADIUS, eduroam logging and Elasticsearch

MultiClient chatting berbasis gambar
MultiClient chatting berbasis gambarMultiClient chatting berbasis gambar
MultiClient chatting berbasis gambar
yoyomay93
 
MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010
Sadayuki Furuhashi
 
Formal Verification of Transactional Interaction Contract
Formal Verification of Transactional Interaction ContractFormal Verification of Transactional Interaction Contract
Formal Verification of Transactional Interaction Contract
Gera Shegalov
 

Similar to FreeRADIUS, eduroam logging and Elasticsearch (20)

RestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message QueueRestMQ - HTTP/Redis based Message Queue
RestMQ - HTTP/Redis based Message Queue
 
Cassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, OverviewCassandra 2.1 boot camp, Overview
Cassandra 2.1 boot camp, Overview
 
Pycon - Python for ethical hackers
Pycon - Python for ethical hackers Pycon - Python for ethical hackers
Pycon - Python for ethical hackers
 
Streaming Way to Webscale: How We Scale Bitly via Streaming
Streaming Way to Webscale: How We Scale Bitly via StreamingStreaming Way to Webscale: How We Scale Bitly via Streaming
Streaming Way to Webscale: How We Scale Bitly via Streaming
 
Non-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.jsNon-blocking I/O, Event loops and node.js
Non-blocking I/O, Event loops and node.js
 
MultiClient chatting berbasis gambar
MultiClient chatting berbasis gambarMultiClient chatting berbasis gambar
MultiClient chatting berbasis gambar
 
9:40 am InfluxDB 2.0 and Flux – The Road Ahead Paul Dix, Founder and CTO | ...
 9:40 am InfluxDB 2.0 and Flux – The Road Ahead  Paul Dix, Founder and CTO | ... 9:40 am InfluxDB 2.0 and Flux – The Road Ahead  Paul Dix, Founder and CTO | ...
9:40 am InfluxDB 2.0 and Flux – The Road Ahead Paul Dix, Founder and CTO | ...
 
MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010MessagePack Rakuten Technology Conference 2010
MessagePack Rakuten Technology Conference 2010
 
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
 
Flux and InfluxDB 2.0 by Paul Dix
Flux and InfluxDB 2.0 by Paul DixFlux and InfluxDB 2.0 by Paul Dix
Flux and InfluxDB 2.0 by Paul Dix
 
Puppet Camp 2012
Puppet Camp 2012Puppet Camp 2012
Puppet Camp 2012
 
Samza at LinkedIn
Samza at LinkedInSamza at LinkedIn
Samza at LinkedIn
 
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
Message Queuing on a Large Scale: IMVUs stateful real-time message queue for ...
 
Formal Verification of Transactional Interaction Contract
Formal Verification of Transactional Interaction ContractFormal Verification of Transactional Interaction Contract
Formal Verification of Transactional Interaction Contract
 
Fast HTTP string processing algorithms
Fast HTTP string processing algorithmsFast HTTP string processing algorithms
Fast HTTP string processing algorithms
 
Lecture 5
Lecture 5Lecture 5
Lecture 5
 
Handy Networking Tools and How to Use Them
Handy Networking Tools and How to Use ThemHandy Networking Tools and How to Use Them
Handy Networking Tools and How to Use Them
 
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
How and Why Prometheus' New Storage Engine Pushes the Limits of Time Series D...
 
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Data Provenance Support in...
 
8 Minutes On Rack
8 Minutes On Rack8 Minutes On Rack
8 Minutes On Rack
 

Recently uploaded

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
FIDO Alliance
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
Wonjun Hwang
 

Recently uploaded (20)

TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)CORS (Kitworks Team Study 양다윗 발표자료 240510)
CORS (Kitworks Team Study 양다윗 발표자료 240510)
 
Google I/O Extended 2024 Warsaw
Google I/O Extended 2024 WarsawGoogle I/O Extended 2024 Warsaw
Google I/O Extended 2024 Warsaw
 
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptxCyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
Cyber Insurance - RalphGilot - Embry-Riddle Aeronautical University.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
UiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overviewUiPath manufacturing technology benefits and AI overview
UiPath manufacturing technology benefits and AI overview
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 

FreeRADIUS, eduroam logging and Elasticsearch

  • 1. FreeRADIUS and eduroam logging Matthew Ntewton
  • 2. We need all the logs.
  • 3. Do we need all the logs?
  • 4. Just keep authentiaton logs, right?
  • 5. Keep fewer logs. – where possible
  • 6. v2: Matih EAP Identty
  • 7. authorize { if (EAP-Message =~ /^0x02 . . . . . . 01/) { linelog } ... }
  • 9. recv Access-Request { if (!&session-state:) { linelog } ... }
  • 10. recv Access-Request { if (!&session-state:) { update session-state { Tmp-Integer64-1 := "%{expr:(%c*1000) + (%C/1000)}" } linelog } ... }
  • 11. server inner-tunnel { send Access-Accept { update outer.session-state { User-Name := &User-Name } } }
  • 12. send Access-Accept { update { control:Tmp-String-1 := “accept” session-state:Tmp-Integer64-2 := "%{expr:(%c*1000) + (%C/1000)}" } update control { Tmp-Integer64-1 := "%{expr:&session-state:Tmp-Integer64-2 - &session-state:Tmp-Integer64-1}" } linelog }
  • 13. default server recv Access-Request → check session-state, log request send Access-Accept → log accept send Access-Reject → log reject inner-tunnel send Access-Accept → update session-state send Access-Reject → update session-state
  • 14. %T → tme in ISO8601 date format control:Tmp-String-1 → “request”, “accept” or “reject” session-state:Module-Failure-Message → inner reject reason request:User-Name → outer User-Name request:Calling-Staton-Id → Calling-Staton-Id request:Operator-Name → operator name session-state:User-Name → inner User-Name control:Tmp-Integer64-1 → total auth tme in ms
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. input { file { path => "/path/to/radius/detail/file" start_positon => "beginning" type => radiusdetail codec => multline { pattern => "^t" negate => false what => "previous" } } }
  • 20.
  • 21. if ("%{redis:LPUSH radius:event '{"tmestamp":"%T", "type":"%{control:Tmp-String-1}", "Outer-User-Name":"%{jsonquote:%{User-Name}}", "User-Name":"%{jsonquote:%{session-state:User-Name}}", "Calling-Staton-Id":"%{jsonquote:%{Calling-Staton-Id}}", "latency":"%{control:Tmp-Integer64-1}" %}'}") { noop }
  • 22. input { redis { host => "localhost" port => "6379" data_type => "list" key => "radius:event" threads => 2 codec => "json" type => "radius" } }
  • 23.
  • 24. authorize { uri = "${..connect_uri}/radius/_doc/" method = 'post' body = 'json' force_to = 'plain' data = '{"tmestamp":"%T", "type":"%{control:Tmp-String-1}", "Outer-User-Name":"%{jsonquote:%{User-Name}}", "Calling-Staton-Id":"%{jsonquote:%{Calling-Staton-Id}}", "Called-Staton-Id":"%{jsonquote:%{Called-Staton-Id}}"}', "latency":"%{control:Tmp-Integer64-1}" }
  • 25. { "_index" : "radius", "_type" : "_doc", "_id" : "Dcr4XWIBag7SnI-grLNi", "_version" : 1, "result" : "created", "_shards": { "total":2, "successful":1, "failed":0 }, "_seq_no" : 4578, "_primary_term" : 3 }
  • 26. rest map json &REST-HTTP-Body { &Tmp-String-2 := "$.result" &Tmp-Integer-1 := "$._shards.total" &Tmp-Integer-2 := "$._shards.successful" &Tmp-Integer-3 := "$._shards.failed" } if (&control:Tmp-String-2 != "created" ) { ... }
  • 27.