Contents
The Compare Attribute filter enables you to compare the value of a specified
message attribute on the API Gateway white board with the values specified in the filter. For
example, the following filter only passes if the authentication.subject.id
message
attribute has a value of penelope
:
Configure the following fields:
Name:
Enter an appropriate name for this filter.
Filter will pass if:
Select all or one of the specified conditions to apply. Defaults to all. Click the Add button at the bottom right to specify a rule condition. In the Attribute filter rule dialog, perform the following steps:
-
Enter a message attribute name in the Value from text box on the left (for example,
http.request.verb
ormy.customer.attribute
). -
Select one of the following rule conditions from the drop-down list:
-
contains
-
doesn't contain
-
doesn't match regular expression
-
ends with
-
is
-
is not
-
matches regular expression
-
starts with
-
-
Enter a value to compare with in the text box on the right (for example,
POST
). Alternatively, you can enter a selector that is expanded at runtime (for example,${http.request.uri}
). For more details on selectors, see Selecting configuration values at runtime. -
Click OK.
Finally, to edit or delete an existing rule condition, select it in the table, and click the appropriate button.