Content type filtering

Overview

The SOAP Messages with Attachments specification introduced a standard for transmitting arbitrary files along with SOAP messages as part of a multipart MIME message. In this way, both XML and non-XML data, including binary data, can be encapsulated in a SOAP message. The more recent Direct Internet Message Encapsulation (DIME) specification describes another way of packaging attachments with SOAP messages.

The API Gateway can accept or block multipart messages with certain MIME or DIME content types. For example, you can configure a Content Type filter that blocks multipart messages with parts of type image/jpeg.

Allow or deny content types

The Content Type Filtering screen lists the content types that are allowed or denied by this filter.

Allow Content Types:

Use this option if you wish to accept most content types, but only want to reject a few specific types. To allow or deny incoming messages based on their content types, complete the following steps:

  1. Select the Allow content types radio button to allow multipart messages to be routed onwards. If you wish to allow all content types, you do not need to select any of the MIME types in the list.

  2. To deny multipart messages with certain MIME or DIME types as parts, select those types here. Multipart messages containing the selected MIME or DIME type parts will be rejected.

Deny Content Types:

If you wish to block multipart messages containing most content types, but want to allow a small number of content types, select this option. To reject multipart messages based on the content types of their parts, complete the following steps:

  1. Select the Deny content types radio button to reject multipart messages. If you wish to block all multipart messages, you do not need to select any of the MIME or DIME types in the list.

  2. To allow messages with parts of a certain MIME or DIME type, select the checkbox next to those types. Multipart messages with parts of the MIME or DIME types selected here will be allowed. All other MIME or DIME types will be denied.

MIME and DIME types can be added by clicking the MIME/DIME Registered Types button. The next section describes how to add, edit, and remove MIME/DIME types.

Configure MIME/DIME types

The MIME/DIME Settings dialog enables you to configure new and existing MIME types. When a type is added, you can configure the API Gateway to accept or block multipart messages with parts of this type.

Click the Add button to add a new MIME/DIME type, or highlight a type in the table, and select the Edit button to edit an existing type. To delete an existing type, select that type in the list, and click the Remove button. You can edit or add types using the Configure MIME/DIME Type dialog.

Enter a name for the new type in the MIME or DIME Type field, and the corresponding file extension in the Extension field.