SlideShare ist ein Scribd-Unternehmen logo
1 von 29
RSYSLOG update
v7 and beyond
Rainer Gerhards
What's in this talk?
•
•
•
•

Security improvements in v7
A quick word on Journal integration
v8 engine improvements
Writing plugins in languages other than C

• I will probably “run out of time” - but that's fine, the
slides at the end are optional.
The rsyslog doc project
• The doc just sucks...
• Spawned a new project to create better one:
https://github.com/rsyslog/rsyslog-doc
• Lead by James Boylan (a sysadmin)
• Please help
▫ Complain ;-)
▫ open issues
▫ Write some doc...

• We are especially interested to learn what is hard for
beginners!
Rainer Gerhards

New security features in rsyslog
v7
Remeber, in pre-v7 we have
• TLS-encrypted syslog transport
▫ RFC5425
▫ Mutual authentication

• Trusted properties
▫ Take log message origin based on
SCM_CREDENTIALS
Signed Log Records
• Introduced in v7.4
• Protects log files on machine
• Generic approach by introducing a signature
provider interface
• Currently provider for “Keyless Signature
Infrastructure” (KSI)
• Hash chain for log record is created
Signing via Hash Chains...

Source: http://en.wikipedia.org/wiki/File:Hashlink_timestamping.svg

• Very rough sample (actually Merkle trees!)
• No local secret!
• Consider “chain layer” to be operated on a schedule
(timer ticks!) by external entity
Where did we add Signatures?
Inputs

Outputs

/dev/log

Network
(e.g.TCP)

files

file

Parsers

Rules
&
Filters

Formatter

Database

Remote
system
File Signature Interface in Detail
omfile

File
Stream
Class

Log File
Both files
together
are the
“signed log”

SigProv
Interface

GuardTime
SigProv

Sig File
(TLV)

Generic interface providing future extensibility
Enables Distros to pack Functionality w/o increasing base system size
Activating Log Signing
action(type="omfile"
file="/var/log/logfile"
sig.provider="gt"
sig.keepTreeHashes="on"
sig.keepRecordHashes="on")

• Parameters except sig.provider are optional
• Writes
▫ regular log file
▫ plus signature file (*.gtsig)
Signing log records in flight
• Best practice is to use TLS with mutual
authentication so that the log source can be trusted
• no good and practical solution for signatures inside
the log record
• Experimental module rfc5424addhmac provides
HMAC within RFC5424 strucutured data
Log File Encryption
• Generic approach by introducing a crypto-provider
interface
• Currently available a libgcrypt-based crypto
provider
• Symmetric cryptography, all ciphers & modes
supported by libgcrypt
• Key can come from
▫ Config param (testing only, pls!)
▫ File
▫ Script (interface for advanced key exchange options)
Activating Log Encryption
action(type="omfile"
file="/var/log/logfile"
       cry.provider="gcry"
       cry.keyprogram=”/path/to/binary”)

• Addtl Parameters for ciphers, etc...
• Writes
▫ regular log file, encrypted
▫ plus encryption info file (*.encinfo)

• Works in conjunction with signatures
Encrypted Disk Queues
action(type="omfwd"
target="172.123.123.5
Port="10514″
queue.type="disk" queue.fileName="enc"
queue.cry.provider="gcry"
    queue.cry.keyprogram="binary" )

• Starting with v7.5, disk queue files can also be
encrypted
• Uses same crypto provider as log files
• Can be specififed on a per-queue basis
Log File Anonymization
• Permits to anonymize IP addresses
▫ Zero-out (based on netmask)
▫ Replace with char
▫ Based on hard German data protection laws

• Currently for IPv4
• Implemented via the action interface
▫ Can be applied conditionally
▫ Permits access to original message if desired
▫ No access possible after anonymizer is run
RELP security enhancements
• RELP is used to reliably forward messages
• Can now be secured like TCP syslog
▫ TLS
▫ Mutual authentication via various authentication
modes

• Implemented at the librelp level
▫ So this is available to other apps as well
Rainer Gerhards

rsyslog Journal Integration
Integration Modules
• Module imjournal
▫ Provides ability to pull messages off the journal, just as
another event source
▫ Gets into trouble if journal DB is unclean
▫ We currently recommend to use only when absolutely
required

