[jira] [Updated] (CXF-8451) Logging Feature: MTOM endpoint logs binary data on REQ_IN
[ 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] [Updated] (CXF-8451) Logging Feature: MTOM endpoint logs binary data on REQ_IN
[ 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 >