CFX在属性文件中使用加密密码

时间:2014-04-29 11:16:45

标签: cxf ws-security password-encryption

我正在使用CXF来实现我的Web服务安全性。我有以下配置:

  <entry key="ws-security.callback-handler" value="PasswordCallbackHandler"/>
  <entry key="ws-security.encryption.properties" value="WEB-INF/keystore.properties"/>
  <entry key="ws-security.signature.properties" value="WEB-INF/keystore.properties"/>
  <entry key="ws-security.encryption.username" value="useReqSigCert"/>

目前我们将密码存储在keystore.properties中作为明文密码。我想存储一个加密的密码,然后用它来登录密钥库。

知道我需要做什么吗?

由于

1 个答案:

答案 0 :(得分:1)

CXF 3.0.0支持在加密属性文件中使用加密密码。在此方案中,CallbackHandler必须提供用于解密加密密码的密码。有关更多信息,请参见此处:

http://ws.apache.org/wss4j/newfeatures20.html

http://coheigea.blogspot.ie/2014/02/apache-wss4j-200-part-iv.html

科尔姆。