• Module omjournal
▫ stores messages into the journal
▫ Permits to integrate e.g. router messages – especially
in SOHO environment
Integrating syslog Data into the
journal (SOHO env)
/* first, we make sure all necessary modules are present: */
module(load="imudp") # input module for UDP syslog
module(load="omjournal") # output module for journal
/* then, define the actual server that listens to the
* router. Note that 514 is the default port for UDP syslog.
*/
input(type="imudp" port="514" ruleset="writeToJournal")
/* inside that ruleset, we just write data to the journal: */
ruleset(name="writeToJournal") {
action(type="omjournal")
}
Writing RSYSLOG error messages to
journal
• New feature in 7.4.10 and above
• Permits to write rsyslog error messages directly to
journal
• We hope that this will finally help make user notice
them, e.g. via
$ systemctl status rsyslog
global(
   ProcessInternalMessages = "off"
)
Rainer Gerhards

The rsyslog v8 engine
The v7 rule engine
Queue worker
rsyslog
core

Queue worker

queue

Single-thread
compartment

Action instance

Queue worker

Filter processing

Message formatting


Actual output action, like sending msg

Kept simple & single threaded

Works well with fast actions

Has problems with slow ones, e.g.
via HTTP (like Elasticsearch)

The v8 rule engine
Queue worker
queue

Queue worker

Action wrkr inst.

Queue worker

rsyslog
core

Action wrkr inst.

Action wrkr inst.

Now multiple instances per action!

Queue worker pool automatically
scales outbound connection count
by spawning more worker instances

Works well with Elasticsearch etc.

Inherently serial outputs (e.g. local files!)
must serialize themselves

Rainer Gerhards

Writing external output plugins
for RSysLog
IN 2 MINUTES
Write the plugin itself
• Choose any language you like
• Implement the pseudocode below
▫
▫
▫
▫

Messages arrive via stdin, one message per line
Read from stdin until EOF
Process each message read as you like
Terminate when EOF is reached

• That's it!
While not EOF(stdin) do {
    Read msg from stdin
    Process msg
}
Make RsysLog call plugin
• Regular filtering applies (as with any action)
• You can specify message format via a template
• Use omprog for the call

module(load=”omprog”) # needed only once in config!
if $rawmsg contains “sometrigger” then
   action(type=”omprog”
          binary=”/path/to/your/plugin”)
Optional: debugging your plugin
• If something doesn't work, it's best to debug outside
of rsyslog
• Do this as you usually debug your programs (e.g. use
your favorite debugger!)
• For example, do
$ echo “testmessage” | /path/to/your/plugin

• Questions about the plugin interface or plugin
integration? Visit
http://kb.monitorware.com/external-plugins-f53.html
Want to know more details?
• There is an additional presentation available at
http://www.slideshare.net/rainergerhards1/external-plugins

• The complete interface specification can be found
right inside the source repository:
https://github.com/rsyslog/rsyslog/blob/master/plugins/external/INTERFACE.md

• Check out the copy-templates
▫ Available for an increasing number of languages
▫ More advanced interface handling
▫ Ready to be copied
▫ https://github.com/rsyslog/rsyslog/tree/master/plugins/external
Questions?
rgerhards@adiscon.com
www.rsyslog.com
https://github.com/rsyslog

Please fill in the feedback questionnaire:
http://devconf.cz/f/107

Weitere ähnliche Inhalte

Was ist angesagt?

HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
hotrannam
 

Was ist angesagt? (20)

Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
 
Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?
 
LogStash in action
LogStash in actionLogStash in action
LogStash in action
 
Large Scale Log collection using LogStash & mongoDB
Large Scale Log collection using LogStash & mongoDB Large Scale Log collection using LogStash & mongoDB
Large Scale Log collection using LogStash & mongoDB
 
Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with Elasticsearch
 
Logstash
LogstashLogstash
Logstash
 
Monitoramento com ELK - Elasticsearch - Logstash - Kibana
Monitoramento com ELK - Elasticsearch - Logstash - KibanaMonitoramento com ELK - Elasticsearch - Logstash - Kibana
Monitoramento com ELK - Elasticsearch - Logstash - Kibana
 
