You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Julien Greffe (Jira)" <ji...@apache.org> on 2022/05/05 15:07:00 UTC

[jira] [Commented] (CXF-8692) CXF custom sensitive logging doesn't work on jaxrs and jaxws features blueprint declaration

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

Julien Greffe commented on CXF-8692:
------------------------------------

Hello [~reta],

you're right, this property was set.

Closing the JIRA.

> CXF custom sensitive logging doesn't work on jaxrs and jaxws features blueprint declaration
> -------------------------------------------------------------------------------------------
>
>                 Key: CXF-8692
>                 URL: https://issues.apache.org/jira/browse/CXF-8692
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, logging, WS-* Components
>    Affects Versions: 3.4.7
>            Reporter: Julien Greffe
>            Priority: Major
>         Attachments: image-2022-04-13-11-50-12-253.png
>
>
> 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;
> {code:java}
> <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>
> {code}
> Working:
> {code:java}
> <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>
> {code}
> 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
> !image-2022-04-13-11-50-12-253.png!



--
This message was sent by Atlassian Jira
(v8.20.7#820007)