[asterisk-dev] Asterisk Logger find-replace in log messages
info at asteriskite.com
info at asteriskite.com
Tue Jan 17 15:00:14 CST 2017
Greetings! I would like to patch Asterisk Logger facility to include
the following features.
1. Main purpose is to be able to find and replace sensitive
information, such as Customer ID, PIN, Credit Card Information etc.
Thus sensitive data in clear text can be removed prior to writing to
syslog or console, rather than triggering via a logger rotate or cron
job with say, sed or awk etc.
2. Create a file named, say, sanitize.conf in /etc/asterisk
3. Make changes to main/logger.c
4. re issue 'make install'
5. start asterisk with root cli verbosity desired
6. Syslog and console should reflect the find-replace as defined in
sanitize.conf
Attached
1. Sample dialplan
2. Sample sanitize.conf
3. changed main/logger.c - changes are marked by comment with word SANITIZE
Right now, unable to issue commands in *CLI> like 'reload', 'logger
rotate', 'logger reload'.
It crashes with below output:
Asterisk Ready.
*CLI> logger reload
/var/log/asterisk/sanitizeconf.log Logfile1 PHPAGI_ARGS_REPLACED_
0 (null)
0x2ad5bc0 Logfile pointer[2017-01-17 20:52:53] == Parsing
'/etc/asterisk/logger.conf': Found
[2017-01-17 20:52:53] == Parsing '/etc/asterisk/sanitize.conf': Found
Hoping that experts here may find this a useful feature request! And
also, help me with pointers how to proceed.
Regards,
RMD
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dialplan-sample-entry.conf
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20170118/4ceebb9b/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sanitize.conf
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20170118/4ceebb9b/attachment-0003.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: logger.c
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20170118/4ceebb9b/attachment-0001.c>
More information about the asterisk-dev
mailing list