Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A9796200C24 for ; Thu, 23 Feb 2017 09:52:52 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A8036160B62; Thu, 23 Feb 2017 08:52:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E8D16160B50 for ; Thu, 23 Feb 2017 09:52:51 +0100 (CET) Received: (qmail 84374 invoked by uid 500); 23 Feb 2017 08:52:50 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 84362 invoked by uid 99); 23 Feb 2017 08:52:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2017 08:52:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id EB94B18DBED for ; Thu, 23 Feb 2017 08:52:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.992 X-Spam-Level: X-Spam-Status: No, score=0.992 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ZVrziddszrEe for ; Thu, 23 Feb 2017 08:52:49 +0000 (UTC) Received: from mail-qt0-f178.google.com (mail-qt0-f178.google.com [209.85.216.178]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 03C565FC2A for ; Thu, 23 Feb 2017 08:52:49 +0000 (UTC) Received: by mail-qt0-f178.google.com with SMTP id r45so4283066qte.3 for ; Thu, 23 Feb 2017 00:52:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2sKQ6NUPIa3XguDWLMHhwGlh7Jo2XWVVcoz9lw0K+bM=; b=GND5kAdHsUZxuukerWnJCBBLm8hwPbrFjRpLQPLlrsFz86/Sal4Qhy4tPsbqHg/XVN iX8/EHe8y5aU6SxTOKGvAPprMEuMZ54LZtd3wv9nVW0Lvl0/+xSoBq8ClFcGBpG+X8J4 k8zzCk4ysSMLQVyCJbZl6imabXk5P6BQHbbymcY6qna35v/9eSWcPOjkW5soYSQHBWCM E9ksxJTF0Fdqf5BiAqGh0rEZ1DMDdwjFABCUT5UT7mQmYuqehHHySJq8iFpjBYyz1rxI ISdWBcDe07h5bPNg80HoOitvGRoaZh7uMxeOsoj7HkEsXez3WAH7icSpmTjSN6r9YXfm peIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2sKQ6NUPIa3XguDWLMHhwGlh7Jo2XWVVcoz9lw0K+bM=; b=Rz5at8noAV5wjDsD9QeYIQsKsev1H0zVxFz8WJu/ANywcHHqGWSji54ef0dcUMKB3Y Kg7RZNvH79q7d80nlffp9JpwvfMSA4Tw8sHZZjeeMP/r1BrdYsUGvv5Jfayz65ig6P8D YyznMWTZmSFKYW5MN/HcP3flV/x5wuAVBoxVitThEp+9IsRqSauoOewPFYqfMHk/KioX Jer+JIW0yjdLfL//xScNJ8cJ/PUXJ6HOWCNfD4JWQeQyWynoz4cLdypojhWQx7M8q9mu 4CriR8zyddB6mu5I3HO91nRwC1UqQkruxmTPVVPcNlz7kW61MbjRVBQ/JD80cT3DebeO RfXg== X-Gm-Message-State: AMke39m4v4NGJtbk/9PKPVi9EvrpcVIHcBUanyXhRJx5/mC/pdwRYKWs7FsKH5n8ZSPs0aKXiyLJVAGzMEnflg== X-Received: by 10.237.62.25 with SMTP id l25mr20131946qtf.225.1487839965464; Thu, 23 Feb 2017 00:52:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.237.41.33 with HTTP; Thu, 23 Feb 2017 00:52:25 -0800 (PST) In-Reply-To: <1487839449549-5794308.post@n5.nabble.com> References: <1487802246345-5794301.post@n5.nabble.com> <1487839449549-5794308.post@n5.nabble.com> From: Claus Ibsen Date: Thu, 23 Feb 2017 09:52:25 +0100 Message-ID: Subject: Re: Mask password using log component To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 archived-at: Thu, 23 Feb 2017 08:52:52 -0000 Hi Okay so its in json format. Masking password from the message body depends on what format is it in json, xml, text, pojo (toString) etc. There is no out of the box mask function you can use. Camel does mask passwords in endpoint uris, but that is easier because its uri parameters with key=value. So what you can do is to have a java bean with a log method where you mask the password and then call your bean from the . The log message uses the simple language so you can check that doc how to call beans You can maybe use some regular exp to find / replace that password in your json On Thu, Feb 23, 2017 at 9:44 AM, adondoni wrote: > Hello Claus, > thanks for your reply. > > My message body is a jsor RPC request like this > > { > "method": "login", > "id": "341182007", > "params": { > "username": "xxxxx", > "password": "yyyy" > }, > "jsonrpc": "2.0" > } > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/Mask-password-using-log-component-tp5794301p5794308.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2