Mobile Analytics mit Elasticsearch und Kibana
Mobile Analytics mit Elasticsearch und KibanaMobile Analytics mit Elasticsearch und Kibana
Mobile Analytics mit Elasticsearch und Kibana
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 
Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016Logging logs with Logstash - Devops MK 10-02-2016
Logging logs with Logstash - Devops MK 10-02-2016
 
Fluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log ManagementFluentd vs. Logstash for OpenStack Log Management
Fluentd vs. Logstash for OpenStack Log Management
 
Journée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et Kibana
Journée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et KibanaJournée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et Kibana
Journée DevOps : Des dashboards pour tous avec ElasticSearch, Logstash et Kibana
 
Logmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELKLogmanagement with Icinga2 and ELK
Logmanagement with Icinga2 and ELK
 
Logstash family introduction
Logstash family introductionLogstash family introduction
Logstash family introduction
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
 
Node.js
Node.jsNode.js
Node.js
 
RESTEasy Reactive: Why should you care? | DevNation Tech Talk
RESTEasy Reactive: Why should you care? | DevNation Tech TalkRESTEasy Reactive: Why should you care? | DevNation Tech Talk
RESTEasy Reactive: Why should you care? | DevNation Tech Talk
 
Tuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for LogsTuning Elasticsearch Indexing Pipeline for Logs
Tuning Elasticsearch Indexing Pipeline for Logs
 
Machine Learning in a Twitter ETL using ELK
Machine Learning in a Twitter ETL using ELK Machine Learning in a Twitter ETL using ELK
Machine Learning in a Twitter ETL using ELK
 

Ähnlich wie Fedora Developer's Conference 2014 Talk

A Kernel of Truth: Intrusion Detection and Attestation with eBPF
A Kernel of Truth: Intrusion Detection and Attestation with eBPFA Kernel of Truth: Intrusion Detection and Attestation with eBPF
A Kernel of Truth: Intrusion Detection and Attestation with eBPF
oholiab
 
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon
 

Ähnlich wie Fedora Developer's Conference 2014 Talk (20)

RSYSLOG v8 improvements and how to write plugins in any language.
RSYSLOG v8 improvements and how to write plugins in any language.RSYSLOG v8 improvements and how to write plugins in any language.
RSYSLOG v8 improvements and how to write plugins in any language.
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logs
 
Engage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-RedEngage 2019: Introduction to Node-Red
Engage 2019: Introduction to Node-Red
 
Don’t turn your logs into cuneiform
Don’t turn your logs into cuneiformDon’t turn your logs into cuneiform
Don’t turn your logs into cuneiform
 
Monitoring.pptx
Monitoring.pptxMonitoring.pptx
Monitoring.pptx
 
A Kernel of Truth: Intrusion Detection and Attestation with eBPF
A Kernel of Truth: Intrusion Detection and Attestation with eBPFA Kernel of Truth: Intrusion Detection and Attestation with eBPF
A Kernel of Truth: Intrusion Detection and Attestation with eBPF
 
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
DevSecCon London 2019: A Kernel of Truth: Intrusion Detection and Attestation...
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Configuring Syslog by Octavio
Configuring Syslog by OctavioConfiguring Syslog by Octavio
Configuring Syslog by Octavio
 
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
BSides LV 2016 - Beyond the tip of the iceberg - fuzzing binary protocols for...
 
Logging, Serilog, Structured Logging, Seq
Logging, Serilog, Structured Logging, SeqLogging, Serilog, Structured Logging, Seq
Logging, Serilog, Structured Logging, Seq
 
Nginx conf.compressed
Nginx conf.compressedNginx conf.compressed
Nginx conf.compressed
 
GrayLog for Java developers FOSDEM 2018
GrayLog for Java developers FOSDEM 2018GrayLog for Java developers FOSDEM 2018
GrayLog for Java developers FOSDEM 2018
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Turbo charge your logs
Turbo charge your logsTurbo charge your logs
Turbo charge your logs
 
Application Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.keyApplication Logging in the 21st century - 2014.key
Application Logging in the 21st century - 2014.key
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and Tuning
 
Elk presentation 2#3
Elk presentation 2#3Elk presentation 2#3
Elk presentation 2#3
 
Syslog.pptx
Syslog.pptxSyslog.pptx
Syslog.pptx
 
rspamd-slides
rspamd-slidesrspamd-slides
rspamd-slides
 

