|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XMessageAbstractType
Abstract base type from which all XKMS messages are derived.
[86] The MessageAbstractType abstract type is the type from which all XKMS message element types are derived. The MessageAbstractType abstract type contains the following element and attributes:
<ds:Signature>
[Optional]
An XML Signature in enveloped mode. The scope of the signature is
the entire request message (i.e. the element derived from
MessageAbstractType) and is specified using a reference to the 'Id' attribute
specified in the MessageAbstractType abstract type.
<MessageExtension>
[Any Number]
An extension element derived from the MessageExtensionAbstractType.
<OpaqueClientData>
[Optional]
A collection of data specified by the client that is opaque to the service.
An XKMS service SHOULD return the value of the <OpaqueClientData>
element unmodified in a request in a response with status code 'Success'.
Id [Required]
A unique identifier generated by the originator.
Service [Required]
The URI of the Web Service port to which the request is addressed.
Nonce [Optional]
Cryptographically random data used to defend against replay attack.
Element <ds:Signature>
[88] An XML Signature in enveloped mode. The scope of the signature
is the entire request message (i.e. the element derived from
MessageAbstractType) and is specified using a reference to the 'Id' attribute
specified in the MessageAbstractType abstract type. The empty identifier ""
MUST NOT be used.
[89] Validation of XML Signatures MUST be done independent of any ancestral
XML context of the message.
This may be achieved by:
-- Isolating the XKMS message from any
'wrapper' (eg. SOAP) before validation, or;
-- Specifying a
canonicalization algorithm, such as Exclusive XML Canonicalization, in
<SignedInfo>:<CanonicalizationMethod> to exclude ancestral XML
context during the validation of the message.
[90] For interoperability purposes XKMS implementations MUST support the use of Exclusive XML Canonicalization.
[91] The <ds:Signature>
element is specified in the XML Signature
specification.
Element <MessageExtension>
[92] The <MessageExtension>
element is an abstract element of the
abstract type MessageExtensionAbstractType. Implementations may define
subclasses of the MessageExtensionAbstractType to define message extension
elements that may be applied to any XKMS message.
Element <OpaqueClientData>
[94] The <OpaqueClientData>
contains data specified by the client
that is opaque to the service. An XKMS service SHOULD return the value of an
<OpaqueClientData>
element, including its children, specified in a
request unmodified in the corresponding response.
[95] A client MAY use Opaque client data in conjunction with asynchronous request processing to match a response to the original request context. Opaque client data MAY also be used in conjunction with synchronous request processing to provide context information for purposes such as audit trail reconciliation.
[364] Clients SHOULD NOT send confidential or privacy sensitive data to an XKMS Service as Opaque Data unless it is encrypted such that it is not disclosed to the service.
Method Summary | |
---|---|
void |
addDefaults(XKMSContext ctx)
Add default values to message. |
void |
addOpaqueClientData(byte[] data)
Adds a byte array to the OpaqueClientData of
this message. |
void |
clearOpaqueClientData()
Clears the content of OpaqueClientData
of this message. |
NCName |
getId()
Gets the Id of this message. |
String |
getMessageName()
Gets plain text name of message. |
byte[] |
getNonce()
Returns the Nonce of this message. |
List<byte[]> |
getOpaqueClientData()
Gets all byte arrays in OpaqueClientData
of this message. |
byte[] |
getRequestSignatureValue()
Gets the RequestSignatureValue . |
String |
getService()
Returns the Service URI of this message. |
X509Certificate |
getSignatureCertificate()
Gets certificate of message signature. |
boolean |
hasSignature()
Checks whether this message contains a signature. |
boolean |
isValid()
Checks whether this object is in a consistent state. |
void |
setId(NCName id)
Sets the Id of this message to the given NCName . |
void |
setNonce(byte[] indata)
Sets the Nonce of this message to the given value. |
void |
setService(String serviceURI)
Sets the Service URI of this message. |
void |
setSignature(Key privatekey,
X509Certificate cert)
Set credentials for whole message signature. |
String |
toString()
OBSOLETE |
Method Detail |
---|
void setSignature(Key privatekey, X509Certificate cert)
privatekey
- the private key to be used for signingcert
- the matching certificate to be used for signingboolean hasSignature()
true
if this message is signed,
false
otherwiseX509Certificate getSignatureCertificate()
null
otherwise.byte[] getRequestSignatureValue()
RequestSignatureValue
.
RequestSignatureValue
void addOpaqueClientData(byte[] data)
OpaqueClientData
of
this message.
data
- the data to addList<byte[]> getOpaqueClientData()
OpaqueClientData
of this message.
List<byte[]>
of all byte arrays in the
OpaqueClientData
void clearOpaqueClientData()
OpaqueClientData
of this message.
void setId(NCName id)
Id
of this message to the given NCName
.
id
- new value for Id.NCName getId()
void setService(String serviceURI) throws XKMSException
Service
URI of this message.
serviceURI
- value to set
XKMSException
- if the supplied value is not an URIString getService()
Service
URI of this message.
Service
URIvoid setNonce(byte[] indata)
Nonce
of this message to the given value.
indata
- new nonce valuebyte[] getNonce()
Nonce
of this message.
void addDefaults(XKMSContext ctx)
Id
is set to a random value.Service
URI is set to default value, if set in context.
boolean isValid()
true
if this object is in a conistent state,
false
otherwiseString getMessageName()
String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |