You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2020/06/14 20:52:04 UTC

[cxf] branch master updated: CXF-8099: added protected transform option for logging interceptors

This is an automated email from the ASF dual-hosted git repository.

ashakirin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 3f12ebd  CXF-8099: added protected transform option for logging interceptors
3f12ebd is described below

commit 3f12ebdcf949ef3e1effae63be0eada2b840e409
Author: ashakirin <49...@users.noreply.github.com>
AuthorDate: Sun Jun 14 22:50:54 2020 +0200

    CXF-8099: added protected transform option for logging interceptors
---
 .../java/org/apache/cxf/attachment/cxf3383.data    | 602 ++++++++++-----------
 .../ext/logging/AbstractLoggingInterceptor.java    |   4 +
 .../cxf/ext/logging/LoggingInInterceptor.java      |   4 +-
 .../cxf/ext/logging/LoggingOutInterceptor.java     |   4 +-
 .../org/apache/cxf/ext/logging/TransformTest.java  | 166 ++++++
 .../cxf/sts/rest/RESTSecurityTokenServiceImpl.java |   9 +
 6 files changed, 484 insertions(+), 305 deletions(-)

diff --git a/core/src/test/java/org/apache/cxf/attachment/cxf3383.data b/core/src/test/java/org/apache/cxf/attachment/cxf3383.data
index 5bd3d9c..d7ea323 100644
--- a/core/src/test/java/org/apache/cxf/attachment/cxf3383.data
+++ b/core/src/test/java/org/apache/cxf/attachment/cxf3383.data
@@ -1,301 +1,301 @@
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
-Content-Transfer-Encoding: binary
-Content-ID: <ro...@cxf.apache.org>
-
-<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getHashMapDataResponse xmlns:ns2="http://jaxb.systest.cxf.apache.org/"><return><keyData><entry key="1"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1882f79d-e20a-4b36-a222-7a75518cf395-1@cxf.apache.org"/></entry><entry key="2"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1882f79d-e20a-4b36-a222-7a75518cf395-2@cxf.apache.org"/></entry><entry key="3" [...]
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-A
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-AB
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABC
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCD
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDE
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEF
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFG
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGH
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHI
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJ
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJK
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKL
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLM
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMN
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNO
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOP
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQ
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQR
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRS
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRST
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTU
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUV
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVW
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWX
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXY
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
-Content-Type: application/octet-stream
-Content-Transfer-Encoding: binary
-Content-ID: <18...@cxf.apache.org>
-
-ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq
---uuid:7a555f51-c9bb-4bd4-9929-706899e2f793--
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
+Content-Transfer-Encoding: binary
+Content-ID: <ro...@cxf.apache.org>
+
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:getHashMapDataResponse xmlns:ns2="http://jaxb.systest.cxf.apache.org/"><return><keyData><entry key="1"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1882f79d-e20a-4b36-a222-7a75518cf395-1@cxf.apache.org"/></entry><entry key="2"><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1882f79d-e20a-4b36-a222-7a75518cf395-2@cxf.apache.org"/></entry><entry key="3" [...]
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+A
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+AB
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABC
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCD
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDE
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEF
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFG
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGH
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHI
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJ
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJK
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKL
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLM
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMN
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNO
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOP
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQ
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQR
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRS
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRST
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTU
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUV
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVW
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWX
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXY
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`a
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcd
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcde
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghi
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghij
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijk
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkl
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793
+Content-Type: application/octet-stream
+Content-Transfer-Encoding: binary
+Content-ID: <18...@cxf.apache.org>
+
+ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq
+--uuid:7a555f51-c9bb-4bd4-9929-706899e2f793--
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java
index 38f6d19..9302a43 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/AbstractLoggingInterceptor.java
@@ -102,4 +102,8 @@ public abstract class AbstractLoggingInterceptor extends AbstractPhaseIntercepto
         }
     }
 
+    protected String transform(final String originalLogString) {
+        return originalLogString;
+    }
+
 }
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingInInterceptor.java b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingInInterceptor.java
index 76ea59e..db677f0 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingInInterceptor.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingInInterceptor.java
@@ -99,7 +99,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
         StringBuilder payload = new StringBuilder();
         cos.writeCacheTo(payload, encoding, limit);
         cos.close();
-        event.setPayload(payload.toString());
+        event.setPayload(transform(payload.toString()));
         boolean isTruncated = cos.size() > limit && limit != -1;
         event.setTruncated(isTruncated);
         event.setFullContentFile(cos.getTempFile());
@@ -110,7 +110,7 @@ public class LoggingInInterceptor extends AbstractLoggingInterceptor {
         StringBuilder payload = new StringBuilder();
         writer.writeCacheTo(payload, limit);
         writer.close();
-        event.setPayload(payload.toString());
+        event.setPayload(transform(payload.toString()));
         event.setTruncated(isTruncated);
         event.setFullContentFile(writer.getTempFile());
     }
diff --git a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java
index bacaf00..2580649 100644
--- a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java
+++ b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/LoggingOutInterceptor.java
@@ -146,7 +146,7 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
             }
 
             String payload = shouldLogContent(event) ? getPayload(event, w2) : CONTENT_SUPPRESSED;
-            event.setPayload(payload);
+            event.setPayload(transform(payload));
             sender.send(event);
             message.setContent(Writer.class, out);
             super.close();
@@ -212,7 +212,7 @@ public class LoggingOutInterceptor extends AbstractLoggingInterceptor {
                 String encoding = (String) message.get(Message.ENCODING);
                 StringBuilder payload = new StringBuilder();
                 writePayload(payload, cos, encoding, event.getContentType());
-                event.setPayload(payload.toString());
+                event.setPayload(transform(payload.toString()));
                 boolean isTruncated = cos.size() > limit && limit != -1;
                 event.setTruncated(isTruncated);
             } catch (Exception ex) {
diff --git a/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/TransformTest.java b/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/TransformTest.java
new file mode 100644
index 0000000..2adcb10
--- /dev/null
+++ b/rt/features/logging/src/test/java/org/apache/cxf/ext/logging/TransformTest.java
@@ -0,0 +1,166 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.ext.logging;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Reader;
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.nio.charset.StandardCharsets;
+import java.util.Collection;
+
+import org.apache.cxf.ext.logging.event.LogEvent;
+import org.apache.cxf.ext.logging.event.LogEventSender;
+import org.apache.cxf.message.Exchange;
+import org.apache.cxf.message.ExchangeImpl;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageImpl;
+import org.apache.cxf.phase.PhaseInterceptor;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class TransformTest {
+
+    private static final String ORIG_LOGGING_CONTENT = "myOrigString";
+    private static final String TRANSFORMED_LOGGING_CONTENT = "myNewString";
+
+    private static class TransformLoggingOutInterceptor extends LoggingOutInterceptor {
+        TransformLoggingOutInterceptor(final LogEventSender sender) {
+            super(sender);
+        }
+
+        protected String transform(String content) {
+            return content.replace(ORIG_LOGGING_CONTENT, TRANSFORMED_LOGGING_CONTENT);
+        }
+    }
+
+    private static class TransformLoggingInInterceptor extends LoggingInInterceptor {
+        TransformLoggingInInterceptor(final LogEventSender sender) {
+            super(sender);
+        }
+
+        protected String transform(String content) {
+            return content.replace(ORIG_LOGGING_CONTENT, TRANSFORMED_LOGGING_CONTENT);
+        }
+    }
+
+    @Test
+    public void transformOutboundInterceptorOutputStream() throws IOException {
+        // Arrange
+        Message message = new MessageImpl();
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        message.setContent(OutputStream.class, outputStream);
+        Exchange exchange = new ExchangeImpl();
+        message.setExchange(exchange);
+        LogEventSenderMock logEventSender = new LogEventSenderMock();
+        LoggingOutInterceptor interceptor = new TransformLoggingOutInterceptor(logEventSender);
+
+        // Act
+        interceptor.handleMessage(message);
+        byte[] payload = ORIG_LOGGING_CONTENT.getBytes(StandardCharsets.UTF_8);
+        OutputStream out = message.getContent(OutputStream.class);
+        out.write(payload);
+        out.close();
+
+        // Verify
+        LogEvent event = logEventSender.getLogEvent();
+        assertNotNull(event);
+        assertEquals(TRANSFORMED_LOGGING_CONTENT, event.getPayload()); // only the first byte is read!
+    }
+
+    @Test
+    public void transformOutboundInterceptorWriter() throws IOException {
+        // Arrange
+        Message message = new MessageImpl();
+        StringWriter stringWriter = new StringWriter();
+        message.setContent(Writer.class, stringWriter);
+        Exchange exchange = new ExchangeImpl();
+        message.setExchange(exchange);
+        LogEventSenderMock logEventSender = new LogEventSenderMock();
+        LoggingOutInterceptor interceptor = new TransformLoggingOutInterceptor(logEventSender);
+
+        // Act
+        interceptor.handleMessage(message);
+        Writer out = message.getContent(Writer.class);
+        out.write(ORIG_LOGGING_CONTENT);
+        out.close();
+
+        // Assert
+        LogEvent event = logEventSender.getLogEvent();
+        assertNotNull(event);
+        assertEquals(TRANSFORMED_LOGGING_CONTENT, event.getPayload()); // only the first byte is read!
+    }
+
+    @Test
+    public void transformInboundInterceptorInputStream() {
+        // Arrange
+        Message message = new MessageImpl();
+        ByteArrayInputStream inputStream =
+                new ByteArrayInputStream(ORIG_LOGGING_CONTENT.getBytes(StandardCharsets.UTF_8));
+        message.setContent(InputStream.class, inputStream);
+        Exchange exchange = new ExchangeImpl();
+        message.setExchange(exchange);
+        LogEventSenderMock logEventSender = new LogEventSenderMock();
+        LoggingInInterceptor interceptor = new TransformLoggingInInterceptor(logEventSender);
+
+        // Act
+        Collection<PhaseInterceptor<? extends Message>> interceptors = interceptor.getAdditionalInterceptors();
+        for (PhaseInterceptor intercept : interceptors) {
+            intercept.handleMessage(message);
+        }
+        interceptor.handleMessage(message);
+
+        // Verify
+        LogEvent event = logEventSender.getLogEvent();
+        assertNotNull(event);
+        assertEquals(TRANSFORMED_LOGGING_CONTENT, event.getPayload()); // only the first byte is read!
+    }
+
+    @Test
+    public void transformInboundInterceptorReader() {
+        // Arrange
+        Message message = new MessageImpl();
+        StringReader stringReader = new StringReader(ORIG_LOGGING_CONTENT);
+        message.setContent(Reader.class, stringReader);
+        Exchange exchange = new ExchangeImpl();
+        message.setExchange(exchange);
+        LogEventSenderMock logEventSender = new LogEventSenderMock();
+        LoggingInInterceptor interceptor = new TransformLoggingInInterceptor(logEventSender);
+
+        // Act
+        Collection<PhaseInterceptor<? extends Message>> interceptors = interceptor.getAdditionalInterceptors();
+        for (PhaseInterceptor intercept : interceptors) {
+            intercept.handleMessage(message);
+        }
+        interceptor.handleMessage(message);
+
+        // Verify
+        LogEvent event = logEventSender.getLogEvent();
+        assertNotNull(event);
+        assertEquals(TRANSFORMED_LOGGING_CONTENT, event.getPayload()); // only the first byte is read!
+    }
+}
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
index 8101180..7d73359 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/rest/RESTSecurityTokenServiceImpl.java
@@ -413,6 +413,14 @@ public class RESTSecurityTokenServiceImpl extends SecurityTokenServiceImpl imple
         return writer.toString();
     }
 
+    protected void setMessageContext(final MessageContext messageContext) {
+        this.messageContext = messageContext;
+    }
+
+    protected void setSecurityContext(final javax.ws.rs.core.SecurityContext securityContext) {
+        this.securityContext = securityContext;
+    }
+
     private static int getDeflateLevel() {
         Integer level = null;
 
@@ -438,4 +446,5 @@ public class RESTSecurityTokenServiceImpl extends SecurityTokenServiceImpl imple
             return token;
         }
     }
+
 }