Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update threat protection docs #7864

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified en/docs/assets/img/learn/mediation-json-validator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified en/docs/assets/img/learn/mediation-regex-policy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified en/docs/assets/img/learn/mediation-xml-validator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,25 @@ is given below.

To edit the existing sequence follow the steps below.

1. Log in to the Management Console.
2. Navigate to `/_system/governance/apimgt/customsequences/in/json_validator.xml `
3. Edit the `json_validator.xml` file.
4. Go to the API Publisher and re-publish your API for the changes to take effect.
1. Go to **Policies** section in the Publisher Portal.
2. Add a new policy with the name **JSON Validator** and provide an newer version.
3. Upload the Policy File with the required changes.
4. Click **Save** to save the newer version of the policy.
5. Apply the newly created policy to the API as per the below section.

### Applying the JSON validator policy

You can apply the predefined JSON Policy through the UI. Follow the instructions below to apply the json\_validator
in sequence.

- Create an API or edit an existing API.
1. Create an API or edit an existing API.
2. Go to **Policies** under the **API Configuration** sub-section from the left hand panel.
3. As required, drag and drop the **JSON Validator** from the Policy List tab into Request Flow.
4. Provide the required parameters for JSON validation.

- Go to **Message Mediation** Policies under **Request** configurations of the **Runtime Configurations** tab.

- Select **Edit** the message mediation bar and select **Common Policies** .

- Select `json\_validator` from the drop-down menu for Common Policies.

<a href="{{base_path}}/assets/img/learn/mediation-json-validator.png"><img src="{{base_path}}/assets/img/learn/mediation-json-validator.png" width="70%" alt="Select JSON validator from the drop-down menu"></a>

- Scroll down the page and click **Save** to save the changes.
<a href="{{base_path}}/assets/img/learn/mediation-json-validator.png"><img src="{{base_path}}/assets/img/learn/mediation-json-validator.png" width="70%" alt="Drag and drop the JSON Validator from the policy list"></a>

4. Scroll down the page and click **Save** to save the changes (click **Save and Deploy** and deploy the API for the changes to take effect in the gateways).

### Testing the JSON threat protector

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ We recommend the following patterns for denying requests.

To edit the existing sequence follow the steps below.

1. Log in to the Management Console.
2. Navigate to `/_system/governance/apimgt/customsequences/in/regex_policy.xml`
3. Edit the `regex_policy.xml` file.
4. Go to the API Publisher and re-publish your API for the changes to take effect.
1. Go to **Policies** section in the Publisher Portal.
2. Add a new policy with the name **Regex Policy** and provide an newer version.
3. Upload the Policy File with the required changes.
4. Click **Save** to save the newer version of the policy.
5. Apply the newly created policy to the API as per the below section.

### Applying the Regular Expression Policy

You can apply the predefined Regular Expression Policy through the UI. Follow the instructions below to apply the
regex\_policy in sequence.

1. Create an API or edit an existing API.
2. Go to **Message Mediation** Policies under **Request** configurations of the **Runtime Configurations** tab.
3. Select **Edit** in the message mediation bar and select **Common Policies** .
4. Select `regex_policy` from the drop-down menu for Common Policies.
1. Create an API or edit an existing API.
2. Go to **Policies** under the **API Configuration** sub-section from the left hand panel.
3. As required, drag and drop the **Regex Policy** from the Policy List tab into Request Flow.

<a href="{{base_path}}/assets/img/learn/mediation-regex-policy.png"><img src="{{base_path}}/assets/img/learn/mediation-regex-policy.png" width="70%" alt="Select Regex policy from the drop-down menu"></a>
<a href="{{base_path}}/assets/img/learn/mediation-regex-policy.png"><img src="{{base_path}}/assets/img/learn/mediation-regex-policy.png" width="70%" alt="Drag and drop the Regex Policy from the policy list"></a>

4. Scroll down the page and click **Save** to save the changes.
4. Scroll down the page and click **Save** to save the changes (click **Save and Deploy** and deploy the API for the changes to take effect in the gateways).

Each request is sanitized through the regular expression threat protector. You can add or modify the regex patterns
according to your requirement.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,24 @@ your requirement.

To edit the existing sequence follow the steps below.

1. Log in to the Management Console.
2. Navigate to `/_system/governance/apimgt/customsequences/in/xml_validator.xml`
3. Edit the `xml_validator.xml` file.
4. Go to the API Publisher and re-publish your API for the changes to take effect.
1. Go to **Policies** section in the Publisher Portal.
2. Add a new policy with the name **XML Validator** and provide an newer version.
3. Upload the Policy File with the required changes.
4. Click **Save** to save the newer version of the policy.
5. Apply the newly created policy to the API as per the below section.

### Applying the XML validator policy

You can apply the predefined XML Policy through the UI. Follow the instructions below to apply the xml\_validator
in sequence.

- Create an API or edit an existing API.

- Go to **Message Mediation** Policies under **Request** configurations of the **Runtime Configurations** tab.

- Select **Edit** in the message mediation bar and select **Common Policies** .

- Select `xml_validator` from the drop-down menu for Common Policies.

<a href="{{base_path}}/assets/img/learn/mediation-xml-validator.png"><img src="{{base_path}}/assets/img/learn/mediation-xml-validator.png" width="70%" alt="Select XML validator from the drop-down menu"></a>
1. Create an API or edit an existing API.
2. Go to **Policies** under the **API Configuration** sub-section from the left hand panel.
3. As required, drag and drop the **XML Validator** from the Policy List tab into Request Flow.

<a href="{{base_path}}/assets/img/learn/mediation-xml-validator.png"><img src="{{base_path}}/assets/img/learn/mediation-xml-validator.png" width="70%" alt="Drag and drop the XML Validator from the policy list"></a>

- Scroll down the page and click **Save** to save the changes.
4. Scroll down the page and click **Save** to save the changes (click **Save and Deploy** and deploy the API for the changes to take effect in the gateways).

### Testing the XML threat protector

Expand Down