|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Represents configuration of message's WS-Security and Timestamp headers.
This interface is used for runtime configuration that
is applied to next outgoing message, and persistent configuration (used MessageConf is given by Java method name) WSSEProviderConf.
Configuration contains
setSecurityTokens(org.systinet.wasp.security.ws.conf.SecurityTokenConf[]), setEncryptedData(org.systinet.wasp.security.ws.conf.EncryptedDataConf[]), setEncryptedKeys(org.systinet.wasp.security.ws.conf.EncryptedKeyConf[]), setSignatures(org.systinet.wasp.security.ws.conf.SignatureConf[])
and setReferenceLists(org.systinet.wasp.security.ws.conf.ReferenceListConf[])
setMustUnderstand(java.lang.Boolean), setRole(java.lang.String), setNoSecurityHeader(java.lang.Boolean).
setNoSecurityHeader(java.lang.Boolean) is set to true, then no security header is generated, even if there are security tokens, encrypted keys, etc.
This option allows to configure creation of "unsecure" message in WS-Security security provider usage.
setCreateTimestampHeader(java.lang.Boolean), setMustUnderstandTimestampHeader(java.lang.Boolean)
setSecureFault(java.lang.Boolean)
setWsseNamespace(java.lang.String), setWsuNamespace(java.lang.String)
Sender
CallContext, ServiceEndpoint
or ServiceClient. The key is Constants.CD_MESSAGE_CONF.
Configuration stored at CallContext has higher priority than configuration at service endpoint and service client.
WSSEConf and IncomingValidator.
Example:
Configurable configurable = Configurator.newRuntimeConfigurable(); MessageConf messageConf = (MessageConf)configurable.narrow(MessageConf.class); ...setup messageConf (createSecurityTokenEncryptedData,EncryptedKey,Signatures,ReferenceList)... ServiceClient serviceClient = ServiceClient.create(...); MyService ref = (MyService)serviceClient.createProxy( MyService.class ); WaspSecurity.setInitiatingProvider(serviceClientContext, Constants.PROVIDER_NAME); // set it on service client serviceClient.getContext().getContextData().put( Constants.CD_MESSAGE_CONF, messageConf ); // or set it on call context serviceClient.getCallContext().getContextData().put( Constants.CD_MESSAGE_CONF, messageConf );
Configurable configurable = Configurator.newRuntimeConfigurable(); MessageConf messageConf = (MessageConf)configurable.narrow(MessageConf.class); ...setup messageConf (createSecurityTokenEncryptedData,EncryptedKey,Signatures,ReferenceList)... ServiceEndpointContext serviceEndpointContext = Current.getServiceEndpointContext(); WaspSecurity.setInitiatingProvider(serviceEndpointContext, Constants.PROVIDER_NAME); // set it on service endpoint serviceEndpointContext.getContext().getContextData().put(Constants.CD_MESSAGE_CONF, messageConf); // or set it on call context - this code must be called in processing (e.g., service's code, validator,...) Current.getCallContext().getContextData().put(Constants.CD_MESSAGE_CONF, messageConf);
WSSEProviderConf.
Receiver
Receiver can check received message configuration's encrypted key using IncomingValidator.
| Method Summary | |
java.lang.Boolean |
getCreateTimestampHeader()
Gets the flag that indicates Timestamp header presence. |
EncryptedDataConf[] |
getEncryptedData()
Gets configuration of encrypted data. |
EncryptedKeyConf[] |
getEncryptedKeys()
Gets configuration of encrypted keys. |
java.lang.Boolean |
getMustUnderstand()
Gets the value of Soap mustUnderstand atribute of the Security header. |
java.lang.Boolean |
getMustUnderstandTimestampHeader()
Gets the value of Soap mustUnderstand atribute of the Timestamp header. |
java.lang.Boolean |
getNoSecurityHeader()
Disables generation of the security header. |
ReferenceListConf[] |
getReferenceLists()
Gets configuration XML Encryption's reference lists to be contained in Security header. |
java.lang.String |
getRole()
Gets the value of Soap role attribute of the Security header. |
java.lang.Boolean |
getSecureFault()
Gets the flag that indicates whether to to apply WS-Security configuration to Soap faults or not. |
SecurityTokenConf[] |
getSecurityTokens()
Gets configuration of security tokens. |
SignatureConf[] |
getSignatures()
Gets configuration of signatures. |
java.lang.String |
getTimestampId()
Sets ID of the timestamp so it can be signed. |
java.lang.String |
getVersion()
Gets WS-Security version currently used. |
java.lang.String |
getWsseNamespace()
Deprecated. Use getVersion() instead. |
java.lang.String |
getWsuNamespace()
Deprecated. Use getVersion() instead. |
EncryptedDataConf |
newEncryptedData()
Creates new instance of EncryptedDataConf. |
EncryptedKeyConf |
newEncryptedKey()
Creates new instance of EncryptedKeyConf. |
ReferenceListConf |
newReferenceList()
Creates new instance of ReferenceListConf. |
SecurityTokenConf |
newSecurityToken()
Creates new instance of SecurityTokenConf. |
SignatureConf |
newSignature()
Creates new instance of SignatureConf. |
void |
setCreateTimestampHeader(java.lang.Boolean flag)
Sets the flag that indicates whether to generate Timestamp header or not. |
void |
setEncryptedData(EncryptedDataConf[] dataConfs)
Sets configuration of encrypted data, originally defined by XML Encryption specification. |
void |
setEncryptedKeys(EncryptedKeyConf[] keyConfs)
Sets configuration of encrypted keys, originally defined by XML Encryption specification. |
void |
setMustUnderstand(java.lang.Boolean flag)
Sets the value of Soap mustUnderstand atribute of the Security header. |
void |
setMustUnderstandTimestampHeader(java.lang.Boolean flag)
Sets the value of Soap mustUnderstand atribute of the Timestamp header. |
void |
setNoSecurityHeader(java.lang.Boolean flag)
Disables generation of the security header. |
void |
setReferenceLists(ReferenceListConf[] referenceListConf)
Sets configuration XML Encryption's reference lists to be contained in Security header. |
void |
setRole(java.lang.String role)
Sets the value of Soap role attribute of the Security header. |
void |
setSecureFault(java.lang.Boolean secureFault)
Sets the flag that indicates whether to apply WS-Security configuration to Soap faults or not. |
void |
setSecurityTokens(SecurityTokenConf[] tokenConfs)
Sets configuration of security tokens. |
void |
setSignatures(SignatureConf[] signatureConfs)
Sets configuration of signatures. |
void |
setTimestampId(java.lang.String id)
Gets ID of the timestamp so it can be signed. |
void |
setVersion(java.lang.String version)
Sets WS-Security version to be used. |
void |
setWsseNamespace(java.lang.String namespace)
Deprecated. Use setVersion(java.lang.String) instead. |
void |
setWsuNamespace(java.lang.String namespace)
Deprecated. Use setVersion(java.lang.String) instead. |
| Methods inherited from interface org.systinet.wasp.security.ws.conf.ElementConf |
getWsuId, setWsuId |
| Method Detail |
public void setVersion(java.lang.String version)
version - versionpublic java.lang.String getVersion()
null is not specified):
public void setWsseNamespace(java.lang.String namespace)
setVersion(java.lang.String) instead.
namespace - wsse namespacegetWsseNamespace(),
Constants.DEFAULT_WSSE_NAMESPACEpublic java.lang.String getWsseNamespace()
getVersion() instead.
setWsseNamespace(java.lang.String),
Constants.DEFAULT_WSSE_NAMESPACEpublic void setWsuNamespace(java.lang.String namespace)
setVersion(java.lang.String) instead.
namespace - wsse namespacegetWsuNamespace(),
Constants.DEFAULT_WSU_NAMESPACEpublic java.lang.String getWsuNamespace()
getVersion() instead.
setWsuNamespace(java.lang.String),
Constants.DEFAULT_WSU_NAMESPACEpublic void setRole(java.lang.String role)
role - value of Soap:role attributegetRole()public java.lang.String getRole()
nullsetRole(java.lang.String)public void setMustUnderstand(java.lang.Boolean flag)
flag - the attribute valuegetMustUnderstand()public java.lang.Boolean getMustUnderstand()
setMustUnderstand(java.lang.Boolean)public void setSecurityTokens(SecurityTokenConf[] tokenConfs)
tokenConfs - token configurationsgetSecurityTokens(),
newSecurityToken()public SecurityTokenConf[] getSecurityTokens()
newSecurityToken()public SecurityTokenConf newSecurityToken()
SecurityTokenConf.
setSecurityTokens(SecurityTokenConf[])public void setCreateTimestampHeader(java.lang.Boolean flag)
flag - true to generate Timestamp headergetCreateTimestampHeader(),
setTimestampId(java.lang.String),
getTimestampId()public java.lang.Boolean getCreateTimestampHeader()
true in the case of Timestamp header presencesetCreateTimestampHeader(Boolean),
setTimestampId(java.lang.String),
getTimestampId()public java.lang.String getTimestampId()
setCreateTimestampHeader(java.lang.Boolean),
getCreateTimestampHeader(),
setTimestampId(java.lang.String)public void setTimestampId(java.lang.String id)
id - the ID valuesetCreateTimestampHeader(java.lang.Boolean),
getCreateTimestampHeader(),
getTimestampId()public void setSignatures(SignatureConf[] signatureConfs)
signatureConfs - signature configurationsgetSignatures(),
newSignature()public SignatureConf[] getSignatures()
setSignatures(org.systinet.wasp.security.ws.conf.SignatureConf[])public SignatureConf newSignature()
SignatureConf.
setSignatures(SignatureConf[])public void setEncryptedKeys(EncryptedKeyConf[] keyConfs)
keyConfs - encrypted key configurationsgetEncryptedKeys(),
newEncryptedKey()public EncryptedKeyConf[] getEncryptedKeys()
setEncryptedKeys(org.systinet.wasp.security.ws.conf.EncryptedKeyConf[])public EncryptedKeyConf newEncryptedKey()
EncryptedKeyConf.
setEncryptedKeys(EncryptedKeyConf[])public void setEncryptedData(EncryptedDataConf[] dataConfs)
dataConfs - encrypted data configurationsgetEncryptedData(),
newEncryptedData()public EncryptedDataConf[] getEncryptedData()
setEncryptedData(org.systinet.wasp.security.ws.conf.EncryptedDataConf[])public EncryptedDataConf newEncryptedData()
EncryptedDataConf.
setEncryptedData(EncryptedDataConf[])public void setReferenceLists(ReferenceListConf[] referenceListConf)
referenceListConf - ReferenceList configurationsgetReferenceLists(),
newReferenceList()public ReferenceListConf[] getReferenceLists()
setReferenceLists(org.systinet.wasp.security.ws.conf.ReferenceListConf[])public ReferenceListConf newReferenceList()
ReferenceListConf.
setReferenceLists(org.systinet.wasp.security.ws.conf.ReferenceListConf[])public void setSecureFault(java.lang.Boolean secureFault)
false. If set to true,
the configuration of the WS-Security MUST be applicable to the Soap
message which contains the Soap fault.
secureFault - true to sign SOAP faultgetSecureFault()public java.lang.Boolean getSecureFault()
null to use defaultsetSecureFault(java.lang.Boolean)public void setMustUnderstandTimestampHeader(java.lang.Boolean flag)
flag - the attribute valuegetMustUnderstandTimestampHeader()public java.lang.Boolean getMustUnderstandTimestampHeader()
setMustUnderstandTimestampHeader(java.lang.Boolean)public java.lang.Boolean getNoSecurityHeader()
setNoSecurityHeader(java.lang.Boolean)public void setNoSecurityHeader(java.lang.Boolean flag)
flag - the flag valuegetNoSecurityHeader()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||