You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Paw B Sørensen <pa...@systematic.com.INVALID> on 2020/03/17 09:43:49 UTC

How to prevent the logging of patient identifiers

Hi,

I am using the camel fhir component to retrieve observations for a patient. As part of the request I set the URL including query params identifying the patient:

.setHeader(FhirConstants.PROPERTY_PREFIX + "url", constant("Observation?subject:Patient=0111191234"))
.toD(String.format("fhir:%s/%s",
          FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName(),
          FhirSearchApiMethod.SEARCHBYURL.getName()) +
          "?encoding=XML" +
          "&log=false" +
          "&validationMode=NEVER")

If the request fails for example HTTP 404 Not Found because the patient was unknown then the resulting RuntimeCamelException logged by the RedeliveryErrorHandler includes the URL.
This is a problem because of GDPR we cannot allow a patient identifier in the log files.
Is there any way to prevent the logging or to remove the URL before the logging


Paw B Sørensen
paw.b.sorensen@systematic.com

Med venlig hilsen / Kind regards

[Systematic Logo]<http://www.systematic.com/>
Paw B Sørensen
Systems Engineer

Søren Frichs Vej 39, 8000 Aarhus C
Denmark

Mobile: +45 2544 9834
paw.b.sorensen@systematic.com<ma...@systematic.com>
www.systematic.com<http://www.systematic.com>

Re: How to prevent the logging of patient identifiers

Posted by Guillaume Nodet <gn...@apache.org>.
You can also investigate writing your own log4j / logback filter / appender
to filter out log statements that may contain sensitive information.

Le mar. 17 mars 2020 à 11:07, Claus Ibsen <cl...@gmail.com> a écrit :

> Hi
>
> You can configure the error handler logging level, incl / excl stracktraces
> etc.
> Or you can do a custom onException and then handle the exception, and then
> do your own logging etc.
>
>
>
> On Tue, Mar 17, 2020 at 10:44 AM Paw B Sørensen
> <pa...@systematic.com.invalid> wrote:
>
> > Hi,
> >
> >
> >
> > I am using the camel fhir component to retrieve observations for a
> > patient. As part of the request I set the URL including query params
> > identifying the patient:
> >
> >
> >
> > .setHeader(FhirConstants.PROPERTY_PREFIX + "url",
> > constant("Observation?subject:Patient=0111191234"))
> >
> > .toD(String.format("fhir:%s/%s",
> >
> >
> >
> FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName(),
> >
> >           FhirSearchApiMethod.SEARCHBYURL.getName()) +
> >
> >           "?encoding=XML" +
> >
> >           "&log=false" +
> >
> >           "&validationMode=NEVER")
> >
> >
> >
> > If the request fails for example HTTP 404 Not Found because the patient
> > was unknown then the resulting RuntimeCamelException logged by the
> > RedeliveryErrorHandler includes the URL.
> >
> > This is a problem because of GDPR we cannot allow a patient identifier in
> > the log files.
> >
> > Is there any way to prevent the logging or to remove the URL before the
> > logging
> >
> >
> >
> >
> >
> > Paw B Sørensen
> >
> > paw.b.sorensen@systematic.com
> >
> >
> >
> > Med venlig hilsen / Kind regards
> >
> > [image: Systematic Logo] <http://www.systematic.com/>
> > *Paw B Sørensen*
> > Systems Engineer
> >
> > Søren Frichs Vej 39, 8000 Aarhus C
> > Denmark
> >
> > Mobile: +45 2544 9834
> > paw.b.sorensen@systematic.com
> > www.systematic.com
> >
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


-- 
------------------------
Guillaume Nodet

Re: How to prevent the logging of patient identifiers

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You can configure the error handler logging level, incl / excl stracktraces
etc.
Or you can do a custom onException and then handle the exception, and then
do your own logging etc.



On Tue, Mar 17, 2020 at 10:44 AM Paw B Sørensen
<pa...@systematic.com.invalid> wrote:

> Hi,
>
>
>
> I am using the camel fhir component to retrieve observations for a
> patient. As part of the request I set the URL including query params
> identifying the patient:
>
>
>
> .setHeader(FhirConstants.PROPERTY_PREFIX + "url",
> constant("Observation?subject:Patient=0111191234"))
>
> .toD(String.format("fhir:%s/%s",
>
>
> FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName(),
>
>           FhirSearchApiMethod.SEARCHBYURL.getName()) +
>
>           "?encoding=XML" +
>
>           "&log=false" +
>
>           "&validationMode=NEVER")
>
>
>
> If the request fails for example HTTP 404 Not Found because the patient
> was unknown then the resulting RuntimeCamelException logged by the
> RedeliveryErrorHandler includes the URL.
>
> This is a problem because of GDPR we cannot allow a patient identifier in
> the log files.
>
> Is there any way to prevent the logging or to remove the URL before the
> logging
>
>
>
>
>
> Paw B Sørensen
>
> paw.b.sorensen@systematic.com
>
>
>
> Med venlig hilsen / Kind regards
>
> [image: Systematic Logo] <http://www.systematic.com/>
> *Paw B Sørensen*
> Systems Engineer
>
> Søren Frichs Vej 39, 8000 Aarhus C
> Denmark
>
> Mobile: +45 2544 9834
> paw.b.sorensen@systematic.com
> www.systematic.com
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2