angoca / log4db2

A logging utility like log4j for IBM Db2 SQL PL
https://angoca.github.io/log4db2/
BSD 2-Clause "Simplified" License
7 stars 2 forks source link

Encrypt the content with specific appender #59

Open angoca opened 10 years ago

angoca commented 10 years ago

Encrypt appender To encrypt the data with DB2 functions. http://pic.dhe.ibm.com/infocenter/db2luw/v10r5/topic/com.ibm.db2.luw.sql.ref.doc/doc/r0004211.html

The Key could be in the configuration (security risk) Or it could be part of the message to log messageLogged:

"${myPassword}$This is the message to encrypt"

Message after layout

"[level] logger ${myPassword}$This is the message to encrypt"

The appender will take out the password and the rest of the message, and then encrypt the whole message with the password provided. If the message does not include a password, it will be retrieved from the configuration. Message to encrypt:

"[level] logger This is the message to encrypt"
angoca commented 10 years ago

An article about this: http://www.ibm.com/developerworks/data/library/techarticle/benfield/0108benfield.html