|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.ws.soap.security.callback.AbstractCallbackHandler
org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler
org.springframework.ws.soap.security.wss4j.callback.KeyStoreCallbackHandler
public class KeyStoreCallbackHandler
Callback handler that uses Java Security KeyStores to handle cryptographic callbacks. Allows for
specific key stores to be set for various cryptographic operations.
KeyStoreFactoryBean| Field Summary |
|---|
| Fields inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler |
|---|
logger |
| Constructor Summary | |
|---|---|
KeyStoreCallbackHandler()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected void |
handleDecrypt(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.DECRYPT usage. |
protected void |
handleKeyName(org.apache.ws.security.WSPasswordCallback callback)
Invoked when the callback has a WSPasswordCallback.KEY_NAME usage. |
protected void |
loadDefaultKeyStore()
Loads the key store indicated by system properties. |
void |
setKeyStore(java.security.KeyStore keyStore)
Sets the key store to use if a symmetric key name is embedded. |
void |
setPrivateKeyPassword(java.lang.String privateKeyPassword)
Sets the password used to retrieve private keys from the keystore. |
void |
setSymmetricKeyPassword(java.lang.String symmetricKeyPassword)
Sets the password used to retrieve keys from the symmetric keystore. |
| Methods inherited from class org.springframework.ws.soap.security.wss4j.callback.AbstractWsPasswordCallbackHandler |
|---|
handleCleanup, handleCustomToken, handleEncryptedKeyToken, handleInternal, handleSecurityContextToken, handleSignature, handleUsernameToken, handleUsernameTokenPrincipal, handleUsernameTokenUnknown |
| Methods inherited from class org.springframework.ws.soap.security.callback.AbstractCallbackHandler |
|---|
handle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public KeyStoreCallbackHandler()
| Method Detail |
|---|
public void setKeyStore(java.security.KeyStore keyStore)
public void setPrivateKeyPassword(java.lang.String privateKeyPassword)
public void setSymmetricKeyPassword(java.lang.String symmetricKeyPassword)
setPrivateKeyPassword(String)
public void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exception
protected void handleDecrypt(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
AbstractWsPasswordCallbackHandlerWSPasswordCallback.DECRYPT usage.
This method is invoked when WSS4J needs a password to get the private key of the identifier (username) from the keystore. WSS4J uses this private key to
decrypt the session (symmetric) key. Because the encryption method uses the public key to encrypt the session key
it needs no password (a public key is usually not protected by a password).
Default implementation throws an UnsupportedCallbackException.
handleDecrypt in class AbstractWsPasswordCallbackHandlerjava.io.IOException
javax.security.auth.callback.UnsupportedCallbackException
protected void handleKeyName(org.apache.ws.security.WSPasswordCallback callback)
throws java.io.IOException,
javax.security.auth.callback.UnsupportedCallbackException
AbstractWsPasswordCallbackHandlerWSPasswordCallback.KEY_NAME usage.
This method is invoked when WSS4J needs the key associated with the identifier. WSS4J uses this key to encrypt or decrypt parts of the SOAP request. Note, the key must match the
symmetric encryption/decryption algorithm specified (refer to WSHandlerConstants.ENC_SYM_ALGO).
Default implementation throws an UnsupportedCallbackException.
handleKeyName in class AbstractWsPasswordCallbackHandlerjava.io.IOException
javax.security.auth.callback.UnsupportedCallbackExceptionprotected void loadDefaultKeyStore()
KeyStoreUtils.loadDefaultKeyStore().
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||