[jira] [Updated] (CXF-8451) Logging Feature: MTOM endpoint logs binary data on REQ_IN

2021-04-07 Thread Stephen Patten (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephen Patten updated CXF-8451:

Description: 
MTOM request properties that are binary are being logged, even 

 

Given this partial definition of the request object, there is an array of 
ContentElement:
{code:java}
@Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
public class ContentElement implements Serializable, ToString2
{

   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   private final static long serialVersionUID = 2L;
   @XmlElement(name = "FileName", required = true)
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected String fileName;
   @XmlElement(name = "MimeType", required = true)
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected String mimeType;
   @XmlElement(name = "Buffer", required = true)
   @XmlMimeType("application/octet-stream")
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected DataHandler buffer;
 
removed
 
}
{code}
 

excerpt from the log:
{code:java}
2021-04-07 19:17:28.519  INFO [fnws3,fdbf44eb40e4b9ea,fdbf44eb40e4b9ea] 18788 
--- [nio-8443-exec-6] o.a.cxf.services.PLFileNetWSSoap.REQ_IN  : REQ_IN
Address: https://localhost:8443/fnws/DocumentServices/v3
HttpMethod: POST
Content-Type: 
application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary"
ExchangeId: 0f524d01-ce9c-43a9-b204-9cd2e2a96b60
ServiceName: PLFileNetWS
PortName: PLFileNetWSSoap12
PortTypeName: PLFileNetWSSoap
Headers: {host=localhost:8443, connection=Keep-Alive, 
content-type=application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary",
 Content-Length=723848, accept-encoding=gzip,deflate, 
user-agent=Apache-HttpClient/4.5.5 (Java/12.0.1)}
Payload: http://www.w3.org/2003/05/soap-envelope; xmlns:plf="PLFileNetWS">

  

  



  

s_p8dccommit_d

XXX

New_Business





  

443643841-1.tiff

image/tiff


SUkqAAgPAP4ABAABAAABBAABkAYAAAEBBAABfAgAAAIBAwABA
   NOTE: this goes on until the max-size is reached

 
{code}
 

Logging Bean Def:
{code:java}
@Bean
public LoggingFeature loggingFeature() {

LoggingFeature feature = new LoggingFeature();
feature.addBinaryContentMediaTypes(Const.TIFF_MIMETYPE);
feature.setLogBinary(false);
feature.setPrettyLogging(true);
feature.addSensitiveElementNames(new 
HashSet<>(this.properties.getSoapSensitiveElements()));
feature.addSensitiveElementNames(new 
HashSet<>(this.properties.getSoapSensitiveHeaders()));
return feature;
}
{code}

  was:
MTOM request properties that are binary are being logged, even 

 

Given this partial definition of the request object, there is an array of 
ContentElement:
{code:java}
@Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
public class ContentElement implements Serializable, ToString2
{

   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   private final static long serialVersionUID = 2L;
   @XmlElement(name = "FileName", required = true)
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected String fileName;
   @XmlElement(name = "MimeType", required = true)
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected String mimeType;
   @XmlElement(name = "Buffer", required = true)
   @XmlMimeType("application/octet-stream")
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected DataHandler buffer;
 
removed
 
}
{code}
 

excerpt from the log:
{code:java}
2021-04-07 19:17:28.519  INFO [fnws3,fdbf44eb40e4b9ea,fdbf44eb40e4b9ea] 18788 
--- [nio-8443-exec-6] o.a.cxf.services.PLFileNetWSSoap.REQ_IN  : REQ_IN
Address: https://localhost:8443/fnws/DocumentServices/v3
HttpMethod: POST
Content-Type: 
application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary"
ExchangeId: 0f524d01-ce9c-43a9-b204-9cd2e2a96b60
ServiceName: PLFileNetWS
PortName: PLFileNetWSSoap12
PortTypeName: PLFileNetWSSoap
Headers: {host=localhost:8443, connection=Keep-Alive, 

[jira] [Commented] (CXF-8451) Logging Feature: MTOM endpoint logs binary data on REQ_IN

2021-04-07 Thread Stephen Patten (Jira)


[ 
https://issues.apache.org/jira/browse/CXF-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17316786#comment-17316786
 ] 

Stephen Patten commented on CXF-8451:
-

[~ffang] I was so excited when you were assigned 
https://issues.apache.org/jira/browse/CXF-7666 and then resolved it! Thank you. 

So , yes I am running latest maven binaries 3.4.3 and the REQ_OUT is working 
fine.

> Logging Feature: MTOM endpoint logs binary data on REQ_IN
> -
>
> Key: CXF-8451
> URL: https://issues.apache.org/jira/browse/CXF-8451
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime
>Affects Versions: 3.4.3
>Reporter: Stephen Patten
>Assignee: Freeman Yue Fang
>Priority: Major
>
> MTOM request properties that are binary are being logged, even 
>  
> Given this partial definition of the request object, there is an array of 
> ContentElement:
> {code:java}
> @Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
> public class ContentElement implements Serializable, ToString2
> {
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>private final static long serialVersionUID = 2L;
>@XmlElement(name = "FileName", required = true)
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>protected String fileName;
>@XmlElement(name = "MimeType", required = true)
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>protected String mimeType;
>@XmlElement(name = "Buffer", required = true)
>@XmlMimeType("application/octet-stream")
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>protected DataHandler buffer;
>  
> removed
>  
> }
> {code}
>  
> excerpt from the log:
> {code:java}
> 2021-04-07 19:17:28.519  INFO [fnws3,fdbf44eb40e4b9ea,fdbf44eb40e4b9ea] 18788 
> --- [nio-8443-exec-6] o.a.cxf.services.PLFileNetWSSoap.REQ_IN  : REQ_IN
> Address: https://localhost:8443/fnws/DocumentServices/v3
> HttpMethod: POST
> Content-Type: 
> application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary"
> ExchangeId: 0f524d01-ce9c-43a9-b204-9cd2e2a96b60
> ServiceName: PLFileNetWS
> PortName: PLFileNetWSSoap12
> PortTypeName: PLFileNetWSSoap
> Headers: {host=localhost:8443, connection=Keep-Alive, 
> content-type=application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary",
>  Content-Length=723848, accept-encoding=gzip,deflate, 
> user-agent=Apache-HttpClient/4.5.5 (Java/12.0.1)}
> Payload:  xmlns:soap="http://www.w3.org/2003/05/soap-envelope; xmlns:plf="PLFileNetWS">
> 
>   
> 
>   
> 
> 
> 
>   
> 
> s_p8dccommit_d
> 
> XXX
> 
> New_Business
> 
> 
> 
> 
> 
>   
> 
> 443643841-1.tiff
> 
> image/tiff
> 
> 
> SUkqAAgPAP4ABAABAAABBAABkAYAAAEBBAABfAgAAAIBAwABA
>NOTE: this goes on until the max-size is reached
>  
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (CXF-8451) Logging Feature: MTOM endpoint logs binary data on REQ_IN

2021-04-07 Thread Stephen Patten (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephen Patten updated CXF-8451:

Description: 
MTOM request properties that are binary are being logged, even 

 

Given this partial definition of the request object, there is an array of 
ContentElement:
{code:java}
@Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
public class ContentElement implements Serializable, ToString2
{

   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   private final static long serialVersionUID = 2L;
   @XmlElement(name = "FileName", required = true)
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected String fileName;
   @XmlElement(name = "MimeType", required = true)
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected String mimeType;
   @XmlElement(name = "Buffer", required = true)
   @XmlMimeType("application/octet-stream")
   @Generated(value = "com.sun.tools.xjc.Driver", date = 
"2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
   protected DataHandler buffer;
 
removed
 
}
{code}
 

excerpt from the log:
{code:java}
2021-04-07 19:17:28.519  INFO [fnws3,fdbf44eb40e4b9ea,fdbf44eb40e4b9ea] 18788 
--- [nio-8443-exec-6] o.a.cxf.services.PLFileNetWSSoap.REQ_IN  : REQ_IN
Address: https://localhost:8443/fnws/DocumentServices/v3
HttpMethod: POST
Content-Type: 
application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary"
ExchangeId: 0f524d01-ce9c-43a9-b204-9cd2e2a96b60
ServiceName: PLFileNetWS
PortName: PLFileNetWSSoap12
PortTypeName: PLFileNetWSSoap
Headers: {host=localhost:8443, connection=Keep-Alive, 
content-type=application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary",
 Content-Length=723848, accept-encoding=gzip,deflate, 
user-agent=Apache-HttpClient/4.5.5 (Java/12.0.1)}
Payload: http://www.w3.org/2003/05/soap-envelope; xmlns:plf="PLFileNetWS">

  

  



  

s_p8dccommit_d

XXX

New_Business





  

443643841-1.tiff

image/tiff


SUkqAAgPAP4ABAABAAABBAABkAYAAAEBBAABfAgAAAIBAwABA
   NOTE: this goes on until the max-size is reached

 
{code}
 

  was:Request payload binary properties are being logged.


> Logging Feature: MTOM endpoint logs binary data on REQ_IN
> -
>
> Key: CXF-8451
> URL: https://issues.apache.org/jira/browse/CXF-8451
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime
>Affects Versions: 3.4.3
>Reporter: Stephen Patten
>Assignee: Freeman Yue Fang
>Priority: Major
>
> MTOM request properties that are binary are being logged, even 
>  
> Given this partial definition of the request object, there is an array of 
> ContentElement:
> {code:java}
> @Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
> public class ContentElement implements Serializable, ToString2
> {
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>private final static long serialVersionUID = 2L;
>@XmlElement(name = "FileName", required = true)
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>protected String fileName;
>@XmlElement(name = "MimeType", required = true)
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>protected String mimeType;
>@XmlElement(name = "Buffer", required = true)
>@XmlMimeType("application/octet-stream")
>@Generated(value = "com.sun.tools.xjc.Driver", date = 
> "2020-10-16T08:48:05-04:00", comments = "JAXB RI v2.3.3")
>protected DataHandler buffer;
>  
> removed
>  
> }
> {code}
>  
> excerpt from the log:
> {code:java}
> 2021-04-07 19:17:28.519  INFO [fnws3,fdbf44eb40e4b9ea,fdbf44eb40e4b9ea] 18788 
> --- [nio-8443-exec-6] o.a.cxf.services.PLFileNetWSSoap.REQ_IN  : REQ_IN
> Address: https://localhost:8443/fnws/DocumentServices/v3
> HttpMethod: POST
> Content-Type: 
> application/soap+xml;charset=UTF-8;action="PLFileNetWS/CreateBinary"
> ExchangeId: 0f524d01-ce9c-43a9-b204-9cd2e2a96b60
> ServiceName: PLFileNetWS
> PortName: PLFileNetWSSoap12
> 

[jira] [Created] (CXF-8451) Logging Feature: MTOM endpoint logs binary data on REQ_IN

2021-04-07 Thread Stephen Patten (Jira)
Stephen Patten created CXF-8451:
---

 Summary: Logging Feature: MTOM endpoint logs binary data on REQ_IN
 Key: CXF-8451
 URL: https://issues.apache.org/jira/browse/CXF-8451
 Project: CXF
  Issue Type: Bug
  Components: JAX-WS Runtime
Affects Versions: 3.4.3
Reporter: Stephen Patten


Request payload binary properties are being logged.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CXF-7666) Binary multipart payload are shown even if logBinary Flag is set to false

2021-01-17 Thread Stephen Patten (Jira)


[ 
https://issues.apache.org/jira/browse/CXF-7666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17266925#comment-17266925
 ] 

Stephen Patten commented on CXF-7666:
-

Same issue here, would like to keep logging the MTOM request/response except 
the binary property. 

The CXF DataHandler on the server can receive base64 encoded, and byte[] 
documents, which are processed and returned by yet another DataHandler that 
support any number of media-types, typically "application/octet-stream", 
"image/tiff",  "application/pdf" . The code below shows an example service 
response and the "binary" property is this

http://www.w3.org/2004/08/xop/include; 
href="cid:ca829d80-30e5-40f8-a841-66b62f1ece42-2@PLFileNetWS"/>

 
{code:java}
2021-01-17 15:47:13.006  INFO [,0a70f2ff4553a887,0a70f2ff4553a887] 67556 --- 
[nio-8443-exec-6] o.a.c.services.PLFileNetWSSoap.RESP_OUT  : RESP_OUT
Address: https://localhost:8443/fnws/DocumentServices/v3
Content-Type: multipart/related; type="application/xop+xml"; 
boundary="uuid:03854f91-65a2-4e63-b5f5-9f36543735cf"; 
start=""; start-info="application/soap+xml"
ResponseCode: 200
ExchangeId: 62c2ef67-4e44-490e-9743-dab10b2f3617
ServiceName: PLFileNetWS
PortName: PLFileNetWSSoap12
PortTypeName: PLFileNetWSSoap
Headers: {}
Payload: 
--uuid:03854f91-65a2-4e63-b5f5-9f36543735cf
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
Content-Transfer-Encoding: binary
Content-ID: http://www.w3.org/2003/05/soap-envelope;>File0http://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; xsi:type="xs:string">MED2jaleh - 
recent.TIFDateCreatedhttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">2020-12-14ContentSizehttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">533284.0MimeTypehttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">image/tiffClassDescriptionhttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">New_BusinessF_DOCNUMBERhttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">6024255Idhttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">{C0B66276--CF18-8300-F34099B13C2A}DocumentTitlehttp://www.w3.org/2001/XMLSchema-instance; 
xmlns:xs="http://www.w3.org/2001/XMLSchema; 
xsi:type="xs:string">6024255http://www.w3.org/2004/08/xop/include; 
href="cid:ca829d80-30e5-40f8-a841-66b62f1ece42-2@PLFileNetWS"/>
--uuid:03854f91-65a2-4e63-b5f5-9f36543735cf
Content-Type: image/tiff
Content-Transfer-Encoding: binary
Content-ID: X  �  
  u  Z         �   �  M  5        �   �        �      C    
I  �   �   �  �  z  i  �  s  �  b  c   �  �   ^  �   }   �   �     
 �  >   V   W   �   �   �  5   O  �  �   �  w   #   �   �   `   L    �  
�  �  _  �  �   �   r   V   G   �   �   i   M   �                 
          �  .  c  T   �                     ���   �� 
,!@\��0��i�䁒���ɏ�?�'���_�޿lk���Cg����_� � ,fنl�D2(��
���޿J�K��K���1%�(�K\DDG�� @��� ���u��b�
�A
{code}
Yes, I did add image/tiff but to no avail.

 

Thank you,

Stephen

 

 

> Binary multipart payload are shown even if logBinary Flag is set to false
> -
>
> Key: CXF-7666
> URL: https://issues.apache.org/jira/browse/CXF-7666
> Project: CXF
>  Issue Type: Bug
>  Components: logging
>Affects Versions: 3.2.1
>Reporter: Mohamed Moez MANSOURI
>Priority: Major
>
> **
> Iam using
> {code:java}
>  
>   org.apache.cxf
>   cxf-rt-features-logging
> 3.2.1
>   
> {code}
> And i still have logs of binary parts of a multipart message (image/png) even 
> if the flag "logBinary" of AbstractLoggingInterceptor is false by default.
>  Can you help me ? I would like that if that flag is false , it applies also 
> to the inner parts of a multipart message.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)