|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.systinet.wasp.security.ws.ReferrableElement
org.systinet.wasp.security.ws.SecurityToken
org.systinet.wasp.security.ws.SharedSecretToken
Represents shared secret token. Suitable for message signing and encryption. This is Systinet proprietary token type.
The following algorithms are supported:
Note that in order to be able to receive messages which contain data encrypted with shared secret token, corresponding instance ofSharedSecretToken
has to be added to external (context) tokens, for example:
// shared secret key bytes - both parties should know it byte[] tripleDESkey = new byte[]{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23}; // create SecretKey instance for TripleDES algorithm SecretKey secretKey = new SecretKeySpec(tripleDESkey, Constants.SK_KEY_ALGORITHM_TRIPLEDES); // create shared secret token with key name http://systinet.com/example/symmetric SharedSecretToken token = new SharedSecretToken("http://systinet.com/example/symmetric", secretKey); // create context security configuration MessageSecurity ms = new MessageSecurity(); // add the token to external tokens in context security configuration ms.addExternalToken(token); // set context security configuration ms.setContextSecurity(...); //ServiceClient
orServiceEndpoint
instance
UsernameToken
,
X509Token
Field Summary |
Fields inherited from class org.systinet.wasp.security.ws.SecurityToken |
NULL_PROPERTY_CONF_ARRAY |
Constructor Summary | |
SharedSecretToken(java.lang.String keyName,
javax.crypto.SecretKey secretKey)
Initializes the token with the specified key name and shared secret. |
Method Summary | |
protected java.lang.String |
getEncryptionMethodHint()
Returns encryption method hint. |
protected java.lang.String |
getKeyEncryptionMethodHint()
Returns key encryption method hint. |
protected SecurityTokenConf |
getSecurityTokenConf(MessageConf messageConf)
Creates low-level API token configuration. |
protected java.lang.String |
getSignatureMethodHint()
Returns signature method hint. |
protected java.lang.String |
getTokenReferenceModeHint(SecurityElement securityElement)
Returns token reference mode hint. |
Methods inherited from class org.systinet.wasp.security.ws.SecurityToken |
getExternalTokenReferenceModeHint |
Methods inherited from class org.systinet.wasp.security.ws.ReferrableElement |
getId, getIdForced, setId |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SharedSecretToken(java.lang.String keyName, javax.crypto.SecretKey secretKey)
keyName
- key namesecretKey
- secret keyMethod Detail |
protected SecurityTokenConf getSecurityTokenConf(MessageConf messageConf)
getSecurityTokenConf
in class SecurityToken
protected java.lang.String getTokenReferenceModeHint(SecurityElement securityElement)
getTokenReferenceModeHint
in class SecurityToken
Constants.STM_KEYNAME
protected java.lang.String getSignatureMethodHint()
getSignatureMethodHint
in class SecurityToken
Constants.ALGO_ID_SIGNATURE_MAC_HMAC_SHA1
protected java.lang.String getEncryptionMethodHint()
getEncryptionMethodHint
in class SecurityToken
Constants.ALGO_ID_BLOCKCIPHER_TRIPLEDES
protected java.lang.String getKeyEncryptionMethodHint()
getKeyEncryptionMethodHint
in class SecurityToken
null
- no transported key
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |