<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"><title type="text">Blog posts by Reis Holmes</title><link href="http://world.optimizely.com" /><updated>2020-04-08T11:38:30.0000000Z</updated><id>https://world.optimizely.com/blogs/reis-holmes/</id> <generator uri="http://world.optimizely.com" version="2.0">Optimizely World</generator> <entry><title>Web Application Firewall (WAF) Rules on DXP</title><link href="https://world.optimizely.com/blogs/reis-holmes/dates/2020/4/web-application-firewall-waf-rules/" /><id>&lt;p&gt;&lt;span&gt;Web Application Firewall (WAF) rules help security within your &lt;a href=&quot;/digital-experience-cloud-service/introduction/&quot;&gt;Digital Experience Platform (DXP)&lt;/a&gt;.&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;What are WAF Rules?&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;The &lt;a href=&quot;/digital-experience-cloud-service/dxc-security/web-application-firewall/&quot;&gt;Web Application Firewall&lt;/a&gt; monitors website traffic and filters any traffic it considers illegitimate.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A WAF rule compares an element of a web request against a defined user pattern. If the rule makes a match, the rule applies an action to a website.&amp;nbsp; In practical terms this could be as simple as:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;IF &amp;lsquo;Country&amp;rsquo; EQUALS &amp;lsquo;Sweden&amp;rsquo; THEN &amp;lsquo;Block&amp;rsquo;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this example, web requests that have the Swedish country code are blocked from access to the website.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A more complex example could be:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;IF &amp;lsquo;Country&amp;rsquo; DOES NOT EQUAL &#39;Germany&#39; AND &#39;URI PATH&#39; EQUALS &#39;api&#39; AND &#39;Request Method&#39; EQUALS &#39;POST&#39; THEN &#39;Block&#39;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this example, web requests that have a path of &lt;code&gt;&#39;api&#39;&lt;/code&gt; making a &lt;code&gt;&#39;POST&#39;&lt;/code&gt; request and from any country code not matching Germany&amp;rsquo;s country code is blocked from access to the website.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Over the course of a website development lifecycle, the default WAF ruleset may not completely align with business requirements. Scenarios can arise where there is a need for more rule granularity. Episerver can apply more specific actions on WAF rules.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Should I use custom WAF rules?&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;You should use WAF rules sparingly, because rules introduce another complexity to website management, and many sites on the DXP platform do not require them.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The general recommendation for the DXP is to &lt;strong&gt;perform as much as possible in code&lt;/strong&gt;. Try to achieve the desired result in your code-base to provide you the most visibility, flexibility, speed, and ease of management for your project. For example, here are some common requests:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;&lt;span&gt;I would like to lockdown my editor login page to a specific IP address.&lt;/span&gt;&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;&lt;span&gt;I would like my integration/pre-production environments to only be visible from my office network.&lt;/span&gt;&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;These requests &lt;em&gt;could&lt;/em&gt; be written through WAF rules, but instead you should utilise &lt;a href=&quot;/link/b81a13f67fee4deeaef672eeaa1793e9.aspx&quot;&gt;rewrite rules in your web.config&lt;/a&gt; and make the rules part of your code.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;See the examples at the end of this article for common requests that can become WAF rules.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;How do I use WAF rules?&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;Visit our &lt;a href=&quot;/link/7ecb44851f5d45228180dea39dfc573a.aspx&quot;&gt;support page&lt;/a&gt; to see if your query is already answered in our self-help resources. If your query is not answered, and you are &lt;em&gt;an eligible customer or partner&lt;/em&gt;, then raise a support ticket, being specific to speed resolution time. It is helpful if you can also cite a business use case to provide further context to what you are trying to accomplish.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It&amp;rsquo;s helpful to think of a WAF rule as performing either an &lt;strong&gt;Allow&lt;/strong&gt;, &lt;strong&gt;Block&lt;/strong&gt;, or &lt;strong&gt;Bypassing&lt;/strong&gt; a built-in security feature of the firewall.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span&gt;Examples&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;&lt;span&gt;Here are some common examples of when a WAF rule could be used. You can use the following templates as examples for how to structure your support query with &lt;a href=&quot;https://en.wikipedia.org/wiki/Pseudocode&quot;&gt;pseudocode&lt;/a&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;I am trying to achieve the following result for my site &amp;lt;www.example.com&amp;gt; and would like to know if it this can be performed in code or if it should be performed through WAF rules:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;IF &#39;Country&#39; DOES NOT EQUAL &#39;Sweden&#39; AND &#39;URI Path&#39; EQUALS &#39;api&#39; THEN &#39;BLOCK&#39;&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;We use an external payment provider with a public IP address of 123.123.123.123 that performs POST attempts to &#39;/payment&#39; on our site. These requests appear to be being blocked by the firewall, can you whitelist our payment provider? Here is the desired result:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;IF &#39;IP Address&#39; EQUALS &#39;123.123.123.123&#39; AND &#39;URI PATH&#39; EQUALS &#39;payment&#39; AND &#39;REQUEST METHOD&#39; EQUALS &#39;POST&#39; THEN &#39;Bypass WAF&#39;&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;We use a third-party website crawler for search engine optimizations but it is being CAPTCHA-challenged on our site &amp;lt;www.mysite.com&amp;gt;. The crawler is identifiable through a portion of the user-agent containing &#39;my-cool-webcrawler-2.2&#39;. Can you please make sure this is allowed?&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;IF &#39;User Agent&#39; CONTAINS &#39;my-cool-webcrawler-2.2&#39; THEN &#39;Allow&#39;&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span&gt;Our website is under constant attack from IP addresses in India. We are a UK business and do not ship outside of the UK.&amp;nbsp; Can we block India as a country to prevent these attacks from hitting our site?&#39;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;code&gt;IF &#39;Country&#39; EQUALS &#39;India&#39; THEN &#39;BLOCK&#39;&lt;/code&gt;&lt;/p&gt;</id><updated>2020-04-08T11:38:30.0000000Z</updated><summary type="html">Blog post</summary></entry></feed>