2.2.19.3 MessagePropertiesHeader

The MessagePropertiesHeader contains property information about a UserMessage Packet and the application-defined message payload.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

Flags

LabelLength

MessageClass

CorrelationID (20 bytes)

...

...

BodyType

ApplicationTag

MessageSize

AllocationBodySize

PrivacyLevel

HashAlgorithm

EncryptionAlgorithm

ExtensionSize

Label (variable)

...

ExtensionData (variable)

...

MessageBody (variable)

...

Flags (1 byte): An 8-bit unsigned integer field that specifies administration acknowledgments. Any combination of these values is acceptable unless otherwise noted in the following table.

For more details on administration acknowledgments, see [MS-MQQB] sections 3.1.7.2.1 and 3.1.5.8.10.


0


1


2


3


4


5


6


7

P

A

P

R

N

A

N

R

X

X

X

X

Where the bits are defined as:

Value

Description

PA

If the message is delivered to the destination queue, the server MUST send a positive acknowledgment.

PR

If the message is retrieved from the destination queue by the application, the server MUST send a positive acknowledgment.

NA

If the message is not delivered to the destination queue, the server MUST send a negative acknowledgment.

NR

If the message is not retrieved from the destination queue by the application, the server MUST send a negative acknowledgment.

X

Unused bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

X

Unused bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

X

Unused bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

X

Unused bit field. This field SHOULD NOT be set when sent and MUST be ignored on receipt.

LabelLength (1 byte): An 8-bit unsigned integer field that MUST be set to the number of elements of WCHAR in the Label field. This field has a valid range from 0x00 to 0xFA. When the value of this field is 0x00, the Label field MUST NOT be present after the ExtensionSize field. When greater than 0x00, this value MUST include the terminating null character.

MessageClass (2 bytes): A 16-bit unsigned integer that specifies the class of the message in the packet. The value MUST be set to a value of the MESSAGE_CLASS_VALUES enumeration specified in section 2.2.18.1.6.

CorrelationID (20 bytes): If this header appears outside an administration acknowledgement message, as specified in [MS-MQQB] section 3.1.5.8.10, then this field MUST be treated as an application-defined buffer and the server MUST not process or interpret this field.

If this header appears inside an administration acknowledgment message, as specified in [MS-MQQB] section 3.1.5.8.10, then this field MUST be set to a MessageIdentifier consisting of UserMessage.UserHeader.MessageID and UserMessage.UserHeader.SourceQueueManager of the message being acknowledged. See section 2.2.18.1.3 for details of the MessageIdentifier type.

BodyType (4 bytes): A 32-bit unsigned integer that specifies the type of data that is contained in the message body. This value MUST be set to a PROPVARIANT type constant as specified in section 2.2.12.

ApplicationTag (4 bytes): A 32-bit unsigned integer that specifies an application-defined value that can be used to organize messages and the server MUST not process or interpret this field.

MessageSize (4 bytes): A 32-bit unsigned integer that MUST be set to the size, in bytes, of the MessageBody field. The field MUST be set to a value between 0x00000000 and the size limit imposed by the value of BaseHeader.PacketSize.

AllocationBodySize (4 bytes): A 32-bit unsigned integer field that MUST be set to the size, in bytes, of the data allocated for the MessageBody field. This size can be larger than the actual message body size; for example, an encrypted message body might be larger than the original unencrypted message body, up to the size limit imposed by the value of BaseHeader.PacketSize.

PrivacyLevel (4 bytes): A 32-bit unsigned integer field that specifies the privacy level of the message in the UserMessage Packet. The privacy level determines what part of the message is encrypted. The field MUST be set to one of the following values.<6>

Value

Meaning

0x00000000

No encryption. The MessageBody field is sent as clear text.

0x00000001

The MessageBody field is encrypted using 40-bit end-to-end encryption.

0x00000003

The MessageBody field is encrypted using 128-bit end-to-end encryption.

0x00000005

The MessageBody field is encrypted using Advanced Encryption Standard (AES).

Any value not specified in the preceding table MUST be treated as an authentication failure.

HashAlgorithm (4 bytes): A 32-bit unsigned integer that specifies the hashing algorithm that is used when authenticating the message. The following table lists the allowed values for this field.

Value

Meaning

0x00008001

Specifies the MD2 hash algorithm, as specified in [RFC1319].

0x00008002

Specifies the MD4 hash algorithm, as specified in [RFC1320].

0x00008003

Specifies the MD5 hash algorithm, as specified in [RFC1321].

0x00008004

Specifies the SHA-1 hash algorithm, as specified in [RFC3110].

0x0000800C

Specifies the SHA-256 hash algorithm [FIPS180-2].

0x0000800E

Specifies the SHA-512 hash algorithm [FIPS180-2].

Any value not specified in the preceding table MUST be treated as an authentication failure when the SecurityHeader is present in the UserMessage and the SecurityHeader.SecurityData.Signature field is present. The SHA-512 hash algorithm (0x0000800E) SHOULD be used to generate the message signature.<7>

EncryptionAlgorithm (4 bytes): A 32-bit unsigned integer that specifies the encryption algorithm used to encrypt the MessageBody field. This field MUST be set to a value in the following table.

Value

Meaning

0x00006602

Specifies the RC2 algorithm, as specified in [RFC2268].

0x00006610

Specifies the AES 256 algorithm, as specified in [FIPS197].

0x0000660E

Specifies the AES 128 algorithm, as specified in [FIPS197].

0x0000660F

Specifies the AES 192 algorithm, as specified in [FIPS197].

0x00006801

Specifies the RC4 algorithm, as specified in [RFC4757].

Any value not specified in the preceding table MUST be treated as a failed decryption error when the SecurityHeader is present in the UserMessage and the SecurityHeader.EB flag is set.

This field MUST be set according to PrivacyLevel as specified in the following table.

PrivacyLevel

Allowed encryption algorithms

0x00000001

RC2, RC4

0x00000003

RC2, RC4

0x00000005

AES 128, AES 192, AES 256

When specifying AES or RC2, the initialization vector must be set to zero. The Padding used with AES or RC2 is [PKCS5] padding.

ExtensionSize (4 bytes): A 32-bit unsigned integer field that MUST be set to the length, in bytes, of the application-defined ExtensionData field. The field MUST be set to a value between 0x00000000 and the size limit imposed by the value of BaseHeader.PacketSize.

Label (variable): The Label field is an application-defined Unicode string. This field can be used by an application to assign a short descriptive string to the message. This field is of length LabelLength * 2 bytes and MUST NOT be more than 500 bytes. If LabelLength is nonzero, this field MUST be in the format specified by the following ABNF rule.

 label = 0*249(%x0001-FFFF) 0x0000

If LabelLength is zero then this field MUST NOT be present.

Unlike the fields preceding and including the Label field, the ExtensionData and MessageBody fields are not guaranteed to be on 4-byte boundaries.

ExtensionData (variable): This field is a buffer containing additional application-defined information that is associated with the message. This field is of length ExtensionSize bytes. If ExtensionSize is zero then this field MUST NOT be present.

MessageBody (variable): The MessageBody field is a buffer containing the application-defined message payload. This field is of length MessageSize bytes. If MessageSize is zero then this field MUST NOT be present.

The MessagePropertiesHeader packet MUST be a multiple of 4 bytes in length and MUST append padding bytes needed to ensure this requirement. There are no restrictions on the value of the padding bytes.<8>