[
https://issues.apache.org/jira/browse/CAMEL-10885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937929#comment-15937929
]
ASF GitHub Bot commented on CAMEL-10885:
----------------------------------------
GitHub user igarashitm opened a pull request:
https://github.com/apache/camel/pull/1561
CAMEL-10885 Add mask option to log EIP
Introduced a StringFormatter interface to plugin a formatter into the Log
EIP processor. MaskingStringFormatter is the implementation which masks
sensitive information like password and passphrase for key=value, XML and JSON.
Like Log Component looks for a ExchangeFormatter with the name
"logFormatter" in registry to be used for a default formatter, LogDefinition
looks for a "logEipFormatter" for the default formatter. It can be overridden
by specifying formatterRef option in Log DSL. It also introduced a series of
logWithFormatter()/logWithFormatterRef() to be used in Java DSL.
Any feedback would be really appreciated. As those addition of the methods
doesn't look really cool, that would be great if you could have better idea...
In the meantime, as it seems there's no log-eip.adoc in the
src/main/docs/eips yet, I'll look into how it could be generated and add more
commit here once it succeeds.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/igarashitm/camel CAMEL-10885
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1561.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1561
----
commit 128a80dc56b5f190385b688cf7f049f2630fb528
Author: Tomohisa Igarashi <[email protected]>
Date: 2017-03-17T08:18:13Z
CAMEL-10885 Add mask option to log EIP
Introduced a StringFormatter interface to plugin a formatter into the Log
EIP processor. MaskingStringFormatter is the implementation which masks
sensitive information like password and passphrase for key=value, XML and JSON.
----
> Add mask option to log EIP
> --------------------------
>
> Key: CAMEL-10885
> URL: https://issues.apache.org/jira/browse/CAMEL-10885
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Reporter: Claus Ibsen
> Assignee: Tomohisa Igarashi
> Priority: Minor
>
> See nabble
> http://camel.465427.n5.nabble.com/Mask-password-using-log-component-tp5794301.html
> We can add a mask option to the Log EIP. It would then take the toString to
> be logged, and then run a series of reg exp to search/replace sensitive
> information such as password and passphrase.
> We need to do this for key=value, xml and json format. So it kinda works on
> most common formats.
> We can then add this in the docs that this is what it can do, so users can
> use it as-is or not. Only if they have very special cases they would then
> need to write their own mask method and call as a bean from the log message.
> We can also add such functionality to the log component itself, eg <to
> uri="log:xxx">.
> So they reuse the same masking algorithm.
> See UriSupport which have masking for uris with key=value
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)