cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CXF-2038) changes for signaturePropFile and decryptionPropFile of WSS4JInteceptor can't be reloaded if we use cxf in container
Date Thu, 12 Feb 2009 09:03:59 GMT

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

Freeman Fang updated CXF-2038:
------------------------------

    Description: 
if we use cxf with ws-security in some kind of container such as servicemix,  and if we change
the content of decryptionPropFile and signaturePropFile, then if we hot redeploy artifacts
into container, then the changes can't be loaded.
The error is caused by WSSHandler of wss4j, the DEC_PROP_FILE(decryptionPropFile) and SIG_PROP_FILE(signaturePropFile)get
loaded only once, see the code of loadDecryptionCrypto in WSSHandler
Crypto crypto = null;
String decPropFile = getString(WSHandlerConstants.DEC_PROP_FILE,
reqData.getMsgContext());
if (decPropFile != null) {
if ((crypto = (Crypto) cryptos.get(decPropFile)) == null) { 
//the cryptos is static so means if decryptionPropFile loaded before, then it won't be loaded
again even the content of decPropFile changed 
crypto = CryptoFactory.getInstance(decPropFile, this .getClassLoader(reqData.getMsgContext()));
cryptos.put(decPropFile, crypto); }
}
we should override the method in AbstractWSS4JInterceptor which is subclass of WSHandler to
ensure each change in DEC_PROP_FILE and SIG_PROP_FILE will be reloaded


  was:
if we use cxf with ws-security in some kind of container such as servicemix,  and if we change
the content of decryptionPropFile and signaturePropFile, then if we hot redeploy artifacts
into container, then the changes can't be loaded.
The error is caused by WSSHandler of wss4j, the DEC_PROP_FILE(decryptionPropFile) and SIG_PROP_FILE(signaturePropFile)get
loaded only once, see the code of loadDecryptionCrypto in WSSHandler
Crypto crypto = null;
String decPropFile = getString(WSHandlerConstants.DEC_PROP_FILE,
reqData.getMsgContext());
if (decPropFile != null) {
if ((crypto = (Crypto) cryptos.get(decPropFile)) == null) { 
//here means if decryptionPropFile loaded before, then it won't be loaded again even the content
of decPropFile changed 
crypto = CryptoFactory.getInstance(decPropFile, this .getClassLoader(reqData.getMsgContext()));
cryptos.put(decPropFile, crypto); }
}
we should override the method in AbstractWSS4JInterceptor which is subclass of WSHandler to
ensure each change in DEC_PROP_FILE and SIG_PROP_FILE will be reloaded



> changes for signaturePropFile and decryptionPropFile of WSS4JInteceptor can't be reloaded
if we use cxf in container
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2038
>                 URL: https://issues.apache.org/jira/browse/CXF-2038
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.0.10, 2.1.4
>            Reporter: Freeman Fang
>            Assignee: Freeman Fang
>             Fix For: 2.2, 2.0.11, 2.1.5
>
>
> if we use cxf with ws-security in some kind of container such as servicemix,  and if
we change the content of decryptionPropFile and signaturePropFile, then if we hot redeploy
artifacts into container, then the changes can't be loaded.
> The error is caused by WSSHandler of wss4j, the DEC_PROP_FILE(decryptionPropFile) and
SIG_PROP_FILE(signaturePropFile)get loaded only once, see the code of loadDecryptionCrypto
in WSSHandler
> Crypto crypto = null;
> String decPropFile = getString(WSHandlerConstants.DEC_PROP_FILE,
> reqData.getMsgContext());
> if (decPropFile != null) {
> if ((crypto = (Crypto) cryptos.get(decPropFile)) == null) { 
> //the cryptos is static so means if decryptionPropFile loaded before, then it won't be
loaded again even the content of decPropFile changed 
> crypto = CryptoFactory.getInstance(decPropFile, this .getClassLoader(reqData.getMsgContext()));
cryptos.put(decPropFile, crypto); }
> }
> we should override the method in AbstractWSS4JInterceptor which is subclass of WSHandler
to ensure each change in DEC_PROP_FILE and SIG_PROP_FILE will be reloaded

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message