Mehr von Rainer Gerhards

Mehr von Rainer Gerhards (7)

Sicherheit im Internet - Wie kann man sich schützen?
Sicherheit im Internet - Wie kann man sich schützen?Sicherheit im Internet - Wie kann man sich schützen?
Sicherheit im Internet - Wie kann man sich schützen?
 
Rsyslog version naming (v8.6.0+)
Rsyslog version naming (v8.6.0+)Rsyslog version naming (v8.6.0+)
Rsyslog version naming (v8.6.0+)
 
Wetterbeobachtung - Ein Vortrag für die Grundschule
Wetterbeobachtung - Ein Vortrag für die GrundschuleWetterbeobachtung - Ein Vortrag für die Grundschule
Wetterbeobachtung - Ein Vortrag für die Grundschule
 
CEE Log Integrity and the "Counterpane Paper"
CEE Log Integrity and the "Counterpane Paper"CEE Log Integrity and the "Counterpane Paper"
CEE Log Integrity and the "Counterpane Paper"
 
State of syslog (2005)
State of syslog (2005)State of syslog (2005)
State of syslog (2005)
 
Status of syslog as of 2005
Status of syslog as of 2005Status of syslog as of 2005
Status of syslog as of 2005
 
LogFile Auswertung (log analysis)
LogFile Auswertung (log analysis)LogFile Auswertung (log analysis)
LogFile Auswertung (log analysis)
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Fedora Developer's Conference 2014 Talk

  • 1. RSYSLOG update v7 and beyond Rainer Gerhards
  • 2. What's in this talk? • • • • Security improvements in v7 A quick word on Journal integration v8 engine improvements Writing plugins in languages other than C • I will probably “run out of time” - but that's fine, the slides at the end are optional.
  • 3. The rsyslog doc project • The doc just sucks... • Spawned a new project to create better one: https://github.com/rsyslog/rsyslog-doc • Lead by James Boylan (a sysadmin) • Please help ▫ Complain ;-) ▫ open issues ▫ Write some doc... • We are especially interested to learn what is hard for beginners!
  • 4. Rainer Gerhards New security features in rsyslog v7
  • 5. Remeber, in pre-v7 we have • TLS-encrypted syslog transport ▫ RFC5425 ▫ Mutual authentication • Trusted properties ▫ Take log message origin based on SCM_CREDENTIALS
  • 6. Signed Log Records • Introduced in v7.4 • Protects log files on machine • Generic approach by introducing a signature provider interface • Currently provider for “Keyless Signature Infrastructure” (KSI) • Hash chain for log record is created
  • 7. Signing via Hash Chains... Source: http://en.wikipedia.org/wiki/File:Hashlink_timestamping.svg • Very rough sample (actually Merkle trees!) • No local secret! • Consider “chain layer” to be operated on a schedule (timer ticks!) by external entity
  • 8. Where did we add Signatures? Inputs Outputs /dev/log Network (e.g.TCP) files file Parsers Rules & Filters Formatter Database Remote system
  • 9. File Signature Interface in Detail omfile File Stream Class Log File Both files together are the “signed log” SigProv Interface GuardTime SigProv Sig File (TLV) Generic interface providing future extensibility Enables Distros to pack Functionality w/o increasing base system size
  • 10. Activating Log Signing action(type="omfile" file="/var/log/logfile" sig.provider="gt" sig.keepTreeHashes="on" sig.keepRecordHashes="on") • Parameters except sig.provider are optional • Writes ▫ regular log file ▫ plus signature file (*.gtsig)
  • 11. Signing log records in flight • Best practice is to use TLS with mutual authentication so that the log source can be trusted • no good and practical solution for signatures inside the log record • Experimental module rfc5424addhmac provides HMAC within RFC5424 strucutured data
  • 12. Log File Encryption • Generic approach by introducing a crypto-provider interface • Currently available a libgcrypt-based crypto provider • Symmetric cryptography, all ciphers & modes supported by libgcrypt • Key can come from ▫ Config param (testing only, pls!) ▫ File ▫ Script (interface for advanced key exchange options)
  • 13. Activating Log Encryption action(type="omfile" file="/var/log/logfile"        cry.provider="gcry"        cry.keyprogram=”/path/to/binary”) • Addtl Parameters for ciphers, etc... • Writes ▫ regular log file, encrypted ▫ plus encryption info file (*.encinfo) • Works in conjunction with signatures
  • 14. Encrypted Disk Queues action(type="omfwd" target="172.123.123.5 Port="10514″ queue.type="disk" queue.fileName="enc" queue.cry.provider="gcry"     queue.cry.keyprogram="binary" ) • Starting with v7.5, disk queue files can also be encrypted • Uses same crypto provider as log files • Can be specififed on a per-queue basis
  • 15. Log File Anonymization • Permits to anonymize IP addresses ▫ Zero-out (based on netmask) ▫ Replace with char ▫ Based on hard German data protection laws • Currently for IPv4 • Implemented via the action interface ▫ Can be applied conditionally ▫ Permits access to original message if desired ▫ No access possible after anonymizer is run
  • 16. RELP security enhancements • RELP is used to reliably forward messages • Can now be secured like TCP syslog ▫ TLS ▫ Mutual authentication via various authentication modes • Implemented at the librelp level ▫ So this is available to other apps as well
  • 18. Integration Modules • Module imjournal ▫ Provides ability to pull messages off the journal, just as another event source ▫ Gets into trouble if journal DB is unclean ▫ We currently recommend to use only when absolutely required • Module omjournal ▫ stores messages into the journal ▫ Permits to integrate e.g. router messages – especially in SOHO environment
  • 19. Integrating syslog Data into the journal (SOHO env) /* first, we make sure all necessary modules are present: */ module(load="imudp") # input module for UDP syslog module(load="omjournal") # output module for journal /* then, define the actual server that listens to the * router. Note that 514 is the default port for UDP syslog. */ input(type="imudp" port="514" ruleset="writeToJournal") /* inside that ruleset, we just write data to the journal: */ ruleset(name="writeToJournal") { action(type="omjournal") }
  • 20. Writing RSYSLOG error messages to journal • New feature in 7.4.10 and above • Permits to write rsyslog error messages directly to journal • We hope that this will finally help make user notice them, e.g. via $ systemctl status rsyslog global(    ProcessInternalMessages = "off" )
  • 22. The v7 rule engine Queue worker rsyslog core Queue worker queue Single-thread compartment Action instance Queue worker Filter processing  Message formatting  Actual output action, like sending msg  Kept simple & single threaded  Works well with fast actions  Has problems with slow ones, e.g. via HTTP (like Elasticsearch) 
  • 23. The v8 rule engine Queue worker queue Queue worker Action wrkr inst. Queue worker rsyslog core Action wrkr inst. Action wrkr inst. Now multiple instances per action!  Queue worker pool automatically scales outbound connection count by spawning more worker instances  Works well with Elasticsearch etc.  Inherently serial outputs (e.g. local files!) must serialize themselves 
  • 24. Rainer Gerhards Writing external output plugins for RSysLog IN 2 MINUTES
  • 25. Write the plugin itself • Choose any language you like • Implement the pseudocode below ▫ ▫ ▫ ▫ Messages arrive via stdin, one message per line Read from stdin until EOF Process each message read as you like Terminate when EOF is reached • That's it! While not EOF(stdin) do {     Read msg from stdin     Process msg }
  • 26. Make RsysLog call plugin • Regular filtering applies (as with any action) • You can specify message format via a template • Use omprog for the call module(load=”omprog”) # needed only once in config! if $rawmsg contains “sometrigger” then    action(type=”omprog”           binary=”/path/to/your/plugin”)
  • 27. Optional: debugging your plugin • If something doesn't work, it's best to debug outside of rsyslog • Do this as you usually debug your programs (e.g. use your favorite debugger!) • For example, do $ echo “testmessage” | /path/to/your/plugin • Questions about the plugin interface or plugin integration? Visit http://kb.monitorware.com/external-plugins-f53.html
  • 28. Want to know more details? • There is an additional presentation available at http://www.slideshare.net/rainergerhards1/external-plugins • The complete interface specification can be found right inside the source repository: https://github.com/rsyslog/rsyslog/blob/master/plugins/external/INTERFACE.md • Check out the copy-templates ▫ Available for an increasing number of languages ▫ More advanced interface handling ▫ Ready to be copied ▫ https://github.com/rsyslog/rsyslog/tree/master/plugins/external