Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
3.4.7
-
None
-
None
-
Unknown
Description
Hello,
we tried setting a custom sensitive logging using blueprint and following documentation https://cxf.apache.org/docs/message-logging.html.
This feature doesn't work when adding our bean/service in <jaxrs:features> or <jaxws:features> .
We have to declare the bean/service on <cxf:bus> level:
Not working;
<blueprint...> <jaxrs:server id="SAMRestService" address="/sam"> <jaxrs:serviceBeans> <ref component-id="restService" /> </jaxrs:serviceBeans> <jaxrs:features> <reference id="sensitiveLoggingFeature" interface="custom.security.logging.SensitiveLoggingFeature" /> </jaxrs:features> </jaxrs:server> </blueprint>
Working:
<blueprint...> <cxf:bus> <cxf:features> <reference id="sensitiveLoggingFeature" interface="custom.security.logging.SensitiveLoggingFeature" /> </cxf:features> </cxf:bus> <jaxrs:server id="SAMRestService" address="/sam"> <jaxrs:serviceBeans> <ref component-id="restService" /> </jaxrs:serviceBeans> </jaxrs:server> </blueprint>
It seems without explicit <cxf:bus> declaration, bus will have cxf:logging feature by default, and therefore will be used instead of custom one: https://github.com/apache/cxf/blob/cxf-3.4.7/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java#L192-L193
See screenshot of stack:
- JAXRSServerFactoryBean has our custom logging feature >> not used
- bus has standard logging feature >> used