Apply policy changes, such as profile and filter details, to a profile. This API setting
is a
POST request. The posted XML request identifies both the filter to be updated and
the filter
detail that is being set. Note that when making update filter settings requests:
- Filters can be identified by name, number, policy-ID, or signature-ID, but only one of these identifications are required inside a filter schema type.
- If a filter is not identified within the filter XML tags, then that filter update section will fail.
- If an XML request contains more than one update and one of them fails, the other updates can still succeed and get applied successfully.
Definition
ipsProfileMgmt/setFilters
Parameters
| Parameter | Type | Description |
| actionset | string |
|
| afc | boolean | Indicates whether the filter is managed by the IPS Adaptive Filter
Configuration (AFC).
If a filter is managed by AFC, then the filter will be
automatically disabled when the device is under heavy load and the given filter
is being triggered without actual filter match.
|
| comment | string | Filter comments. |
| control | string |
|
| enabled | boolean |
|
| filter | Read-only parent element. | |
| locked | boolean | Boolean variable indicating if the filter is locked. Locked filters cannot be remotely changed. |
| number | integer | Read-only internal assigned number for the filter. |
| name | string | Read-only filter name. |
| policy-id | string | Read-only internal ID assigned to the policy, expressed in UUID format. |
| profile | string |
|
| signature-id | string | Read-only internal ID assigned to the filter, expressed in UUID format. |
| trigger |
Trigger frequency detection parameter for the filter. Used only for scan/sweep filters.
|
|
| useParent | boolean | Indicates whether the action set setting for the filter is inherited from a parent profile. |
Example
curl -X POST -k --header "X-SMS-API-KEY: <string>" –form name=@setfilters.xml
"https://<sms_server>/ipsProfileMgmt/setFilters?"
Request Schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="uuid">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"/>
</xs:restriction>
</xs:simpleType>
<xs:element name="setFilters">
<xs:complexType>
<xs:sequence>
<xs:element name="profile">
<xs:complexType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="id" type="uuid"/>
</xs:complexType>
</xs:element>
<xs:element name="filter" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:choice>
<xs:element name="policy-id" type="uuid"/>
<xs:element name="signature-id" type="uuid"/>
<xs:element name="number" type="xs:positiveInteger"/>
<xs:element name="name" type="xs:string"/>
</xs:choice>
<xs:element name="locked" type="xs:boolean" minOccurs="0"/>
<xs:element name="comment" type="xs:string" minOccurs="0"/>
<xs:element name="control" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Category"/>
<xs:enumeration value="Filter"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="actionset" minOccurs="0">
<xs:complexType>
<xs:attribute name="refid" type="uuid"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="enabled" type="xs:boolean" minOccurs="0"/>
<xs:element name="afc" type="xs:boolean" minOccurs="0"/>
<xs:element name="useParent" type="xs:boolean" minOccurs="0"/>
<xs:element name="trigger" minOccurs="0">
<xs:complexType>
<xs:attribute name="threshold">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="10000"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="timeout">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="999999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
The following example shows an update filter serttings request
XML:
<setFilters>
<profile name="ProfileNameHere"/>
<filter>
<number>7001</number>
<actionset name="Block + Notify"/>
<trigger threshold="10" timeout="5000"/>
</filter>
<filter>
<number>3295</number>
<actionset name="Block + Notify"/>
</filter>
<filter>
<signature-id>00000001-0001-0001-0001-000000000027</signature-id>
<enabled>false</enabled>
</filter>
<filter>
<policy-id>00000002-0002-0002-0002-000000000051</policy-id>
<comment>this is a comment</comment>
</filter>
<filter>
<name>0050: IP Options: Unknown Code</name>
<actionset refid="57ec4769-ca05-4dc5-8e79-a34c182adc48"/>
</filter>
</setFilters>
Update Filters Settings XML Response
Response Schema
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs"http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="uuid">
<xs:restriction base="xs:string">
<xs:pattern
value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"/>
<xs:restriction>
<xs:simpleType>
<xs:element name="filters">
<xs:complexType>
<xs:sequence>
<xs:element name="profile">
<xs:compleType>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="version" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="filter" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="policy-id" type="uuid"/>
<xs:element name="version" type="xs:string"/>
<xs:element name="locked" type="xs:boolean"/>
<xs:element name="useParent" type="xs:boolean"/>
<xs:element name="comment" type="xs:string" minOccurs="0"/>
<xs:element name="description" type="xs:string" minOccurs="0"/>
<xs:element name="severity" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Low"/>
<xs:enumeration value="Minor"/>
<xs:enumeration value="Major"/>
<xs:enumeration value="Critical"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="enabled" type="xs:boolean"/>
<xs:element name="actionset" minOccurs="0">
<xs:complexType>
<xs:attribute name="refid" type="uuid"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="control">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Category"/>
<xs:enumeration value="Filter"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="afc" type="xs:boolean"/>
<xs:element name="policyGroup" minOccurs="0">
<xs:complexType>
<xs:attribute name="refid" type="uuid"/>
</xs:complexType>
</xs:element>
<xs:element name="trigger" minOccurs="0">
<xs:complexType>
<xs:attribute name="threshold">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="10000"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="timeout">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="999999"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="capability" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="enabled" type="xs:boolean"/>
<xs:element name="actionset" minOccurs="0">
<xs:complexType>
<xs:attribute name="refid" type="uuid"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
