You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Saibabu Vallurupalli <sa...@gmail.com> on 2014/01/21 22:29:29 UTC

software does not neutralize output that is logged

Hi,

I am working on an issue related to logging. I our application we are using
log4j for logging and we detected our software doesn't neutralize out
properly. Now, Is there any way without modifying the entire source by
going through each and every class we can achieve this functionality of
inspecting the message getting logged and take appropriate action.

We appreciate your support.

Thank you,
Sai

Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
Thank you.


On Thu, Jan 23, 2014 at 1:24 AM, Benedikt Ritter <br...@apache.org> wrote:

> You can use themail archives:
> http://mail-archives.apache.org/mod_mbox/logging-log4j-user/
>
>
> 2014/1/22 Saibabu Vallurupalli <sa...@gmail.com>
>
>>  Hi Team,
>>
>> I need to attach this conversation to my JIRA ticket and I am using my
>> GMail here. Is there any URL I can generate out of this discussion to reuse
>> or refer to. Sorry, This is a forum administration question :-(
>>
>> Thank you,
>> Sai
>>
>>
>> On Wed, Jan 22, 2014 at 5:43 AM, Saibabu Vallurupalli <
>> saibabu.vallurupalli@gmail.com> wrote:
>>
>>>    Ralph,
>>> Good morning.
>>>
>>> This is really helpful.
>>>
>>> Thanks so much.
>>>
>>> Regards,
>>> Sai
>>>
>>>
>>> On Wed, Jan 22, 2014 at 12:41 AM, Ralph Goers <
>>> ralph.goers@dslextreme.com> wrote:
>>>
>>>>  Yes.
>>>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
>>>>  uses
>>>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/log4j-rewrite.xml which
>>>> uses a MapRewritePolicy.  You would replace that with your own
>>>> RewritePolicy.
>>>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/TestRewritePolicy.java shows
>>>> a sample RewritePolicy.  Basically you just create a new LogEvent copying
>>>> data from the input LogEvent modifying that data as needed.
>>>>
>>>> Ralph
>>>>
>>>> On Jan 21, 2014, at 3:38 PM, Saibabu Vallurupalli <
>>>> saibabu.vallurupalli@gmail.com> wrote:
>>>>
>>>>   Hi Scott and Team:
>>>>
>>>> I tried to research on the internet on how to use this functionality
>>>> but very limited information. Do we have a Unit test case showing this
>>>> scenario in the source code? Or any reference implementation will be really
>>>> helpful to refer and try in my Application.
>>>>
>>>> Please advise.
>>>>
>>>> Thank you,
>>>> Sai
>>>>
>>>>
>>>> On Tue, Jan 21, 2014 at 5:57 PM, Scott Deboy <sc...@gmail.com>wrote:
>>>>
>>>>> This mechanism is also available in log4j 1.2:
>>>>>
>>>>>
>>>>> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
>>>>>
>>>>>
>>>>> On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
>>>>> > See
>>>>> >
>>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
>>>>> >
>>>>> > On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com>
>>>>> wrote:
>>>>> >> First of all Thanks so much for you all for the quickest response
>>>>> for
>>>>> >> this
>>>>> >> posting. I am thinking of writing a wrapper class and update the
>>>>> source,
>>>>> >> but we have about 2400 Java classes in the application which needs
>>>>> to be
>>>>> >> updated and are using log4j logger. I am trying to explore the
>>>>> option to
>>>>> >> avoid modifying all these classes with some kind of ingestion. Any
>>>>> >> suggestions around will be greatly appreciated.
>>>>> >>
>>>>> >> Thank you,
>>>>> >> Sai
>>>>> >>
>>>>> >>
>>>>> >>
>>>>> >> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <
>>>>> pbenedict@apache.org>
>>>>> >> wrote:
>>>>> >>
>>>>> >>> This is not an unusual requirement. I've been at a company that
>>>>> tries to
>>>>> >>> scrub log files from certain patterns (like SSN #s). Can that be
>>>>> done in
>>>>> >>> log4j? I don't know. It would be interesting to know if 2.0 had
>>>>> some
>>>>> >>> sort
>>>>> >>> of filtering capability. Remko? Gary? Ralph?
>>>>> >>>
>>>>> >>>
>>>>> >>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
>>>>> >>> saibabu.vallurupalli@gmail.com> wrote:
>>>>> >>>
>>>>> >>>> So, we wanted to inspect the message which is getting logged out
>>>>> to
>>>>> >>>> avoid
>>>>> >>>> possible security issues. So, what exactly I am looking is If I
>>>>> wanted
>>>>> >>>> to
>>>>> >>>> add a restriction on whats been logged. How can I achieve this?
>>>>> >>>>
>>>>> >>>> For example: log.info("user name"+username+"Password"+password);
>>>>> //
>>>>> >>>> This
>>>>> >>>> is just an example if I see a message having password do not log
>>>>> it or
>>>>> >>>> take
>>>>> >>>> some action.
>>>>> >>>>
>>>>> >>>> Please advise.
>>>>> >>>>
>>>>> >>>> Thank you,
>>>>> >>>> Sai
>>>>> >>>>
>>>>> >>>>
>>>>> >>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
>>>>> >>>> <re...@gmail.com>wrote:
>>>>> >>>>
>>>>> >>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>>>> >>>>> What is currently happening and what would you like to happen
>>>>> instead?
>>>>> >>>>>
>>>>> >>>>> Sent from my iPhone
>>>>> >>>>>
>>>>> >>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>>>> >>>>> saibabu.vallurupalli@gmail.com> wrote:
>>>>> >>>>> >
>>>>> >>>>> > Hi,
>>>>> >>>>> >
>>>>> >>>>> > I am working on an issue related to logging. I our application
>>>>> we
>>>>> >>>>> > are
>>>>> >>>>> using log4j for logging and we detected our software doesn't
>>>>> >>>>> neutralize
>>>>> >>>>> out
>>>>> >>>>> properly. Now, Is there any way without modifying the entire
>>>>> source by
>>>>> >>>>> going through each and every class we can achieve this
>>>>> functionality
>>>>> >>>>> of
>>>>> >>>>> inspecting the message getting logged and take appropriate
>>>>> action.
>>>>> >>>>> >
>>>>> >>>>> > We appreciate your support.
>>>>> >>>>> >
>>>>> >>>>> > Thank you,
>>>>> >>>>> > Sai
>>>>> >>>>> >
>>>>> >>>>>
>>>>> >>>>>
>>>>> ---------------------------------------------------------------------
>>>>> >>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>>> >>>>> For additional commands, e-mail:
>>>>> log4j-dev-help@logging.apache.org
>>>>> >>>>>
>>>>> >>>>>
>>>>> >>>>
>>>>> >>>
>>>>> >>>
>>>>> >>> --
>>>>> >>> Cheers,
>>>>> >>> Paul
>>>>> >>>
>>>>> >>
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>
>>
>
>
> --
> http://people.apache.org/~britter/
> http://www.systemoutprintln.de/
> http://twitter.com/BenediktRitter
> http://github.com/britter
>

Re: software does not neutralize output that is logged

Posted by Benedikt Ritter <br...@apache.org>.
You can use themail archives:
http://mail-archives.apache.org/mod_mbox/logging-log4j-user/

2014/1/22 Saibabu Vallurupalli <sa...@gmail.com>

>  Hi Team,
>
> I need to attach this conversation to my JIRA ticket and I am using my
> GMail here. Is there any URL I can generate out of this discussion to reuse
> or refer to. Sorry, This is a forum administration question :-(
>
> Thank you,
> Sai
>
>
> On Wed, Jan 22, 2014 at 5:43 AM, Saibabu Vallurupalli <
> saibabu.vallurupalli@gmail.com> wrote:
>
>>    Ralph,
>> Good morning.
>>
>> This is really helpful.
>>
>> Thanks so much.
>>
>> Regards,
>> Sai
>>
>>
>> On Wed, Jan 22, 2014 at 12:41 AM, Ralph Goers <ralph.goers@dslextreme.com
>> > wrote:
>>
>>>  Yes.
>>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
>>>  uses
>>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/log4j-rewrite.xml which
>>> uses a MapRewritePolicy.  You would replace that with your own
>>> RewritePolicy.
>>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/TestRewritePolicy.java shows
>>> a sample RewritePolicy.  Basically you just create a new LogEvent copying
>>> data from the input LogEvent modifying that data as needed.
>>>
>>> Ralph
>>>
>>> On Jan 21, 2014, at 3:38 PM, Saibabu Vallurupalli <
>>> saibabu.vallurupalli@gmail.com> wrote:
>>>
>>>   Hi Scott and Team:
>>>
>>> I tried to research on the internet on how to use this functionality but
>>> very limited information. Do we have a Unit test case showing this scenario
>>> in the source code? Or any reference implementation will be really helpful
>>> to refer and try in my Application.
>>>
>>> Please advise.
>>>
>>> Thank you,
>>> Sai
>>>
>>>
>>> On Tue, Jan 21, 2014 at 5:57 PM, Scott Deboy <sc...@gmail.com>wrote:
>>>
>>>> This mechanism is also available in log4j 1.2:
>>>>
>>>>
>>>> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
>>>>
>>>>
>>>> On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
>>>> > See
>>>> >
>>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
>>>> >
>>>> > On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com>
>>>> wrote:
>>>> >> First of all Thanks so much for you all for the quickest response for
>>>> >> this
>>>> >> posting. I am thinking of writing a wrapper class and update the
>>>> source,
>>>> >> but we have about 2400 Java classes in the application which needs
>>>> to be
>>>> >> updated and are using log4j logger. I am trying to explore the
>>>> option to
>>>> >> avoid modifying all these classes with some kind of ingestion. Any
>>>> >> suggestions around will be greatly appreciated.
>>>> >>
>>>> >> Thank you,
>>>> >> Sai
>>>> >>
>>>> >>
>>>> >>
>>>> >> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pbenedict@apache.org
>>>> >
>>>> >> wrote:
>>>> >>
>>>> >>> This is not an unusual requirement. I've been at a company that
>>>> tries to
>>>> >>> scrub log files from certain patterns (like SSN #s). Can that be
>>>> done in
>>>> >>> log4j? I don't know. It would be interesting to know if 2.0 had some
>>>> >>> sort
>>>> >>> of filtering capability. Remko? Gary? Ralph?
>>>> >>>
>>>> >>>
>>>> >>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
>>>> >>> saibabu.vallurupalli@gmail.com> wrote:
>>>> >>>
>>>> >>>> So, we wanted to inspect the message which is getting logged out to
>>>> >>>> avoid
>>>> >>>> possible security issues. So, what exactly I am looking is If I
>>>> wanted
>>>> >>>> to
>>>> >>>> add a restriction on whats been logged. How can I achieve this?
>>>> >>>>
>>>> >>>> For example: log.info("user name"+username+"Password"+password);
>>>> //
>>>> >>>> This
>>>> >>>> is just an example if I see a message having password do not log
>>>> it or
>>>> >>>> take
>>>> >>>> some action.
>>>> >>>>
>>>> >>>> Please advise.
>>>> >>>>
>>>> >>>> Thank you,
>>>> >>>> Sai
>>>> >>>>
>>>> >>>>
>>>> >>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
>>>> >>>> <re...@gmail.com>wrote:
>>>> >>>>
>>>> >>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>>> >>>>> What is currently happening and what would you like to happen
>>>> instead?
>>>> >>>>>
>>>> >>>>> Sent from my iPhone
>>>> >>>>>
>>>> >>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>>> >>>>> saibabu.vallurupalli@gmail.com> wrote:
>>>> >>>>> >
>>>> >>>>> > Hi,
>>>> >>>>> >
>>>> >>>>> > I am working on an issue related to logging. I our application
>>>> we
>>>> >>>>> > are
>>>> >>>>> using log4j for logging and we detected our software doesn't
>>>> >>>>> neutralize
>>>> >>>>> out
>>>> >>>>> properly. Now, Is there any way without modifying the entire
>>>> source by
>>>> >>>>> going through each and every class we can achieve this
>>>> functionality
>>>> >>>>> of
>>>> >>>>> inspecting the message getting logged and take appropriate action.
>>>> >>>>> >
>>>> >>>>> > We appreciate your support.
>>>> >>>>> >
>>>> >>>>> > Thank you,
>>>> >>>>> > Sai
>>>> >>>>> >
>>>> >>>>>
>>>> >>>>>
>>>> ---------------------------------------------------------------------
>>>> >>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>> >>>>> For additional commands, e-mail:
>>>> log4j-dev-help@logging.apache.org
>>>> >>>>>
>>>> >>>>>
>>>> >>>>
>>>> >>>
>>>> >>>
>>>> >>> --
>>>> >>> Cheers,
>>>> >>> Paul
>>>> >>>
>>>> >>
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>>
>>>>
>>>
>>>
>>
>


-- 
http://people.apache.org/~britter/
http://www.systemoutprintln.de/
http://twitter.com/BenediktRitter
http://github.com/britter

Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
Hi Team,

I need to attach this conversation to my JIRA ticket and I am using my
GMail here. Is there any URL I can generate out of this discussion to reuse
or refer to. Sorry, This is a forum administration question :-(

Thank you,
Sai


On Wed, Jan 22, 2014 at 5:43 AM, Saibabu Vallurupalli <
saibabu.vallurupalli@gmail.com> wrote:

> Ralph,
> Good morning.
>
> This is really helpful.
>
> Thanks so much.
>
> Regards,
> Sai
>
>
> On Wed, Jan 22, 2014 at 12:41 AM, Ralph Goers <ra...@dslextreme.com>wrote:
>
>> Yes.
>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
>>  uses
>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/log4j-rewrite.xml which
>> uses a MapRewritePolicy.  You would replace that with your own
>> RewritePolicy.
>> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/TestRewritePolicy.java shows
>> a sample RewritePolicy.  Basically you just create a new LogEvent copying
>> data from the input LogEvent modifying that data as needed.
>>
>> Ralph
>>
>> On Jan 21, 2014, at 3:38 PM, Saibabu Vallurupalli <
>> saibabu.vallurupalli@gmail.com> wrote:
>>
>> Hi Scott and Team:
>>
>> I tried to research on the internet on how to use this functionality but
>> very limited information. Do we have a Unit test case showing this scenario
>> in the source code? Or any reference implementation will be really helpful
>> to refer and try in my Application.
>>
>> Please advise.
>>
>> Thank you,
>> Sai
>>
>>
>> On Tue, Jan 21, 2014 at 5:57 PM, Scott Deboy <sc...@gmail.com>wrote:
>>
>>> This mechanism is also available in log4j 1.2:
>>>
>>>
>>> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
>>>
>>>
>>> On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
>>> > See
>>> >
>>> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
>>> >
>>> > On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com>
>>> wrote:
>>> >> First of all Thanks so much for you all for the quickest response for
>>> >> this
>>> >> posting. I am thinking of writing a wrapper class and update the
>>> source,
>>> >> but we have about 2400 Java classes in the application which needs to
>>> be
>>> >> updated and are using log4j logger. I am trying to explore the option
>>> to
>>> >> avoid modifying all these classes with some kind of ingestion. Any
>>> >> suggestions around will be greatly appreciated.
>>> >>
>>> >> Thank you,
>>> >> Sai
>>> >>
>>> >>
>>> >>
>>> >> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
>>> >> wrote:
>>> >>
>>> >>> This is not an unusual requirement. I've been at a company that
>>> tries to
>>> >>> scrub log files from certain patterns (like SSN #s). Can that be
>>> done in
>>> >>> log4j? I don't know. It would be interesting to know if 2.0 had some
>>> >>> sort
>>> >>> of filtering capability. Remko? Gary? Ralph?
>>> >>>
>>> >>>
>>> >>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
>>> >>> saibabu.vallurupalli@gmail.com> wrote:
>>> >>>
>>> >>>> So, we wanted to inspect the message which is getting logged out to
>>> >>>> avoid
>>> >>>> possible security issues. So, what exactly I am looking is If I
>>> wanted
>>> >>>> to
>>> >>>> add a restriction on whats been logged. How can I achieve this?
>>> >>>>
>>> >>>> For example: log.info("user name"+username+"Password"+password); //
>>> >>>> This
>>> >>>> is just an example if I see a message having password do not log it
>>> or
>>> >>>> take
>>> >>>> some action.
>>> >>>>
>>> >>>> Please advise.
>>> >>>>
>>> >>>> Thank you,
>>> >>>> Sai
>>> >>>>
>>> >>>>
>>> >>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
>>> >>>> <re...@gmail.com>wrote:
>>> >>>>
>>> >>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>> >>>>> What is currently happening and what would you like to happen
>>> instead?
>>> >>>>>
>>> >>>>> Sent from my iPhone
>>> >>>>>
>>> >>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>> >>>>> saibabu.vallurupalli@gmail.com> wrote:
>>> >>>>> >
>>> >>>>> > Hi,
>>> >>>>> >
>>> >>>>> > I am working on an issue related to logging. I our application we
>>> >>>>> > are
>>> >>>>> using log4j for logging and we detected our software doesn't
>>> >>>>> neutralize
>>> >>>>> out
>>> >>>>> properly. Now, Is there any way without modifying the entire
>>> source by
>>> >>>>> going through each and every class we can achieve this
>>> functionality
>>> >>>>> of
>>> >>>>> inspecting the message getting logged and take appropriate action.
>>> >>>>> >
>>> >>>>> > We appreciate your support.
>>> >>>>> >
>>> >>>>> > Thank you,
>>> >>>>> > Sai
>>> >>>>> >
>>> >>>>>
>>> >>>>>
>>> ---------------------------------------------------------------------
>>> >>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> >>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>> >>>>>
>>> >>>>>
>>> >>>>
>>> >>>
>>> >>>
>>> >>> --
>>> >>> Cheers,
>>> >>> Paul
>>> >>>
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>
>>>
>>
>>
>

Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
Ralph,
Good morning.

This is really helpful.

Thanks so much.

Regards,
Sai


On Wed, Jan 22, 2014 at 12:41 AM, Ralph Goers <ra...@dslextreme.com>wrote:

> Yes.
> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java
>  uses
> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/log4j-rewrite.xml which
> uses a MapRewritePolicy.  You would replace that with your own
> RewritePolicy.
> https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/TestRewritePolicy.java shows
> a sample RewritePolicy.  Basically you just create a new LogEvent copying
> data from the input LogEvent modifying that data as needed.
>
> Ralph
>
> On Jan 21, 2014, at 3:38 PM, Saibabu Vallurupalli <
> saibabu.vallurupalli@gmail.com> wrote:
>
> Hi Scott and Team:
>
> I tried to research on the internet on how to use this functionality but
> very limited information. Do we have a Unit test case showing this scenario
> in the source code? Or any reference implementation will be really helpful
> to refer and try in my Application.
>
> Please advise.
>
> Thank you,
> Sai
>
>
> On Tue, Jan 21, 2014 at 5:57 PM, Scott Deboy <sc...@gmail.com>wrote:
>
>> This mechanism is also available in log4j 1.2:
>>
>>
>> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
>>
>>
>> On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
>> > See
>> >
>> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
>> >
>> > On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com>
>> wrote:
>> >> First of all Thanks so much for you all for the quickest response for
>> >> this
>> >> posting. I am thinking of writing a wrapper class and update the
>> source,
>> >> but we have about 2400 Java classes in the application which needs to
>> be
>> >> updated and are using log4j logger. I am trying to explore the option
>> to
>> >> avoid modifying all these classes with some kind of ingestion. Any
>> >> suggestions around will be greatly appreciated.
>> >>
>> >> Thank you,
>> >> Sai
>> >>
>> >>
>> >>
>> >> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
>> >> wrote:
>> >>
>> >>> This is not an unusual requirement. I've been at a company that tries
>> to
>> >>> scrub log files from certain patterns (like SSN #s). Can that be done
>> in
>> >>> log4j? I don't know. It would be interesting to know if 2.0 had some
>> >>> sort
>> >>> of filtering capability. Remko? Gary? Ralph?
>> >>>
>> >>>
>> >>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
>> >>> saibabu.vallurupalli@gmail.com> wrote:
>> >>>
>> >>>> So, we wanted to inspect the message which is getting logged out to
>> >>>> avoid
>> >>>> possible security issues. So, what exactly I am looking is If I
>> wanted
>> >>>> to
>> >>>> add a restriction on whats been logged. How can I achieve this?
>> >>>>
>> >>>> For example: log.info("user name"+username+"Password"+password); //
>> >>>> This
>> >>>> is just an example if I see a message having password do not log it
>> or
>> >>>> take
>> >>>> some action.
>> >>>>
>> >>>> Please advise.
>> >>>>
>> >>>> Thank you,
>> >>>> Sai
>> >>>>
>> >>>>
>> >>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
>> >>>> <re...@gmail.com>wrote:
>> >>>>
>> >>>>> Sorry, but I have no idea what you mean by "neutralize out".
>> >>>>> What is currently happening and what would you like to happen
>> instead?
>> >>>>>
>> >>>>> Sent from my iPhone
>> >>>>>
>> >>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>> >>>>> saibabu.vallurupalli@gmail.com> wrote:
>> >>>>> >
>> >>>>> > Hi,
>> >>>>> >
>> >>>>> > I am working on an issue related to logging. I our application we
>> >>>>> > are
>> >>>>> using log4j for logging and we detected our software doesn't
>> >>>>> neutralize
>> >>>>> out
>> >>>>> properly. Now, Is there any way without modifying the entire source
>> by
>> >>>>> going through each and every class we can achieve this functionality
>> >>>>> of
>> >>>>> inspecting the message getting logged and take appropriate action.
>> >>>>> >
>> >>>>> > We appreciate your support.
>> >>>>> >
>> >>>>> > Thank you,
>> >>>>> > Sai
>> >>>>> >
>> >>>>>
>> >>>>>
>> ---------------------------------------------------------------------
>> >>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> >>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>> >>>>>
>> >>>>>
>> >>>>
>> >>>
>> >>>
>> >>> --
>> >>> Cheers,
>> >>> Paul
>> >>>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>
>

Re: software does not neutralize output that is logged

Posted by Ralph Goers <ra...@dslextreme.com>.
Yes.  https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/RewriteAppenderTest.java uses https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/resources/log4j-rewrite.xml which uses a MapRewritePolicy.  You would replace that with your own RewritePolicy. https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rewrite/TestRewritePolicy.java shows a sample RewritePolicy.  Basically you just create a new LogEvent copying data from the input LogEvent modifying that data as needed.

Ralph

On Jan 21, 2014, at 3:38 PM, Saibabu Vallurupalli <sa...@gmail.com> wrote:

> Hi Scott and Team:
> 
> I tried to research on the internet on how to use this functionality but very limited information. Do we have a Unit test case showing this scenario in the source code? Or any reference implementation will be really helpful to refer and try in my Application.
> 
> Please advise.
> 
> Thank you,
> Sai
> 
> 
> On Tue, Jan 21, 2014 at 5:57 PM, Scott Deboy <sc...@gmail.com> wrote:
> This mechanism is also available in log4j 1.2:
> 
> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
> 
> 
> On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
> > See
> > http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
> >
> > On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com> wrote:
> >> First of all Thanks so much for you all for the quickest response for
> >> this
> >> posting. I am thinking of writing a wrapper class and update the source,
> >> but we have about 2400 Java classes in the application which needs to be
> >> updated and are using log4j logger. I am trying to explore the option to
> >> avoid modifying all these classes with some kind of ingestion. Any
> >> suggestions around will be greatly appreciated.
> >>
> >> Thank you,
> >> Sai
> >>
> >>
> >>
> >> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
> >> wrote:
> >>
> >>> This is not an unusual requirement. I've been at a company that tries to
> >>> scrub log files from certain patterns (like SSN #s). Can that be done in
> >>> log4j? I don't know. It would be interesting to know if 2.0 had some
> >>> sort
> >>> of filtering capability. Remko? Gary? Ralph?
> >>>
> >>>
> >>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
> >>> saibabu.vallurupalli@gmail.com> wrote:
> >>>
> >>>> So, we wanted to inspect the message which is getting logged out to
> >>>> avoid
> >>>> possible security issues. So, what exactly I am looking is If I wanted
> >>>> to
> >>>> add a restriction on whats been logged. How can I achieve this?
> >>>>
> >>>> For example: log.info("user name"+username+"Password"+password); //
> >>>> This
> >>>> is just an example if I see a message having password do not log it or
> >>>> take
> >>>> some action.
> >>>>
> >>>> Please advise.
> >>>>
> >>>> Thank you,
> >>>> Sai
> >>>>
> >>>>
> >>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
> >>>> <re...@gmail.com>wrote:
> >>>>
> >>>>> Sorry, but I have no idea what you mean by "neutralize out".
> >>>>> What is currently happening and what would you like to happen instead?
> >>>>>
> >>>>> Sent from my iPhone
> >>>>>
> >>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
> >>>>> saibabu.vallurupalli@gmail.com> wrote:
> >>>>> >
> >>>>> > Hi,
> >>>>> >
> >>>>> > I am working on an issue related to logging. I our application we
> >>>>> > are
> >>>>> using log4j for logging and we detected our software doesn't
> >>>>> neutralize
> >>>>> out
> >>>>> properly. Now, Is there any way without modifying the entire source by
> >>>>> going through each and every class we can achieve this functionality
> >>>>> of
> >>>>> inspecting the message getting logged and take appropriate action.
> >>>>> >
> >>>>> > We appreciate your support.
> >>>>> >
> >>>>> > Thank you,
> >>>>> > Sai
> >>>>> >
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Cheers,
> >>> Paul
> >>>
> >>
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 
> 


Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
Hi Scott and Team:

I tried to research on the internet on how to use this functionality but
very limited information. Do we have a Unit test case showing this scenario
in the source code? Or any reference implementation will be really helpful
to refer and try in my Application.

Please advise.

Thank you,
Sai


On Tue, Jan 21, 2014 at 5:57 PM, Scott Deboy <sc...@gmail.com> wrote:

> This mechanism is also available in log4j 1.2:
>
>
> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html
>
>
> On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
> > See
> >
> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
> >
> > On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com> wrote:
> >> First of all Thanks so much for you all for the quickest response for
> >> this
> >> posting. I am thinking of writing a wrapper class and update the source,
> >> but we have about 2400 Java classes in the application which needs to be
> >> updated and are using log4j logger. I am trying to explore the option to
> >> avoid modifying all these classes with some kind of ingestion. Any
> >> suggestions around will be greatly appreciated.
> >>
> >> Thank you,
> >> Sai
> >>
> >>
> >>
> >> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
> >> wrote:
> >>
> >>> This is not an unusual requirement. I've been at a company that tries
> to
> >>> scrub log files from certain patterns (like SSN #s). Can that be done
> in
> >>> log4j? I don't know. It would be interesting to know if 2.0 had some
> >>> sort
> >>> of filtering capability. Remko? Gary? Ralph?
> >>>
> >>>
> >>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
> >>> saibabu.vallurupalli@gmail.com> wrote:
> >>>
> >>>> So, we wanted to inspect the message which is getting logged out to
> >>>> avoid
> >>>> possible security issues. So, what exactly I am looking is If I wanted
> >>>> to
> >>>> add a restriction on whats been logged. How can I achieve this?
> >>>>
> >>>> For example: log.info("user name"+username+"Password"+password); //
> >>>> This
> >>>> is just an example if I see a message having password do not log it or
> >>>> take
> >>>> some action.
> >>>>
> >>>> Please advise.
> >>>>
> >>>> Thank you,
> >>>> Sai
> >>>>
> >>>>
> >>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
> >>>> <re...@gmail.com>wrote:
> >>>>
> >>>>> Sorry, but I have no idea what you mean by "neutralize out".
> >>>>> What is currently happening and what would you like to happen
> instead?
> >>>>>
> >>>>> Sent from my iPhone
> >>>>>
> >>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
> >>>>> saibabu.vallurupalli@gmail.com> wrote:
> >>>>> >
> >>>>> > Hi,
> >>>>> >
> >>>>> > I am working on an issue related to logging. I our application we
> >>>>> > are
> >>>>> using log4j for logging and we detected our software doesn't
> >>>>> neutralize
> >>>>> out
> >>>>> properly. Now, Is there any way without modifying the entire source
> by
> >>>>> going through each and every class we can achieve this functionality
> >>>>> of
> >>>>> inspecting the message getting logged and take appropriate action.
> >>>>> >
> >>>>> > We appreciate your support.
> >>>>> >
> >>>>> > Thank you,
> >>>>> > Sai
> >>>>> >
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>>>>
> >>>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Cheers,
> >>> Paul
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

Re: software does not neutralize output that is logged

Posted by Scott Deboy <sc...@gmail.com>.
This mechanism is also available in log4j 1.2:

https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/rewrite/RewriteAppender.html


On 1/21/14, Scott Deboy <sc...@gmail.com> wrote:
> See
> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
>
> On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com> wrote:
>> First of all Thanks so much for you all for the quickest response for
>> this
>> posting. I am thinking of writing a wrapper class and update the source,
>> but we have about 2400 Java classes in the application which needs to be
>> updated and are using log4j logger. I am trying to explore the option to
>> avoid modifying all these classes with some kind of ingestion. Any
>> suggestions around will be greatly appreciated.
>>
>> Thank you,
>> Sai
>>
>>
>>
>> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
>> wrote:
>>
>>> This is not an unusual requirement. I've been at a company that tries to
>>> scrub log files from certain patterns (like SSN #s). Can that be done in
>>> log4j? I don't know. It would be interesting to know if 2.0 had some
>>> sort
>>> of filtering capability. Remko? Gary? Ralph?
>>>
>>>
>>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
>>> saibabu.vallurupalli@gmail.com> wrote:
>>>
>>>> So, we wanted to inspect the message which is getting logged out to
>>>> avoid
>>>> possible security issues. So, what exactly I am looking is If I wanted
>>>> to
>>>> add a restriction on whats been logged. How can I achieve this?
>>>>
>>>> For example: log.info("user name"+username+"Password"+password); //
>>>> This
>>>> is just an example if I see a message having password do not log it or
>>>> take
>>>> some action.
>>>>
>>>> Please advise.
>>>>
>>>> Thank you,
>>>> Sai
>>>>
>>>>
>>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
>>>> <re...@gmail.com>wrote:
>>>>
>>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>>>> What is currently happening and what would you like to happen instead?
>>>>>
>>>>> Sent from my iPhone
>>>>>
>>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>>>> saibabu.vallurupalli@gmail.com> wrote:
>>>>> >
>>>>> > Hi,
>>>>> >
>>>>> > I am working on an issue related to logging. I our application we
>>>>> > are
>>>>> using log4j for logging and we detected our software doesn't
>>>>> neutralize
>>>>> out
>>>>> properly. Now, Is there any way without modifying the entire source by
>>>>> going through each and every class we can achieve this functionality
>>>>> of
>>>>> inspecting the message getting logged and take appropriate action.
>>>>> >
>>>>> > We appreciate your support.
>>>>> >
>>>>> > Thank you,
>>>>> > Sai
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Paul
>>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
This is really helpful Scott. I will explore on this options.

Thank you,
Sai



On Tue, Jan 21, 2014 at 5:54 PM, Scott Deboy <sc...@gmail.com> wrote:

> See
> http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender
>
> On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com> wrote:
> > First of all Thanks so much for you all for the quickest response for
> this
> > posting. I am thinking of writing a wrapper class and update the source,
> > but we have about 2400 Java classes in the application which needs to be
> > updated and are using log4j logger. I am trying to explore the option to
> > avoid modifying all these classes with some kind of ingestion. Any
> > suggestions around will be greatly appreciated.
> >
> > Thank you,
> > Sai
> >
> >
> >
> > On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
> > wrote:
> >
> >> This is not an unusual requirement. I've been at a company that tries to
> >> scrub log files from certain patterns (like SSN #s). Can that be done in
> >> log4j? I don't know. It would be interesting to know if 2.0 had some
> sort
> >> of filtering capability. Remko? Gary? Ralph?
> >>
> >>
> >> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
> >> saibabu.vallurupalli@gmail.com> wrote:
> >>
> >>> So, we wanted to inspect the message which is getting logged out to
> >>> avoid
> >>> possible security issues. So, what exactly I am looking is If I wanted
> >>> to
> >>> add a restriction on whats been logged. How can I achieve this?
> >>>
> >>> For example: log.info("user name"+username+"Password"+password); //
> This
> >>> is just an example if I see a message having password do not log it or
> >>> take
> >>> some action.
> >>>
> >>> Please advise.
> >>>
> >>> Thank you,
> >>> Sai
> >>>
> >>>
> >>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
> >>> <re...@gmail.com>wrote:
> >>>
> >>>> Sorry, but I have no idea what you mean by "neutralize out".
> >>>> What is currently happening and what would you like to happen instead?
> >>>>
> >>>> Sent from my iPhone
> >>>>
> >>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
> >>>> saibabu.vallurupalli@gmail.com> wrote:
> >>>> >
> >>>> > Hi,
> >>>> >
> >>>> > I am working on an issue related to logging. I our application we
> are
> >>>> using log4j for logging and we detected our software doesn't
> neutralize
> >>>> out
> >>>> properly. Now, Is there any way without modifying the entire source by
> >>>> going through each and every class we can achieve this functionality
> of
> >>>> inspecting the message getting logged and take appropriate action.
> >>>> >
> >>>> > We appreciate your support.
> >>>> >
> >>>> > Thank you,
> >>>> > Sai
> >>>> >
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> >>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> >>>>
> >>>>
> >>>
> >>
> >>
> >> --
> >> Cheers,
> >> Paul
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

Re: software does not neutralize output that is logged

Posted by Scott Deboy <sc...@gmail.com>.
See http://logging.apache.org/log4j/2.x/manual/appenders.html#RewriteAppender

On 1/21/14, Saibabu Vallurupalli <sa...@gmail.com> wrote:
> First of all Thanks so much for you all for the quickest response for this
> posting. I am thinking of writing a wrapper class and update the source,
> but we have about 2400 Java classes in the application which needs to be
> updated and are using log4j logger. I am trying to explore the option to
> avoid modifying all these classes with some kind of ingestion. Any
> suggestions around will be greatly appreciated.
>
> Thank you,
> Sai
>
>
>
> On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org>
> wrote:
>
>> This is not an unusual requirement. I've been at a company that tries to
>> scrub log files from certain patterns (like SSN #s). Can that be done in
>> log4j? I don't know. It would be interesting to know if 2.0 had some sort
>> of filtering capability. Remko? Gary? Ralph?
>>
>>
>> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
>> saibabu.vallurupalli@gmail.com> wrote:
>>
>>> So, we wanted to inspect the message which is getting logged out to
>>> avoid
>>> possible security issues. So, what exactly I am looking is If I wanted
>>> to
>>> add a restriction on whats been logged. How can I achieve this?
>>>
>>> For example: log.info("user name"+username+"Password"+password); // This
>>> is just an example if I see a message having password do not log it or
>>> take
>>> some action.
>>>
>>> Please advise.
>>>
>>> Thank you,
>>> Sai
>>>
>>>
>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma
>>> <re...@gmail.com>wrote:
>>>
>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>>> What is currently happening and what would you like to happen instead?
>>>>
>>>> Sent from my iPhone
>>>>
>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>>> saibabu.vallurupalli@gmail.com> wrote:
>>>> >
>>>> > Hi,
>>>> >
>>>> > I am working on an issue related to logging. I our application we are
>>>> using log4j for logging and we detected our software doesn't neutralize
>>>> out
>>>> properly. Now, Is there any way without modifying the entire source by
>>>> going through each and every class we can achieve this functionality of
>>>> inspecting the message getting logged and take appropriate action.
>>>> >
>>>> > We appreciate your support.
>>>> >
>>>> > Thank you,
>>>> > Sai
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>>
>>>>
>>>
>>
>>
>> --
>> Cheers,
>> Paul
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
First of all Thanks so much for you all for the quickest response for this
posting. I am thinking of writing a wrapper class and update the source,
but we have about 2400 Java classes in the application which needs to be
updated and are using log4j logger. I am trying to explore the option to
avoid modifying all these classes with some kind of ingestion. Any
suggestions around will be greatly appreciated.

Thank you,
Sai



On Tue, Jan 21, 2014 at 5:20 PM, Paul Benedict <pb...@apache.org> wrote:

> This is not an unusual requirement. I've been at a company that tries to
> scrub log files from certain patterns (like SSN #s). Can that be done in
> log4j? I don't know. It would be interesting to know if 2.0 had some sort
> of filtering capability. Remko? Gary? Ralph?
>
>
> On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
> saibabu.vallurupalli@gmail.com> wrote:
>
>> So, we wanted to inspect the message which is getting logged out to avoid
>> possible security issues. So, what exactly I am looking is If I wanted to
>> add a restriction on whats been logged. How can I achieve this?
>>
>> For example: log.info("user name"+username+"Password"+password); // This
>> is just an example if I see a message having password do not log it or take
>> some action.
>>
>> Please advise.
>>
>> Thank you,
>> Sai
>>
>>
>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <re...@gmail.com>wrote:
>>
>>> Sorry, but I have no idea what you mean by "neutralize out".
>>> What is currently happening and what would you like to happen instead?
>>>
>>> Sent from my iPhone
>>>
>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>> saibabu.vallurupalli@gmail.com> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am working on an issue related to logging. I our application we are
>>> using log4j for logging and we detected our software doesn't neutralize out
>>> properly. Now, Is there any way without modifying the entire source by
>>> going through each and every class we can achieve this functionality of
>>> inspecting the message getting logged and take appropriate action.
>>> >
>>> > We appreciate your support.
>>> >
>>> > Thank you,
>>> > Sai
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>
>>>
>>
>
>
> --
> Cheers,
> Paul
>

Re: software does not neutralize output that is logged

Posted by Paul Benedict <pb...@apache.org>.
This is not an unusual requirement. I've been at a company that tries to
scrub log files from certain patterns (like SSN #s). Can that be done in
log4j? I don't know. It would be interesting to know if 2.0 had some sort
of filtering capability. Remko? Gary? Ralph?


On Tue, Jan 21, 2014 at 4:16 PM, Saibabu Vallurupalli <
saibabu.vallurupalli@gmail.com> wrote:

> So, we wanted to inspect the message which is getting logged out to avoid
> possible security issues. So, what exactly I am looking is If I wanted to
> add a restriction on whats been logged. How can I achieve this?
>
> For example: log.info("user name"+username+"Password"+password); // This
> is just an example if I see a message having password do not log it or take
> some action.
>
> Please advise.
>
> Thank you,
> Sai
>
>
> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <re...@gmail.com>wrote:
>
>> Sorry, but I have no idea what you mean by "neutralize out".
>> What is currently happening and what would you like to happen instead?
>>
>> Sent from my iPhone
>>
>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>> saibabu.vallurupalli@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I am working on an issue related to logging. I our application we are
>> using log4j for logging and we detected our software doesn't neutralize out
>> properly. Now, Is there any way without modifying the entire source by
>> going through each and every class we can achieve this functionality of
>> inspecting the message getting logged and take appropriate action.
>> >
>> > We appreciate your support.
>> >
>> > Thank you,
>> > Sai
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>


-- 
Cheers,
Paul

Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
Thank you Remko. I will do PoC on both the approaches and see which one can
be done in less time.



On Tue, Jan 21, 2014 at 8:46 PM, Remko Popma <re...@gmail.com> wrote:

> You would define a marker once, and use that marker when you are logging
> information that is potentially sensitive.
>
> So yes, this solution assumes that the application knows where sensitive
> information may enter the system.
>
> If you don't know that or don't like this approach for other reasons, your
> only alternative (that I can think of) is to identify patterns in your log
> output and replace those patterns with noise (or encrypted data if you want
> to get fancy :-)). Perhaps the RewriteAppender can help there.
>
>
> Sent from my iPhone
>
> On 2014/01/22, at 9:08, Saibabu Vallurupalli <
> saibabu.vallurupalli@gmail.com> wrote:
>
> Remko,
>
> To implement this I think I need to modify all my Java classes to define
> Marker? Is my understanding correct?
>
> Thank you,
> Sai
>
>
>
> On Tue, Jan 21, 2014 at 6:57 PM, Remko Popma <re...@gmail.com>wrote:
>
>> You could use Markers (
>> http://logging.apache.org/log4j/2.x/manual/markers.html ) to mark log
>> events that may contain sensitive information:
>>
>> logger.debug(MARKER_SECURITY_RISK, request.toString());
>>
>> Then, in your log4j2.xml, you can use MarkerFilter (
>> http://logging.apache.org/log4j/2.x/manual/filters.html#MarkerFilter )
>> to ignore such log events or send then to a special file that the
>> application has write-only access to, and which only admins can read.
>>
>> Would that work?
>>
>>
>> On Wednesday, January 22, 2014, Saibabu Vallurupalli <
>> saibabu.vallurupalli@gmail.com> wrote:
>>
>>> So, we wanted to inspect the message which is getting logged out to
>>> avoid possible security issues. So, what exactly I am looking is If I
>>> wanted to add a restriction on whats been logged. How can I achieve this?
>>>
>>> For example: log.info("user name"+username+"Password"+password); //
>>> This is just an example if I see a message having password do not log it or
>>> take some action.
>>>
>>> Please advise.
>>>
>>> Thank you,
>>> Sai
>>>
>>>
>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <re...@gmail.com>wrote:
>>>
>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>>> What is currently happening and what would you like to happen instead?
>>>>
>>>> Sent from my iPhone
>>>>
>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>>> saibabu.vallurupalli@gmail.com> wrote:
>>>> >
>>>> > Hi,
>>>> >
>>>> > I am working on an issue related to logging. I our application we are
>>>> using log4j for logging and we detected our software doesn't neutralize out
>>>> properly. Now, Is there any way without modifying the entire source by
>>>> going through each and every class we can achieve this functionality of
>>>> inspecting the message getting logged and take appropriate action.
>>>> >
>>>> > We appreciate your support.
>>>> >
>>>> > Thank you,
>>>> > Sai
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>>
>>>>
>>>
>

Re: software does not neutralize output that is logged

Posted by Remko Popma <re...@gmail.com>.
You would define a marker once, and use that marker when you are logging information that is potentially sensitive. 

So yes, this solution assumes that the application knows where sensitive information may enter the system. 

If you don't know that or don't like this approach for other reasons, your only alternative (that I can think of) is to identify patterns in your log output and replace those patterns with noise (or encrypted data if you want to get fancy :-)). Perhaps the RewriteAppender can help there. 


Sent from my iPhone

> On 2014/01/22, at 9:08, Saibabu Vallurupalli <sa...@gmail.com> wrote:
> 
> Remko,
> 
> To implement this I think I need to modify all my Java classes to define Marker? Is my understanding correct?
> 
> Thank you,
> Sai
> 
> 
> 
>> On Tue, Jan 21, 2014 at 6:57 PM, Remko Popma <re...@gmail.com> wrote:
>> You could use Markers (http://logging.apache.org/log4j/2.x/manual/markers.html ) to mark log events that may contain sensitive information:
>> 
>> logger.debug(MARKER_SECURITY_RISK, request.toString());
>> 
>> Then, in your log4j2.xml, you can use MarkerFilter (http://logging.apache.org/log4j/2.x/manual/filters.html#MarkerFilter ) to ignore such log events or send then to a special file that the application has write-only access to, and which only admins can read. 
>> 
>> Would that work?
>> 
>> 
>>> On Wednesday, January 22, 2014, Saibabu Vallurupalli <sa...@gmail.com> wrote:
>>> So, we wanted to inspect the message which is getting logged out to avoid possible security issues. So, what exactly I am looking is If I wanted to add a restriction on whats been logged. How can I achieve this?
>>> 
>>> For example: log.info("user name"+username+"Password"+password); // This is just an example if I see a message having password do not log it or take some action.
>>> 
>>> Please advise.
>>> 
>>> Thank you,
>>> Sai
>>> 
>>> 
>>>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <re...@gmail.com> wrote:
>>>> Sorry, but I have no idea what you mean by "neutralize out".
>>>> What is currently happening and what would you like to happen instead?
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <sa...@gmail.com> wrote:
>>>> >
>>>> > Hi,
>>>> >
>>>> > I am working on an issue related to logging. I our application we are using log4j for logging and we detected our software doesn't neutralize out properly. Now, Is there any way without modifying the entire source by going through each and every class we can achieve this functionality of inspecting the message getting logged and take appropriate action.
>>>> >
>>>> > We appreciate your support.
>>>> >
>>>> > Thank you,
>>>> > Sai
>>>> >
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 

Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
Remko,

To implement this I think I need to modify all my Java classes to define
Marker? Is my understanding correct?

Thank you,
Sai



On Tue, Jan 21, 2014 at 6:57 PM, Remko Popma <re...@gmail.com> wrote:

> You could use Markers (
> http://logging.apache.org/log4j/2.x/manual/markers.html ) to mark log
> events that may contain sensitive information:
>
> logger.debug(MARKER_SECURITY_RISK, request.toString());
>
> Then, in your log4j2.xml, you can use MarkerFilter (
> http://logging.apache.org/log4j/2.x/manual/filters.html#MarkerFilter ) to
> ignore such log events or send then to a special file that the application
> has write-only access to, and which only admins can read.
>
> Would that work?
>
>
> On Wednesday, January 22, 2014, Saibabu Vallurupalli <
> saibabu.vallurupalli@gmail.com> wrote:
>
>> So, we wanted to inspect the message which is getting logged out to avoid
>> possible security issues. So, what exactly I am looking is If I wanted to
>> add a restriction on whats been logged. How can I achieve this?
>>
>> For example: log.info("user name"+username+"Password"+password); // This
>> is just an example if I see a message having password do not log it or take
>> some action.
>>
>> Please advise.
>>
>> Thank you,
>> Sai
>>
>>
>> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <re...@gmail.com>wrote:
>>
>>> Sorry, but I have no idea what you mean by "neutralize out".
>>> What is currently happening and what would you like to happen instead?
>>>
>>> Sent from my iPhone
>>>
>>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>>> saibabu.vallurupalli@gmail.com> wrote:
>>> >
>>> > Hi,
>>> >
>>> > I am working on an issue related to logging. I our application we are
>>> using log4j for logging and we detected our software doesn't neutralize out
>>> properly. Now, Is there any way without modifying the entire source by
>>> going through each and every class we can achieve this functionality of
>>> inspecting the message getting logged and take appropriate action.
>>> >
>>> > We appreciate your support.
>>> >
>>> > Thank you,
>>> > Sai
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>>
>>>
>>

Re: software does not neutralize output that is logged

Posted by Remko Popma <re...@gmail.com>.
You could use Markers (
http://logging.apache.org/log4j/2.x/manual/markers.html ) to mark log
events that may contain sensitive information:

logger.debug(MARKER_SECURITY_RISK, request.toString());

Then, in your log4j2.xml, you can use MarkerFilter (
http://logging.apache.org/log4j/2.x/manual/filters.html#MarkerFilter ) to
ignore such log events or send then to a special file that the application
has write-only access to, and which only admins can read.

Would that work?

On Wednesday, January 22, 2014, Saibabu Vallurupalli <
saibabu.vallurupalli@gmail.com> wrote:

> So, we wanted to inspect the message which is getting logged out to avoid
> possible security issues. So, what exactly I am looking is If I wanted to
> add a restriction on whats been logged. How can I achieve this?
>
> For example: log.info("user name"+username+"Password"+password); // This
> is just an example if I see a message having password do not log it or take
> some action.
>
> Please advise.
>
> Thank you,
> Sai
>
>
> On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <remko.popma@gmail.com<javascript:_e({}, 'cvml', 'remko.popma@gmail.com');>
> > wrote:
>
>> Sorry, but I have no idea what you mean by "neutralize out".
>> What is currently happening and what would you like to happen instead?
>>
>> Sent from my iPhone
>>
>> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
>> saibabu.vallurupalli@gmail.com <javascript:_e({}, 'cvml',
>> 'saibabu.vallurupalli@gmail.com');>> wrote:
>> >
>> > Hi,
>> >
>> > I am working on an issue related to logging. I our application we are
>> using log4j for logging and we detected our software doesn't neutralize out
>> properly. Now, Is there any way without modifying the entire source by
>> going through each and every class we can achieve this functionality of
>> inspecting the message getting logged and take appropriate action.
>> >
>> > We appreciate your support.
>> >
>> > Thank you,
>> > Sai
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org<javascript:_e({}, 'cvml', 'log4j-dev-unsubscribe@logging.apache.org');>
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org<javascript:_e({}, 'cvml', 'log4j-dev-help@logging.apache.org');>
>>
>>
>

Re: software does not neutralize output that is logged

Posted by Saibabu Vallurupalli <sa...@gmail.com>.
So, we wanted to inspect the message which is getting logged out to avoid
possible security issues. So, what exactly I am looking is If I wanted to
add a restriction on whats been logged. How can I achieve this?

For example: log.info("user name"+username+"Password"+password); // This is
just an example if I see a message having password do not log it or take
some action.

Please advise.

Thank you,
Sai


On Tue, Jan 21, 2014 at 5:12 PM, Remko Popma <re...@gmail.com> wrote:

> Sorry, but I have no idea what you mean by "neutralize out".
> What is currently happening and what would you like to happen instead?
>
> Sent from my iPhone
>
> > On 2014/01/22, at 6:29, Saibabu Vallurupalli <
> saibabu.vallurupalli@gmail.com> wrote:
> >
> > Hi,
> >
> > I am working on an issue related to logging. I our application we are
> using log4j for logging and we detected our software doesn't neutralize out
> properly. Now, Is there any way without modifying the entire source by
> going through each and every class we can achieve this functionality of
> inspecting the message getting logged and take appropriate action.
> >
> > We appreciate your support.
> >
> > Thank you,
> > Sai
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

Re: software does not neutralize output that is logged

Posted by Remko Popma <re...@gmail.com>.
Sorry, but I have no idea what you mean by "neutralize out".
What is currently happening and what would you like to happen instead?

Sent from my iPhone

> On 2014/01/22, at 6:29, Saibabu Vallurupalli <sa...@gmail.com> wrote:
> 
> Hi,
> 
> I am working on an issue related to logging. I our application we are using log4j for logging and we detected our software doesn't neutralize out properly. Now, Is there any way without modifying the entire source by going through each and every class we can achieve this functionality of inspecting the message getting logged and take appropriate action.
> 
> We appreciate your support.
> 
> Thank you,
> Sai
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org