
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/">
    <channel>
        <title><![CDATA[ The Cloudflare Blog ]]></title>
        <description><![CDATA[ Get the latest news on how products at Cloudflare are built, technologies used, and join the teams helping to build a better Internet. ]]></description>
        <link>https://blog.cloudflare.com</link>
        <atom:link href="https://blog.cloudflare.com/" rel="self" type="application/rss+xml"/>
        <language>en-us</language>
        <image>
            <url>https://blog.cloudflare.com/favicon.png</url>
            <title>The Cloudflare Blog</title>
            <link>https://blog.cloudflare.com</link>
        </image>
        <lastBuildDate>Wed, 08 Apr 2026 14:34:24 GMT</lastBuildDate>
        <item>
            <title><![CDATA[Secure by default: recommendations from the CISA’s newest guide, and how Cloudflare follows these principles to keep you secure]]></title>
            <link>https://blog.cloudflare.com/secure-by-default-understanding-new-cisa-guide/</link>
            <pubDate>Thu, 20 Apr 2023 13:44:42 GMT</pubDate>
            <description><![CDATA[ In this post we’ll review some of the authors’ recommendations, discuss how Cloudflare applies these principles to the products that we build, and provide some suggestions on what other organizations can do to support similar initiatives internally ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6j0tYaz11zLGvniIkQhDWk/f10e0f3d509dafbab1aade081bd0a2ac/image1-13.png" />
            
            </figure><p>When you buy a new house, you shouldn’t have to worry that everyone in the city can unlock your front door with a universal key before you change the lock. You also shouldn’t have to walk around the house with a screwdriver and tighten the window locks and back door so that intruders can’t pry them open. And you <i>really</i> shouldn’t have to take your alarm system offline every few months to apply critical software updates that the alarm vendor could have fixed with better software practices before they installed it.</p><p>Similarly, you shouldn’t have to worry that when you buy a network discovery tool it can be <a href="https://threatpost.com/cisco-patches-critical-default-password-bug/142814/">accessed by any attacker until you change the password</a>, or that your expensive hardware-based firewalls <a href="https://www.darkreading.com/vulnerabilities-threats/cisa-palo-alto-firewall-bug-active-exploit">can be recruited to launch DDoS attacks</a> or <a href="https://www.cisa.gov/news-events/cybersecurity-advisories/aa22-138a">run arbitrary code</a> without the <a href="https://www.bleepingcomputer.com/news/security/fortinet-warns-of-new-critical-unauthenticated-rce-vulnerability">need to authenticate</a>.</p><p>This “default secure” posture is the focus of a <a href="https://www.cisa.gov/sites/default/files/2023-04/principles_approaches_for_security-by-design-default_508_0.pdf">recently published guide</a> jointly authored by the Cybersecurity and Infrastructure Agency (CISA), NSA, FBI, and six other international agencies representing the United Kingdom, Australia, Canada, Germany, Netherlands, and New Zealand. In the guide, the authors implore technology vendors to follow <i>Secure-by-Design</i> and <i>Secure-by-Default</i> principles, shifting the burden of security as much as possible <i>away</i> from the end-user and back <i>towards</i> the manufacturer:</p><blockquote><p><i>The authoring agencies strongly encourage every technology manufacturer to build their products in a way that prevents customers from having to constantly perform monitoring, routine updates, and damage control on their systems to mitigate cyber intrusions. Manufacturers are encouraged to take ownership of improving the security outcomes of their customers. Historically, technology manufacturers have relied on fixing vulnerabilities found after the customers have deployed the products, requiring the customers to apply those patches at their own expense. Only by incorporating Secure-by-Design practices will we break the vicious cycle of creating and applying fixes.</i></p></blockquote><p>In this post we’ll review some of the authors’ recommendations, discuss how Cloudflare applies these principles to the products that we build, and provide some suggestions on what other organizations can do to support similar initiatives internally.</p>
    <div>
      <h3>Secure-by-Default: building products that require minimal hardening</h3>
      <a href="#secure-by-default-building-products-that-require-minimal-hardening">
        
      </a>
    </div>
    <p>Cloudflare makes cybersecurity products that protect <a href="https://www.cloudflare.com/everywhere-security/">employees, applications, and networks</a> from attack. Typically, the ideas for new products and features come from one of two places: i) customers who are expressing a risk they’re worried about; or ii) our own internal Security team asking for help better securing Cloudflare’s internal network from threats. (The products that we build for our Security team are also then made available to our customers, once they’re battle tested internally.)</p><p>Wherever the source, when a product manager thinks through a new product offering, they first socialize the idea around the company for feedback. Often this feedback includes encouragement to make the product more “magical”. What this means in practice is that customers should have to do less, but get more; our job is essentially to make security administrators’ lives easier so they can focus their time where it’s most needed. An early example of this approach can be found in our blog post announcing <a href="/introducing-universal-ssl/">Universal SSL</a> in 2014:</p><blockquote><p><i>For all customers, we will now automatically provision a SSL certificate on CloudFlare's network that will accept HTTPS connections for a customer's domain and subdomains.</i></p></blockquote><p>The idea sounds simple but in 2014 this approach to SSL/TLS was unique in the industry: every other platform required customers to take some action before their website was encrypted-in-transit using HTTPS to protect against snooping and impersonation. Security administrators either had to go acquire the certificate themselves and upload (and renew) it, or manually perform some steps to demonstrate ownership to a certificate authority (CA). Because Cloudflare both manages authoritative DNS for our customers and runs a global reverse proxy, we can take care of all these steps automagically. Additionally, as new SSL/TLS attacks are discovered, we <a href="/staying-on-top-of-tls-attacks/">automatically improve</a> how our servers negotiate encryption with browsers and API clients to keep our customers secure. No customer configuration or oversight is required.</p><p>We agree with CISA’s statement that “[t]he complexity of security configuration should not be a customer problem.” And aim to build products that materially improve security with little to no customer action beyond putting their employees, applications, and networks behind Cloudflare:</p><blockquote><p><i>Secure-by-Default products are those that are secure to use “out of the box” with little to no configuration changes necessary and security features available without additional cost. Together, these two principles move much of the burden of staying secure to manufacturers and reduce the chances that customers will fall victim to security incidents resulting from misconfigurations, insufficiently fast patching, or many other common issues.</i></p></blockquote><p>Another example of our Secure-by-Default approach is how we protect against “0 day” attacks in our Web Application Firewall using <a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">machine learning (ML)</a>. Zero day attacks are security vulnerabilities discovered by attackers or researchers before the software vendor is aware of the issue (or has had a chance to release a patch). Often the attack is exploited “in the wild” before customers are able to plug the holes in their systems, or their upstream security vendors are able to virtually patch the issue. A recent, widely-exploited 0 day was <a href="/cve-2021-44228-log4j-rce-0-day-mitigation/">Log4j</a>; software manufacturers using this library in their code raced to update their software as quickly as possible. But many took days, weeks, or even months to do so.</p><p>Cloudflare is proud of the speed at which we responded to Log4j, and the fact we provide the highest severity WAF protections <a href="/waf-for-everyone/">to all plans including Free</a>—but it’s always a race against the clock. We created the <a href="/stop-attacks-before-they-are-known-making-the-cloudflare-waf-smarter/">ML-computed WAF Attack Score</a> to provide our customers with a more Secure-by-Default system that didn’t rely on new rules being raced out, or making reactive configuration changes. The way most <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAFs</a> work is they match properties of an incoming HTTP request against a set of “signatures”, which are essentially patterns described using <a href="https://en.wikipedia.org/wiki/Regular_expression">regular expressions</a>. We do that too, but we also train ML models on the “true positive” matches, which allow us to infer the likelihood a new request is malicious <i>even when</i> it doesn’t match a signature. Customers can write one rule up front that blocks high-confidence malicious requests, and they’re protected against 0 days thereafter. Secure by default, even against attacks that have not yet been discovered.</p><p>One final example of this approach can be found in how we designed Cloudflare One, the <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">zero trust</a> suite we initially built to protect Cloudflare’s own employees and networks. When we opened Cloudflare One to businesses of all sizes, we wanted a secure-by-default way to connect and protect corporate networks that didn’t require poking a bunch of holes in network firewalls.</p><p>Instead of this traditional route that requires security administrators to make upfront changes and avoid firewall configuration drift over time, we designed <a href="https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/">Cloudflare Tunnel</a> to establish mutually authenticated, encrypted connections directly to Cloudflare’s edge. Additionally, we wanted to completely shut off access to our customers’ networks by default, except for access to <a href="https://www.cloudflare.com/products/zero-trust/access/">specific applications by strongly-authenticated users</a> rather than IP and port holes that aren’t tied to a known identity.</p>
    <div>
      <h3>Secure-by-Design: continual (re)investment in secure development practices</h3>
      <a href="#secure-by-design-continual-re-investment-in-secure-development-practices">
        
      </a>
    </div>
    <p>Secure defaults that require minimal customer intervention are critically important, but not sufficient on their own to protect our customers. <i>How</i> the products are built by engineering and evaluated by our CSO organization for adherence to secure development practices is just as important in minimizing vulnerabilities that may result in customer compromise. And none of that matters without the support from executive leadership to make significant investments that may not immediately result in visible customer benefit.</p><p>Cloudflare’s engineering team builds products using the most secure development practices and tools available at the time of implementation, that sufficiently meet the requirements and architectural constraints. The options available evolve over time of course, so what was most appropriate (and secure) back in 2013 when we <a href="/cloudflares-new-waf-compiling-to-lua/">wrote the initial version of the Cloudflare WAF</a> may no longer be the best option in 2023. Lua made sense for us for the reasons <a href="https://www.youtube.com/watch?v=nlt4XKhucS4">outlined in this talk</a>, but when the WAF was starting to show its age in 2017 we had a choice: continue bolting on features quickly to try to <a href="/cloudflare-waap-named-leader-gartner-magic-quadrant-2022/">close the gap with competitive products</a>, or invest in a memory-safe language that improved security and performance at the cost of near-term momentum?</p><p>We knew that if we designed our underlying WAF platform correctly, customers—at scale—could more easily adopt other Application Security products such as Bot Management and our new API Gateway. Our existing core WAF functionality would also benefit from new evaluation engines, <a href="/making-the-waf-40-faster/">running 40% faster</a> and <a href="/details-of-the-cloudflare-outage-on-july-2-2019/#what-s-happened-since-last-tuesday">becoming more resilient</a>. But proposing an entire rewrite of a system that processed millions of requests per second in a relatively nascent language, Rust, was not a small undertaking or ask. Fortunately we had the full support of Cloudflare’s executive and technical leadership teams to make this investment, which is critical for security as CISA et al. write (emphasis <b>added</b>):</p><blockquote><p><i>Secure-by-Design development requires the investment of significant resources by software manufacturers at each layer of the product design and development process that cannot be “bolted on” later. It requires </i><b><i>strong leadership by the manufacturer’s top business executives to make security a business priority</i></b><i>, not just a technical feature.</i></p></blockquote><p>[and]</p><blockquote><p><i>Manufacturers are encouraged to make hard tradeoffs and investments, </i><b><i>including those that will be “invisible” to the customers, such as migrating to programming languages that eliminate widespread vulnerabilities</i></b><i>. They should prioritize features, mechanisms, and implementation of tools that protect customers rather than product features that seem appealing but enlarge the attack surface.</i></p></blockquote><p>The end result of our efforts was a new WAF rule evaluation engine entirely written in Rust—a performant, memory-safe language that is immune to <a href="https://my.f5.com/manage/s/article/K52510511">buffer overflow attacks</a> and has positioned us well for the future. After that rewrite, our Cache team also embarked on a similarly XL-sized project called Pingora, which replaced NGINX with a Rust-based reverse proxy engine called <a href="/how-we-built-pingora-the-proxy-that-connects-cloudflare-to-the-internet/">Pingora</a>. These projects were costly, but improved the security posture of our customers:</p><blockquote><p><i>The authoring agencies acknowledge that taking ownership of the security outcomes for customers and </i><b><i>ensuring this level of customer security may increase development costs.</i></b></p></blockquote><blockquote><p><i>However, investing in “Secure-by-Design" practices while developing new technology products and maintaining existing ones can substantially improve the security posture of customers and reduce the likelihood of being compromised.</i></p></blockquote>
    <div>
      <h3>Secure-by-Default and Secure-by-Design: implementing these principles into your organization</h3>
      <a href="#secure-by-default-and-secure-by-design-implementing-these-principles-into-your-organization">
        
      </a>
    </div>
    <p>Building secure products that are easy to adopt and require minimal ongoing customer oversight is paramount in today’s threat environment, but it takes an aligned organization to deliver. Below are some techniques that Cloudflare employs to solve our customers’ security problems, and shift the operational burden away from their network towards ours:</p><p><b>1. Perform as much logic as you can in code you control and can update without user intervention</b>Like many readers, I’m the technical support person for my parents. Their home networking equipment is quite modern and sends me alerts when there are critical security updates, but I’m always afraid if I apply updates without being onsite something might go wrong.</p><p>Professional security administrators face the same problem when dealing with enterprise networking equipment. When software gets shipped into heterogeneous customer environments, things can go wrong. Having a single software stack that runs on every server in our fleet has made it immeasurably easier to stay on top of software updates for our customers.</p><p>To the extent your organization can shift the operational burden away from your customer to your own infrastructure, the easier it will be for people to adopt your products and keep them secure. Relying on overburdened administrators to apply patches, especially if there’s risk of downtime, is a difficult proposition.</p><p><b>2. Educate executive leadership on the importance of continual reinvestment in modern security standards, and run experiments to build credibility</b>Today’s economic environment is challenging: customers are being forced to do more with less, while the software providers they depend upon are no longer hiring at the rate they once were. The appropriate prioritization of scarce engineering resources across new features, technical debt, and security hardening is not obvious and is likely met internally with differing opinions. Laying out clear business cases for adopting  secure-by-default and secure-by-design mindsets is thus even more critical for improving security outcomes without obvious customer-visible benefit.</p><p>Projects should also be appropriately scoped, and experiments should be run early and often. Do not wait until you are nearly through a project before letting others play with and review your proof-of-concepts and code. You may find support within the organization where you did not expect it, accelerating projects and increasing the likelihood that they succeed. You’ll also be able to demonstrate unexpected benefits that customers will embrace, helping build a base of support for the sustained effort.</p><p><b>3. Empower your security practitioners to provide feedback early and often in the development cycle</b>The skill set required to code new products and features does not perfectly overlap with the skill set required to spot security risks in them. Application security experts are helpful because they can quickly pattern match security “code smells” with other projects they’ve previously reviewed and helped harden.</p><p>You should embed your security experts within your product engineering teams so that they can provide guidance at the earliest (and lowest cost) phase of development. Having these experts review your functional specifications may save development cycles downstream.</p><p><b>4. Incentivize products that do more for customers “automagically”</b>People respond to incentives. If your business is built on selling professional services to enterprise customers, there is little incentive for your software developers to minimize the effort required during the installation, tuning, and hardening process.</p><p>If your products are designed to be consumed by hundreds of thousands of customers of all sizes, you have no choice but to do more for customers out-of-the-box. Otherwise, your support organization will be overwhelmed and your customers will be vulnerable.</p><p><b>5. Avoid default passwords at all costs</b>Every day, Cloudflare mitigates DDoS attacks launched by botnets comprised of <i>insecure</i>-by-default devices. Manufacturers ship IoT devices and home networking equipment with default or easy-to-guess passwords, and many proxy vendors require no authentication out of the box.</p><p>If these manufacturers followed the principles outlined in the CISA guide, these attacks would decrease in both intensity and frequency, as fewer and fewer devices can be recruited for attack amplification.</p> ]]></content:encoded>
            <category><![CDATA[CISA]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">66WsBhDcccpFb56DTesYZl</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Ed Conolly</dc:creator>
        </item>
        <item>
            <title><![CDATA[Killnet and AnonymousSudan DDoS attack Australian university websites, and threaten more attacks — here’s what to do about it]]></title>
            <link>https://blog.cloudflare.com/ddos-attacks-on-australian-universities/</link>
            <pubDate>Wed, 29 Mar 2023 11:10:13 GMT</pubDate>
            <description><![CDATA[ Over the past 24 hours, Cloudflare has observed HTTP DDoS attacks targeting university websites in Australia. Universities were the first of several groups publicly targeted by the pro-Russian hacker group Killnet and their affiliate AnonymousSudan, as revealed in a recent Telegram post ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/71imYZhzjgJ0CBHCdm80a8/27c197efb749c2d4814c210e68e73de4/image1-55.png" />
            
            </figure><p>Over the past 24 hours, Cloudflare has observed HTTP DDoS attacks targeting university websites in Australia. Universities were the first of several groups publicly targeted by the pro-Russian hacker group Killnet and their affiliate <a href="https://www.cloudflare.com/learning/ddos/glossary/anonymous-sudan/">AnonymousSudan</a>, as revealed in a recent <a href="https://twitter.com/FalconFeedsio/status/1639574349131677697?s=20">Telegram</a> post. The threat actors called for additional attacks against 8 universities, 10 airports, and 8 hospital websites in Australia beginning on Tuesday, March 28.</p><p>Killnet is a loosely formed group of individuals who collaborate via Telegram. Their Telegram channels provide a space for pro-Russian sympathizers to volunteer their expertise by participating in cyberattacks against western interests.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5n5WXHdc7GOAQWJKRjD8t6/ce76b71769d2a64c044d107fda890009/image2-4.jpg" />
            
            </figure><p><i>Figure: % of traffic constituting DDoS attacks for organizations in Australia</i></p><p>This is not the first time Cloudflare has reported on Killnet activity. On February 2,  2023 we noted in a <a href="/uptick-in-healthcare-organizations-experiencing-targeted-ddos-attacks/">blog</a> that a pro-Russian hacktivist group — claiming to be part of Killnet — was targeting multiple healthcare organizations in the US. In October 2022, Killnet called to attack US airport websites, and attacked the US Treasury the following month.</p><p>As seen with past attacks from this group, these most recent attacks do not seem to be originating from a single botnet, and the attack methods and sources seem to vary, suggesting the involvement of multiple individual threat actors with varying degrees of skill.</p><p>DDoS (Distributed Denial of Service) attacks often make headlines due to their ability to disrupt critical services. Cloudflare recently <a href="/cloudflare-mitigates-record-breaking-71-million-request-per-second-ddos-attack/">announced</a> that it had blocked the largest attack to date, which peaked at 71 million requests per second (rps) and was 54% higher than the previous record attack from June 2022.</p><p>DDoS attacks are designed to overwhelm networks with massive amounts of malicious traffic, and when executed correctly, can disrupt service or take networks offline. The size, sophistication, and frequency of attacks have been increasing over the past months.</p>
    <div>
      <h3>What is Killnet and AnonymousSudan?</h3>
      <a href="#what-is-killnet-and-anonymoussudan">
        
      </a>
    </div>
    <p><a href="https://en.wikipedia.org/wiki/Killnet">Killnet</a> is not a traditional hacking group: it does not have membership, it does not have tools or infrastructure, and it does not operate for financial gain. Instead, Killnet is a space for pro-Russian "hacktivist" sympathizers to volunteer their expertise by participating in cyberattacks against western interests. This collaboration happens entirely in the open via Telegram, where anyone is welcome to join.</p><p>Killnet was formed shortly after (and likely in response to) the IT Army of Ukraine, and it emulates their tactics. Most days, administrators of the Killnet telegram channel will put out a call for volunteers to attack some particular target. Participants share many different tools and techniques for launching successful attacks, and inexperienced individuals are often coached on how to launch cyber attacks by those who are more experienced.</p><p>AnonymousSudan is another nontraditional hacking group similar to Killnet who is ostensibly composed of Sudanese "hacktivists". The two groups have recently begun collaborating to attack various western interests.</p><p>Attackers, including from these groups, are becoming more audacious in  the size and scale of the organizations they are targeting. What this means for businesses, especially those with limited cyber resources, is an increasing threat level against vulnerable networks.</p><p>Organizations of all sizes need to be prepared for the eventuality of a significant DDoS attack against their networks. Detection and mitigation of attacks should ideally be automated as much as possible, because relying solely on humans to mitigate in real time puts attackers in the driver’s seat.</p>
    <div>
      <h3>How should I protect my organization against DDoS?</h3>
      <a href="#how-should-i-protect-my-organization-against-ddos">
        
      </a>
    </div>
    <p>Cloudflare customers are protected against DDoS attacks; our systems have been automatically detecting and mitigating the attack. Our team continues to monitor the situation and will deploy countermeasures as needed.</p><p>As an additional step of precaution, customers in the Education, Travel, and Healthcare industries are advised to follow the below recommendations.</p><ol><li><p>Ensure all other <a href="https://developers.cloudflare.com/ddos-protection/managed-rulesets/">DDoS Managed Rules</a> are set to default settings (High sensitivity level and mitigation actions).</p></li><li><p>Enterprise customers with Advanced DDoS should consider enabling <a href="https://developers.cloudflare.com/ddos-protection/managed-rulesets/adaptive-protection/">Adaptive DDoS Protection</a>.</p></li><li><p>Deploy <a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/">firewall rules</a> and <a href="https://developers.cloudflare.com/waf/rate-limiting-rules/">rate-limiting rules</a> to enforce a combined positive and negative security model. Reduce the traffic allowed to your website based on your known usage.</p></li><li><p>Turn on <a href="https://developers.cloudflare.com/bots/get-started/free/">Bot Fight Mode</a> or the equivalent level (SBFM, Enterprise Bot Management) available to you.</p></li><li><p>Ensure your origin is not exposed to the public Internet, i.e., only enable access to Cloudflare IP addresses.</p></li><li><p>Enable <a href="https://developers.cloudflare.com/cache/">caching</a> as much as possible to reduce the strain on your origin servers, and when using <a href="https://workers.cloudflare.com/">Workers</a>, avoid overwhelming your origin server with more subrequests than necessary</p></li><li><p>Enable <a href="https://developers.cloudflare.com/ddos-protection/reference/alerts/">DDoS alerting</a>.</p></li></ol><p>As easy as it has become for the attackers to launch DDoS attacks, we want to make sure that it is even easier - and free - for defenders of organizations of all sizes to protect themselves against DDoS attacks of all types. We've been providing unmetered and unlimited DDoS protection for free to all of our customers since 2017. Cloudflare's mission is to help build a better Internet. A better Internet is one that is more secure, faster, and reliable for everyone - even in the face of DDoS attacks.</p><p>If you’d like to learn more about key DDoS trends, download the <a href="https://www.cloudflare.com/lp/ddos-trends-report/">Cloudflare DDoS Threat Report</a> for quarterly insights.</p> ]]></content:encoded>
            <category><![CDATA[Attacks]]></category>
            <category><![CDATA[Australia]]></category>
            <guid isPermaLink="false">6k60VUUDMX8YLNOHj1SJuI</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Ben Munroe</dc:creator>
        </item>
        <item>
            <title><![CDATA[Top 50 most impersonated brands in phishing attacks and new tools you can use to protect your employees from them]]></title>
            <link>https://blog.cloudflare.com/50-most-impersonated-brands-protect-phishing/</link>
            <pubDate>Mon, 13 Mar 2023 13:05:00 GMT</pubDate>
            <description><![CDATA[ We’re expanding the phishing protections available to Cloudflare One customers by automatically identifying—and blocking—so-called “confusable” domains. ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2HFWBu7dmLiLxn5ZJIyZSh/07c104656900ba4f17f5129e471f9036/image4-7.png" />
            
            </figure><p>Someone in your organization may have just submitted an administrator username and password for an internal system to the wrong website. And just like that, an attacker is now able to <a href="https://www.cloudflare.com/learning/security/what-is-data-exfiltration/">exfiltrate sensitive data</a>.</p><p>How did it all happen? A well crafted email.</p><p>Detecting, blocking, and mitigating the risks of phishing attacks is arguably one of the hardest challenges any security team is constantly facing.</p><p>Starting today, we are opening beta access to our new brand and <a href="https://www.cloudflare.com/zero-trust/products/email-security/">anti-phishing tools</a> directly from our Security Center dashboard, allowing you to catch and mitigate phishing campaigns targeting your organization even before they happen.</p>
    <div>
      <h2>The challenge of phishing attacks</h2>
      <a href="#the-challenge-of-phishing-attacks">
        
      </a>
    </div>
    <p>Perhaps the most publicized threat vector over the past several months has been phishing attacks. These attacks are highly sophisticated, difficult to detect, becoming more frequent, and can have devastating consequences for businesses that fall victim to them.</p><p>One of the biggest challenges in <a href="https://www.cloudflare.com/learning/email-security/how-to-prevent-phishing/">preventing phishing attacks</a> is the sheer volume and the difficulty of distinguishing legitimate emails and websites from <a href="https://www.cloudflare.com/learning/email-security/what-is-email-fraud/">fraudulent ones</a>. Even when users are vigilant, it can be hard to spot the subtle differences that attackers use to make their phishing emails and websites look convincing.</p><p>For example, last July our Cloudflare One suite of products and use of physical security keys <a href="/2022-07-sms-phishing-attacks/">thwarted the sophisticated “Oktapus” phishing attack targeting Cloudflare employees</a>. The attacker behind the “Oktapus” attack that successfully compromised <a href="https://www.theregister.com/2022/08/25/twilio_cloudflare_oktapus_phishing/">more than one hundred companies</a>, registered the “cloudflare-okta.com” domain name just 40 minutes before sending it to our employees.</p><p>At that time, we identified phishing domains with our <a href="https://www.cloudflare.com/products/registrar/custom-domain-protection/">secure registrar product</a>—but there was a delay in receiving the list of newly registered domains for monitoring purposes. Today, by streaming newly observed domains resolved by our <a href="/announcing-1111/">1.1.1.1 resolver</a> (and other resolvers), we are able to detect phishing domains almost immediately. This gives us the upper hand and allows us to block phishing attempts before they happen.</p><p>We want to start giving our customers access to the same tools we use internally, to help you fight the ongoing challenge.</p>
    <div>
      <h2>New Brand and Phishing Protection tools in Cloudflare’s Security Center</h2>
      <a href="#new-brand-and-phishing-protection-tools-in-cloudflares-security-center">
        
      </a>
    </div>
    <p>We’re expanding the phishing protections available to Cloudflare One customers by automatically identifying—and blocking—so-called “confusable” domains. Common misspellings (clodflare.com) and concatenation of services (cloudflare-okta.com) are often registered by attackers to trick unsuspecting victims into submitting private information such as passwords, and these new tools provide an additional layer of protection against such attempts.</p><p>The new Brand and Phishing Protection tools can be found under the Cloudflare Security Center, and provide even more controls (e.g. custom strings to monitor, searchable list of historical domains, etc.) to our customers. Cloudflare One plans can have access, with the level of control, visibility, and automation based on their plan type.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3RUb5B1d6XkTWAn9YZ44cM/62d112527749f64f1262cb30445269f6/image3-6.png" />
            
            </figure>
    <div>
      <h3>New domain brand matching and alerting</h3>
      <a href="#new-domain-brand-matching-and-alerting">
        
      </a>
    </div>
    <p>At the heart of our new brand protection feature is our ability to detect hostnames created specifically for phishing legitimate brands. We start by monitoring the first use of a domain or subdomain by sifting through trillions of daily DNS queries made to 1.1.1.1, Cloudflare’s public DNS resolver, in order to compile a list of hostnames in the wild for the first time.</p><p>Using this list, we perform <a href="https://en.wikipedia.org/wiki/Fuzzy_matching_(computer-assisted_translation)">”fuzzy” matching</a>, a technique used to match two strings that are similar in meaning or spelling, against our users' saved patterns in real-time. We compare the strings and calculate a similarity score based on various factors (ie: phonetics, distance, substring matching). These saved patterns, which can be strings with <a href="https://en.wikipedia.org/wiki/Edit_distance">edit distances</a>, enable our system to generate alerts whenever we detect a match with any of the domains in the list.</p><p>While our users currently have to create and save these queries, we will introduce an automated matching system in the future. This system will simplify the process of detecting matches for our users,  though custom strings will still be available for security teams tracking more complex patterns.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5OjKjvKBJv4kicRl12MQFF/25aff5f3a7d3dbce8652b81f043cde44/image2-6.png" />
            
            </figure>
    <div>
      <h3>Historical searches</h3>
      <a href="#historical-searches">
        
      </a>
    </div>
    <p>In addition to real-time monitoring, we offer historical searches (saved queries) and alerts for newly observed domains within the last 30 days. When a new pattern is created, we will display search results from the last 30 days to show any potential matches. This allows security teams to quickly assess the potential threat level of a new domain and take necessary actions.</p><p>Furthermore, this search mechanism can also be used for ad hoc domain hunting, providing additional flexibility for security teams who may need to investigate specific domains or patterns.</p>
    <div>
      <h2>Observations in the wild: most phished brands</h2>
      <a href="#observations-in-the-wild-most-phished-brands">
        
      </a>
    </div>
    <p>While building out these new Brand Protection tools, we wanted to test our capabilities against a broad set of commonly phished brands. To do so, we  examined the frequency that domains containing phishing URLs were resolved against our 1.1.1.1 resolver. All domains that are used for shared services (like hosting sites Google, Amazon, GoDaddy) that could not be verified as a phishing attempt were removed from the data set.</p><p>The top 50 brands we found, along with one of the most commonly used domains for phishing those brands can be found in the table below.</p>
<table>
<thead>
  <tr>
    <th><span>Rank</span></th>
    <th><span>Brand</span></th>
    <th><span>Sample domain used to phish brand[1]</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>1</span></td>
    <td><span>AT&amp;T Inc.</span></td>
    <td><span>att-rsshelp[.]com</span></td>
  </tr>
  <tr>
    <td><span>2</span></td>
    <td><span>PayPal</span></td>
    <td><span>paypal-opladen[.]be</span></td>
  </tr>
  <tr>
    <td><span>3</span></td>
    <td><span>Microsoft</span></td>
    <td><span>login[.]microsoftonline.ccisystems[.]us</span></td>
  </tr>
  <tr>
    <td><span>4</span></td>
    <td><span>DHL</span></td>
    <td><span>dhlinfos[.]link</span></td>
  </tr>
  <tr>
    <td><span>5</span></td>
    <td><span>Meta</span></td>
    <td><span>facebookztv[.]com</span></td>
  </tr>
  <tr>
    <td><span>6</span></td>
    <td><span>Internal Revenue Service</span></td>
    <td><span>irs-contact-payments[.]com</span></td>
  </tr>
  <tr>
    <td><span>7</span></td>
    <td><span>Verizon</span></td>
    <td><span>loginnnaolcccom[.]weebly[.]com</span></td>
  </tr>
  <tr>
    <td><span>8</span></td>
    <td><span>Mitsubishi UFJ NICOS Co., Ltd.</span></td>
    <td><span>cufjaj[.]id</span></td>
  </tr>
  <tr>
    <td><span>9</span></td>
    <td><span>Adobe</span></td>
    <td><span>adobe-pdf-sick-alley[.]surge[.]sh</span></td>
  </tr>
  <tr>
    <td><span>10</span></td>
    <td><span>Amazon</span></td>
    <td><span>login-amazon-account[.]com</span></td>
  </tr>
  <tr>
    <td><span>11</span></td>
    <td><span>Apple</span></td>
    <td><span>apple-grx-support-online[.]com</span></td>
  </tr>
  <tr>
    <td><span>12</span></td>
    <td><span>Wells Fargo &amp; Company</span></td>
    <td><span>connect-secure-wellsfargo-com.herokuapp[.]com</span></td>
  </tr>
  <tr>
    <td><span>13</span></td>
    <td><span>eBay, Inc.</span></td>
    <td><span>www[.]ebay8[.]bar</span></td>
  </tr>
  <tr>
    <td><span>14</span></td>
    <td><span>Swiss Post</span></td>
    <td><span>www[.]swiss-post-ch[.]com</span></td>
  </tr>
  <tr>
    <td><span>15</span></td>
    <td><span>Naver</span></td>
    <td><span>uzzmuqwv[.]naveicoipa[.]tech</span></td>
  </tr>
  <tr>
    <td><span>16</span></td>
    <td><span>Instagram (Meta)</span></td>
    <td><span>instagram-com-p[.]proxy.webtoppings[.]bar</span></td>
  </tr>
  <tr>
    <td><span>17</span></td>
    <td><span>WhatsApp (Meta)</span></td>
    <td><span>joingrub-whatsapp-pistol90[.]duckdns[.]org</span></td>
  </tr>
  <tr>
    <td><span>18</span></td>
    <td><span>Rakuten</span></td>
    <td><span>rakutentk[.]com</span></td>
  </tr>
  <tr>
    <td><span>19</span></td>
    <td><span>East Japan Railway Company</span></td>
    <td><span>www[.]jreast[.]co[.]jp[.]card[.]servicelist[].bcens[.]net</span></td>
  </tr>
  <tr>
    <td><span>20</span></td>
    <td><span>American Express Company</span></td>
    <td><span>www[.]webcome-aexp[.]com</span></td>
  </tr>
  <tr>
    <td><span>21</span></td>
    <td><span>KDDI</span></td>
    <td><span>aupay[.]kddi-fshruyrt[.]com</span></td>
  </tr>
  <tr>
    <td><span>22</span></td>
    <td><span>Office365 (Microsoft)</span></td>
    <td><span>office365loginonlinemicrosoft[.]weebly[.]com</span></td>
  </tr>
  <tr>
    <td><span>23</span></td>
    <td><span>Chase Bank</span></td>
    <td><span>safemailschaseonlineserviceupgrade09[.]weebly[.]com</span></td>
  </tr>
  <tr>
    <td><span>24</span></td>
    <td><span>AEON</span></td>
    <td><span>aeon-ver1fy[.]shop</span></td>
  </tr>
  <tr>
    <td><span>25</span></td>
    <td><span>Singtel Optus Pty Limited</span></td>
    <td><span>myoptus[.]mobi</span></td>
  </tr>
  <tr>
    <td><span>26</span></td>
    <td><span>Coinbase Global, Inc.</span></td>
    <td><span>supp0rt-coinbase[.]com</span></td>
  </tr>
  <tr>
    <td><span>27</span></td>
    <td><span>Banco Bradesco S.A.</span></td>
    <td><span>portalbradesco-acesso[.]com</span></td>
  </tr>
  <tr>
    <td><span>28</span></td>
    <td><span>Caixa Econômica Federal</span></td>
    <td><span>lnternetbanklng-caixa[.]com</span></td>
  </tr>
  <tr>
    <td><span>29</span></td>
    <td><span>JCB Co., Ltd.</span></td>
    <td><span>www[.]jcb-co-jp[.]ascaceeccea[.]ioukrg[.]top</span></td>
  </tr>
  <tr>
    <td><span>30</span></td>
    <td><span>ING Group</span></td>
    <td><span>ing-ingdirect-movil[.]com</span></td>
  </tr>
  <tr>
    <td><span>31</span></td>
    <td><span>HSBC Holdings plc</span></td>
    <td><span>hsbc-bm-online[.]com</span></td>
  </tr>
  <tr>
    <td><span>32</span></td>
    <td><span>Netflix Inc</span></td>
    <td><span>renew-netflix[.]com</span></td>
  </tr>
  <tr>
    <td><span>33</span></td>
    <td><span>Sumitomo Mitsui Banking Corporation</span></td>
    <td><span>smbc[.]co[.]jp[.]xazee[.]com</span></td>
  </tr>
  <tr>
    <td><span>34</span></td>
    <td><span>Nubank</span></td>
    <td><span>nuvip2[.]ru</span></td>
  </tr>
  <tr>
    <td><span>35</span></td>
    <td><span>Bank Millennium SA</span></td>
    <td><span>www[.]bankmillenium-pl[.]com</span></td>
  </tr>
  <tr>
    <td><span>36</span></td>
    <td><span>National Police Agency Japan</span></td>
    <td><span>sun[.]pollice[.]xyz</span></td>
  </tr>
  <tr>
    <td><span>37</span></td>
    <td><span>Allegro</span></td>
    <td><span>powiadomienieallegro[.]net</span></td>
  </tr>
  <tr>
    <td><span>38</span></td>
    <td><span>InPost</span></td>
    <td><span>www.inpost-polska-lox.order9512951[.]info</span></td>
  </tr>
  <tr>
    <td><span>39</span></td>
    <td><span>Correos</span></td>
    <td><span>correosa[.]online</span></td>
  </tr>
  <tr>
    <td><span>40</span></td>
    <td><span>FedEx</span></td>
    <td><span>fedexpress-couriers[.]com</span></td>
  </tr>
  <tr>
    <td><span>41</span></td>
    <td><span>LinkedIn (Microsoft)</span></td>
    <td><span>linkkedin-2[.]weebly[.]com</span></td>
  </tr>
  <tr>
    <td><span>42</span></td>
    <td><span>United States Postal Service</span></td>
    <td><span>uspstrack-7518276417-addressredelivery-itemnumber.netlify[.]app</span></td>
  </tr>
  <tr>
    <td><span>43</span></td>
    <td><span>Alphabet</span></td>
    <td><span>www[.]googlecom[.]vn10000[.]cc</span></td>
  </tr>
  <tr>
    <td><span>44</span></td>
    <td><span>The Bank of America Corporation</span></td>
    <td><span>baanofamericase8[.]hostfree[.]pw</span></td>
  </tr>
  <tr>
    <td><span>45</span></td>
    <td><span>Deutscher Paketdienst</span></td>
    <td><span>dpd-info[.]net</span></td>
  </tr>
  <tr>
    <td><span>46</span></td>
    <td><span>Banco Itaú Unibanco S.A.</span></td>
    <td><span>silly-itauu[.]netlify[.]app</span></td>
  </tr>
  <tr>
    <td><span>47</span></td>
    <td><span>Steam</span></td>
    <td><span>gift-steam-discord[.]com</span></td>
  </tr>
  <tr>
    <td><span>48</span></td>
    <td><span>Swisscom AG</span></td>
    <td><span>swiss-comch[.]duckdns[.]org</span></td>
  </tr>
  <tr>
    <td><span>49</span></td>
    <td><span>LexisNexis</span></td>
    <td><span>mexce[.]live</span></td>
  </tr>
  <tr>
    <td><span>50</span></td>
    <td><span>Orange S.A.</span></td>
    <td><span>orange-france24[.]yolasite[.]com</span></td>
  </tr>
</tbody>
</table><p><sup>[1] </sup>Phishing sites are typically served on a specific URL and not on the root, e.g., hxxp://example.com/login.html rather than hxxp://example.com/. Full URLs are not provided here.</p>
    <div>
      <h2>Combining threat intelligence capabilities with Zero Trust enforcement</h2>
      <a href="#combining-threat-intelligence-capabilities-with-zero-trust-enforcement">
        
      </a>
    </div>
    <p>The new features become a lot more effective for customers using our <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust</a> product suite. You can in fact easily block any confusable domains found as soon as they are detected by creating Cloudflare Gateway or DNS policy rules. This immediately stops your users from resolving or browsing to potentially malicious sites thwarting attacks before they happen.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/383IIsROAH5m5OksbCuoDx/a2c24f7ce128c9eed83477505669710e/image1-12.png" />
            
            </figure>
    <div>
      <h2>Future enhancements</h2>
      <a href="#future-enhancements">
        
      </a>
    </div>
    <p>The new features are just the start of our broader brand infringement and anti-phishing security portfolio.</p>
    <div>
      <h3>Matching against SSL/TLS certificates</h3>
      <a href="#matching-against-ssl-tls-certificates">
        
      </a>
    </div>
    <p>In addition to matching against domains, we plan to also match against new <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL/TLS certificates</a> logged to <a href="/introducing-certificate-transparency-and-nimbus/">Nimbus, our Certificate Transparency log</a>. By analyzing CT logs, we can identify potentially fraudulent certificates that may be used in phishing attacks. This is helpful as certificates are typically created shortly after domain registration in an attempt to give the phishing site more legitimacy by supporting HTTPS.</p>
    <div>
      <h3>Automatic population of managed lists</h3>
      <a href="#automatic-population-of-managed-lists">
        
      </a>
    </div>
    <p>While today customers can script updates to custom lists referenced in a Zero Trust blocking rule, as mentioned above, we plan to automatically add domains to dynamically updating lists. Additionally, we will automatically add matching domains to lists that can be used in Zero Trust rules, e.g. blocking from Gateway.</p>
    <div>
      <h3>Changes in domain ownership and other metadata</h3>
      <a href="#changes-in-domain-ownership-and-other-metadata">
        
      </a>
    </div>
    <p>Lastly, we plan to provide the ability to monitor domains for changes in ownership or other metadata, such as registrant, name servers, or resolved IP addresses. This would enable customers to track changes in key information related to their domains and take appropriate action if necessary.</p>
    <div>
      <h2>Getting started</h2>
      <a href="#getting-started">
        
      </a>
    </div>
    <p>If you’re an Enterprise customer, <a href="https://www.cloudflare.com/lp/brandprotection/">sign up for Beta access</a> for Brand protection now to gain access to private scanning for your domains, save queries and set up alerts on matched domains.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Phishing]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">4BJPrmF5T36llRS5w1sEfr</guid>
            <dc:creator>Alexandra Moraru</dc:creator>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Cloudforce One is now generally available: empower your security team with threat data, tooling, and access to industry experts]]></title>
            <link>https://blog.cloudflare.com/cloudforce-one-is-now-ga/</link>
            <pubDate>Mon, 19 Sep 2022 14:01:00 GMT</pubDate>
            <description><![CDATA[ Cloudflare’s threat operations and research team, Cloudforce One, is now open for business and has begun conducting threat briefings. Join our webinar on “YackingYeti: How a Russian threat group targets Ukraine—and the world”, scheduled for October 12, to learn more ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7iIWvmjFG1WB0gdKwJQhyf/f9c4774a7e4a3212e13b120d1b41456d/image5-2.png" />
            
            </figure><p>Cloudflare’s threat operations and research team, <a href="/introducing-cloudforce-one-threat-operations-and-threat-research/">Cloudforce One</a>, is now open for business and has begun conducting threat briefings. Access to the team is available via an add-on subscription, and includes threat data and briefings, security tools, and the ability to make requests for information (RFIs) to the team.</p><p>Fill out <a href="https://www.cloudflare.com/zero-trust/lp/cloudforce-one-threat-intel-subscription">this form</a> or contact your account team to learn more.</p><p>Subscriptions come in two packages, and are priced based on number of employees: “Premier” includes our full history of threat data, bundled RFIs, and an API quota designed to support integrations with SIEMs. “Core” level includes reduced history and quotas. Both packages include access to all available security tools, including a threat investigation portal and sinkholes-as-a-service.</p><p>If you’re an enterprise customer interested in understanding the type of threat briefings that Cloudforce One customers receive, you can <a href="https://gateway.on24.com/wcc/eh/2153307/lp/3932196/how-a-russian-threat-group-targets-ukraineand-the-world">register here</a> for “<i>YackingYeti: How a Russian threat group targets Ukraine—and the world</i>”, scheduled for October 12. The briefing will include Q&amp;A with Blake Darché, head of Cloudforce One, and an opportunity to learn more about the team and offering.</p>
    <div>
      <h2>Requests for Information (RFIs) and Briefings</h2>
      <a href="#requests-for-information-rfis-and-briefings">
        
      </a>
    </div>
    <p>The Cloudforce One team is composed of analysts assigned to five subteams: <i>Malware Analysis</i>, <i>Threat Analysis</i>, <i>Active Mitigation and Countermeasures</i>, <i>Intelligence Analysis</i>, and <i>Intelligence Sharing</i>. Collectively, they have tracked many of the most sophisticated cyber criminals on the Internet while at the National Security Agency (NSA), USCYBERCOM, and Area 1 Security, and have worked closely with similar organizations and governments to disrupt these threat actors. They’ve also been prolific in publishing “finished intel” reports on security topics of significant geopolitical importance, such as targeted attacks against governments, technology companies, the energy sector, and law firms, and have regularly briefed top organizations around the world on their efforts.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2tsbSpfHXSCltfIyZr1FE7/2a741bca5f2ee3053c2ae37824997a3f/image3-5.png" />
            
            </figure><p>Included with a Cloudforce One subscription is the ability to make “requests for information” (RFIs) to these experts. RFIs can be on any security topic of interest, and will be analyzed and responded to in a timely manner. For example, the Cloudforce One Malware Analysis team can accept uploads of possible malware and provide a technical analysis of the submitted resource. Each plan level comes with a fixed number of RFIs, and additional requests can be added.</p><p>In addition to customer-specific requests, Cloudforce One conducts regular briefings on a variety of threats and threat actors—those targeting specific industries as well as more general topics of interest.</p>
    <div>
      <h2>Threat Data</h2>
      <a href="#threat-data">
        
      </a>
    </div>
    <p>The best way to understand threats facing networks and applications connected to the Internet is to operate and protect critical, large scale Internet infrastructure. And to defend attacks against millions of customers, large and small. Since our early days, Cloudflare has set out to build one of the world’s largest global networks to do just that. Every <i>day</i> we answer trillions of <a href="https://1.1.1.1/">DNS queries</a>, track the issuance of millions <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL/TLS certificates</a> in our CT log, inspect millions of <a href="https://www.cloudflare.com/products/zero-trust/email-security/">emails</a> for threats, route multiple petabytes of traffic to our customers’ networks, and proxy trillions of HTTP <a href="https://www.cloudflare.com/application-security/">requests</a> destined for our customers’ applications. Each one of these queries and packets provides a unique data point that can be analyzed at scale and anonymized into actionable threat data—now available to our Cloudforce One customers.</p><p>Data sets now available in the dashboard and via API for subscribers include IP, ASN, and domain intelligence, passive <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS resolutions</a>; threat actor cards with indicators of compromise (IoC), open port, and new Managed IP Lists are planned for release later this year.</p>
    <div>
      <h2>Security Tools</h2>
      <a href="#security-tools">
        
      </a>
    </div>
    <p>Security analysts and <a href="https://www.cloudflare.com/learning/security/glossary/what-is-threat-hunting/">threat hunting teams</a> are being forced to do more with less in today’s operating environment, but that doesn’t reduce their need for reliable tools that can quickly identify and eliminate risks.</p><p>Bundled with Cloudforce One are several security tools that can be deployed as services to expedite threat hunting and remediation:</p>
    <div>
      <h3>Threat Investigation Portal</h3>
      <a href="#threat-investigation-portal">
        
      </a>
    </div>
    <ul><li><p>Located within Security Center, the <i>Investigate</i> tab is your portal for querying current and historical threat data on IPs, ASNs, URLs (new!), and domains.</p></li><li><p>URLs can now be scanned for phishing contents, with heuristic and machine learning-scored results presented on demand.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1N7AHaIj2bfdROEcD13gJP/6d4a76701d39099d3e9ef2fdd3573b32/image2-6.png" />
            
            </figure>
    <div>
      <h3>Brand Protection (new!)</h3>
      <a href="#brand-protection-new">
        
      </a>
    </div>
    <ul><li><p>Also located within the Security Center, the <i>Brand Protection</i> tab can be used to register keywords or assets (e.g., corporate logos, etc.) that customers wish to be notified of when they appear on the Internet.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6JslAprezcRaszLA9ZmJKO/3ceca23c8305a4c888fe0e28e66a9f14/image1-9.png" />
            
            </figure>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7gfTKr4hcficaPpZ841rU6/15746c4a64e0143f78ef6b2a0ef12db9/image4-2.png" />
            
            </figure>
    <div>
      <h3>Sinkholes (new!)</h3>
      <a href="#sinkholes-new">
        
      </a>
    </div>
    <ul><li><p>Sinkholes can be created on-demand, as a service, to monitor hosts infected with malware and prevent them from communicating with command-and-control (C2) servers.</p></li><li><p>After creating a sinkhole via API, an IP will be returned which can be used with DNS products like <a href="https://www.cloudflare.com/products/zero-trust/gateway/">Cloudflare Gateway</a> to route web requests to safe sinkholes (and away from C2 servers). Sinkholes can be used to intercept SMTP traffic.</p></li><li><p>Premier customers can also bring their own IP address space to use for sinkholes, to accommodate egress firewall filtering or other use cases. In the future we plan to extend our sinkhole capability to the network layer, which will allow it to be deployed alongside offerings such as Magic Transit and Magic WAN.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3v07Z6np6EgraBivUfnUaj/b74e9fb8e8b2f5810b2f6daad48184d3/code.png" />
            
            </figure>
    <div>
      <h2>Getting Started with Cloudforce One</h2>
      <a href="#getting-started-with-cloudforce-one">
        
      </a>
    </div>
    <p>Cloudforce One is open for business and ready to answer your security inquiries. Speak to your account manager or fill out <a href="https://www.cloudflare.com/zero-trust/lp/cloudforce-one-threat-intel-subscription">this form</a> to learn more. We hope to see you on the <a href="https://gateway.on24.com/wcc/eh/2153307/lp/3932196/how-a-russian-threat-group-targets-ukraineand-the-world">upcoming webinar</a>!</p>
    <div>
      <h2>Watch on Cloudflare TV</h2>
      <a href="#watch-on-cloudflare-tv">
        
      </a>
    </div>
    <div></div><p></p> ]]></content:encoded>
            <category><![CDATA[GA Week]]></category>
            <category><![CDATA[General Availability]]></category>
            <category><![CDATA[Cloudforce One]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Security Center]]></category>
            <guid isPermaLink="false">50ddxtwu6Je6xDmDyuTzGU</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Blake Darché</dc:creator>
        </item>
        <item>
            <title><![CDATA[Bring your own license and threat feeds to use with Cloudflare One]]></title>
            <link>https://blog.cloudflare.com/bring-your-own-threat-feeds-with-cloudflare-one/</link>
            <pubDate>Mon, 20 Jun 2022 13:57:23 GMT</pubDate>
            <description><![CDATA[ Today, we are announcing new integrations that enable our customers to integrate third-party threat intel data with the rich threat intelligence from Cloudflare One products — all within the Cloudflare dashboard ]]></description>
            <content:encoded><![CDATA[ <p></p><p>At Cloudflare, we strive to make our customers’ lives simpler by building products that solve their problems, are extremely easy to use, and integrate well with their existing tech stack. Another element of ensuring that we fit well with existing deployments is integrating seamlessly with additional solutions that customers subscribe to, and making sure those solutions work collaboratively together to solve a pain point.</p><p>Today, we are announcing new integrations that enable our customers to integrate third-party threat intel data with the rich threat intelligence from <a href="https://www.cloudflare.com/cloudflare-one/">Cloudflare One</a> products — all within the Cloudflare dashboard. We are releasing this feature in partnership with Mandiant, Recorded Future, and VirusTotal, and will be adding new partners in the coming months.</p><p>Customers of these threat intel partners can upload their API keys to the Cloudflare Security Center to enable the use of additional threat data to create rules within Cloudflare One products such as Gateway and Magic Firewall, and infrastructure security products including the Web Application Firewall and API Gateway. Additionally, search results from Security Center’s threat investigations portal will also be automatically enriched with licensed data.</p>
    <div>
      <h3>Entering your API keys</h3>
      <a href="#entering-your-api-keys">
        
      </a>
    </div>
    <p>Customers will be able to enter their keys by navigating to Security Center → Reference Data, and clicking on the ellipsis next to desired rows and selecting “Edit API key”. Once a valid key has been added, the status listed on the row should change from “No key provided” to “Active key”.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7olsgmCCo4KsMyoIsyRY8M/e26259c724d6cf3e3a051471205162d8/image3-17.png" />
            
            </figure>
    <div>
      <h3>Mandiant</h3>
      <a href="#mandiant">
        
      </a>
    </div>
    <p>Mandiant Advantage customers with a Threat Intelligence subscription can enter their API keys and leverage  Mandiant’s most popular feeds of FQDN and IP address indicators of security threats and their related context throughout Cloudflare One products.</p><p>These include lists organized by threat category and aggregations of most active malicious infrastructure. By curating the most recent data and data relevant to your infrastructure on the Cloudflare network, Cloudflare will make it easy to take advantage of active and relevant indicators of malicious activity from Mandiant’s extensive threat intelligence data. Cloudflare takes care of importing the data and refreshing it regularly to help protect you from the latest threats Mandiant sees on the frontlines. Cloudflare products such as Gateway, Magic Firewall, and Web Application Firewall (WAF) will have access to the threat intelligence data and make it easy to operationalize using the same rule builder you use today.</p><blockquote><p>“As cyber threats continue to rapidly evolve, organizations require up-to-date and relevant intelligence integrated with their preferred technology solutions to comprehensively protect their environments. Together, Mandiant and Cloudflare are enabling our mutual customers to better protect themselves from malicious actors that are active on the front lines right now”.- Robert Wallace, Senior Director, Strategy,  Mandiant</p></blockquote>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3sti3ubfVuuTUinM3pEBed/3ed079d7423fb15cc998471e7a1776ee/image1-16.png" />
            
            </figure>
    <div>
      <h3>Recorded Future</h3>
      <a href="#recorded-future">
        
      </a>
    </div>
    <p>Recorded Future customers can upload their API key to unlock use of Security Control Feeds. Once you have set up your API key, Recorded Future intelligence will also be available in the rule builder of Cloudflare Gateway and Magic Firewall. Cloudflare will present the intelligence that is relevant to and actionable by the product being configured. Intelligence will be regularly updated for you, freeing you to focus on the security policies and actions that are relevant for your organization.</p><p>For example, customers will be able to create a rule that blocks connections where the source or destination IP is in the Security Control feed “​​Command and Control - IP Addresses [Prevent]”. This list will be automatically updated daily for each customer who has a valid API key.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4NJzP1xP9jelwjASBg1l33/b7265ffc5d55676991b906b91c5056b2/image2-21.png" />
            
            </figure><blockquote><p>As threats accelerate and converge in the world around us, Recorded Future and Cloudflare are working together to empower customers with the right intelligence at the right time, to keep our people and infrastructure safe.- Craig Adams, Chief Product &amp; Engineering officer, Recorded Future</p></blockquote>
    <div>
      <h3>VirusTotal</h3>
      <a href="#virustotal">
        
      </a>
    </div>
    <p>Virus Total Premium customers can upload their API key to augment and enrich Security Center search results for IPs, domains, and URLs. In the future we plan to add additional object types such as binary files.</p><p>Results will be automatically populated within a new card in the ‘Investigate’ tab. When searching an IP address, you will see a summary of the IP address information from VirusTotal including the overall results of the last analysis (e.g., harmless, suspicious, malicious, etc.), reputation score, tags, community votes, and the top files (if any) associated with that IP address by communications.</p><blockquote><p>“Cybersecurity teams face a challenging environment as attackers become more sophisticated. They need complete visibility and real-time threat intelligence from multiple sources to combat malicious threats. We are partnering with Cloudflare to help our mutual customers outsmart adversaries.”- Emiliano Martinez Contreras, Head of Product for VirusTotal — Google</p></blockquote>
    <div>
      <h3>Want to get started?</h3>
      <a href="#want-to-get-started">
        
      </a>
    </div>
    <p>If you are interested in gaining access during our beta testing phase, please complete this <a href="https://forms.gle/fJLNCuYueAzUHgy49">form</a>. And if there are additional data vendors you would like to see us integrate with, including your own sources, click <a href="https://forms.gle/fJLNCuYueAzUHgy49">here</a>.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare One Week]]></category>
            <category><![CDATA[Cloudflare One]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Cloudflare Zero Trust]]></category>
            <guid isPermaLink="false">5S4ZSavngXmsFSpNQmonE4</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Deeksha Lamba</dc:creator>
            <dc:creator>Jesse Kipp</dc:creator>
        </item>
        <item>
            <title><![CDATA[Democratizing email security: protecting individuals and businesses of all sizes from phishing and malware attacks]]></title>
            <link>https://blog.cloudflare.com/democratizing-email-security/</link>
            <pubDate>Mon, 14 Mar 2022 12:59:33 GMT</pubDate>
            <description><![CDATA[ Once the acquisition of Area 1 closes, we plan to give all paid self-serve plans access to their email security technology at no additional charge ]]></description>
            <content:encoded><![CDATA[ 
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5t6mGqXJD9qlJOdDYKgFW4/062c99b0769b5c30eb07e056c53a87cd/image1-10.png" />
            
            </figure><p>Since our founding, Cloudflare has been on a mission to take expensive, complex security solutions typically only available to the largest companies and make them easy to use and accessible to everyone. In 2011 and 2015 we did this for the <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">web application firewall</a> and SSL/TLS markets, simplifying the process of protecting websites from application vulnerabilities and encrypting HTTP requests down to single clicks; in 2020, during the start of the COVID-19 pandemic, we made our Zero Trust suite available to everyone; and today—in the face of heightened phishing attacks—we’re doing the same for the email security market.</p><p>Once the acquisition of Area 1 closes, as we expect early in the second quarter of 2022, we plan to give all paid self-serve plans access to their <a href="https://www.cloudflare.com/zero-trust/solutions/email-security-services/">email security technology</a> at no additional charge. Control, customization, and visibility via analytics will vary with plan level, and the highest flexibility and support levels will be available to Enterprise customers for purchase.</p><p>All self-serve users will also get access to a more feature-packed version of the <a href="https://www.cloudflare.com/learning/security/glossary/what-is-zero-trust/">Zero Trust solution</a> we made available to everyone in 2020. Zero Trust services are incomplete without an <a href="https://www.cloudflare.com/zero-trust/products/email-security/">email security solution</a>, and <a href="https://www.cisa.gov/news/2021/10/01/cisa-kicks-cybersecurity-awareness-month">CISA’s recent report</a> makes that clearer than ever: over 90% of successful cyber attacks start with a phishing email, so we expect that over time analysts will have no choice but to include email in their definitions of secure access and zero edges.</p><p><b>If you’re interested in reserving your place in line, register your interest by logging into your Cloudflare account at dash.cloudflare.com, selecting your domain, clicking Email, and then “Join Waitlist” at the top of the page; we’ll reach out after the Area 1 acquisition is completed, and the integration is ready, in the order we received your request.</b></p>
    <div>
      <h3>One-click deployment</h3>
      <a href="#one-click-deployment">
        
      </a>
    </div>
    <p>If you’re already managing your authoritative DNS with Cloudflare, as nearly 100% of <a href="https://www.cloudflare.com/plans/">non-Enterprise plans</a> are, there will just be a single click to get started. Once clicked, we’ll start returning different MX records to anyone trying to send email to your domain. This change will attract all emails destined for your domain, during which they’ll be run through Area 1’s models and potentially be quarantined or flagged. Customers of Microsoft Office 365 will also be able to take advantage of APIs for an even deeper integration and capabilities like post-delivery message redaction.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5CbqzMF8kBl1AP1z62smRo/54807cd4dcf81335a7f0471d01fc67be/image2-10.png" />
            
            </figure><p>In addition to routing and filtering email, we’ll also automagically take care of your DNS email security records such as SPF, DKIM, DMARC, etc. We launched a tool to help with this last year, and soon we’ll be making it even more comprehensive and easier to use.</p>
    <div>
      <h3>Integration with other Zero Trust products</h3>
      <a href="#integration-with-other-zero-trust-products">
        
      </a>
    </div>
    <p>As we wrote in the <a href="/why-we-are-acquiring-area-1/">acquisition announcement post</a> on this blog, we’re excited to integrate email security with other products in our Zero Trust suite. For customers of Gateway and Remote Browser Isolation (RBI), we’ll automatically route potentially suspicious domains and links through these protective layers. Our built-in <a href="/data-loss-prevention/">data loss prevention (DLP) technology</a> will also be wired into Area 1’s technology in deployments where visibility into outbound email is available.</p>
    <div>
      <h3>Improving threat intelligence with new data sources</h3>
      <a href="#improving-threat-intelligence-with-new-data-sources">
        
      </a>
    </div>
    <p>In addition to integrating directly with Zero Trust products, we’re excited about connecting threat data sources from Area 1 into existing Cloudflare products and vice versa. For example, phishing infrastructure identified during Area 1’s Internet-wide scans will be displayed within the recently launched Cloudflare Security Center, and 1.1.1.1’s trillions of queries per month will help Area 1 identify new domains that may be threats. Domains that are newly registered, or registered with slight variations of legitimate domains, are often warning signs of an upcoming phishing attack.</p>
    <div>
      <h3>Getting started</h3>
      <a href="#getting-started">
        
      </a>
    </div>
    <p>Cloudflare has been a happy customer of Area 1’s technology for years, and we’re excited to open it up to all of our customers as soon as possible. If you’re excited as we are about being able to use this in your Pro or Business plan, reserve your place in line today within the Email tab for your domain. Or if you’re an Enterprise customer and want to get started immediately, fill out <a href="https://www.cloudflare.com/lp/emailsecurity/">this form</a> or contact your Customer Success Manager.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Email]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Zero Trust]]></category>
            <category><![CDATA[Phishing]]></category>
            <category><![CDATA[Malware]]></category>
            <category><![CDATA[Cloudflare Zero Trust]]></category>
            <guid isPermaLink="false">3FxihkQRtKc61pl0Sevyjt</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Shalabh Mohan</dc:creator>
        </item>
        <item>
            <title><![CDATA[Investigating threats using the Cloudflare Security Center]]></title>
            <link>https://blog.cloudflare.com/security-center-investigate/</link>
            <pubDate>Mon, 14 Mar 2022 12:59:21 GMT</pubDate>
            <description><![CDATA[ The data we glean from attacks trains our machine learning models and improves the efficacy of our network and application security products, but historically hasn’t been available to query directly. This week, we’re changing that ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Cloudflare blocks a <i>lot</i> of diverse security threats, with some of the more interesting attacks targeting the “long tail” of the millions of Internet properties we protect. The data we glean from these attacks trains our <a href="https://www.cloudflare.com/learning/ai/what-is-machine-learning/">machine learning models</a> and improves the efficacy of our network and application security products, but historically hasn’t been available to query directly. This week, we’re changing that.</p><p>All customers will soon be granted access to our new threat investigations portal, <i>Investigate</i>, in the Cloudflare Security Center (first launched in December 2021). Additionally, we’ll be annotating threats across our analytics platform with this intelligence to streamline security workflows and tighten feedback loops.</p><div></div>
<p></p><p>What sorts of data might you want to look up here? Let’s say you’re seeing an IP address in your logs and want to learn which hostnames have pointed to it via <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS</a>, or you’re seeing a cluster of attacks come from an autonomous system (AS) you’re not familiar with. Or maybe you want to investigate a domain name to see how it’s been categorized from a threat perspective. Simply enter any of those items into the omni search box, and we’ll tell you everything we know.</p><p>IPs and hostnames will be available to query this week, followed by AS details to give you insight into the networks that communicate with your Cloudflare accounts. Next month as we move to general availability we’ll add data types and properties. Integrations with partners will allow you to use your existing license keys to see all your threat data in a single, unified interface. We also plan to show how both your infrastructure and corporate employees are interacting with any objects you look up, e.g., you can see how many times an IP triggers a WAF or API Shield rule, or how many times your employees attempted to resolve a domain that’s known to serve malware.</p>
    <div>
      <h2>Annotations in the dashboard: actionable intelligence in context</h2>
      <a href="#annotations-in-the-dashboard-actionable-intelligence-in-context">
        
      </a>
    </div>
    <p>Looking up threat data on an ad hoc basis is great, but it’s better when that data is annotated directly in logs and analytics. Starting this week, we will begin rolling out intelligence that is available in <i>Investigate</i> in the dashboard where it is relevant to your workflow. We’re starting with the web application firewall analytics for your websites that are behind Cloudflare.</p><p>Say you are investigating a security alert for a large number of requests that are blocked by a web application firewall rule. You might see that the alert was caused by an IP address probing your website for commonly exploited software vulnerabilities. If the IP in question were a cloud IP or flagged as an anonymizer, contextual intelligence will show that information directly on the analytics page.</p><p>This context can help you see patterns. Are attacks coming from anonymizers or the Tor network? Are they coming from cloud virtual machines? An IP is just an IP. But seeing a credential stuffing attack coming from anonymizers is a pattern that enables a proactive response, “Is my bot management configuration up-to-date?”</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/234fVUM8Un89bcl5uuwlDx/b817074e5b9a2ee54ade9a573917720b/image2-11.png" />
            
            </figure>
    <div>
      <h2>Cloudflare’s network vantage point and how this informs our data</h2>
      <a href="#cloudflares-network-vantage-point-and-how-this-informs-our-data">
        
      </a>
    </div>
    <p>The scale at which each product suite operates at Cloudflare is staggering. At peak, Cloudflare handles 44 million HTTP requests a second, from more than <b>250 cities</b> in over <b>100 countries</b>. The Cloudflare network responds to over <b>1.2 trillion DNS queries per day</b>, and it has <b>121 Tbps of network capacity</b> to serve traffic and mitigate denial of service attacks across all products. But on top of this immense scale, Cloudflare’s architecture enables refining raw data and combining intelligence from all of our products to paint a holistic picture of the security landscape.</p><p>We are able to take signals refined from the raw data generated by each product and combine them with signals from other products and capabilities to enhance our network and threat data capabilities. It is a common paradigm for security products to be built to have positive flywheel effects among users of the products. If one customer sees a new piece of malware, an endpoint protection vendor can deploy an update that will detect and block this malware for all their other customers. If a botnet attacks one customer, this provides information that can be used to find the signature of that botnet and protect other customers. If a device participates in a DDoS (Distributed Denial of Service) attack, that information can be used to make the network able to faster detect and mitigate future DDoS attacks. Cloudflare’s breadth of product offerings means that the flywheel effect benefits to users accumulate not just between users, but <i>between products as well</i>.</p><p>Let’s look at some examples:</p>
    <div>
      <h3>DNS resolution and certificate transparency</h3>
      <a href="#dns-resolution-and-certificate-transparency">
        
      </a>
    </div>
    <p>First, Cloudflare operates 1.1.1.1, one of the largest recursive DNS resolvers in the world. We operate it in a privacy-forward manner, so here at Cloudflare we do not know who or what IP performed a query, nor are we able to correlate queries together to distinct anonymous users. However, through the requests the resolver handles, Cloudflare sees newly registered and newly seen domains. Additionally, Cloudflare has one of the most <a href="https://www.cloudflare.com/application-services/products/ssl/">advanced SSL/TLS encryption products</a> on the market, and as part of that is a member organization helping to maintain the Certificate Transparency logs. These are public logs of every TLS certificate issued by a root certificate authority that is trusted by web browsers. Between these two products, Cloudflare has an unmatched view of what domains are out there on the Internet and when they become active. We use this information not only to populate our new and newly seen domains categories for our Gateway product, but we feed these domains into machine learning models that label suspicious or potentially malicious domains early in their lifecycle.</p>
    <div>
      <h3>Email security</h3>
      <a href="#email-security">
        
      </a>
    </div>
    <p>As another example, with the acquisition of Area 1, Cloudflare will bring a new set of mutually-reinforcing capabilities into its product offering. All the signals we can generate for a domain from our 1.1.1.1 resolver will become available to help <a href="https://www.cloudflare.com/zero-trust/products/email-security/">identify malicious email</a>, and Area 1’s years of expertise in identifying malicious email will be able to feed back into Cloudflare’s Gateway product and 1.1.1.1 for Families DNS resolver. In the past, data integrations like this would have been performed by IT or security teams. Instead, data will be able to flow seamlessly between the points on your organization’s <a href="https://www.cloudflare.com/learning/security/what-is-an-attack-surface/">attack surface</a>, mutually reinforcing the quality of the analysis and classification. The entire Cloudflare Zero Trust toolkit, including request logging, blocking, and <a href="https://www.cloudflare.com/learning/access-management/what-is-browser-isolation/">remote browser isolation</a> will be available to handle potentially malicious links delivered via email, using the same policies already in place for other security risks.</p><p>Over the last few years, Cloudflare has integrated the use of machine learning in many of our product offerings, but today we’ve launched a new tool that puts the data and signals that power our <a href="https://www.cloudflare.com/network-security/">network security</a> into our customer’s hands as well. Whether responding to security incidents, <a href="https://www.cloudflare.com/learning/security/glossary/what-is-threat-hunting/">threat hunting</a>, or proactively setting security policies to protect for your organization, you, human, can now be part of the Cloudflare network as well. Cloudflare’s unique position in the network means that your insights can be fed back into the network to protect not just your organization across all Cloudflare products it uses, but also can participate in mutual insight and defense among all Cloudflare customers.</p>
    <div>
      <h2>Looking forward</h2>
      <a href="#looking-forward">
        
      </a>
    </div>
    <p>Cloudflare can <a href="https://www.cloudflare.com/application-services/products/securitycenter/">cover your organization’s whole attack surface</a>: defending websites, protecting devices and SaaS applications with Cloudflare Zero Trust, your locations and offices with Magic Transit, and your email communications. Security Center is here to make sure you have all the information you need to understand the <a href="https://www.cloudflare.com/learning/security/what-is-cyber-security/">cyber security risks</a> present today, and to help you defend your organization using Cloudflare.</p><p>“What is the wiper malware that I hear about on the news, and how do I protect my company from it?” We hear your questions, and we’re going to give you answers. Not just raw information, but what is relevant to you and how you use the Internet. We have big plans for Security Center. A file scanning portal will provide you with information about JavaScript files seen by Page Shield, executable files scanned by Gateway, and the ability to upload and scan files. Indicators of Compromise like IP addresses and domains will link to information about the relevant threat actors, when known, giving you more information about the techniques and tactics you are faced with, and information about how Cloudflare products can be used to defend against them. CVE search will let you find information on software vulnerabilities, along with the same easy-to-understand Cloudflare perspective you are used to reading on this blog to help decode the jargon and technical language. With today’s release, we’re just getting started.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Threat Intelligence]]></category>
            <category><![CDATA[Security Center]]></category>
            <guid isPermaLink="false">1iIplOzXKw2PKTAmKATBf9</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Jesse Kipp</dc:creator>
        </item>
        <item>
            <title><![CDATA[Upgrading the Cloudflare China Network: better performance and security through product innovation and partnership]]></title>
            <link>https://blog.cloudflare.com/upgrading-the-cloudflare-china-network/</link>
            <pubDate>Thu, 22 Jul 2021 12:56:26 GMT</pubDate>
            <description><![CDATA[ Cloudflare and our strategic partner in China have created a global network that offers a fast experience for visitors inside and outside of China — with DDoS mitigation, web application firewall (WAF), and other security services built in. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>Core to Cloudflare’s mission of helping build a better Internet is making it easy for our customers to improve the performance, security, and reliability of their digital properties, no matter where in the world they might be. This includes Mainland China. Cloudflare has had customers using our service in China since 2015 and recently, we expanded our China presence through a partnership with JD Cloud, the cloud division of Chinese Internet giant, JD.com. We’ve also had a local office in Beijing for several years, which has given us a deep understanding of the Chinese Internet landscape as well as local customers.</p><p>The new Cloudflare China Network built in partnership with JD Cloud has been live for several months, with significant performance and security improvements compared to the previous in-country network. Today, we’re excited to describe the improvements we made to our DNS and DDoS systems, and provide data demonstrating the performance gains customers are seeing. All customers licensed to operate in China can now benefit from these innovations, with the click of a button in the Cloudflare dashboard or via the API.</p>
    <div>
      <h2>Serving DNS inside China</h2>
      <a href="#serving-dns-inside-china">
        
      </a>
    </div>
    <p>With over 14% of all domains on the Internet using Cloudflare’s nameservers we are the <a href="https://w3techs.com/technologies/overview/dns_server">largest DNS</a> provider. Furthermore, we pride ourselves on consistently being among the <a href="https://dnsperf.com">fastest authoritative nameservers</a>, answering about 12 million DNS queries per second on average (in Q2 2021). We achieve this scale and performance by running our DNS platform on our <a href="https://www.cloudflare.com/network/">global network</a> in more than 200 cities, in over 100 countries.</p><p>Not too long ago, a user in mainland China accessing a website using Cloudflare DNS did not fully benefit from these advantages. Their DNS queries had to leave the country and, in most cases, cross the Pacific Ocean to reach our nameservers outside of China. This network distance introduced latency and sometimes even packet drops, resulting in a poor user experience.</p><p>With the new China Network offering built on JD Cloud’s infrastructure, customers are now able to serve their DNS in mainland China. This means <a href="https://www.cloudflare.com/learning/dns/what-is-dns/">DNS queries</a> are answered directly from one of the JD Cloud Points of Presence (PoPs), leading to faster response times and improved reliability.</p><p>Once a user signs up a domain and opts in to serve their DNS in China we will assign two nameservers, from two of the following three domains:</p>
            <pre><code>cf-ns.com
cf-ns.net
cf-ns.tech</code></pre>
            <p>We selected these Top Level Domains (TLDs) because they offer the best possible performance from within mainland China. They are chosen to always be different from the TLD of the domain using them. For example, example.com will be assigned nameservers using the <a href="https://www.cloudflare.com/application-services/products/registrar/buy-tech-domains/">.tech</a> and .net TLD. This gives us “glueless delegations” for customers’ nameservers, allowing us to dynamically return nameserver IP addresses instead of static <a href="https://en.wikipedia.org/wiki/Domain_Name_System#Circular_dependencies_and_glue_records">glue records</a>.</p><p>A “glue record” (or just “glue”) is a mapping between nameservers and IPs that’s added by <a href="https://www.cloudflare.com/learning/dns/glossary/what-is-a-domain-name-registrar/">registrars</a> to break circular lookup dependencies when a domain uses a nameserver with the same TLD. For example, imagine a resolver asks the .com TLD nameserver: “Where do I find the nameservers for example.com?” and this domain is using ns1.example.com and ns2.example.com as nameservers. If .com just replied: “Go and ask ns1.example.com or ns2.example.com.” the resolver would come back to .com with the same question and this would never stop. One solution is to add glue at .com, so the answer can be: “The nameservers for example.com are ns1.example.com and ns2.example.com, and they can be reached at 192.0.2.78 and 203.0.113.55.”.</p><p>By using different TLDs, as described above, we don’t need to rely on glue records for customers’ nameservers. This way, we can ensure that queries will always be answered from the nearest point of presence (PoP) leading to a faster DNS response. Another advantage of serving dynamic nameserver IPs is the ability to distribute queries across different PoPs, which helps to spread load more efficiently and mitigate attacks.</p>
    <div>
      <h2>Mitigating DDoS attacks within China</h2>
      <a href="#mitigating-ddos-attacks-within-china">
        
      </a>
    </div>
    <p>Everywhere in the world except for China and India, we use a technique known as anycast routing to distribute DDoS attacks and absorb them in data centers as close to the traffic source as possible. But as we <a href="/how-we-extended-cloudflares-performance-and-security-into-mainland-china/">first wrote in 2015</a>, the Internet in China works a bit differently than the rest of the world so anycast-based mitigation was not an option:</p><p><i>Unlike much of the rest of the world where network routing is open, in China core Internet access is largely controlled by two ISPs: China Telecom and China Unicom. [Today this list also includes China Mobile.] These ISPs control IP address allocation and routing inside the country. Even the Chinese Internet giants rarely own their own IP address allocations, or use BGP to control routing across the Chinese Internet. This makes BGP Anycast and many of the other routing techniques we use across Cloudflare's network impossible inside of China.</i></p><p>The lack of anycast in China requires a different approach to mitigating attacks, and our expansion with JD Cloud pushed us to further improve the <a href="/deep-dive-cloudflare-autonomous-edge-ddos-protection/">edge-based mitigation system we wrote about earlier this year</a>. Most importantly, we pushed the detection and mitigation of application (L7) attacks to the edge, reducing our time to mitigate and improving the resiliency of the system by removing a dependency on other core data centers for instructions. In the first quarter of 2021, we mitigated 81% of all L7 attacks at the edge.</p><p>For the larger network-based (L3/L4) attacks, we worked closely with JD Cloud to augment our in-data center protections with remote signaling to China Telecom, China Unicom, and China Mobile. These integrations allow us to remotely — and automatically — signal from our edge-based mitigation systems when we want upstream filtering assistance from the ISP. Mitigating attacks at the edge is faster than relying on centralized data centers, and in the first quarter of 2021 98.6% of all L3/4 DDoS attacks were mitigated without centralized communication. Attacks exceeding certain thresholds can also be re-routed to large scrubbing centers, a technique that doesn’t make sense in an anycast world but is useful when unicast is the only option.</p><p>Beyond the improved mitigation controls, we also developed new traffic engineering processes to move traffic from overloaded data centers to locations with more spare resources. These controls are already used outside of China, but doing so within the country required integration with our DNS systems.</p><p>Lastly, because all of our data centers run the same software stack, the work we did to improve the underlying components of DDoS detection and mitigation systems within China has already made its way back to our data centers outside of China.</p>
    <div>
      <h2>Improving performance</h2>
      <a href="#improving-performance">
        
      </a>
    </div>
    <p>Cloudflare on JD Cloud is significantly faster than our previous in-country network, allowing us to accelerate the delivery of our customers’ web properties in China.</p><p>To compare the Cloudflare PoPs on JD Cloud vs. our previous in-country network, we deployed a test zone to simulate a customer website on both China networks. We tested each website with the same two origin networks. Both origins are commonly used public cloud providers. One site was hosted in the northwest region of the United States, and the other in Western Europe.</p><p>For both zones, we assigned DNS nameservers in China to reduce out-of-country latency incurred during DNS lookups (more details are on DNS below). To test our caching, we used a monitoring and benchmarking service with a wide variety of clients in various Chinese cities and provinces to download 100 kilobyte, 1 megabyte, and 10 megabyte files every 15 minutes over the course of 36 hours.</p><p>Latency, as measured by <a href="https://www.cloudflare.com/learning/cdn/glossary/round-trip-time-rtt/">Round Trip Time (RTT)</a> from the client to our JD Cloud PoPs, was reduced at least 30% across tests for all file sizes. This subsequently reduced our Time to First Byte (TTFB) metrics. Reducing latency — and making it more consistent, i.e., improving jitter — has the most impact on other performance metrics, as latency and the slow-start process is the bottleneck for the vast majority of TCP connections.</p><p>Our latency reduction comes from the quality of the JD Cloud network, their placement of the PoPs within China, and our ability to direct clients to the closest PoP. As we continue to add more capacity and PoPs in partnership with JD Cloud in the future, we only expect our latency metrics to get even better.</p>
    <div>
      <h3>Dynamic Content</h3>
      <a href="#dynamic-content">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1yY5Ifkmq9Fn04Na2OprfR/e6949415e7f45c96fcb07dc4de7a85cc/image3-8.png" />
            
            </figure>
    <div>
      <h3>Static Content</h3>
      <a href="#static-content">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5YfT8pRmrfHtKfqvu2PtdA/b1373680a11fda355320fff04d8c9490/image4-7.png" />
            
            </figure>
    <div>
      <h3>DNS Response Time</h3>
      <a href="#dns-response-time">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/xhHswN41o23RpkvjCr4G4/9e76f8756dd331316b5ff46cfbdc299a/image2-12.png" />
            
            </figure>
    <div>
      <h2>Looking forward and welcoming new customers in China</h2>
      <a href="#looking-forward-and-welcoming-new-customers-in-china">
        
      </a>
    </div>
    <p>Cloudflare’s sustained product investments in China, in partnership with JD Cloud, have resulted in significant performance and security improvements over our previous in-country network first launched in 2015.</p><p>Specifically, innovations in DNS and DDoS mitigation technology, alongside an improved network design and distribution of PoPs, have resulted in better security for our customers and at least a 30% performance boost.</p><p>This new network is open for business, and interested customers should <a href="https://www.cloudflare.com/china-network/">reach out to learn more</a>.</p> ]]></content:encoded>
            <category><![CDATA[China]]></category>
            <category><![CDATA[Partners]]></category>
            <guid isPermaLink="false">RD99TlGNcznZVksJSK8Sn</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Keyless SSL now supports FIPS 140-2 L3 hardware security module (HSM) offerings from all major cloud providers]]></title>
            <link>https://blog.cloudflare.com/keyless-ssl-supports-fips-140-2-l3-hsm/</link>
            <pubDate>Sat, 27 Mar 2021 13:01:00 GMT</pubDate>
            <description><![CDATA[ Private encryption keys stored in hardware security module offerings from all major cloud providers can now be used to secure HTTPS connections at Cloudflare’s global edge.  ]]></description>
            <content:encoded><![CDATA[ <p></p><p><b>Private encryption keys stored in hardware security module offerings from all major cloud providers can now be used to secure HTTPS connections at Cloudflare’s global edge</b>.</p><p>Cloudflare generates, protects, and manages more SSL/TLS private keys than perhaps any organization in the world. Private keys must be carefully protected, as an attacker in possession of one can impersonate legitimate sites and decrypt HTTPS requests. To mitigate this risk, Cloudflare has strict key handling procedures and <a href="/going-keyless-everywhere/">layers of isolation</a> at the edge that are designed to safeguard keys at all costs. But for a small minority of customers with <a href="https://www.cloudflare.com/learning/security/what-is-information-security/">information security policies</a> dictating where they can (or cannot) custody their keys, these protections do not meet their requirements.</p><p>It was for these customers that we <a href="/announcing-keyless-ssl-all-the-benefits-of-cloudflare-without-having-to-turn-over-your-private-ssl-keys/">first released Keyless SSL in 2014</a>, a protocol we use extensively inside our network: all of the TLS handshakes per day established at the Cloudflare edge that take place in a process that has no access to our customers’ private keys. The data required to establish the session is instead sent to a separate system, where the necessary cryptographic signing operation is performed. For keys uploaded to or generated by Cloudflare, we manage this other system, but some customers wish to manage it themselves.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2TvqVFrjxysKMtotYnQkQo/7f4c325d764571621141733445a8e99f/image2-47.png" />
            
            </figure><p>Historically the keys were placed on the server running the <a href="https://github.com/cloudflare/gokeyless">open source gokeyless daemon</a> we provide to process the handshake, or secured in an on-prem hardware security module (HSM) that gokeyless interfaces with using a standard protocol known as PKCS#11. However, as financial services, healthcare, cryptocurrency, and other highly regulated or security-focused companies have moved to the cloud, they cannot simply ship these expensive boxes and ask Amazon, Google, IBM, or Microsoft to rack and stack them.</p><p>For these customers, especially those whose information security policies mandate <a href="https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf">FIPS 140-2 Level 3</a> validated HSMs, we are announcing that Keyless SSL now supports the following cloud-hosted HSMs: <a href="https://aws.amazon.com/cloudhsm/">Amazon Cloud HSM</a>; <a href="https://cloud.google.com/kms/docs/hsm">Google Cloud HSM</a>; <a href="https://cloud.ibm.com/catalog/infrastructure/hardware-security-module">IBM Cloud HSM</a>; <a href="https://azure.microsoft.com/en-us/services/azure-dedicated-hsm/">Microsoft Azure Dedicated HSM</a> and <a href="https://azure.microsoft.com/en-us/updates/akv-managed-hsm-public-preview/">Managed HSM</a>. We also support any other HSM that implements the PKCS#11 standard, including series such as the <a href="https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules/ncipher-thales-nshield-connect">nCipher nShield Connect</a> and Thales Luna.</p>
    <div>
      <h3>HSM overview</h3>
      <a href="#hsm-overview">
        
      </a>
    </div>
    <p>HSMs are purpose-built machines that are tamper-resistant, hardened against weaknesses such as side-channel attacks, and optimized to perform cryptographic operations such as signing and decryption. They can be deployed as stand-alone boxes, as expansion cards inserted into servers, or, most recently, as cloud services.</p><p>Rather than generate private keys on a server and upload them to the HSM, vendors and security experts typically recommend that keys are generated on (and never leave) the device itself. HSMs have better randomness guarantees than general-purpose servers, and take special precautions to protect keys in memory before synchronizing them to disk in an encrypted state. When operations that require the private key are required, services make authenticated API calls into the device using libraries provided by the HSM vendor.</p>
    <div>
      <h3>HSMs and FIPS 140-2 level 3</h3>
      <a href="#hsms-and-fips-140-2-level-3">
        
      </a>
    </div>
    <p>HSMs are typically validated against the Federal Information Process Standard (FIPS) publication 140-2: <a href="https://csrc.nist.gov/publications/detail/fips/140/2/final">Security Requirements for Cryptographic Modules</a>. There are four levels — 1 through 4 — that specify increasingly stringent requirements around approved algorithms, security functions, <a href="https://www.cloudflare.com/learning/access-management/role-based-access-control-rbac/">role-based access control</a>, and tamper evident/resistant protections.</p><p>The National Institute of Standards and Technology (NIST) publishes these guidelines, administers the <a href="https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules">Cryptographic Module Validation Program</a>, and publishes a <a href="https://csrc.nist.gov/projects/cryptographic-module-validation-program/validated-modules/search">searchable database of validated modules</a>, which includes the offerings listed below. We have provided instructions on how to use them with Cloudflare.</p>
    <div>
      <h3>Getting started with cloud offerings</h3>
      <a href="#getting-started-with-cloud-offerings">
        
      </a>
    </div>
    <p>All existing Keyless SSL customers can immediately make use of this technology, and you can read instructions for doing so at <a href="https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules">https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules</a>. Source code is available on GitHub: <a href="https://github.com/cloudflare/gokeyless">https://github.com/cloudflare/gokeyless</a>.</p>
    <div>
      <h3>End-to-end example: Microsoft Azure Managed HSM</h3>
      <a href="#end-to-end-example-microsoft-azure-managed-hsm">
        
      </a>
    </div>
    <p>Microsoft’s Azure Key Vault team <a href="https://azure.microsoft.com/en-us/updates/akv-managed-hsm-public-preview/">released Managed HSM</a>. The offering is FIPS 140-2 Level 3 validated and is integrated with Azure services such as Azure Storage, Azure SQL, and Azure Information Protection. Managed HSM is available in the following regions: East US 2, South Central US, North Europe, and West Europe.</p><p>The instructions below are taken from the <a href="https://docs.microsoft.com/en-us/azure/key-vault/managed-hsm/quick-create-cli">Quickstart: Provision and activate a managed HSM using Azure CLI</a> guide, followed by instructions for using the Managed HSM with Cloudflare. The commands were run on a Ubuntu VM created in the same region (South Central US) as the HSM; this is also where we will deploy the Cloudflare Keyless SSL daemon.</p>
    <div>
      <h3>Provision and activate the HSM</h3>
      <a href="#provision-and-activate-the-hsm">
        
      </a>
    </div>
    <p>First we log in via the CLI and create a resource group for the Managed HSM in one of the supported regions. Note that you may get warnings from various commands based on the preview status of the offering.</p>
            <pre><code>$ LOCATION=southcentralus; GROUPNAME=”HSMgroup”; HSMNAME=”KeylessHSM”
$ az login
$ az group create --name $GROUPNAME --location $LOCATION</code></pre>
            <p>Next, we provision the HSM resource and activate it by downloading the <a href="https://docs.microsoft.com/en-us/azure/key-vault/managed-hsm/security-domain">security domain</a>. The example below grants administrative access to the signed-in user, along with another administrator whose OID can be retrieved by executing the same oid=$(...) command from the CLI where that user is logged in.</p>
            <pre><code>$ MYOID=$(az ad signed-in-user show --query objectId -o tsv)
$ OTHERADMIN_OID=...

$ az keyvault create --hsm-name $HSMNAME --resource-group $GROUPNAME --location $LOCATION --administrators $MYOID $OTHERADMIN_OID

Argument '--hsm-name' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Argument '--administrators' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
{- Finished ..
  "id": "/subscriptions/.../resourceGroups/HSMgroup/providers/Microsoft.KeyVault/managedHSMs/Keyles
sHSM",
  "location": "southcentralus",
  "name": "KeylessHSM",
  "properties": {
    "createMode": null,
    "enablePurgeProtection": false,
    "enableSoftDelete": true,
    "hsmUri": "https://keylesshsm.managedhsm.azure.net/",
    "initialAdminObjectIds": [
      "$MYOID",
      "$OTHERADMIN_OID"
    ],
    "provisioningState": "Succeeded",
    "softDeleteRetentionInDays": 90,
    "statusMessage": "The Managed HSM is provisioned and ready to use.",
    "tenantId": "..."
  },
  "resourceGroup": "$GROUPNAME",
  "sku": {
    "family": "B",
    "name": "Standard_B1"
  },
  "tags": {},
  "type": "Microsoft.KeyVault/managedHSMs"
}</code></pre>
            <p>Record the <b>hsmUri</b> property that is returned from the command above. You will need this shortly when configuring Keyless SSL on your VM.</p>
            <pre><code>$ HSMURI="https://keylesshsm.managedhsm.azure.net/"</code></pre>
            <p>Now that the HSM is provisioned, you must provide it with at least 3 RSA public keys. The HSM will encrypt the security domain with these keys and send it back to you, after which the HSM is ready to use.</p>
            <pre><code>$ openssl req -newkey rsa:2048 -nodes -keyout cert_0.key -x509 -days 365 -out cert_0.cer
$ openssl req -newkey rsa:2048 -nodes -keyout cert_1.key -x509 -days 365 -out cert_1.cer
$ openssl req -newkey rsa:2048 -nodes -keyout cert_2.key -x509 -days 365 -out cert_2.cer

$ az keyvault security-domain download --hsm-name $HSMNAME --sd-wrapping-keys ./cert_0.cer ./cert_1.cer ./cert_2.cer --sd-quorum 2 --security-domain-file $HSMNAME-SD.json</code></pre>
            <p>If you get a “Failed to connect to MSI” error, and you are using a cloud shell from the Azure Portal, run az login again as this is a known issue.</p><p>Once you have your HSM provisioned, <a href="https://docs.microsoft.com/en-us/cli/azure/keyvault/key?view=azure-cli-latest#az_keyvault_key_import">add your private key</a> to the keyvault</p>
            <pre><code>$ az keyvault key import --KeylessHSM</code></pre>
            <p>This will return a URI that you will later add to the Keyless YAML file to indicate where your private key is stored.</p><p>Now that you have your HSM provisioned and activated, you need to create a VM where you will deploy the Keyless daemon. For this example, we will create an Ubuntu Xenial VM in Azure. In the portal, go to the <b>Virtual machines</b> page and <b>Add</b> a VM. There, you can use the resource group that you created earlier for the HSM. For best results, choose the same region as the one for the HSM. Note the public IP of the VM, you will use this to remotely connect to the server.</p><p>Next, configure your VM as a key server. First, you need to add the <a href="https://pkg.cloudflare.com/">Cloudflare Package Repository</a>. Then, you will update your OS’ package listings and install the gokeyless server.</p>
            <pre><code>$ apt-get update
$ echo 'deb http://pkg.cloudflare.com/ Xenial main' |
sudo tee /etc/apt/sources.list.d/cloudflare-main.list
$ curl -C - https://pkg.cloudflare.com/pubkey.gpg | sudo apt-key
$ apt-get update
$ apt-get install gokeyless</code></pre>
            <p>Then, update the gokeyless YAML file. There, you will add the hostname of your keyserver — this hostname should have a DNS record that points to your VM, the zoneID, and Origin CA API key. The zoneID and Origin CA API key can be found in the Cloudflare dashboard. In addition to that, indicate the URI that to points to your private key’s directory under private_key_stores.</p>
            <pre><code>$ vim /etc/keyless/gokeyless.yaml</code></pre>
            <p>Lastly, start the keyless server.</p>
            <pre><code>$ service gokeyless start</code></pre>
            <p>Go back to the Azure portal and open the required TCP ports for the Azure VM. Go to your VM → Networking → Add inbound port rule. Make sure you allow traffic on any source port and indicate Port 2407 for the destination port.</p><p>Save the change, then go to the Cloudflare dashboard to upload your <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a>. You should see “Upload Keyless SSL Certificate” in the Edge Certificates section of the SSL/TLS tab. There, enter the fields with the key server label, the hostname in the YAML file, the key server port-- 2407 is the default port, and paste the SSL certificate.</p><p>Next you’re ready to test! Run <code>curl -v https://zone.com</code> and check that the TLS handshake is successfully completed.</p>
    <div>
      <h3>Microsoft Azure Dedicated HSM</h3>
      <a href="#microsoft-azure-dedicated-hsm">
        
      </a>
    </div>
    <p>In addition to the Managed HSM offering that is now in public preview, Azure customers can configure Cloudflare’s edge to utilize keys stored in Microsoft’s <a href="https://azure.microsoft.com/en-us/services/azure-dedicated-hsm/">Dedicated HSM offering</a>, based on the SafeNet Luna Network HSM 7 Model A790 series.</p><p>Azure Dedicated HSM is validated against both FIPS 140-2 Level 3 and eIDAS Common Criteria EAL4+. After following the instructions to <a href="https://docs.microsoft.com/en-us/azure/dedicated-hsm/tutorial-deploy-hsm-powershell">deploy the HSM</a>, customers should follow the Azure specific Keyless SSL instructions <a href="https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules/azure-dedicated-hsm">here</a>.</p>
    <div>
      <h3>Amazon Web Services (AWS) Cloud HSM</h3>
      <a href="#amazon-web-services-aws-cloud-hsm">
        
      </a>
    </div>
    <p><a href="https://aws.amazon.com/cloudhsm/">AWS CloudHSM</a> also provides FIPS 140-2 Level 3 validated HSMs to store your private keys.</p><p>The official <a href="https://registry.terraform.io/providers/hashicorp/aws/latest">AWS Terraform Provider</a> now includes support for the <a href="https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudhsm_v2_cluster">aws_cloudhsm_v2_cluster</a>, which is the version that Cloudflare supports. After <a href="https://docs.aws.amazon.com/cloudhsm/latest/userguide/getting-started.html">provisioning the AWS CloudHSM cluster</a>, customers should follow the AWS specific Keyless SSL instructions <a href="https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules/aws-cloud-hsm">here</a>.</p>
    <div>
      <h3>Google Cloud HSM</h3>
      <a href="#google-cloud-hsm">
        
      </a>
    </div>
    <p><a href="https://cloud.google.com/kms/docs/hsm">Google Cloud HSM</a> uses GCP’s Cloud KMS as its front end, and allows hosting of keys in FIPS 140-2 Level 3 validated HSMs. Additionally, Google offers the ability to host your own HSM in Google provided space; it is recommended that you contact your GCP account representative for additional information about this option.</p><p>Once the key ring and key have been <a href="https://cloud.google.com/kms/docs/hsm">created</a> within the HSM, customers should follow the Google Cloud specific Keyless SSL instructions <a href="https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules/google-cloud-hsm">here</a>. Additional details on using asymmetric keys with GCP KMS can be found <a href="https://cloud.google.com/kms/docs/encrypt-decrypt-rsa">here</a>.</p>
    <div>
      <h3>IBM Cloud</h3>
      <a href="#ibm-cloud">
        
      </a>
    </div>
    <p><a href="https://cloud.ibm.com/docs/hardware-security-modules/about.html#about-ibm-cloud-hsm">IBM Cloud HSM</a> 7.0 provides FIPS 140-2 Level 3 validated HSM capabilities. The offering is based on the SafeNet Luna A750 series.</p><p>After <a href="https://cloud.ibm.com/docs/hardware-security-modules?topic=hardware-security-modules-provisioning-ibm-cloud-hsm#provisioning-ibm-cloud-hs">provisioning the HSM</a>, customers should refer to the IBM specific Keyless SSL instructions <a href="https://developers.cloudflare.com/ssl/keyless-ssl/hardware-security-modules/ibm-cloud-hsm">here</a>.</p>
    <div>
      <h3>Getting help and providing feedback</h3>
      <a href="#getting-help-and-providing-feedback">
        
      </a>
    </div>
    <p>HSMs offer strong key protection capabilities, but can be complicated to set up and deploy. If you need assistance deploying the HSM on your cloud provider, we suggest that you start with their support channels.</p><p>However, if you need assistance configuring the HSM to work with Cloudfare’s edge, or would like to provide feedback on the process, you should reach out directly to your Solutions Engineering team who can put you in touch with Cloudflare’s Keyless SSL specialists.</p> ]]></content:encoded>
            <category><![CDATA[Security Week]]></category>
            <category><![CDATA[Keyless SSL]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">7KkFM8MKL5KP7l2zYnquaY</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Dina Kozlov</dc:creator>
        </item>
        <item>
            <title><![CDATA[Protecting against recently disclosed Microsoft Exchange Server vulnerabilities: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065]]></title>
            <link>https://blog.cloudflare.com/protecting-against-microsoft-exchange-server-cves/</link>
            <pubDate>Sun, 07 Mar 2021 00:47:20 GMT</pubDate>
            <description><![CDATA[ Cloudflare has deployed managed rules protecting customers against a series of remotely exploitable vulnerabilities that were recently found in Microsoft Exchange Server.  ]]></description>
            <content:encoded><![CDATA[ <p><b>Enabling the Cloudflare WAF and Cloudflare Specials ruleset protects against exploitation of unpatched CVEs: CVE-2021-26855, CVE-2021-26857, CVE-2021-26858, and CVE-2021-27065.</b></p><p>Cloudflare has deployed managed rules protecting customers against a series of remotely exploitable vulnerabilities that were recently found in Microsoft Exchange Server. Web Application Firewall customers with the Cloudflare Specials ruleset enabled are automatically protected against <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26855">CVE-2021-26855</a>, <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26857">CVE-2021-26857</a>, <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26858">CVE-2021-26858</a>, and <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-27065">CVE-2021-27065</a>.</p><p>If you are running Exchange Server 2013, 2016, or 2019, and do not have the Cloudflare Specials ruleset enabled, we strongly recommend that you do so. You should also follow Microsoft’s <a href="https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/">urgent recommendation to patch your on-premise systems immediately</a>. These vulnerabilities are actively being exploited in the wild by attackers to exfiltrate email inbox content and move laterally within organizations’ IT systems.</p>
    <div>
      <h2>Edge Mitigation</h2>
      <a href="#edge-mitigation">
        
      </a>
    </div>
    <p>If you are running the Cloudflare WAF and have enabled the Cloudflare Specials ruleset, there is nothing else you need to do. We have taken the <a href="https://developers.cloudflare.com/waf/change-log">unusual step of immediately deploying</a> these rules in “Block” mode given active attempted exploitation.</p><p>If you wish to <i>disable</i> the rules for any reason, e.g., you are experiencing a false positive mitigation, you can do so by following these instructions:</p><ol><li><p>Login to the Cloudflare Dashboard and click on the Cloudflare Firewall tab and then Managed Rules.</p></li><li><p>Click on the “Advanced” link at the bottom of the Cloudflare Managed Ruleset card and search for rule ID 100179. Select any appropriate action or disable the rule.</p></li><li><p>Repeat step #2 for rule ID 100181.</p></li></ol>
    <div>
      <h2>Server Side Mitigation</h2>
      <a href="#server-side-mitigation">
        
      </a>
    </div>
    <p>In addition to blocking attacks at the edge, we recommend that you follow Microsoft’s <a href="https://www.microsoft.com/security/blog/2021/03/02/hafnium-targeting-exchange-servers/">urgent recommendation to patch your on-premise systems immediately</a>. For those that are unable to immediately patch their systems, Microsoft posted yesterday with <a href="https://msrc-blog.microsoft.com/2021/03/05/microsoft-exchange-server-vulnerabilities-mitigations-march-2021/">interim mitigations</a> that can be applied.</p><p>To determine whether your system is (still) exploitable, you can run an Nmap script posted by Microsoft to GitHub: <a href="https://github.com/microsoft/CSS-Exchange/blob/main/Security/http-vuln-cve2021-26855.nse">https://github.com/microsoft/CSS-Exchange/blob/main/Security/http-vuln-cve2021-26855.nse</a>.</p>
    <div>
      <h2>Vulnerability Details</h2>
      <a href="#vulnerability-details">
        
      </a>
    </div>
    <p>The attacks observed in the wild take advantage of multiple CVEs that can result in exfiltration of email inboxes and remote code execution when chained together. Security researchers at Volexity have <a href="https://www.volexity.com/blog/2021/03/02/active-exploitation-of-microsoft-exchange-zero-day-vulnerabilities/">published a detailed analysis</a> of the zero-day vulnerabilities.</p><p>Briefly, attackers are:</p><ol><li><p>First exploiting a server-side request forgery (SSRF) vulnerability documented as <a href="https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2021-26855">CVE-2021-26855</a> to send arbitrary HTTP requests and authenticate as the Microsoft Exchange server.</p></li><li><p>Using this SYSTEM-level authentication to send SOAP payloads that are insecurely deserialized by the Unified Messaging Service, as documented in <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26857">CVE-2021-26857</a>. An example of the malicious SOAP payload can be found in the Volexity post linked above.</p></li><li><p>Additionally taking advantage of <a href="https://msrc.microsoft.com/update-guide/vulnerability/CVE-2021-26858">CVE-2021-26858</a> and <a href="http://cve-2021-27065">CVE-2021-27065</a> to upload arbitrary files such as webshells that allow further exploitation of the system along with a base to move laterally to other systems and networks. These file writes require authentication but this can be bypassed using <a href="https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2021-26855">CVE-2021-26855</a>.</p></li></ol><p>All 4 of the CVEs listed above are blocked by the recently deployed Cloudflare Specials rules: 100179 and 100181. Additionally, existing rule ID 100173, also enabled to Block by default, partially mitigates the vulnerability by blocking the upload of certain scripts.</p>
    <div>
      <h2>Additional Recommendations</h2>
      <a href="#additional-recommendations">
        
      </a>
    </div>
    <p>Organizations can deploy additional protections against this type of attack by adopting a Zero Trust model and making the Exchange server available only to trusted connections. The <a href="https://msrc.microsoft.com/update-guide/en-US/vulnerability/CVE-2021-26855">CVE guidance recommends</a> deploying a VPN or other solutions to block attempts to reach public endpoints. In addition to the edge mitigations from the Cloudflare WAF, your team can <a href="https://developers.cloudflare.com/cloudflare-one/tutorials">protect your Exchange server</a> by using Cloudflare for Teams to block all unauthorized requests.</p> ]]></content:encoded>
            <category><![CDATA[Vulnerabilities]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[WAF Rules]]></category>
            <guid isPermaLink="false">34qp9CzZnVFqX8BoMZHA2V</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Gabriel Gabor</dc:creator>
        </item>
        <item>
            <title><![CDATA[Holistic web protection: industry recognition for a prolific 2020]]></title>
            <link>https://blog.cloudflare.com/cloudflare-named-the-innovation-leader-in-holistic-web-protection/</link>
            <pubDate>Thu, 14 Jan 2021 17:00:20 GMT</pubDate>
            <description><![CDATA[ Today we’re excited to announce that Frost & Sullivan has named Cloudflare the Innovation Leader in their Frost Radar™: Global Holistic Web Protection Market Report. ]]></description>
            <content:encoded><![CDATA[ <p>I love building products that solve real problems for our customers. These days I don’t get to do so as much directly with our Engineering teams. Instead, about half my time is spent with customers listening to and learning from their security challenges, while the other half of my time is spent with other Cloudflare Product Managers (PMs) helping them solve these customer challenges as simply and elegantly as possible. While I miss the deeply technical engineering discussions, I am proud to have the opportunity to look back every year on all that we’ve shipped across our application security teams.</p><p>Taking the time to reflect on what we’ve delivered also helps to reinforce my belief in the Cloudflare approach to shipping product: release early, stay close to customers for feedback, and iterate quickly to deliver incremental value. To borrow a term from the investment world, this approach brings the benefits of <a href="https://www.ellevest.com/magazine/investing/compounding-returns"><i>compounded</i> returns</a> to our customers: we put new products that solve real-world problems into their hands as quickly as possible, and then reinvest the proceeds of our shared learnings immediately back into the product.</p><p>It is these sustained investments that allow us to release a flurry of small improvements over the course of a year, and be recognized by leading industry analyst firms for the capabilities we’ve accumulated and distributed to our customers. Today we’re excited to announce that Frost &amp; Sullivan has named Cloudflare the Innovation Leader in their <a href="https://www.cloudflare.com/lp/frost-radar-holistic-web/">Frost Radar™: Global Holistic Web Protection Market Report</a>. Frost &amp; Sullivan’s view that this market “will gradually absorb the markets formed around legacy and point solutions” is consistent with <a href="https://www.sec.gov/Archives/edgar/data/1477333/000119312519222176/d735023ds1.htm">our view of the world</a>, and we’re leading the way in “the consolidation of standalone WAF, DDoS mitigation, and Bot Risk Management solutions” they believe is “poised to happen before 2025”.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Nd202DDxdKpbpRW2Zkrhe/7af782d5be18980571daaf8b160a5fd5/image4-10.png" />
            
            </figure><p>Image © 2020 Frost &amp; Sullivan from Frost Radar™: Global Holistic Web Protection Market Report</p><p>We are honored to receive this recognition, based on the analysis of 10 providers’ competitive strengths and opportunities as assessed by Frost &amp; Sullivan. The rest of this post explains some of the capabilities that we shipped in 2020 across our Web Application Firewall (WAF), Bot Management, and Distributed Denial-of-Service product lines—the scope of Frost &amp; Sullivan’s report. Get a copy of the Frost &amp; Sullivan Frost Radar report to see why Cloudflare was named the Innovation Leader <a href="https://www.cloudflare.com/lp/frost-radar-holistic-web/">here</a>.</p>
    <div>
      <h3>2020 Web Security Themes and Roundup</h3>
      <a href="#2020-web-security-themes-and-roundup">
        
      </a>
    </div>
    <p>Before jumping into specific product and feature launches, I want to briefly explain how we think about building and delivering our web security capabilities. The most important “product” by far that’s been built at Cloudflare <a href="/welcome-to-birthday-week-2020/">over the past 10 years</a> is the massive global network that moves bits securely around the world, as close to the speed of light as possible. Building our features atop this network allows us to reject the legacy tradeoff of performance <i>or</i> security. And equipping customers with the ability to <a href="/cloudflare-workers-serverless-week/">program and extend the network with Cloudflare Workers</a> and <a href="/announcing-firewall-rules/">Firewall Rules</a> allows us to focus on quickly delivering useful security primitives such as functions, operators, and ML-trained data—then later packaging them up in streamlined user interfaces.</p><p>We talk internally about building up the “toolbox” of security controls so customers can express their desired security posture, and that’s how we think about many of the releases over the past year that are discussed below. We begin by providing the saw, hammer, and nails, and let expert builders construct whatever defenses they see fit. By watching how these tools are put to use and observing the results of billions of attempts to evade the erected defenses, we learn how to improve and package them together as a whole for those less inclined to build from components. Most recently we did this with <a href="/introducing-api-shield/">API Shield</a>, providing a guided template to create “positive security” models within Firewall Rules using <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/fields">existing primitives</a> plus new data structures for strong authentication such as Cloudflare-managed client <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL/TLS certificates</a>. Each new tool added to the toolbox increases the value of the existing tools. Each new web request—good or bad—improves the models that our threat intelligence and Bot Management capabilities depend upon.</p>
    <div>
      <h3>Web application firewall (WAF) usability at scale</h3>
      <a href="#web-application-firewall-waf-usability-at-scale">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5zYZ7oR2sLCI1liN7iI6YQ/f4ba1d92208bc6f5714488af25a5b0e2/image3-6.png" />
            
            </figure><p>Last year we spoke with many customers about our plan to decouple configuration from the zone/domain model and allow rules to be set for arbitrary paths and groups of services across an account. In 4Q2020 we put this granular control in the hands of a few developers and some of our most sophisticated enterprise customers, and we’re currently collecting and incorporating feedback before defaulting the capabilities on for new customers.</p><p>Rules are great, especially with increased flexibility, but without data structures and request enrichment at the edge (such as the Bot Management techniques described below) they cannot act on anything beyond static properties of the request. In 3Q2020 we <a href="/introducing-ip-lists/">released our IP Lists capabilities</a> and customers have been steadily uploading their home-grown and third-party subscription lists. These lists can be referenced anywhere in a customer’s account as named variables and then combined with all other attributes of the request, even Bot Management scores, e.g., http.request.uri.path contains “/login” and (not ip.src in $pingdom_probes and cf.bot_management.score &lt; 30) is a Firewall Rule filter that blocks all bots except Pingdom from accessing the login endpoint.</p><p>Requests that are blocked or challenged need to find their way as quickly as possible to our customers’ SOCs for triage, investigation and, occasionally, incident response, so we upgraded our edge-logging framework in 2Q2020 to <a href="/stream-firewall-events-directly-to-your-siem/">push real time security-specific logs directly to customer SIEMs</a>. And in 4Q2020, we released the ability to encrypt sensitive payloads within these logs <a href="/encrypt-waf-payloads-hpke/">using customer-provided encryption keys and novel encryption algorithms</a> termed “Hybrid Public Key Encryption” (HPKE), and a <a href="/introducing-the-cloudflare-data-localization-suite/">data localization suite</a> to provide control over where our customers’ data is stored and protected.</p><p>Built predominantly in 4Q2020 and currently being tested in the Firewall Rules engine is a brand new implementation of our Rate Limiting engine. By moving this matching and enforcement logic from a standalone tool to a component within a <a href="/how-we-made-firewall-rules/">performant, memory-safe, expressive engine built in Rust</a>, we have increased the utility of existing functions. Additional examples of improving this library of capabilities include the work completed in 1Q2020 to <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/functions#overview">add HMAC functions</a> and regex-based <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/fields#http-header-fields">HTTP header</a> and <a href="https://developers.cloudflare.com/firewall/cf-firewall-language/fields#http-body-fields">body inspection</a> to the engine.</p>
    <div>
      <h3>Bots and machine learning (ML)</h3>
      <a href="#bots-and-machine-learning-ml">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5KEBq46aNERzVkijgMpgnS/03bff5bda74c4e820abbd09e65eefd54/image2-3.png" />
            
            </figure><p>In addition to making edge data sets accessible for request evaluation, we continued to invest heavily within our Bot Management team to provide actionable data so that our customers could decide what (if any) automated traffic they wanted to allow to interact with their applications. Our highest priority for Bot research and development has always been efficacy, and last year was no different. A significant portion of our engineering effort was dedicated to our detection engines — both updating and iterating on existing systems or creating entirely new detection engines from scratch.</p><p>In 1Q2020 we completed a total rewrite of our Machine Learning engine, and are continually focused on improving the efficacy of our ML engines. To do this, we draw on one of our major competitive advantages: the massive amount of data flowing through Cloudflare’s network. The early 2020 upgrade to our ML model nearly doubled the number of features we use to evaluate and score requests. And to help customers better understand why requests are flagged as bots, we have recently complemented the bot likelihood score in our logs with attribution to the specific engine that generated the score.</p><p>Also in 1Q2020, we upgraded our behavioral analysis engine to incorporate more features and increase overall accuracy. This engine conducts histogram-based outlier scoring and is now fully deployed to nearly all Bot Management zones.</p><p>In 2Q2020, we developed a lightweight JavaScript element that further advanced our browser fingerprinting capabilities and aids in detection. Specifically, we now silently challenge browsers and detect if a browser is misrepresenting its User Agent. This technique will be incorporated into our ML models and combined with our heuristics engine for more accurate browser fingerprinting. This feature is entirely optional and can be enabled or disabled by customers through our UI and API. Customers with extremely performance sensitive zones or traffic types that are unsuitable for JavaScript (such as API or some mobile app traffic) can still be accurately scored by our Bot Management engine.</p><p>In addition to detection, we also spent (and will continue to spend) engineering effort on mitigation. Our entire JavaScript and <a href="/moving-from-recaptcha-to-hcaptcha/">CAPTCHA challenge</a> platform was rewritten in the last year and deployed to our customer zones in a staged fashion in the second half of 2020. Our new platform is faster and more robust at detecting automated systems attempting to solve the challenges. More importantly, this platform allows us to further invest in new challenge types and modes as we enter 2021.</p><p>The biggest and most well received feature released in 2020 was our <a href="/introducing-bot-analytics/">dedicated Bot Management analytics</a>, released in 3Q2020. We now present informative graphs that double as diagnostic tools. Customers have found that analytics are far more than interesting charts and statistics: in the case of Bot Management, analytics are essential to spotting and subsequently eliminating false positives.</p><p>Last but definitely not least, we <a href="/deprecating-cfduid-cookie/">announced the deprecation of the __cfduid cookie</a> in 4Q2020 which was used primarily to detect bots but caused confusion for some customers including questions about whether they needed to display a <a href="https://www.cloudflare.com/learning/privacy/what-are-cookies/">cookie</a> banner because of what we do.</p><p>To get a sense of the Bot Attack trends we saw in the first half of 2020, take a read through <a href="/bot-attack-trends-for-jan-jul-2020/">this blog post</a>. And if you’re curious about how our ML models and heuristic engines work to keep your properties safe, this <a href="/cloudflare-bot-management-machine-learning-and-more/">deep dive</a> by Alex Bocharov, Machine Learning Tech Lead on the Bots team, is an excellent guide.</p>
    <div>
      <h3>API and IoT security and protection</h3>
      <a href="#api-and-iot-security-and-protection">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4GYNbUKISexzB8PpGBRzzK/7628a4687a3e4d538ed936991b9bcad4/image5-3.png" />
            
            </figure><p>At the beginning of 4Q2020, we released a product called <a href="/introducing-api-shield/">API Shield</a> that was purpose built to secure, protect, and accelerate API traffic — and will eventually provide much of the common functionality expected in traditional API Gateways. The UI for API Shield was built on top of Firewall Rules for maximum flexibility, and will serve as the jump-off point for configuring additional API security features we have planned this year.</p><p>As part of API Shield, every customer now gets a fully managed, domain-scoped private CA generated for each of their zones, and we plan to continue working closely with the SSL/TLS team to expand CA management options based on feedback. Since the release, we’ve seen great adoption from in particular IoT companies focused on locking down their APIs using short-lived client certificates distributed out to devices. Customers can also now upload OpenAPI schemas to be matched against incoming requests from these devices, with bad requests being dropped at the edge rather than passed on to origin infrastructure.</p><p>Another capability we released in 4Q2020 was <a href="/announcing-grpc/">support for gRPC-based API traffic</a>. Since that release, customers have expressed significant interest in using Cloudflare as a secure API gateway between easy-to-use customer-facing JSON endpoints and internal-facing gRPC or GraphQL endpoints. Like most customer challenges at Cloudflare, early adopters are looking to solve these use cases initially with Cloudflare Workers, but we’re keeping an eye on whether there are aspects for which we’ll want to provide first-class feature support.</p>
    <div>
      <h3>Distributed Denial-of-Service (DDoS) protections for web applications and APIs</h3>
      <a href="#distributed-denial-of-service-ddos-protections-for-web-applications-and-apis">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1pXLkySFtelZn124hOnGx0/cf907be1f59e5c3f69d77789f1f80715/image1-6.png" />
            
            </figure><p>The application-layer security of a web application or API is of minimal importance if the service itself is not available due to a persistent DDoS attack at L3-L7. While mitigating such attacks has long been one of Cloudflare’s strengths, <a href="/beat-an-acoustics-inspired-ddos-attack/">attack methodologies evolve</a> and we continued to invest heavily in 2020 to drop attacks more quickly, more efficiently, and more precisely; as a result, automatic mitigation techniques are applied immediately and most malicious traffic is blocked in less than 3 seconds.</p><p>Early in 2020 we responded to a <a href="/rolling-with-the-punches-shifting-attack-tactics-dropping-packets-faster-cheaper-at-the-edge/#edge-analyzed-edge-enforced-mitigations">persistent increase in smaller, more localized attacks</a> by fine-tuning a system that can autonomously detect attacks on any server in any datacenter. In the month prior to us first posting about this tool, it mitigated almost 300,000 network-layer attacks, roughly 55 times greater than the tool we previously relied upon. This new tool, dubbed “dosd”, leverages Linux’s eXpress Data Path (XDP) and allows our system to quickly — and automatically — deploy rules eBPF rules that run on each packet received. We further enhanced our edge mitigation capabilities in 3Q2020 by developing and releasing a protection layer that can <a href="/announcing-flowtrackd/">operate even in environments where we only see one side of the TCP flow</a>. These network layer protections help protect our customers who leverage both <a href="https://www.cloudflare.com/magic-transit/">Magic Transit</a> to protect their IP ranges and our WAF to protect their applications and APIs.</p><p>To document and provide visibility into these attacks, we released a GraphQL-backed interface in 1Q2020 called <a href="/announcing-network-analytics/">Network Analytics</a>. Network Analytics extends the visibility of attacks against our customers’ services from L7 to L3, and includes detailed attack logs containing data such as top source and destination IPs and ports, ASNs, data centers, countries, bit rates, protocol and TCP flag distributions. A litany of improvements made to this graphical rendering engine over the course of 2020 have benefitted all analytics tools using the same front-end. In 4Q2020, <a href="/announcing-spectrum-ddos-analytics-and-ddos-insights-trends/">Network Analytics was extended</a> to provide traffic and attack insights into Cloudflare Spectrum-protected applications, which are terminated at L4 (TCP/UDP).</p><p>Towards the end of 4Q2020, we <a href="/announcing-ddos-alerts/">released real-time DDoS attack alerting</a> capable of sending emails or pages via PagerDuty to alert security teams of ongoing attacks and mitigations. This capability was released just in time to assist with the onslaught of <a href="/ransom-ddos-attacks-target-a-fortune-global-500-company/">ransomware attacks that Cloudflare helped detect and defend against</a>. For additional context on unique attacks we fought off in 2020, consider reading about <a href="/beat-an-acoustics-inspired-ddos-attack/">an acoustics inspired attack</a>, a <a href="/mitigating-a-754-million-pps-ddos-attack-automatically/">754 million packet-per-second</a>, or a roundup of attacks from <a href="/network-layer-ddos-attack-trends-for-q1-2020/">1Q2020</a>, <a href="/network-layer-ddos-attack-trends-for-q2-2020/">2Q2020</a>, or <a href="/network-layer-ddos-attack-trends-for-q3-2020/">3Q2020</a>.</p>
    <div>
      <h3>Wrapping up and looking towards 2021</h3>
      <a href="#wrapping-up-and-looking-towards-2021">
        
      </a>
    </div>
    <p>2020 was a tough year around the world. Throughout what has also been, and continues to be, a period of heightened cyberattacks and breaches, we feel proud that our teams were able to release a steady flow of new and improved capabilities across several critical security product areas reviewed by Frost &amp; Sullivan. These releases culminated in far greater protections for customers at the end of the year than the beginning, and a recognition for our sustained efforts.</p><p>We are pleased to have been named the Innovation Leader in their Frost Radar™: Global Holistic Web Protection Market Report, which “addresses organizations' demand for consolidated, single pane of glass solutions, which not only reduce the security gaps of legacy products but also provide simplified management capabilities”.</p><p>As we look towards 2021 we plan to continue releasing early and often, listening to feedback from our customers, and delivering incremental value along the way. If you have ideas on what additional capabilities you’d like to use to protect your applications and networks, we’d love to hear them below in the comments.</p> ]]></content:encoded>
            <category><![CDATA[Bot Management]]></category>
            <category><![CDATA[Speed & Reliability]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[WAF]]></category>
            <category><![CDATA[DDoS]]></category>
            <category><![CDATA[Firewall]]></category>
            <guid isPermaLink="false">6geQrFLmwe1clYApvzZoPc</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing API Shield]]></title>
            <link>https://blog.cloudflare.com/introducing-api-shield/</link>
            <pubDate>Thu, 01 Oct 2020 13:01:00 GMT</pubDate>
            <description><![CDATA[ Of the 18 million requests per second that traverse Cloudflare’s network, 50% are directed towards APIs. Cloudflare is making it simple to secure APIs through the use of strong client certificate-based identity and strict schema-based validation. ]]></description>
            <content:encoded><![CDATA[ <p>APIs are the lifeblood of modern Internet-connected applications. Every millisecond they carry requests from mobile applications—place this food delivery order, “like” this picture—and directions to IoT devices—unlock the car door, start the wash cycle, my human just finished a 5k run—among countless other calls.</p><p>They’re also the target of widespread attacks designed to perform unauthorized actions or <a href="https://www.cloudflare.com/learning/security/what-is-data-exfiltration/">exfiltrate</a> data, as data from Gartner increasingly shows: “by 2021, 90% of web-enabled applications will have more surface area for attack in the form of exposed APIs rather than the UI, up from 40% in 2019, and “Gartner predicted that, by 2022, API abuses will move from an infrequent to the most-frequent attack vector, resulting in data breaches for enterprise web applications”[1][2]. Of the 18 million requests per second that traverse Cloudflare’s network, 50% are directed towards APIs—with the majority of these requests blocked as malicious.</p><p>To combat these threats, Cloudflare is making it simple to <a href="https://www.cloudflare.com/application-services/solutions/api-security/">secure APIs</a> through the use of strong client certificate-based identity and strict schema-based validation. As of today, these capabilities are available free for all plans within our new “API Shield” offering. And as of today, the security benefits <a href="/announcing-grpc/">also extend to gRPC-based APIs</a>, which use binary formats such as protocol buffers rather than JSON, and have been growing in popularity with our customer base.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/57hU743WWPc9IuSri97hCD/c6d495ce4edcd272263e0aa4d1f86e04/image3.png" />
            
            </figure><p>Continue reading to learn more about the new capabilities, or jump right to the "Demonstration" paragraph for examples of how to get started configuring your first API Shield rule.</p>
    <div>
      <h2>Positive security models and client certificates</h2>
      <a href="#positive-security-models-and-client-certificates">
        
      </a>
    </div>
    <p>A “positive security” model is one that allows only known behavior and identities, while rejecting everything else. It is the opposite of the traditional “negative security” model enforced by a <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">Web Application Firewall (WAF)</a> that allows everything <i>except</i> for requests coming from problematic IPs, ASNs, countries or requests with problematic signatures (SQL injection attempts, etc.).</p><p>Implementing a positive security model for APIs is the most direct way to eliminate the noise of credential stuffing attacks and other automated scanning tools. And the first step towards a positive model is deploying strong authentication such as mutual TLS authentication, which is not vulnerable to the <a href="https://spycloud.com/2020-annual-credential-exposure-report/">reuse or sharing of passwords</a>.</p><p>Just as we simplified the issuance of server certificates back in 2014 with <a href="/introducing-universal-ssl/">Universal SSL</a>, API Shield reduces the process of issuing client certificates to clicking a few buttons in the Cloudflare Dashboard. By providing a fully hosted private public key infrastructure (PKI), you can focus on your applications and features—rather than operating and securing your own certificate authority (CA).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3W34OWMhIbvXhFkJvqVUjc/8986a3068ebbf683c37f27542717642e/API_Shield_Mutual_TLS.png" />
            
            </figure>
    <div>
      <h2>Enforcing valid requests with schema validation</h2>
      <a href="#enforcing-valid-requests-with-schema-validation">
        
      </a>
    </div>
    <p>Once developers can be sure that only legitimate clients (with <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificates</a> in hand) are connecting to their APIs, the next step in implementing a positive security model is making sure that those clients are making valid requests. Extracting a client certificate from a device and reusing elsewhere is difficult, but not impossible, so it’s also important to make sure that the API is being called as intended.</p><p>Requests containing extraneous input may not have been anticipated by the API developer, and can cause problems if processed directly by the application, so these should be dropped at the edge if possible. API Schema validation works by matching the contents of API requests—the query parameters that come after the URL and contents of the POST body—against a contract or “schema” that contains the rules for what is expected. If validation fails, the API call is blocked protecting the origin from an invalid request or a malicious payload.</p><p>Schema validation is currently in closed beta for JSON payloads, with gRPC/protocol buffer support on the roadmap. If you would like to join the beta please open a support ticket with the subject “API Schema Validation Beta”. After the beta has ended, we plan to make schema validation available as part of the API Shield user interface.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7e0v45eOD6jY65spHlNYe2/37899470ffba1a8ff53c8f21295d6372/API_Shield_Schema_Protection.png" />
            
            </figure>
    <div>
      <h2>Demonstration</h2>
      <a href="#demonstration">
        
      </a>
    </div>
    <p>To demonstrate how the APIs powering IoT devices and mobile applications can be secured, we have built an API Shield demonstration using client certificates and schema validation.</p><p>Temperatures are captured by an IoT device, represented in the demo by a Raspberry Pi 3 Model B+ with an external infrared temperature sensor, and then transmitted via a POST request to a Cloudflare-protected API. Temperatures are subsequently retrieved by GET requests and then displayed in a mobile application built in Swift for iOS.</p><p>In both cases, the API was actually built using Cloudflare Workers® and Workers KV, but can be replaced by any Internet-accessible endpoint.</p>
    <div>
      <h3>1. API Configuration</h3>
      <a href="#1-api-configuration">
        
      </a>
    </div>
    <p>Before configuring the IoT device and mobile application to communicate securely with the API, we need to bootstrap the API endpoints. To keep the example simple, while also allowing for additional customization, we’ve implemented the API as a Cloudflare Worker (borrowing code from the <a href="https://developers.cloudflare.com/workers/tutorials/build-a-jamstack-app">To-Do List tutorial</a>).</p><p>In this particular example the temperatures are stored in Workers KV using the source IP address as a key, but this could easily be replaced by a <a href="https://developers.cloudflare.com/access/service-auth/mtls-headers/">value from the client certificate</a>, e.g., the fingerprint. The code below saves a temperature and timestamp into KV when a POST is made, and returns the most recent 5 temperatures when a GET request is made.</p>
            <pre><code>const defaultData = { temperatures: [] }

const getCache = key =&gt; TEMPERATURES.get(key)
const setCache = (key, data) =&gt; TEMPERATURES.put(key, data)

async function addTemperature(request) {

    // pull previously recorded temperatures for this client
    const ip = request.headers.get('CF-Connecting-IP')
    const cacheKey = `data-${ip}`
    let data
    const cache = await getCache(cacheKey)
    if (!cache) {
        await setCache(cacheKey, JSON.stringify(defaultData))
        data = defaultData
    } else {
        data = JSON.parse(cache)
    }

    // append the recorded temperatures with the submitted reading (assuming it has both temperature and a timestamp)
    try {
        const body = await request.text()
        const val = JSON.parse(body)

        if (val.temperature &amp;&amp; val.time) {
            data.temperatures.push(val)
            await setCache(cacheKey, JSON.stringify(data))
            return new Response("", { status: 201 })
        } else {
            return new Response("Unable to parse temperature and/or timestamp from JSON POST body", { status: 400 })
        }
    } catch (err) {
        return new Response(err, { status: 500 })
    }
}

function compareTimestamps(a,b) {
    return -1 * (Date.parse(a.time) - Date.parse(b.time))
}

// return the 5 most recent temperature measurements
async function getTemperatures(request) {
    const ip = request.headers.get('CF-Connecting-IP')
    const cacheKey = `data-${ip}`

    const cache = await getCache(cacheKey)
    if (!cache) {
        return new Response(JSON.stringify(defaultData), { status: 200, headers: { 'content-type': 'application/json' } })
    } else {
        data = JSON.parse(cache)
        const retval = JSON.stringify(data.temperatures.sort(compareTimestamps).splice(0,5))
        return new Response(retval, { status: 200, headers: { 'content-type': 'application/json' } })
    }
}

async function handleRequest(request) {

    if (request.method === 'POST') {
        return addTemperature(request)
    } else {
        return getTemperatures(request)
    }

}

addEventListener('fetch', event =&gt; {
  event.respondWith(handleRequest(event.request))
})</code></pre>
            <p>Before adding mutual TLS authentication, we’ll test POST’ing a random temperature reading:</p>
            <pre><code>$ TEMPERATURE=$(echo $((361 + RANDOM %11)) | awk '{printf("%.2f",$1/10.0)}')
$ TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")

$ echo -e "$TEMPERATURE\n$TIMESTAMP"
36.30
2020-09-28T02:57:49Z

$ curl -v -H "Content-Type: application/json" -d '{"temperature":'''$TEMPERATURE''', "time": "'''$TIMESTAMP'''"}' https://shield.upinatoms.com/temps 2&gt;&amp;1 | grep "&lt; HTTP/2"
&lt; HTTP/2 201 </code></pre>
            <p>And here’s a subsequent read of that temperature, along with the previous 4 that were submitted:</p>
            <pre><code>$ curl -s https://shield.upinatoms.com/temps | jq .
[
  {
    "temperature": 36.3,
    "time": "2020-09-28T02:57:49Z"
  },
  {
    "temperature": 36.7,
    "time": "2020-09-28T02:54:56Z"
  },
  {
    "temperature": 36.2,
    "time": "2020-09-28T02:33:08Z"
  },
    {
    "temperature": 36.5,
    "time": "2020-09-28T02:29:22Z"
  },
  {
    "temperature": 36.9,
    "time": "2020-09-28T02:27:19Z"
  } 
]</code></pre>
            
    <div>
      <h3>2. Client certificate issuance</h3>
      <a href="#2-client-certificate-issuance">
        
      </a>
    </div>
    <p>With our API in hand, it’s time to lock it down to require a valid client certificate. Before doing so we’ll want to generate those certificates. To do so, you can either go to the SSL/TLS → Client Certificates tab of the Cloudflare Dashboard and click “Create Certificate” or you can automate the process via API calls.</p><p>Because most developers at scale will be generating their own private keys and CSRs and requesting that they be signed via API, we’ll show that process here. Using Cloudflare’s PKI toolkit <a href="https://github.com/cloudflare/cfssl">CFSSL</a> we’ll first create a bootstrap certificate for the iOS application, and then we’ll create a certificate for the IoT device:</p>
            <pre><code>$ cat &lt;&lt;'EOF' | tee -a csr.json
{
    "hosts": [
        "ios-bootstrap.devices.upinatoms.com"
    ],
    "CN": "ios-bootstrap.devices.upinatoms.com",
    "key": {
        "algo": "rsa",
        "size": 2048
    },
    "names": [{
        "C": "US",
        "L": "Austin",
        "O": "Temperature Testers, Inc.",
        "OU": "Tech Operations",
        "ST": "Texas"
    }]
}
EOF

$ cfssl genkey csr.json | cfssljson -bare certificate
2020/09/27 21:28:46 [INFO] generate received request
2020/09/27 21:28:46 [INFO] received CSR
2020/09/27 21:28:46 [INFO] generating key: rsa-2048
2020/09/27 21:28:47 [INFO] encoded CSR

$ mv certificate-key.pem ios-key.pem
$ mv certificate.csr ios.csr

// and do the same for the IoT sensor
$ sed -i.bak 's/ios-bootstrap/sensor-001/g' csr.json
$ cfssl genkey csr.json | cfssljson -bare certificate
...
$ mv certificate-key.pem sensor-key.pem
$ mv certificate.csr sensor.csr</code></pre>
            <p>Generate a private key and CSR for the IoT device and iOS application</p>
            <pre><code>// we need to replace actual newlines in the CSR with ‘\n’ before POST’ing
$ CSR=$(cat ios.csr | perl -pe 's/\n/\\n/g')
$ request_body=$(&lt; &lt;(cat &lt;&lt;EOF
{
  "validity_days": 3650,
  "csr":"$CSR"
}
EOF
))

// save the response so we can view it and then extract the certificate
$ curl -H 'X-Auth-Email: YOUR_EMAIL' -H 'X-Auth-Key: YOUR_API_KEY' -H 'Content-Type: application/json' -d “$request_body” https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/client_certificates &gt; response.json

$ cat response.json | jq .
{
  "success": true,
  "errors": [],
  "messages": [],
  "result": {
    "id": "7bf7f70c-7600-42e1-81c4-e4c0da9aa515",
    "certificate_authority": {
      "id": "8f5606d9-5133-4e53-b062-a2e5da51be5e",
      "name": "Cloudflare Managed CA for account 11cbe197c050c9e422aaa103cfe30ed8"
    },
    "certificate": "-----BEGIN CERTIFICATE-----\nMIIEkzCCA...\n-----END CERTIFICATE-----\n",
    "csr": "-----BEGIN CERTIFICATE REQUEST-----\nMIIDITCCA...\n-----END CERTIFICATE REQUEST-----\n",
    "ski": "eb2a48a19802a705c0e8a39489a71bd586638fdf",
    "serial_number": "133270673305904147240315902291726509220894288063",
    "signature": "SHA256WithRSA",
    "common_name": "ios-bootstrap.devices.upinatoms.com",
    "organization": "Temperature Testers, Inc.",
    "organizational_unit": "Tech Operations",
    "country": "US",
    "state": "Texas",
    "location": "Austin",
    "expires_on": "2030-09-26T02:41:00Z",
    "issued_on": "2020-09-28T02:41:00Z",
    "fingerprint_sha256": "84b045d498f53a59bef53358441a3957de81261211fc9b6d46b0bf5880bdaf25",
    "validity_days": 3650
  }
}

$ cat response.json | jq .result.certificate | perl -npe 's/\\n/\n/g; s/"//g' &gt; ios.pem

// now ask that the second client certificate signing request be signed
$ CSR=$(cat sensor.csr | perl -pe 's/\n/\\n/g')
$ request_body=$(&lt; &lt;(cat &lt;&lt;EOF
{
  "validity_days": 3650,
  "csr":"$CSR"
}
EOF
))

$ curl -H 'X-Auth-Email: YOUR_EMAIL' -H 'X-Auth-Key: YOUR_API_KEY' -H 'Content-Type: application/json' -d "$request_body" https://api.cloudflare.com/client/v4/zones/YOUR_ZONE_ID/client_certificates | perl -npe 's/\\n/\n/g; s/"//g' &gt; sensor.pem</code></pre>
            <p>Ask Cloudflare to sign the CSRs with the private CA issued for your zone</p>
    <div>
      <h3>3. API Shield rule creation</h3>
      <a href="#3-api-shield-rule-creation">
        
      </a>
    </div>
    <p>With certificates in hand we can now configure the API endpoint to require their use. Below is a demonstration of how to create such a rule.</p><p>The steps include specifying which hostnames to prompt for certificates, e.g., shield.upinatoms.com, and then creating the API Shield rule.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4AdQIq6SE7b3EudHbkruHV/c079941c7afa73490b7701e4c09ed541/API_Shield_demo.gif" />
            
            </figure>
    <div>
      <h3>4. IoT Device Communication</h3>
      <a href="#4-iot-device-communication">
        
      </a>
    </div>
    <p>To prepare the IoT device for secure communication with our API endpoint we need to embed the certificate on the device, and then point our application to it so it can be used when making the POST request to the API endpoint.</p><p>We securely copied the private key and certificate into /etc/ssl/private/sensor-key.pem and /etc/ssl/certs/sensor.pem, and then modified our sample script to point to these files:</p>
            <pre><code>import requests
import json
from datetime import datetime

def readSensor():

    # Takes a reading from a temperature sensor and store it to temp_measurement 

    dateTimeObj = datetime.now()
    timestampStr = dateTimeObj.strftime(‘%Y-%m-%dT%H:%M:%SZ’)

    measurement = {'temperature':str(36.5),'time':timestampStr}
    return measurement

def main():

    print("Cloudflare API Shield [IoT device demonstration]")

    temperature = readSensor()
    payload = json.dumps(temperature)
    
    url = 'https://shield.upinatoms.com/temps'
    json_headers = {'Content-Type': 'application/json'}
    cert_file = ('/etc/ssl/certs/sensor.pem', '/etc/ssl/private/sensor-key.pem')
    
    r = requests.post(url, headers = json_headers, data = payload, cert = cert_file)
    
    print("Request body: ", r.request.body)
    print("Response status code: %d" % r.status_code)</code></pre>
            <p>When the script attempts to connect to <a href="https://shield.upinatoms.com/temps">https://shield.upinatoms.com/temps</a>, Cloudflare requests that a ClientCertificate is sent, and our script sends the contents of sensor.pem before demonstrating it has possession of sensor-key.pem as required to complete the SSL/TLS handshake.</p><p>If we fail to send the client certificate or attempt to include extraneous fields in the API request, the schema validation (configuration not shown) fails and the request is rejected:</p>
            <pre><code>Cloudflare API Shield [IoT device demonstration]
Request body:  {"temperature": "36.5", "time": "2020-09-28T15:52:19Z"}
Response status code: 403</code></pre>
            <p>If instead a valid certificate is presented and the payload follows the schema previously uploaded, our script POSTs the latest temperature reading to the API.</p>
            <pre><code>Cloudflare API Shield [IoT device demonstration]
Request body:  {"temperature": "36.5", "time": "2020-09-28T15:56:45Z"}
Response status code: 201</code></pre>
            
    <div>
      <h3>5. Mobile Application (iOS) Communication</h3>
      <a href="#5-mobile-application-ios-communication">
        
      </a>
    </div>
    <p>Now that temperature requests have been sent to our API endpoint, it’s time to read them securely from our mobile application using one of the client certificates.</p><p>For purposes of brevity, we’re going to embed a “bootstrap” certificate and key as a PKCS#12 file within the application bundle. In a real world deployment, this bootstrap certificate should only be used alongside users’ credentials to authenticate to an API endpoint that can return a unique user certificate. Corporate users will want to use MDM to distribute certificates for additional control and persistence options.</p>
    <div>
      <h4>Package the certificate and private key</h4>
      <a href="#package-the-certificate-and-private-key">
        
      </a>
    </div>
    <p>Before adding the bootstrap certificate and private key, we need to combine them into a binary PKCS#12 file. This binary file will then be added to our iOS application bundle.</p>
            <pre><code>$ openssl pkcs12 -export -out bootstrap-cert.pfx -inkey ios-key.pem -in ios.pem
Enter Export Password:
Verifying - Enter Export Password:</code></pre>
            
    <div>
      <h4>Add the certificate bundle to your iOS application</h4>
      <a href="#add-the-certificate-bundle-to-your-ios-application">
        
      </a>
    </div>
    <p>Within XCode, click File → Add Files To "[Project Name]" and select your .pfx file. Make sure to check "Add to target" before confirming.</p>
    <div>
      <h4>Modify your URLSession code to use the client certificate</h4>
      <a href="#modify-your-urlsession-code-to-use-the-client-certificate">
        
      </a>
    </div>
    <p><a href="https://leenarts.net/2020/02/28/client-certificate-with-urlsession-in-swift/">This article</a> provides a nice walkthrough of using a PKCS#11 class and <a href="https://developer.apple.com/documentation/foundation/urlsessiondelegate">URLSessionDelegate</a>  to modify your application to complete mutual TLS authentication when connecting to an API that requires it.</p>
    <div>
      <h2>Looking Forward</h2>
      <a href="#looking-forward">
        
      </a>
    </div>
    <p>In the coming months, we plan to expand API Shield with a number of additional features designed to protect API traffic. For customers that want to use their own PKI, we will provide the ability to import their own CAs, something <a href="https://developers.cloudflare.com/access/service-auth/mtls/">available today</a> as part of Cloudflare Access.</p><p>As we receive feedback on our schema validation beta, we will look to make the capability generally available to all customers. If you’re trying out the beta and have thoughts to share, we’d love to hear your feedback.</p><p>Beyond certificates and schema validation, we’re excited to layer on additional API security capabilities as well as deep analytics to help you better understand your APIs. If there are features you’d like to see, let us know in the comments below!</p><p><i>1: “By 2021, 90% of web-enabled applications will have more surface area for attack in the form of exposed APIs rather than the UI, up from 40% in 2019. Source: Gartner “Gartner’s API Strategy Maturity Model”, Saniye Alaybeyi, Mark O'Neill, October 21, 2019. (Gartner subscription required)</i></p><p><i>2: “Gartner predicted by 2022, API abuses will move from an infrequent to the most-frequent attack vector, resulting in data breaches for enterprise web applications. Source: Gartner “Cool Vendors in API Strategy”, Shameen Pillai, Paolo Malinverno, Mark O'Neill, Jeremy D'Hoinne, May 18, 2020 (Gartner subscription required)</i></p> ]]></content:encoded>
            <category><![CDATA[Birthday Week]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[API Shield]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">5gBG4hH3rZQAFU29D6RSPh</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
            <dc:creator>Daniele Molteni</dc:creator>
        </item>
        <item>
            <title><![CDATA[Introducing IP Lists]]></title>
            <link>https://blog.cloudflare.com/introducing-ip-lists/</link>
            <pubDate>Wed, 22 Jul 2020 09:41:00 GMT</pubDate>
            <description><![CDATA[ IP Lists can now be stored with metadata at the Cloudflare edge, replicated within seconds to our data centers in 200+ cities, and used as part of our powerful, expressive Firewall Rules engine to take action on incoming requests. ]]></description>
            <content:encoded><![CDATA[ <p>Authentication on the web has been steadily moving to the application layer using services such as <a href="https://teams.cloudflare.com/access/">Cloudflare Access</a> to establish and enforce software-controlled, zero trust <a href="https://www.cloudflare.com/learning/access-management/what-is-the-network-perimeter/">perimeters</a>. However, there are still several important use cases for restricting access at the network-level by source IP address, autonomous system number (ASN), or country. For example, some businesses are prohibited from doing business with customers in certain countries, while others maintain a blocklist of problematic IPs that have previously attacked them.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3WwZQK2xtLJoOp4nK348uT/f3d0810488ea7663c44586eb10a7514a/Firewall-rule--blocklist_2x.png" />
            
            </figure><p>Enforcing these network restrictions at centralized chokepoints using appliances—hardware or virtualized—adds unacceptable latency and complexity, but doing so performantly for individual IPs at the Cloudflare edge is easy. Today we’re making it just as easy to manage tens of thousands of IPs across all of your zones by grouping them in data structures known as IP Lists. Lists can be stored with metadata at the Cloudflare edge, replicated within seconds to our data centers in 200+ cities, and used as part of our powerful, expressive <a href="https://developers.cloudflare.com/firewall/cf-firewall-language">Firewall Rules</a> engine to take action on incoming requests.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/B85CzFvmD1zrWCa5OiBJd/7141825d16ec657d5bde2066ce84ba19/ip_lists.gif" />
            
            </figure><p>Creating and using an IP List</p><p>Previously, these sort of network-based security controls have been configured using <a href="https://support.cloudflare.com/hc/en-us/articles/217074967-Configuring-IP-Access-Rules">IP Access</a> or <a href="https://support.cloudflare.com/hc/en-us/articles/115001595131-Understanding-Cloudflare-Zone-Lockdown">Zone Lockdown</a> rules. Both tools have a number of shortcomings that we’ve eliminated with the introduction of IP Lists, including:</p>
    <div>
      <h4>IP prefix boundaries</h4>
      <a href="#ip-prefix-boundaries">
        
      </a>
    </div>
    <p>Our legacy IP Access rules allow the use of a limited number of IP prefix lengths: /16 and /24 for IPv4; and /32, /48, and /64 for IPv6. These restrictions typically result in users creating far more rules than needed, e.g., if you want to block a /20 IPv4 network you must create 16 separate /24 entries.</p><p>With IP Lists we’ve removed this restriction entirely, allowing users to create Lists with any prefix length: /8 through /32 for IPv4 and /4 through /64 for IPv6. Lists can also contain individual IPv4 addresses. For IPv6, the lower 64 bits can often be changed by the end user, therefore IP Lists do not offer prefixes beyond /64.</p>
    <div>
      <h4>Order of evaluation</h4>
      <a href="#order-of-evaluation">
        
      </a>
    </div>
    <p>Perhaps the most limiting factor in the use of IP Access rules today is that they are evaluated before Firewall Rules. You can elect to Block or Challenge the request based on a the source IP address, country or ASN, or you can allow the request to <a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/actions/#supported-actions">bypass</a> all subsequent L7 mitigations: DDoS, Firewall Rules, Zone Lockdown, User Agent, Browser Integrity Check, Hotlink Protection, IP Reputation (including “Under Attack” Mode), Rate Limiting, and Managed Rules.</p><p>IP Lists introduce much more flexibility.</p><p>For example, with IP Lists, you can combine a check of a source IP address with a Bot Management score, contents of an HTTP request header, or any other <a href="https://developers.cloudflare.com/firewall/cf-firewall-language">filter criteria</a> that the Firewall Rules engine supports to implement more complex logic.</p><p>Below is a rule that blocks requests to <code>/login</code> with a bot score below 30, unless it is coming from the <a href="https://help.pingdom.com/hc/en-us/articles/203682601-Pingdom-probe-servers-IP-addresses">probe servers of Pingdom</a>, an external monitoring solution.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3YitvsSjxDlGtapDCs4Zo9/ef3a5eb82ae120f33dd6e6d2214ed2cf/pingdom_probes_bots.png" />
            
            </figure>
    <div>
      <h4>Shared use across zones</h4>
      <a href="#shared-use-across-zones">
        
      </a>
    </div>
    <p>Zone Lockdown rules are defined exclusively at the zone level, and cannot be re-used across zones, so if you wanted to allow only a specific set of IPs to the same hundred zones you’d have to recreate the rules and IPs in each zone.</p><p>IP Lists are stored at the account level, not zone level, so the same list can be referenced—and updated—in Firewall Rules across multiple zones. We’re also hard at work on letting you create account-wide Firewall Rules, which will streamline your security configuration even further.</p>
    <div>
      <h4>Organization, labeling, and bulk uploading</h4>
      <a href="#organization-labeling-and-bulk-uploading">
        
      </a>
    </div>
    <p>IP Access and Zone Lockdown rules must be created one at a time whereas IP Lists can be uploaded in bulk through the UI using a CSV file (or pasting multiple lines, as shown below), or via the API. Individual items are timestamped, and can be given descriptions along with the group itself.</p><p>In the clip below, the contents of Pingdom's IPv4 list are copied to the clipboard and then pasted into the Lists UI. Multiple rows will automatically be created as shown:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/zjihhMH1GFF9FuMcEK8aL/ea51d8d5523fd29293839814751905c9/pingdom_probe_paste.gif" />
            
            </figure>
    <div>
      <h4>Actions available for use in rules</h4>
      <a href="#actions-available-for-use-in-rules">
        
      </a>
    </div>
    <p>Because IP Lists are used within Firewall Rules, users can take advantage of all the <a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/actions/#supported-actions">actions available today</a>, as well as those that we add in the future. In the coming months we plan to migrate all of the capabilities under Firewall → Tools into Firewall Rules, including Rate Limiting, which will require the addition of the Custom Response action. This action, which allows users to specify the specific status code, content type, and payload that gets to the eyeball, will then be usable with IP Lists.</p>
    <div>
      <h2>Planned Enhancements</h2>
      <a href="#planned-enhancements">
        
      </a>
    </div>
    <p>We wanted to get IP Lists in your hands as soon as possible, but we’re still working on adding additional capabilities. If you have thoughts on our ideas below, or have other suggestions, please comment at the end of this blog post—we’d love to hear what would make Lists more useful to you!</p>
    <div>
      <h4>Multiple Lists and increased quotas for paid plans</h4>
      <a href="#multiple-lists-and-increased-quotas-for-paid-plans">
        
      </a>
    </div>
    <p>As of today (7/22/20) every account can create one (1) IP List with a total of 1,000 entries. In the near future we plan to increase both the number of Lists that can be created as well as the total count of entries.</p><p><i><b>NOTE: Limits have since been increased. Please refer to the</b></i><b> </b><a href="https://developers.cloudflare.com/firewall/cf-firewall-rules/rules-lists#entitlements"><b>Rules Lists developer documentation</b></a><b> </b><i><b>for the latest details.</b></i></p>
    <div>
      <h4>Additional types of custom Lists</h4>
      <a href="#additional-types-of-custom-lists">
        
      </a>
    </div>
    <p>Lists are assigned a type during creation and the first type available is the IP List. We plan to add Country and ASN Lists, and are monitoring feedback to see what other types may be useful.</p>
    <div>
      <h4>Expiring List entries</h4>
      <a href="#expiring-list-entries">
        
      </a>
    </div>
    <p>We’ve heard a few requests from beta testers who are interested in expiring individual List entries after some specified period of time, e.g., 24 hours from addition to the List. If this is something of interest to you, please let us know along with your use cases.</p>
    <div>
      <h4>Managed Lists</h4>
      <a href="#managed-lists">
        
      </a>
    </div>
    <p>In addition to Lists that you create and manage yourself, we plan to curate Lists that you can subscribe to and use in your rules. Our initial ideas revolve around surfacing intelligence gleaned from the 27M properties reverse proxying traffic through the Cloudflare edge, e.g., equipping you with lists of IPs that are known open proxies so requests from these can be treated differently.</p><p>In addition to intelligent lists, we’re planning on creating other managed lists for your convenience—but need your help in identifying which those are. Are there lists of IPs you find yourself manually inputting? We’d like to hear about those as candidates for Cloudflare Managed lists. Some examples from beta testers include third-party performance monitoring tools that should never have security enforcements applied to them.</p><p>Are you paying for a third-party List today that you’d like to subscribe to and have automatically updated within Cloudflare? Let us know in the comments below.</p>
    <div>
      <h2>Get started today and let us know what you think</h2>
      <a href="#get-started-today-and-let-us-know-what-you-think">
        
      </a>
    </div>
    <p>IP Lists are now available in all Cloudflare accounts. We’re excited to let you start using them, and look forward to your feedback.</p> ]]></content:encoded>
            <category><![CDATA[Cloudflare Access]]></category>
            <category><![CDATA[Cloudflare Network]]></category>
            <category><![CDATA[Product News]]></category>
            <guid isPermaLink="false">65v7kOG2ozwSdOsA5HrMwB</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Stream Firewall Events directly to your SIEM]]></title>
            <link>https://blog.cloudflare.com/stream-firewall-events-directly-to-your-siem/</link>
            <pubDate>Fri, 24 Apr 2020 11:00:00 GMT</pubDate>
            <description><![CDATA[ As of today, customers using Cloudflare Logs can create Logpush jobs that send only Firewall Events. These events arrive much faster than our existing HTTP requests logs: they are typically delivered to your logging platform within 60 seconds of sending the response to the client. ]]></description>
            <content:encoded><![CDATA[ <p></p><p>The highest trafficked sites using Cloudflare receive billions of requests per day. But only about 5% of those requests typically trigger security rules, whether they be “managed” rules such as our <a href="https://www.cloudflare.com/learning/ddos/glossary/web-application-firewall-waf/">WAF</a> and DDoS protections, or custom rules such as those configured by customers using our powerful Firewall Rules and Rate Limiting engines.</p><p>When enforcement is taken on a request that interrupts the flow of malicious traffic, a <a href="/updates-to-firewall-analytics/#event-based-logging">Firewall Event is logged with detail</a> about the request including which rule triggered us to take action and what action we took, e.g., challenged or blocked outright.</p><p>Previously, if you wanted to ingest all of these events into your <a href="https://www.cloudflare.com/learning/security/what-is-siem/">SIEM</a> or logging platform, you had to take the whole firehose of requests—good and bad—and then filter them client side. If you’re paying by the log line or scaling your own storage solution, this cost can add up quickly. And if you have a security team monitoring logs, they’re being sent a lot of extraneous data to sift through before determining what needs their attention most.</p><p>As of today, customers using Cloudflare Logs can create <a href="https://developers.cloudflare.com/logs/about">Logpush jobs</a> that send only Firewall Events. These events arrive much faster than our existing HTTP requests logs: they are typically delivered to your logging platform within 60 seconds of sending the response to the client.</p><p>In this post we’ll show you how to use Terraform and Sumo Logic, an <a href="https://developers.cloudflare.com/logs/analytics-integrations/">analytics integration partner</a>, to get this logging set up live in just a few minutes.</p>
    <div>
      <h2>Process overview</h2>
      <a href="#process-overview">
        
      </a>
    </div>
    <p>The steps below take you through the process of configuring Cloudflare Logs to push security events directly to your logging platform. For purposes of this tutorial, we’ve chosen Sumo Logic as our log destination, but you’re free to use any of our <a href="https://developers.cloudflare.com/logs/analytics-integrations/">analytics partners</a>, or any logging platform that can read from cloud storage such as <a href="https://developers.cloudflare.com/logs/logpush/aws-s3/">AWS S3</a>, <a href="https://developers.cloudflare.com/logs/logpush/azure/">Azure Blob Storage</a>, or <a href="https://developers.cloudflare.com/logs/logpush/google-cloud-storage/">Google Cloud Storage</a>.</p><p>To configure Sumo Logic and Cloudflare we make use of Terraform, a popular Infrastructure-as-Code tool from HashiCorp. If you’re new to Terraform, see <a href="/getting-started-with-terraform-and-cloudflare-part-1/">Getting started with Terraform and Cloudflare</a> for a guided walkthrough with best practice recommendations such as how to version and store your configuration in git for easy rollback.</p><p>Once the infrastructure is in place, you’ll send a malicious request towards your site to trigger the Cloudflare Web Application Firewall, and watch as the Firewall Events generated by that request shows up in Sumo Logic about a minute later.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/7HQ0Ky3j85kh2abquFBJf7/e0ee2a5d4d613bf597c4298e4be73467/image2-18.png" />
            
            </figure>
    <div>
      <h2>Prerequisites</h2>
      <a href="#prerequisites">
        
      </a>
    </div>
    
    <div>
      <h3>Install Terraform and Go</h3>
      <a href="#install-terraform-and-go">
        
      </a>
    </div>
    <p>First you’ll need to install Terraform. See our Developer Docs for <a href="https://developers.cloudflare.com/terraform/installing/">instructions</a>.</p><p>Next you’ll need to install Go. The easiest way on macOS to do so is with <a href="https://brew.sh/">Homebrew</a>:</p>
            <pre><code>$ brew install golang
$ export GOPATH=$HOME/go
$ mkdir $GOPATH</code></pre>
            <p><a href="https://golang.org/">Go</a> is required because the Sumo Logic Terraform Provider is a "community" plugin, which means it has to be built and installed manually rather than automatically through the Terraform Registry, as will happen later for the Cloudflare Terraform Provider.</p>
    <div>
      <h3>Install the Sumo Logic Terraform Provider Module</h3>
      <a href="#install-the-sumo-logic-terraform-provider-module">
        
      </a>
    </div>
    <p>The official installation instructions for installing the Sumo Logic provider can be found on their <a href="https://github.com/SumoLogic/sumologic-terraform-provider">GitHub Project page</a>, but here are my notes:</p>
            <pre><code>$ mkdir -p $GOPATH/src/github.com/terraform-providers &amp;&amp; cd $_
$ git clone https://github.com/SumoLogic/sumologic-terraform-provider.git
$ cd sumologic-terraform-provider
$ make install</code></pre>
            
    <div>
      <h2>Prepare Sumo Logic to receive Cloudflare Logs</h2>
      <a href="#prepare-sumo-logic-to-receive-cloudflare-logs">
        
      </a>
    </div>
    
    <div>
      <h3>Install Sumo Logic livetail utility</h3>
      <a href="#install-sumo-logic-livetail-utility">
        
      </a>
    </div>
    <p>While not strictly necessary, the <a href="https://help.sumologic.com/05Search/Live-Tail/Live-Tail-CLI">livetail tool</a> from Sumo Logic makes it easy to grab the Cloudflare Logs challenge token we’ll need in a minute, and also to view the fruits of your labor: seeing a Firewall Event appear in Sumo Logic shortly after the malicious request hit the edge.</p><p>On macOS:</p>
            <pre><code>$ brew cask install livetail
...
==&gt; Verifying SHA-256 checksum for Cask 'livetail'.
==&gt; Installing Cask livetail
==&gt; Linking Binary 'livetail' to '/usr/local/bin/livetail'.
?  livetail was successfully installed!</code></pre>
            
    <div>
      <h3>Generate Sumo Logic Access Key</h3>
      <a href="#generate-sumo-logic-access-key">
        
      </a>
    </div>
    <p>This step assumes you already have a Sumo Logic account. If not, you can sign up for a free trial <a href="https://www.sumologic.com/sign-up/">here</a>.</p><ol><li><p>Browse to <code>https://service.$ENV.sumologic.com/ui/#/security/access-keys</code> where <code>$ENV</code> should be replaced by <a href="http://help.sumologic.com/Send_Data/Collector_Management_API/Sumo_Logic_Endpoints">the environment</a> you chose on signup.</p></li><li><p>Click the "+ Add Access Key" button, give it a name, and click "Create Key"</p></li><li><p>In the next step you'll save the Access ID and Access Key that are provided as environment variables, so don’t close this modal until you do.</p></li></ol>
    <div>
      <h3>Generate Cloudflare Scoped API Token</h3>
      <a href="#generate-cloudflare-scoped-api-token">
        
      </a>
    </div>
    <ol><li><p>Log in to the <a href="https://dash.cloudflare.com/">Cloudflare Dashboard</a></p></li><li><p>Click on the profile icon in the top-right corner and then select "My Profile"</p></li><li><p>Select "API Tokens" from the nav bar and click "Create Token"</p></li><li><p>Click the "Get started" button next to the "Create Custom Token" label</p></li></ol><p>On the Create Custom Token screen:</p><ol><li><p>Provide a token name, e.g., "Logpush - Firewall Events"</p></li><li><p>Under Permissions, change Account to Zone, and then select Logs and Edit, respectively, in the two drop-downs to the right</p></li><li><p>Optionally, change Zone Resources and IP Address Filtering to restrict restrict access for this token to specific zones or from specific IPs</p></li></ol><p>Click "Continue to summary" and then "Create token" on the next screen. Save the token somewhere secure, e.g., your password manager, as it'll be needed in just a minute.</p>
    <div>
      <h3>Set environment variables</h3>
      <a href="#set-environment-variables">
        
      </a>
    </div>
    <p>Rather than add sensitive credentials to source files (that may get submitted to your source code repository), we'll set environment variables and have the Terraform modules read from them.</p>
            <pre><code>$ export CLOUDFLARE_API_TOKEN="&lt;your scoped cloudflare API token&gt;"
$ export CF_ZONE_ID="&lt;tag of zone you wish to send logs for&gt;"</code></pre>
            <p>We'll also need your Sumo Logic environment, Access ID, and Access Key:</p>
            <pre><code>$ export SUMOLOGIC_ENVIRONMENT="eu"
$ export SUMOLOGIC_ACCESSID="&lt;access id from previous step&gt;"
$ export SUMOLOGIC_ACCESSKEY="&lt;access key from previous step&gt;"</code></pre>
            
    <div>
      <h3>Create the Sumo Logic Collector and HTTP Source</h3>
      <a href="#create-the-sumo-logic-collector-and-http-source">
        
      </a>
    </div>
    <p>We'll create a directory to store our Terraform project in and build it up as we go:</p>
            <pre><code>$ mkdir -p ~/src/fwevents &amp;&amp; cd $_</code></pre>
            <p>Then we'll create the Collector and HTTP source that will store and provide Firewall Events logs to Sumo Logic:</p>
            <pre><code>$ cat &lt;&lt;'EOF' | tee main.tf
##################
### SUMO LOGIC ###
##################
provider "sumologic" {
    environment = var.sumo_environment
    access_id = var.sumo_access_id
}

resource "sumologic_collector" "collector" {
    name = "CloudflareLogCollector"
    timezone = "Etc/UTC"
}

resource "sumologic_http_source" "http_source" {
    name = "firewall-events-source"
    collector_id = sumologic_collector.collector.id
    timezone = "Etc/UTC"
}
EOF</code></pre>
            <p>Then we'll create a variables file so Terraform has credentials to communicate with Sumo Logic:</p>
            <pre><code>$ cat &lt;&lt;EOF | tee variables.tf
##################
### SUMO LOGIC ###
##################
variable "sumo_environment" {
    default = "$SUMOLOGIC_ENVIRONMENT"
}

variable "sumo_access_id" {
    default = "$SUMOLOGIC_ACCESSID"
}
EOF</code></pre>
            <p>With our Sumo Logic configuration set, we’ll initialize Terraform with <code>terraform init</code> and then preview what changes Terraform is going to make by running <code>terraform plan</code>:</p>
            <pre><code>$ terraform init

Initializing the backend...

Initializing provider plugins...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.</code></pre>
            
            <pre><code>$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # sumologic_collector.collector will be created
  + resource "sumologic_collector" "collector" {
      + destroy        = true
      + id             = (known after apply)
      + lookup_by_name = false
      + name           = "CloudflareLogCollector"
      + timezone       = "Etc/UTC"
    }

  # sumologic_http_source.http_source will be created
  + resource "sumologic_http_source" "http_source" {
      + automatic_date_parsing       = true
      + collector_id                 = (known after apply)
      + cutoff_timestamp             = 0
      + destroy                      = true
      + force_timezone               = false
      + id                           = (known after apply)
      + lookup_by_name               = false
      + message_per_request          = false
      + multiline_processing_enabled = true
      + name                         = "firewall-events-source"
      + timezone                     = "Etc/UTC"
      + url                          = (known after apply)
      + use_autoline_matching        = true
    }

Plan: 2 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.</code></pre>
            <p>Assuming everything looks good, let’s execute the plan:</p>
            <pre><code>$ terraform apply -auto-approve
sumologic_collector.collector: Creating...
sumologic_collector.collector: Creation complete after 3s [id=108448215]
sumologic_http_source.http_source: Creating...
sumologic_http_source.http_source: Creation complete after 0s [id=150364538]

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.</code></pre>
            <p>Success! At this point you could log into the Sumo Logic web interface and confirm that your Collector and HTTP Source were created successfully.</p>
    <div>
      <h2>Create a Cloudflare Logpush Job</h2>
      <a href="#create-a-cloudflare-logpush-job">
        
      </a>
    </div>
    <p>Before we’ll start sending logs to your collector, you need to demonstrate the ability to read from it. This validation step prevents accidental (or intentional) misconfigurations from overrunning your logs.</p>
    <div>
      <h3>Tail the Sumo Logic Collector and await the challenge token</h3>
      <a href="#tail-the-sumo-logic-collector-and-await-the-challenge-token">
        
      </a>
    </div>
    <p>In a new shell window—you should keep the current one with your environment variables set for use with Terraform—we'll start tailing Sumo Logic for events sent from the <code>firewall-events-source</code> HTTP source.</p><p>The first time that you run livetail you'll need to specify your <a href="https://help.sumologic.com/APIs/General-API-Information/Sumo-Logic-Endpoints-and-Firewall-Security">Sumo Logic Environment</a>, Access ID and Access Key, but these values will be stored in the working directory for subsequent runs:</p>
            <pre><code>$ livetail _source=firewall-events-source
### Welcome to Sumo Logic Live Tail Command Line Interface ###
1 US1
2 US2
3 EU
4 AU
5 DE
6 FED
7 JP
8 CA
Please select Sumo Logic environment: 
See http://help.sumologic.com/Send_Data/Collector_Management_API/Sumo_Logic_Endpoints to choose the correct environment. 3
### Authenticating ###
Please enter your Access ID: &lt;access id&gt;
Please enter your Access Key &lt;access key&gt;
### Starting Live Tail session ###</code></pre>
            
    <div>
      <h3>Request and receive challenge token</h3>
      <a href="#request-and-receive-challenge-token">
        
      </a>
    </div>
    <p>Before requesting a challenge token, we need to figure out where Cloudflare should send logs.</p><p>We do this by asking Terraform for the receiver URL of the recently created HTTP source. Note that we modify the URL returned slightly as Cloudflare Logs expects <code>sumo://</code> rather than <code>https://</code>.</p>
            <pre><code>$ export SUMO_RECEIVER_URL=$(terraform state show sumologic_http_source.http_source | grep url | awk '{print $3}' | sed -e 's/https:/sumo:/; s/"//g')

$ echo $SUMO_RECEIVER_URL
sumo://endpoint1.collection.eu.sumologic.com/receiver/v1/http/&lt;redacted&gt;</code></pre>
            <p>With URL in hand, we can now request the token.</p>
            <pre><code>$ curl -sXPOST -H "Content-Type: application/json" -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" -d '{"destination_conf":"'''$SUMO_RECEIVER_URL'''"}' https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/logpush/ownership

{"errors":[],"messages":[],"result":{"filename":"ownership-challenge-bb2912e0.txt","message":"","valid":true},"success":true}</code></pre>
            <p>Back in the other window where your livetail is running you should see something like this:</p>
            <pre><code>{"content":"eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4R0NNIiwidHlwIjoiSldUIn0..WQhkW_EfxVy8p0BQ.oO6YEvfYFMHCTEd6D8MbmyjJqcrASDLRvHFTbZ5yUTMqBf1oniPNzo9Mn3ZzgTdayKg_jk0Gg-mBpdeqNI8LJFtUzzgTGU-aN1-haQlzmHVksEQdqawX7EZu2yiePT5QVk8RUsMRgloa76WANQbKghx1yivTZ3TGj8WquZELgnsiiQSvHqdFjAsiUJ0g73L962rDMJPG91cHuDqgfXWwSUqPsjVk88pmvGEEH4AMdKIol0EOc-7JIAWFBhcqmnv0uAXVOH5uXHHe_YNZ8PNLfYZXkw1xQlVDwH52wRC93ohIxg.pHAeaOGC8ALwLOXqxpXJgQ","filename":"ownership-challenge-bb2912e0.txt"}</code></pre>
            <p>Copy the content value from above into an environment variable, as you'll need it in a minute to create the job:</p>
            <pre><code>$ export LOGPUSH_CHALLENGE_TOKEN="&lt;content value&gt;"</code></pre>
            
    <div>
      <h3>Create the Logpush job using the challenge token</h3>
      <a href="#create-the-logpush-job-using-the-challenge-token">
        
      </a>
    </div>
    <p>With challenge token in hand, we'll use Terraform to create the job.</p><p>First you’ll want to choose the log fields that should be sent to Sumo Logic. You can enumerate the list by querying the dataset:</p>
            <pre><code>$ curl -sXGET -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/logpush/datasets/firewall_events/fields | jq .
{
  "errors": [],
  "messages": [],
  "result": {
    "Action": "string; the code of the first-class action the Cloudflare Firewall took on this request",
    "ClientASN": "int; the ASN number of the visitor",
    "ClientASNDescription": "string; the ASN of the visitor as string",
    "ClientCountryName": "string; country from which request originated",
    "ClientIP": "string; the visitor's IP address (IPv4 or IPv6)",
    "ClientIPClass": "string; the classification of the visitor's IP address, possible values are: unknown | clean | badHost | searchEngine | whitelist | greylist | monitoringService | securityScanner | noRecord | scan | backupService | mobilePlatform | tor",
    "ClientRefererHost": "string; the referer host",
    "ClientRefererPath": "string; the referer path requested by visitor",
    "ClientRefererQuery": "string; the referer query-string was requested by the visitor",
    "ClientRefererScheme": "string; the referer url scheme requested by the visitor",
    "ClientRequestHTTPHost": "string; the HTTP hostname requested by the visitor",
    "ClientRequestHTTPMethodName": "string; the HTTP method used by the visitor",
    "ClientRequestHTTPProtocol": "string; the version of HTTP protocol requested by the visitor",
    "ClientRequestPath": "string; the path requested by visitor",
    "ClientRequestQuery": "string; the query-string was requested by the visitor",
    "ClientRequestScheme": "string; the url scheme requested by the visitor",
    "Datetime": "int or string; the date and time the event occurred at the edge",
    "EdgeColoName": "string; the airport code of the Cloudflare datacenter that served this request",
    "EdgeResponseStatus": "int; HTTP response status code returned to browser",
    "Kind": "string; the kind of event, currently only possible values are: firewall",
    "MatchIndex": "int; rules match index in the chain",
    "Metadata": "object; additional product-specific information. Metadata is organized in key:value pairs. Key and Value formats can vary by Cloudflare security product and can change over time",
    "OriginResponseStatus": "int; HTTP origin response status code returned to browser",
    "OriginatorRayName": "string; the RayId of the request that issued the challenge/jschallenge",
    "RayName": "string; the RayId of the request",
    "RuleId": "string; the Cloudflare security product-specific RuleId triggered by this request",
    "Source": "string; the Cloudflare security product triggered by this request",
    "UserAgent": "string; visitor's user-agent string"
  },
  "success": true
}</code></pre>
            <p>Then you’ll append your Cloudflare configuration to the <code>main.tf</code> file:</p>
            <pre><code>$ cat &lt;&lt;EOF | tee -a main.tf

##################
### CLOUDFLARE ###
##################
provider "cloudflare" {
  version = "~&gt; 2.0"
}

resource "cloudflare_logpush_job" "firewall_events_job" {
  name = "fwevents-logpush-job"
  zone_id = var.cf_zone_id
  enabled = true
  dataset = "firewall_events"
  logpull_options = "fields=RayName,Source,RuleId,Action,EdgeResponseStatusDatetime,EdgeColoName,ClientIP,ClientCountryName,ClientASNDescription,UserAgent,ClientRequestHTTPMethodName,ClientRequestHTTPHost,ClientRequestHTTPPath&amp;timestamps=rfc3339"
  destination_conf = replace(sumologic_http_source.http_source.url,"https:","sumo:")
  ownership_challenge = "$LOGPUSH_CHALLENGE_TOKEN"
}
EOF</code></pre>
            <p>And add to the <code>variables.tf</code> file:</p>
            <pre><code>$ cat &lt;&lt;EOF | tee -a variables.tf

##################
### CLOUDFLARE ###
##################
variable "cf_zone_id" {
  default = "$CF_ZONE_ID"
}</code></pre>
            <p>Next we re-run <code>terraform init</code> to install the latest Cloudflare Terraform Provider Module. You’ll need to make sure you have at least version 2.6.0 as this is the version in which we added Logpush job support:</p>
            <pre><code>$ terraform init

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "cloudflare" (terraform-providers/cloudflare) 2.6.0...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.</code></pre>
            <p>With the latest Terraform installed, we check out the plan and then apply:</p>
            <pre><code>$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

sumologic_collector.collector: Refreshing state... [id=108448215]
sumologic_http_source.http_source: Refreshing state... [id=150364538]

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # cloudflare_logpush_job.firewall_events_job will be created
  + resource "cloudflare_logpush_job" "firewall_events_job" {
      + dataset             = "firewall_events"
      + destination_conf    = "sumo://endpoint1.collection.eu.sumologic.com/receiver/v1/http/(redacted)"
      + enabled             = true
      + id                  = (known after apply)
      + logpull_options     = "fields=RayName,Source,RuleId,Action,EdgeResponseStatusDatetime,EdgeColoName,ClientIP,ClientCountryName,ClientASNDescription,UserAgent,ClientRequestHTTPMethodName,ClientRequestHTTPHost,ClientRequestHTTPPath&amp;timestamps=rfc3339"
      + name                = "fwevents-logpush-job"
      + ownership_challenge = "(redacted)"
      + zone_id             = "(redacted)"
    }

Plan: 1 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.</code></pre>
            
            <pre><code>$ terraform apply --auto-approve
sumologic_collector.collector: Refreshing state... [id=108448215]
sumologic_http_source.http_source: Refreshing state... [id=150364538]
cloudflare_logpush_job.firewall_events_job: Creating...
cloudflare_logpush_job.firewall_events_job: Creation complete after 3s [id=13746]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.</code></pre>
            <p>Success! Last step is to test your setup.</p>
    <div>
      <h2>Testing your setup by sending a malicious request</h2>
      <a href="#testing-your-setup-by-sending-a-malicious-request">
        
      </a>
    </div>
    <p>The following step assumes that you have the Cloudflare WAF turned on. Alternatively, you can create a Firewall Rule to match your request and generate a Firewall Event that way.</p><p>First make sure that livetail is running as described earlier:</p>
            <pre><code>$ livetail "_source=firewall-events-source"
### Authenticating ###
### Starting Live Tail session ###</code></pre>
            <p>Then in a browser make the following request <code>https://example.com/&lt;script&gt;alert()&lt;/script&gt;</code>. You should see the following returned:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4FOw7aQFIaaERMSbi2bRH3/3ca02fb0fa377956d28b444f4c5b2034/sqli-upinatoms.png" />
            
            </figure><p>And a few moments later in livetail:</p>
            <pre><code>{"RayName":"58830d3f9945bc36","Source":"waf","RuleId":"958052","Action":"log","EdgeColoName":"LHR","ClientIP":"203.0.113.69","ClientCountryName":"gb","ClientASNDescription":"NTL","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36","ClientRequestHTTPMethodName":"GET","ClientRequestHTTPHost":"upinatoms.com"}
{"RayName":"58830d3f9945bc36","Source":"waf","RuleId":"958051","Action":"log","EdgeColoName":"LHR","ClientIP":"203.0.113.69","ClientCountryName":"gb","ClientASNDescription":"NTL","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36","ClientRequestHTTPMethodName":"GET","ClientRequestHTTPHost":"upinatoms.com"}
{"RayName":"58830d3f9945bc36","Source":"waf","RuleId":"973300","Action":"log","EdgeColoName":"LHR","ClientIP":"203.0.113.69","ClientCountryName":"gb","ClientASNDescription":"NTL","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36","ClientRequestHTTPMethodName":"GET","ClientRequestHTTPHost":"upinatoms.com"}
{"RayName":"58830d3f9945bc36","Source":"waf","RuleId":"973307","Action":"log","EdgeColoName":"LHR","ClientIP":"203.0.113.69","ClientCountryName":"gb","ClientASNDescription":"NTL","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36","ClientRequestHTTPMethodName":"GET","ClientRequestHTTPHost":"upinatoms.com"}
{"RayName":"58830d3f9945bc36","Source":"waf","RuleId":"973331","Action":"log","EdgeColoName":"LHR","ClientIP":"203.0.113.69","ClientCountryName":"gb","ClientASNDescription":"NTL","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36","ClientRequestHTTPMethodName":"GET","ClientRequestHTTPHost":"upinatoms.com"}
{"RayName":"58830d3f9945bc36","Source":"waf","RuleId":"981176","Action":"drop","EdgeColoName":"LHR","ClientIP":"203.0.113.69","ClientCountryName":"gb","ClientASNDescription":"NTL","UserAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36","ClientRequestHTTPMethodName":"GET","ClientRequestHTTPHost":"upinatoms.com"}</code></pre>
            <p>Note that for this one malicious request Cloudflare Logs actually sent 6 separate Firewall Events to Sumo Logic. The reason for this is that this specific request triggered a variety of different Managed Rules: #958051, 958052, 973300, 973307, 973331, and 981176.</p>
    <div>
      <h2>Seeing it all in action</h2>
      <a href="#seeing-it-all-in-action">
        
      </a>
    </div>
    <p>Here's a demo of  launching <code>livetail</code>, making a malicious request in a browser, and then seeing the result sent from the Cloudflare Logpush job:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5KtWEvKCr6QrbGKWZGzQ3a/1142fa4d2dddb6fd7cd7278d3273e0ee/fwevents-sumo-demo.gif" />
            
            </figure> ]]></content:encoded>
            <category><![CDATA[Firewall]]></category>
            <category><![CDATA[Logs]]></category>
            <category><![CDATA[Terraform]]></category>
            <category><![CDATA[SIEM]]></category>
            <guid isPermaLink="false">4JdLdzVCAsQGdNwMq7VgCa</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[T-25 days until Chrome starts flagging HTTP sites as "Not Secure"]]></title>
            <link>https://blog.cloudflare.com/chrome-not-secure-for-http/</link>
            <pubDate>Thu, 28 Jun 2018 13:00:00 GMT</pubDate>
            <description><![CDATA[ Less than one month from today, on July 23, Google will start prominently labeling any site loaded in Chrome without HTTPS as "Not Secure". ]]></description>
            <content:encoded><![CDATA[ <p>Less than one month from today, on July 24*, Google will start prominently labeling any site loaded in Chrome without HTTPS as "<b>Not Secure</b>".</p><p>When we <a href="/https-or-bust-chromes-plan-to-label-sites-as-not-secure/">wrote about</a> Google’s plans back in February, the percent of sites loaded over HTTPS clocked in at 69.7%. Just one year prior to that only 52.5% of sites were loaded using SSL/TLS—the encryption protocol behind HTTPS—so tremendous progress has been made.</p><p>Unfortunately, quite a few popular sites on the web still don’t support HTTPS (or fail to redirect insecure requests) and will soon be flagged by Google. I spent some time scanning the top one million sites, and here’s what I learned about the 946,039 reachable over plaintext (unencrypted) HTTP:</p>
            <figure>
            <a href="http://staging.blog.mrk.cfdata.org/content/images/2018/06/http-infographic.png">
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3zcX4tP4T6W84IPJfm4UUR/836a1bdd934582fb992cd507130e76a4/http-infographic.png" />
            </a>
            </figure><p>If you were to ask the operators of these sites why they don’t protect themselves and their visitors with HTTPS, the responses you’d get could be bucketed into the following three groups: "I don’t need it", "it’s difficult to do", or "it’s slow".</p><p>None of these are legitimate answers, but they’re common misconceptions so let’s take each in turn.</p>
    <div>
      <h3>Myth #1: "HTTPS is difficult to deploy"</h3>
      <a href="#myth-1-https-is-difficult-to-deploy">
        
      </a>
    </div>
    
    <div>
      <h4>For Individual Sites</h4>
      <a href="#for-individual-sites">
        
      </a>
    </div>
    <p>This was true.. in the mid 1990s, when I placed my first SSL certificate order. All that has changed.</p><p>Back then, I was a high school student writing software for my friend’s mom’s company. We were getting ready to launch her website and I learned that we needed something called an "<a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificate</a>" to transact securely online, but I had no idea how to get one.</p><p>After a bit of research conducted over my blazingly fast <a href="https://en.wikipedia.org/wiki/USRobotics#/media/File:Fax_modem_antigo.jpg">US Robotics Sportster 14.4k</a> modem (we had recently upgraded from the relatively slow MultiTech 9600), I found out that we had to mail the company’s "original" Articles of Incorporation, emblazoned with the State Seal of Massachusetts and signed by company officers, along with a hefty check to some far away office. I asked her what to put for my title, so she shrugged and said "CTO" as that sounded more official and likely to get us approved. A week or so later, the CA <i>finally</i> emailed the certificate.</p><p>Thankfully, we’ve come a long way since then. Today, you can protect your site with HTTPS in a matter of seconds, for free, either by signing up for Cloudflare or using a CA such as Let’s Encrypt. If you use Cloudflare we’ll renew your certificate automatically, and store it within milliseconds of your users for optimal performance, using our <a href="https://www.cloudflare.com/network/">150+ data centers</a> around the world. As an added benefit, once we’re handling your SSL/TLS traffic, you can start using technologies like <a href="/tag/workers/">Cloudflare Workers</a> to implement any logic you want at the edge.</p>
    <div>
      <h4>For SaaS Providers</h4>
      <a href="#for-saas-providers">
        
      </a>
    </div>
    <p>While the "it’s difficult" excuse rings hollow for individual site operators, things do get a bit more challenging when you’re dealing with issuing (and regularly renewing) hundreds, thousands, or even millions of certificates. Such is the case for SaaS providers who write and deploy software on another company’s domain, e.g., <a href="https://blog.example.com">https://blog.example.com</a> or <a href="https://mystore.example">https://mystore.example</a>.</p><p>The reason that it can seem difficult to manage SSL certificates on behalf of other companies (putting aside performance and scale for a second), is that Certificate Authorities are only supposed to give out SSL certificates for hostnames where the requestor has "demonstrated control". Fortunately, methods such as HTTP-based validation, i.e., placing a random token on a well-defined path that the CA can access, have reduced the burden on the end-customer to a single step.</p><p>For those that want the benefits of having an edge provider like Cloudflare in front of their servers for acceleration and protection, our <a href="https://www.cloudflare.com/application-services/products/ssl-for-saas-providers/">SSL for SaaS</a> product reduces this process to a single API call. Alternatively, those that wish to handle their own issuance, renewal, certificate hosting, and DDoS protection, the HTTP validation method or <a href="https://github.com/ietf-wg-acme/acme/">ACME protocol</a> can be used.</p>
    <div>
      <h3>Myth #2: "I don’t need HTTPS"</h3>
      <a href="#myth-2-i-dont-need-https">
        
      </a>
    </div>
    <p>This argument is the most puzzling to me, especially <a href="http://this.how/googleAndHttp/">when spouted</a> by people who should know better. Even if you don’t care about performance—see myth #3 below—surely you care about the safety and privacy of those visiting your site.</p><p>Without HTTPS, anyone in the path between your visitor’s browser and your site or API can snoop on (or modify) your content without your consent. This includes <a href="https://en.wikipedia.org/wiki/Internet_censorship_and_surveillance_by_country">governments</a>, employers, and even especially <a href="https://arstechnica.com/tech-policy/2013/04/how-a-banner-ad-for-hs-ok/">internet</a> <a href="http://forums.xfinity.com/t5/Customer-Service/Are-you-aware/td-p/3009551">service</a> <a href="https://thehackernews.com/2016/02/china-hacker-malware.html">providers</a>.</p><p>If you care about your users receiving your content unmodified and being safe from maliciously injected advertisements or malware, you care about—and must use—HTTPS.</p><p>Besides safety, there are additional benefits such as <a href="https://webmasters.googleblog.com/2014/08/https-as-ranking-signal.html">SEO</a> and access to new web features: increasingly, the major browser vendors such as Apple, Google, Mozilla, and Microsoft, are <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1072859">restricting functionality</a> to only work over HTTPS. As for mobile apps, Google will soon block <a href="https://android-developers.googleblog.com/2018/03/previewing-android-p.html">unencrypted connections</a> by default, in their upcoming version of Android. Apple also <a href="https://developer.apple.com/videos/play/wwdc2016/706">announced</a> (and will soon hopefully follow through on their requirement) that apps must use HTTPS.</p>
    <div>
      <h3>Myth #3: "HTTPS is slow"</h3>
      <a href="#myth-3-https-is-slow">
        
      </a>
    </div>
    <p>Lastly, the other common myth about HTTPS is that it’s “slow”. This belief is a holdover from an era when SSL/TLS could actually have a negative performance impact on a site, but that's <a href="https://istlsfastyet.com/#cdn-paas">no longer the case</a> today. In fact, HTTPS is required to enable and enjoy the performance benefits of HTTP/2.</p>
            <figure>
            <a href="http://staging.blog.mrk.cfdata.org/content/images/2018/06/is-tls-fast-yet.png">
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4aiEaxmU31tRO3Uqb0F65H/27d5b717d21fc2a76e87981dc8d89b11/is-tls-fast-yet.png" />
            </a>
            </figure><p>Detractors typically think HTTPS is slow for two primary reasons: i) it takes marginally more CPU power to encrypt and decrypt data; and ii) establishing a TLS session takes two network round trips between the browser and the server.</p><p>Even with decade old hardware, SSL/TLS adds less than 1% of CPU load, as Adam Langley <a href="https://www.imperialviolet.org/2010/06/25/overclocking-ssl.html">explained</a> while debunking the HTTPS performance/cost myth. Today’s processors also come with instruction sets such as AES-NI, that help performance. Further, session resumption technologies reduce the TLS 1.2 overhead and TLS 1.3 aims to <a href="/introducing-0-rtt/">eliminate these round-trips</a> entirely.</p><p>When HTTPS content is served from the edge, typically 10–20 milliseconds away from your users in the case of Cloudflare, SSL/TLS enabled sites are incredibly fast and performant. And even when they are not served from an edge provider it bears repeating that SSL/TLS is not a performance burden! There’s really no excuse not to use it.</p>
    <div>
      <h4>Will my site show “Not Secure” on July 23 24*?</h4>
      <a href="#will-my-site-show-not-secure-on-july-23-24">
        
      </a>
    </div>
    <p>To help you determine if your site is ready for July 23 24*, we’ve built the handy widget shown at the top of the page. Simply type in your domain name (without explicitly specifying "http://" or "https://" to emulate what your visitors typically do) and hit enter.</p><p>Using a Cloudflare Worker, we’ll connect to your site and check to see if it’s redirected to a secure HTTPS link.</p>
    <div>
      <h4>How can I avoid my site showing "Not Secure"?</h4>
      <a href="#how-can-i-avoid-my-site-showing-not-secure">
        
      </a>
    </div>
    <p>If you'd like to avoid your website showing "Not Secure" in Chrome, all you need to do is obtain an SSL certificate and configure your site to redirect all traffic to HTTPS.</p><p>If you're using Cloudflare, we’ll take care of the SSL certificate order and renewal for you; take a look at Troy Hunt's excellent video "HTTPS Is Easy!" series here: <a href="https://httpsiseasy.com/">https://httpsiseasy.com/</a>. You should be sure to use the "Always use HTTPS" toggle to redirect HTTP visitors to HTTPS:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3DWy4aBDklTs1ptQPKr3G8/14e7ef9849af6fb0a5aae8b601a89dae/always-use-https.png" />
            
            </figure><p>Advanced users should also consider <a href="https://support.cloudflare.com/hc/en-us/articles/204183088-Does-Cloudflare-offer-HSTS-HTTP-Strict-Transport-Security-">using HSTS</a> to instruct the browser to always load your content over HTTPS, saving it a round trip (and page load time) on subsequent requests. And by turning on <a href="/fixing-the-mixed-content-problem-with-automatic-https-rewrites/">Automatic HTTPS Rewrites</a>, you can also rewrite any content that would normally be loaded over HTTP to use HTTPS (if available):</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/29wEVaj8lNfDcfAqpSq8Ms/02351641a576ec39139199c89402e345/automatic-https-rewrites.png" />
            
            </figure><p>If you're trying to protect your customers' vanity domains that are pointed to your SaaS application, <a href="https://www.cloudflare.com/ssl-for-saas-providers/">reach out</a>, and we can help you with this process.</p>
    <div>
      <h4>Want to help us secure the web with HTTPS?</h4>
      <a href="#want-to-help-us-secure-the-web-with-https">
        
      </a>
    </div>
    <p>The team that manages HTTPS and SSL certificate issuance at Cloudflare is hiring, in both Engineering and Product Management. Check out our open positions here:</p><ul><li><p><a href="https://boards.greenhouse.io/cloudflare/jobs/982340?gh_jid=982340">Product Manager, SSL/TLS and Crypto</a></p></li><li><p><a href="https://boards.greenhouse.io/cloudflare/jobs/589508?gh_jid=589508">Web Services Engineer</a></p></li><li><p><a href="https://boards.greenhouse.io/cloudflare/jobs/589507?gh_jid=589507">Security Software Engineer</a></p></li><li><p><a href="https://boards.greenhouse.io/cloudflare/jobs/936927?gh_jid=936927">Full Stack Engineer</a></p></li></ul><p><i>If you have a worker you'd like to share, or want to check out workers from other Cloudflare users, visit the </i><a href="https://community.cloudflare.com/tags/recipe-exchange"><i>“Recipe Exchange”</i></a><i> in the Workers section of the </i><a href="https://community.cloudflare.com/c/developers/workers"><i>Cloudflare Community Forum</i></a><i>.</i></p><p>* After this post was published Google pushed the release back one day, to the 24th.</p> ]]></content:encoded>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Chrome]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">2md7E1MxzPpLm5w37yYZFq</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Getting started with Terraform and Cloudflare (Part 2 of 2)]]></title>
            <link>https://blog.cloudflare.com/getting-started-with-terraform-and-cloudflare-part-2/</link>
            <pubDate>Mon, 30 Apr 2018 16:20:45 GMT</pubDate>
            <description><![CDATA[ Continue exploring Terraform with Cloudflare by enabling load balancing, creating page rules, and rolling back changes. ]]></description>
            <content:encoded><![CDATA[ <p><i> In </i><a href="/getting-started-with-terraform-and-cloudflare-part-1/"><i>Part 1 of Getting Started with Terraform</i></a><i>, we explained how Terraform lets developers store Cloudflare configuration in their own source code repository, institute change management processes that include code review, track their configuration versions and history over time, and easily roll back changes as needed.</i></p><p><i>We covered </i><a href="/getting-started-with-terraform-and-cloudflare-part-1#installingterraform"><i>installing Terraform</i></a><i>, </i><a href="/getting-started-with-terraform-and-cloudflare-part-1#helloworld"><i>provider initialization</i></a><i>, </i><a href="/getting-started-with-terraform-and-cloudflare-part-1#trackingchangehistory"><i>storing configuration in git</i></a><i>, </i><a href="/getting-started-with-terraform-and-cloudflare-part-1#applyingzonesettings"><i>applying zone settings</i></a><i>, and </i><a href="/getting-started-with-terraform-and-cloudflare-part-1#managingratelimits"><i>managing rate limits</i></a><i>. This post continues the Cloudflare Terraform provider walkthrough with examples of </i><a href="#addingloadbalancing"><i>load balancing</i></a><i>, </i><a href="#usingpagerules"><i>page rules</i></a><i>, </i><a href="#reviewingandrollingbackchanges"><i>reviewing and rolling back configuration</i></a><i>, and </i><a href="#importingexistingstateandconfiguration"><i>importing state</i></a><i>.</i></p>
    <div>
      <h3>Reviewing the current configuration</h3>
      <a href="#reviewing-the-current-configuration">
        
      </a>
    </div>
    <p>Before we build on Part 1, let's quickly review what we configured in that post. Because our configuration is in git, we can easily view the current configuration and change history that got us to this point.</p>
            <pre><code>$ git log
commit e1c38cf6f4230a48114ce7b747b77d6435d4646c
Author: Me
Date:   Mon Apr 9 12:34:44 2018 -0700

    Step 4 - Update /login rate limit rule from 'simulate' to 'ban'.

commit 0f7e499c70bf5994b5d89120e0449b8545ffdd24
Author: Me
Date:   Mon Apr 9 12:22:43 2018 -0700

    Step 4 - Add rate limiting rule to protect /login.

commit d540600b942cbd89d03db52211698d331f7bd6d7
Author: Me
Date:   Sun Apr 8 22:21:27 2018 -0700

    Step 3 - Enable TLS 1.3, Always Use HTTPS, and SSL Strict mode.

commit 494c6d61b918fce337ca4c0725c9bbc01e00f0b7
Author: Me
Date:   Sun Apr 8 19:58:56 2018 -0700

    Step 2 - Ignore terraform plugin directory and state file.

commit 5acea176050463418f6ac1029674c152e3056bc6
Author: Me
Date:   Sun Apr 8 19:52:13 2018 -0700

    Step 2 - Initial commit with webserver definition.</code></pre>
            <p>We'll get into more detail about reviewing and rolling back to prior versions of configuration <a href="#reviewingandrollingbackchanges">later in this post</a>, but for now let's review the current version.</p><p>In lines 1-4 below, we configured the Cloudflare Terraform provider. Initially we stored our email address and API key in the <code>cloudflare.tf</code> file, but for security reasons we removed them before committing to a git repository.</p><p>In lines 6-8, we define a <code>variable</code> that can be interpolated into <code>resources</code> definitions. Terraform can be used to mass configure multiple zones through the use of variables, as we'll explore in a future post.</p><p>Lines 10-16 tell Cloudflare to create a DNS <code>A</code> record for <code>www.${var.domain}</code> using IP address <code>203.0.113.10</code>. Later in this post, we'll explore adding a second web server and load balancing between the two origins.</p><p>Lines 18-26 apply zone-wide settings and lines 28-54 define a rate limiting rule to protect against credential stuffing and other brute force attacks.</p>
            <pre><code>$ cat -n cloudflare.tf 
     1	provider "cloudflare" {
     2	  # email pulled from $CLOUDFLARE_EMAIL
     3	  # token pulled from $CLOUDFLARE_TOKEN
     4	}
     5	
     6	variable "domain" {
     7	  default = "example.com"
     8	}
     9	
    10	resource "cloudflare_record" "www" {
    11	  domain  = "${var.domain}"
    12	  name    = "www"
    13	  value   = "203.0.113.10"
    14	  type    = "A"
    15	  proxied = true
    16	}
    17	
    18	resource "cloudflare_zone_settings_override" "example-com-settings" {
    19	  name = "${var.domain}"
    20	
    21	  settings {
    22	    tls_1_3 = "on"
    23	    automatic_https_rewrites = "on"
    24	    ssl = "strict"
    25	  }
    26	}
    27	
    28	resource "cloudflare_rate_limit" "login-limit" {
    29	  zone = "${var.domain}"
    30	
    31	  threshold = 5
    32	  period = 60
    33	  match {
    34	    request {
    35	      url_pattern = "${var.domain}/login"
    36	      schemes = ["HTTP", "HTTPS"]
    37	      methods = ["POST"]
    38	    }
    39	    response {
    40	      statuses = [401, 403]
    41	      origin_traffic = true
    42	    }
    43	  }
    44	  action {
    45	    mode = "ban"
    46	    timeout = 300
    47	    response {
    48	      content_type = "text/plain"
    49	      body = "You have failed to login 5 times in a 60 second period and will be blocked from attempting to login again for the next 5 minutes."
    50	    }
    51	  }
    52	  disabled = false
    53	  description = "Block failed login attempts (5 in 1 min) for 5 minutes."
    54	}</code></pre>
            
    <div>
      <h3>Adding load balancing</h3>
      <a href="#adding-load-balancing">
        
      </a>
    </div>
    <p>Thanks to the <a href="/getting-started-with-terraform-and-cloudflare-part-1#managingratelimits">rate limiting set up in part 1</a>, our login page is protected against credential brute force attacks. Now it's time to focus on performance and reliability. Imagine organic traffic has grown for your web server, and this traffic is increasingly global. It’s time to spread these requests to your origin over multiple data centers.</p><p>Below we'll add a second origin for some basic round robining, and then use the <a href="https://www.cloudflare.com/load-balancing/">Cloudflare Load Balancing</a> product to fail traffic over as needed. We'll then enhance our load balancing configuration through the use of "geo steering" to serve results from an origin server that is geographically closest to your end users.</p>
    <div>
      <h4>1. Add another DNS record for <code>www</code></h4>
      <a href="#1-add-another-dns-record-for-www">
        
      </a>
    </div>
    <p>To get started, we'll add a DNS record for a second web server, which is located in Asia. The IP address for this server is <code>198.51.100.15</code>.</p>
            <pre><code>$ git checkout -b step5-loadbalance
Switched to a new branch 'step5-loadbalance'

$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'
resource "cloudflare_record" "www-asia" {
  domain  = "${var.domain}"
  name    = "www"
  value   = "198.51.100.15"
  type    = "A"
  proxied = true
}
EOF</code></pre>
            <p>Note that while the name of the resource is different as Terraform resources of the same type must be uniquely named, the DNS name, i.e., what your customers will type in their browser, is the same: "www".</p>
    <div>
      <h4>2. Preview and merge the changes</h4>
      <a href="#2-preview-and-merge-the-changes">
        
      </a>
    </div>
    <p>Below we'll check the <code>terraform plan</code>, merge and apply the changes.</p>
            <pre><code>$ terraform plan | grep -v "&lt;computed&gt;"
...
Terraform will perform the following actions:

  + cloudflare_record.www-asia
      domain:      "example.com"
      name:        "www"
      proxied:     "true"
      type:        "A"
      value:       "198.51.100.15"


Plan: 1 to add, 0 to change, 0 to destroy.</code></pre>
            
            <pre><code>$ git add cloudflare.tf
$ git commit -m "Step 5 - Add additional 'www' DNS record for Asia data center."
[step5-loadbalance 6761a4f] Step 5 - Add additional 'www' DNS record for Asia data center.
 1 file changed, 7 insertions(+)

$ git checkout master
Switched to branch 'master'

$ git merge step5-loadbalance 
Updating e1c38cf..6761a4f
Fast-forward
 cloudflare.tf | 7 +++++++
 1 file changed, 7 insertions(+)</code></pre>
            
    <div>
      <h4>3. Apply and verify the changes</h4>
      <a href="#3-apply-and-verify-the-changes">
        
      </a>
    </div>
    <p>Let's add the second DNS record for <a href="http://www.example.com">www.example.com</a>:</p>
            <pre><code>$ terraform apply --auto-approve
...
cloudflare_record.www-asia: Creating...
  created_on:  "" =&gt; "&lt;computed&gt;"
  domain:      "" =&gt; "example.com"
  hostname:    "" =&gt; "&lt;computed&gt;"
  metadata.%:  "" =&gt; "&lt;computed&gt;"
  modified_on: "" =&gt; "&lt;computed&gt;"
  name:        "" =&gt; "www"
  proxiable:   "" =&gt; "&lt;computed&gt;"
  proxied:     "" =&gt; "true"
  ttl:         "" =&gt; "&lt;computed&gt;"
  type:        "" =&gt; "A"
  value:       "" =&gt; "198.51.100.15"
  zone_id:     "" =&gt; "&lt;computed&gt;"
cloudflare_record.www-asia: Creation complete after 1s (ID: fda39d8c9bf909132e82a36bab992864)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.</code></pre>
            <p>With the second DNS record in place, let's try making some requests to see where the traffic is served from:</p>
            <pre><code>$ curl https://www.example.com
Hello, this is 203.0.113.10!

$ curl https://www.example.com
Hello, this is 203.0.113.10!

$ curl https://www.example.com
Hello, this is 198.51.100.15!

$ curl https://www.example.com
Hello, this is 203.0.113.10!</code></pre>
            <p>As you can see above, there is no discernible pattern for which origin receives the request. When Cloudflare connects to an origin with multiple DNS records, one of the IP addresses is selected at random. If both of these IPs are in the same data center and sessions can be shared (i.e., it doesn't matter if the same user hops between origin servers), this may work fine. However, for anything more complicated such as origins in different geographies or active health checks, you're going to want to use Cloudflare's Load Balancing product.</p>
    <div>
      <h4>4. Switch to using Cloudflare Load Balancing</h4>
      <a href="#4-switch-to-using-cloudflare-load-balancing">
        
      </a>
    </div>
    <p>Before proceeding, make sure that your account is enabled for Load Balancing. If you're on an Enterprise plan, you should ask your Customer Success Manager to do this; otherwise, you can subscribe to Load Balancing within the Cloudflare Dashboard.</p><p>As described in the <a href="https://support.cloudflare.com/hc/en-us/articles/115000081911-Tutorial-How-to-Set-Up-Load-Balancing-Intelligent-Failover-on-Cloudflare">load balancing tutorial</a> on the Cloudflare Support site, you will need to do three things:</p><blockquote><p>i. Create a monitor to run health checks against your origin servers.
ii. Create a pool of one or more origin servers that will receive load balanced traffic.
iii. Create a load balancer with an external hostname, e.g., www.example.com, and one or more pools.
iv. Preview and merge the changes.
v. Test the changes.</p></blockquote>
    <div>
      <h5>i. Define and create the health check ("monitor")</h5>
      <a href="#i-define-and-create-the-health-check-monitor">
        
      </a>
    </div>
    <p>To monitor our origins we're going to create a basic health check that makes a GET request to each origin on the URL <a href="https://www.example.com">https://www.example.com</a>. If the origin returns the 200/OK status code within 5 seconds, we'll consider it healthy. If it fails to do so three (3) times in a row, we'll consider it unhealthy. This health check will be run once per minute from several regions, and send an email notification to <a>you@example.com</a> if any failures are detected.</p>
            <pre><code>$ git checkout step5-loadbalance
Switched to branch 'step5-loadbalance'

$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'
resource "cloudflare_load_balancer_monitor" "get-root-https" {
  expected_body = "alive"
  expected_codes = "200"
  method = "GET"
  timeout = 5
  path = "/"
  interval = 60
  retries = 2
  check_regions = ["WNAM", "ENAM", "WEU", "EEU", "SEAS", "NEAS"]
  description = "GET / over HTTPS - expect 200"
}
EOF</code></pre>
            
    <div>
      <h5>ii. Define and create the pool of origins</h5>
      <a href="#ii-define-and-create-the-pool-of-origins">
        
      </a>
    </div>
    <p>We will call our pool "www-servers” and add two origins to it: <code>www-us</code> (<code>203.0.113.10</code>) and www-asia (<code>198.51.100.15</code>). For now, we'll skip any sort of <a href="https://support.cloudflare.com/hc/en-us/articles/115000540888-Load-Balancing-Geographic-Regions">geo routing</a>.</p><p>Note that we reference the monitor we added in the last step. When applying this confirmation, Terraform will figure out that it first needs to create the monitor so that it can look up the ID and provide to the pool we wish to create.</p>
            <pre><code>$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'
resource "cloudflare_load_balancer_pool" "www-servers" {
  name = "www-servers"
  monitor = "${cloudflare_load_balancer_monitor.get-root-https.id}"
  origins {
    name = "www-us"
    address = "203.0.113.10"
  }
  origins {
    name = "www-asia"
    address = "198.51.100.15"
  }
  description = "www origins"
  enabled = true
  minimum_origins = 1
  notification_email = "you@example.com"
}
EOF</code></pre>
            
    <div>
      <h5>iii. Define and create the load balancer</h5>
      <a href="#iii-define-and-create-the-load-balancer">
        
      </a>
    </div>
    <p>Note that when you create a load balancer (LB), it will <a href="https://support.cloudflare.com/hc/en-us/articles/115004954407-How-Does-a-Load-Balancer-Interact-with-Existing-DNS-Records-">replace any existing DNS records with the same name</a>. For example, when we create the "<a href="http://www.example.com">www.example.com</a>" LB below, it will supersede the two www DNS records that you have previously defined. One benefit of leaving these DNS records in place is that if you temporarily disable load balancing, connections to this hostname will still be possible as shown above.</p>
            <pre><code>$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'
resource "cloudflare_load_balancer" "www-lb" {
  zone = "example.com"
  name = "www-lb"
  default_pool_ids = ["${cloudflare_load_balancer_pool.www-servers.id}"]
  fallback_pool_id = "${cloudflare_load_balancer_pool.www-servers.id}"
  description = "example load balancer"
  proxied = true
}
EOF</code></pre>
            
    <div>
      <h5>iv. Preview and merge the changes</h5>
      <a href="#iv-preview-and-merge-the-changes">
        
      </a>
    </div>
    <p>As usual, we take a look at the proposed plan before we apply any changes:</p>
            <pre><code>$ terraform plan
...
Terraform will perform the following actions:

  + cloudflare_load_balancer.www-lb
      id:                         &lt;computed&gt;
      created_on:                 &lt;computed&gt;
      default_pool_ids.#:         &lt;computed&gt;
      description:                "example load balancer"
      fallback_pool_id:           "${cloudflare_load_balancer_pool.www-servers.id}"
      modified_on:                &lt;computed&gt;
      name:                       "www-lb"
      pop_pools.#:                &lt;computed&gt;
      proxied:                    "true"
      region_pools.#:             &lt;computed&gt;
      ttl:                        &lt;computed&gt;
      zone:                       "example.com"
      zone_id:                    &lt;computed&gt;

  + cloudflare_load_balancer_monitor.get-root-https
      id:                         &lt;computed&gt;
      created_on:                 &lt;computed&gt;
      description:                "GET / over HTTPS - expect 200"
      expected_body:              "alive"
      expected_codes:             "200"
      interval:                   "60"
      method:                     "GET"
      modified_on:                &lt;computed&gt;
      path:                       "/"
      retries:                    "2"
      timeout:                    "5"
      type:                       "http"

  + cloudflare_load_balancer_pool.www-servers
      id:                         &lt;computed&gt;
      check_regions.#:            "6"
      check_regions.1151265357:   "SEAS"
      check_regions.1997072153:   "WEU"
      check_regions.2367191053:   "EEU"
      check_regions.2826842289:   "ENAM"
      check_regions.2992567379:   "WNAM"
      check_regions.3706632574:   "NEAS"
      created_on:                 &lt;computed&gt;
      description:                "www origins"
      enabled:                    "true"
      minimum_origins:            "1"
      modified_on:                &lt;computed&gt;
      monitor:                    "${cloudflare_load_balancer_monitor.get-root-https.id}"
      name:                       "www-servers"
      notification_email:         "you@example.com"
      origins.#:                  "2"
      origins.3039426352.address: "198.51.100.15"
      origins.3039426352.enabled: "true"
      origins.3039426352.name:    "www-asia"
      origins.4241861547.address: "203.0.113.10"
      origins.4241861547.enabled: "true"
      origins.4241861547.name:    "www-us"


Plan: 3 to add, 0 to change, 0 to destroy.</code></pre>
            <p>The plan looks good so let's go ahead, merge it in, and apply it.</p>
            <pre><code>$ git add cloudflare.tf
$ git commit -m "Step 5 - Create load balancer (LB) monitor, LB pool, and LB."
[step5-loadbalance bc9aa9a] Step 5 - Create load balancer (LB) monitor, LB pool, and LB.
 1 file changed, 35 insertions(+)

$ terraform apply --auto-approve
...
cloudflare_load_balancer_monitor.get-root-https: Creating...
  created_on:     "" =&gt; "&lt;computed&gt;"
  description:    "" =&gt; "GET / over HTTPS - expect 200"
  expected_body:  "" =&gt; "alive"
  expected_codes: "" =&gt; "200"
  interval:       "" =&gt; "60"
  method:         "" =&gt; "GET"
  modified_on:    "" =&gt; "&lt;computed&gt;"
  path:           "" =&gt; "/"
  retries:        "" =&gt; "2"
  timeout:        "" =&gt; "5"
  type:           "" =&gt; "http"
cloudflare_load_balancer_monitor.get-root-https: Creation complete after 1s (ID: 4238142473fcd48e89ef1964be72e3e0)
cloudflare_load_balancer_pool.www-servers: Creating...
  check_regions.#:            "" =&gt; "6"
  check_regions.1151265357:   "" =&gt; "SEAS"
  check_regions.1997072153:   "" =&gt; "WEU"
  check_regions.2367191053:   "" =&gt; "EEU"
  check_regions.2826842289:   "" =&gt; "ENAM"
  check_regions.2992567379:   "" =&gt; "WNAM"
  check_regions.3706632574:   "" =&gt; "NEAS"
  created_on:                 "" =&gt; "&lt;computed&gt;"
  description:                "" =&gt; "www origins"
  enabled:                    "" =&gt; "true"
  minimum_origins:            "" =&gt; "1"
  modified_on:                "" =&gt; "&lt;computed&gt;"
  monitor:                    "" =&gt; "4238142473fcd48e89ef1964be72e3e0"
  name:                       "" =&gt; "www-servers"
  notification_email:         "" =&gt; "you@example.com"
  origins.#:                  "" =&gt; "2"
  origins.3039426352.address: "" =&gt; "198.51.100.15"
  origins.3039426352.enabled: "" =&gt; "true"
  origins.3039426352.name:    "" =&gt; "www-asia"
  origins.4241861547.address: "" =&gt; "203.0.113.10"
  origins.4241861547.enabled: "" =&gt; "true"
  origins.4241861547.name:    "" =&gt; "www-us"
cloudflare_load_balancer_pool.www-servers: Creation complete after 0s (ID: 906d2a7521634783f4a96c062eeecc6d)
cloudflare_load_balancer.www-lb: Creating...
  created_on:         "" =&gt; "&lt;computed&gt;"
  default_pool_ids.#: "" =&gt; "1"
  default_pool_ids.0: "" =&gt; "906d2a7521634783f4a96c062eeecc6d"
  description:        "" =&gt; "example load balancer"
  fallback_pool_id:   "" =&gt; "906d2a7521634783f4a96c062eeecc6d"
  modified_on:        "" =&gt; "&lt;computed&gt;"
  name:               "" =&gt; "www-lb"
  pop_pools.#:        "" =&gt; "&lt;computed&gt;"
  proxied:            "" =&gt; "true"
  region_pools.#:     "" =&gt; "&lt;computed&gt;"
  ttl:                "" =&gt; "&lt;computed&gt;"
  zone:               "" =&gt; "example.com"
  zone_id:            "" =&gt; "&lt;computed&gt;"
cloudflare_load_balancer.www-lb: Creation complete after 1s (ID: cb94f53f150e5c1a65a07e43c5d4cac4)

Apply complete! Resources: 3 added, 0 changed, 0 destroyed.</code></pre>
            
    <div>
      <h5>iv. Test the changes</h5>
      <a href="#iv-test-the-changes">
        
      </a>
    </div>
    <p>With load balancing in place, let's run those curl requests again to see where the traffic is served from:</p>
            <pre><code>$ for i in {1..4}; do curl https://www.example.com &amp;&amp; sleep 5; done
Hello, this is 198.51.100.15!

Hello, this is 203.0.113.10!

Hello, this is 198.51.100.15!

Hello, this is 203.0.113.10!</code></pre>
            <p>Great, we're now seeing each request load balanced evenly across the two origins we defined.</p>
    <div>
      <h3>Using page rules</h3>
      <a href="#using-page-rules">
        
      </a>
    </div>
    <p>Earlier we configured zone settings that apply to all of example.com. Now we're going to add an exception to these settings by using <a href="https://www.cloudflare.com/features-page-rules/">Page Rules</a>.</p><p>Specifically, we're going to turn increase the security level for a URL we know is expensive to render (and cannot be cached): <a href="https://www.example.com/expensive-db-call">https://www.example.com/expensive-db-call</a>. Additionally, we're going to add a redirect from the previous URL we used to host this page.</p>
    <div>
      <h4>1. Create a new branch and append the page rule</h4>
      <a href="#1-create-a-new-branch-and-append-the-page-rule">
        
      </a>
    </div>
    <p>As usual, we'll create a new branch and append our configuration.</p>
            <pre><code>$ git checkout -b step6-pagerule
Switched to a new branch 'step6-pagerule'

$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'
resource "cloudflare_page_rule" "increase-security-on-expensive-page" {
  zone = "${var.domain}"
  target = "www.${var.domain}/expensive-db-call"
  priority = 10

  actions = {
    security_level = "under_attack",
  }
}

resource "cloudflare_page_rule" "redirect-to-new-db-page" {
  zone = "${var.domain}"
  target = "www.${var.domain}/old-location.php"
  priority = 10

  actions = {
    forwarding_url {
      url = "https://www.${var.domain}/expensive-db-call"
      status_code = 301
    }
  }
}
EOF</code></pre>
            
    <div>
      <h4>2. Preview and merge the changes</h4>
      <a href="#2-preview-and-merge-the-changes">
        
      </a>
    </div>
    <p>You know the drill: preview the changes Terraform is going to make and then merge them into the master branch.</p>
            <pre><code>$ terraform plan
...
Terraform will perform the following actions:

  + cloudflare_page_rule.increase-security-on-expensive-page
      id:                                     &lt;computed&gt;
      actions.#:                              "1"
      actions.0.always_use_https:             "false"
      actions.0.disable_apps:                 "false"
      actions.0.disable_performance:          "false"
      actions.0.disable_security:             "false"
      actions.0.security_level:               "under_attack"
      priority:                               "10"
      status:                                 "active"
      target:                                 "www.example.com/expensive-db-call"
      zone:                                   "example.com"
      zone_id:                                &lt;computed&gt;

  + cloudflare_page_rule.redirect-to-new-db-page
      id:                                     &lt;computed&gt;
      actions.#:                              "1"
      actions.0.always_use_https:             "false"
      actions.0.disable_apps:                 "false"
      actions.0.disable_performance:          "false"
      actions.0.disable_security:             "false"
      actions.0.forwarding_url.#:             "1"
      actions.0.forwarding_url.0.status_code: "301"
      actions.0.forwarding_url.0.url:         "https://www.example.com/expensive-db-call"
      priority:                               "10"
      status:                                 "active"
      target:                                 "www.example.com/old-location.php"
      zone:                                   "example.com"
      zone_id:                                &lt;computed&gt;


Plan: 2 to add, 0 to change, 0 to destroy.</code></pre>
            
            <pre><code>$ git add cloudflare.tf

$ git commit -m "Step 6 - Add two Page Rules."
[step6-pagerule d4fec16] Step 6 - Add two Page Rules.
 1 file changed, 23 insertions(+)

$ git checkout master
Switched to branch 'master'

$ git merge step6-pagerule 
Updating 7a2ac34..d4fec16
Fast-forward
 cloudflare.tf | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
3. Apply And Verify The Changes
First we'll test requesting the (now missing) old location of the expensive-to-render page.</code></pre>
            
            <pre><code>$ curl -vso /dev/null https://www.example.com/old-location.php 2&gt;&amp;1 | grep "&lt; HTTP\|Location"
&lt; HTTP/1.1 404 Not Found</code></pre>
            <p>As expected, it can't be found. Let's apply the Page Rules, including the redirect that should fix this error.</p>
            <pre><code>$ terraform apply --auto-approve
...
cloudflare_page_rule.redirect-to-new-db-page: Creating...
  actions.#:                              "0" =&gt; "1"
  actions.0.always_use_https:             "" =&gt; "false"
  actions.0.disable_apps:                 "" =&gt; "false"
  actions.0.disable_performance:          "" =&gt; "false"
  actions.0.disable_security:             "" =&gt; "false"
  actions.0.forwarding_url.#:             "0" =&gt; "1"
  actions.0.forwarding_url.0.status_code: "" =&gt; "301"
  actions.0.forwarding_url.0.url:         "" =&gt; "https://www.example.com/expensive-db-call"
  priority:                               "" =&gt; "10"
  status:                                 "" =&gt; "active"
  target:                                 "" =&gt; "www.example.com/old-location.php"
  zone:                                   "" =&gt; "example.com"
  zone_id:                                "" =&gt; "&lt;computed&gt;"
cloudflare_page_rule.increase-security-on-expensive-page: Creating...
  actions.#:                     "0" =&gt; "1"
  actions.0.always_use_https:    "" =&gt; "false"
  actions.0.disable_apps:        "" =&gt; "false"
  actions.0.disable_performance: "" =&gt; "false"
  actions.0.disable_security:    "" =&gt; "false"
  actions.0.security_level:      "" =&gt; "under_attack"
  priority:                      "" =&gt; "10"
  status:                        "" =&gt; "active"
  target:                        "" =&gt; "www.example.com/expensive-db-call"
  zone:                          "" =&gt; "example.com"
  zone_id:                       "" =&gt; "&lt;computed&gt;"
cloudflare_page_rule.redirect-to-new-db-page: Creation complete after 3s (ID: c5c40ff2dc12416b5fe4d0541980c591)
cloudflare_page_rule.increase-security-on-expensive-page: Creation complete after 6s (ID: 1c13fdb84710c4cc8b11daf7ffcca449)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.</code></pre>
            <p>With the Page Rules in place, let's try that call again, along with the <a href="/introducing-im-under-attack-mode/">I'm Under Attack Mode</a> test:</p>
            <pre><code>$ curl -vso /dev/null https://www.example.com/old-location.php 2&gt;&amp;1 | grep "&lt; HTTP\|Location"
&lt; HTTP/1.1 301 Moved Permanently
&lt; Location: https://www.upinatoms.com/expensive-db-call

$ curl -vso /dev/null https://www.upinatoms.com/expensive-db-call 2&gt;&amp;1 | grep "&lt; HTTP"
&lt; HTTP/1.1 503 Service Temporarily Unavailable</code></pre>
            <p>Great, they work as expected! In the first case, the Cloudflare edge responds with a <code>301</code> redirecting the browser to the new location. In the second case it initially responds with a <code>503</code> (as it is consistent with the "I Am Under Attack” mode).</p>
    <div>
      <h3>Reviewing and rolling back changes</h3>
      <a href="#reviewing-and-rolling-back-changes">
        
      </a>
    </div>
    <p>We've come a long way! Now it's time to tear it all down. Well, maybe just part of it.</p><p>Sometimes when you deploy configuration changes you later determine that they need to be rolled back. You could be performance testing a new configuration and want to revert to your previous configuration when done testing. Or maybe you fat-fingered an IP address and brought your entire site down (#hugops).</p><p>Either way, if you've determined you want to revert your configuration, all you need to do is check the desired branch out and ask Terraform to move your Cloudflare settings back in time. And note that if you accidentally brought your site down you should consider establishing a good strategy for peer reviewing pull requests (rather than merging directly to primary, as I do here for brevity)!</p>
    <div>
      <h4>1. Reviewing your configuration history</h4>
      <a href="#1-reviewing-your-configuration-history">
        
      </a>
    </div>
    <p>Before we figure out how far back in time we want to roll back, let's take a look at our (git) versioned history.</p>
            <pre><code>$ git log
commit d4fec164581bec44684a4d59bb80aec1f1da5a6e
Author: Me
Date:   Wed Apr 18 22:04:52 2018 -0700

    Step 6 - Add two Page Rules.

commit bc9aa9a465a4c8d6deeaa0491814c9f364e9aa8a
Author: Me
Date:   Sun Apr 15 23:58:35 2018 -0700

    Step 5 - Create load balancer (LB) monitor, LB pool, and LB.

commit 6761a4f754e77322629ba4e90a90a3defa1fd4b6
Author: Me
Date:   Wed Apr 11 11:20:25 2018 -0700

    Step 5 - Add additional 'www' DNS record for Asia data center.

commit e1c38cf6f4230a48114ce7b747b77d6435d4646c
Author: Me
Date:   Mon Apr 9 12:34:44 2018 -0700

    Step 4 - Update /login rate limit rule from 'simulate' to 'ban'.

commit 0f7e499c70bf5994b5d89120e0449b8545ffdd24
Author: Me
Date:   Mon Apr 9 12:22:43 2018 -0700

    Step 4 - Add rate limiting rule to protect /login.

commit d540600b942cbd89d03db52211698d331f7bd6d7
Author: Me
Date:   Sun Apr 8 22:21:27 2018 -0700

    Step 3 - Enable TLS 1.3, Always Use HTTPS, and SSL Strict mode.

commit 494c6d61b918fce337ca4c0725c9bbc01e00f0b7
Author: Me
Date:   Sun Apr 8 19:58:56 2018 -0700

    Step 2 - Ignore terraform plugin directory and state file.

commit 5acea176050463418f6ac1029674c152e3056bc6
Author: Me
Date:   Sun Apr 8 19:52:13 2018 -0700

    Step 2 - Initial commit with webserver definition.

Another nice benefit of storing your Cloudflare configuration in git is that you can see who made the change, as well as who reviewed and approved the change (assuming you're peer reviewing pull requests).</code></pre>
            
    <div>
      <h4>2. Examining specific historical changes</h4>
      <a href="#2-examining-specific-historical-changes">
        
      </a>
    </div>
    <p>To begin with, let's see what the last change we made was.</p>
            <pre><code>$ git show
commit d4fec164581bec44684a4d59bb80aec1f1da5a6e
Author: Me
Date:   Wed Apr 18 22:04:52 2018 -0700

    Step 6 - Add two Page Rules.

diff --git a/cloudflare.tf b/cloudflare.tf
index 0b39450..ef11d8a 100644
--- a/cloudflare.tf
+++ b/cloudflare.tf
@@ -94,3 +94,26 @@ resource "cloudflare_load_balancer" "www-lb" {
   description = "example load balancer"
   proxied = true
 }
+
+resource "cloudflare_page_rule" "increase-security-on-expensive-page" {
+  zone = "${var.domain}"
+  target = "www.${var.domain}/expensive-db-call"
+  priority = 10
+
+  actions = {
+    security_level = "under_attack",
+  }
+}
+
+resource "cloudflare_page_rule" "redirect-to-new-db-page" {
+  zone = "${var.domain}"
+  target = "www.${var.domain}/old-location.php"
+  priority = 10
+
+  actions = {
+    forwarding_url {
+      url = "https://${var.domain}/expensive-db-call"
+      status_code = 301
+    }
+  }
+}</code></pre>
            <p>Now let's look at the past few changes:</p>
            <pre><code>$ git log -p -3

... 
// page rule config from above
...

commit bc9aa9a465a4c8d6deeaa0491814c9f364e9aa8a
Author: Me
Date:   Sun Apr 15 23:58:35 2018 -0700

    Step 5 - Create load balancer (LB) monitor, LB pool, and LB.

diff --git a/cloudflare.tf b/cloudflare.tf
index b92cb6f..195b646 100644
--- a/cloudflare.tf
+++ b/cloudflare.tf
@@ -59,3 +59,38 @@ resource "cloudflare_record" "www-asia" {
   type    = "A"
   proxied = true
 }
+resource "cloudflare_load_balancer_monitor" "get-root-https" {
+  expected_body = "alive"
+  expected_codes = "200"
+  method = "GET"
+  timeout = 5
+  path = "/"
+  interval = 60
+  retries = 2
+  description = "GET / over HTTPS - expect 200"
+}
+resource "cloudflare_load_balancer_pool" "www-servers" {
+  name = "www-servers"
+  monitor = "${cloudflare_load_balancer_monitor.get-root-https.id}"
+  check_regions = ["WNAM", "ENAM", "WEU", "EEU", "SEAS", "NEAS"]
+  origins {
+    name = "www-us"
+    address = "203.0.113.10"
+  }
+  origins {
+    name = "www-asia"
+    address = "198.51.100.15"
+  }
+  description = "www origins"
+  enabled = true
+  minimum_origins = 1
+  notification_email = "you@example.com"
+}
+resource "cloudflare_load_balancer" "www-lb" {
+  zone = "${var.domain}"
+  name = "www-lb"
+  default_pool_ids = ["${cloudflare_load_balancer_pool.www-servers.id}"]
+  fallback_pool_id = "${cloudflare_load_balancer_pool.www-servers.id}"
+  description = "example load balancer"
+  proxied = true
+}

commit 6761a4f754e77322629ba4e90a90a3defa1fd4b6
Author: Me
Date:   Wed Apr 11 11:20:25 2018 -0700

    Step 5 - Add additional 'www' DNS record for Asia data center.

diff --git a/cloudflare.tf b/cloudflare.tf
index 9f25a0c..b92cb6f 100644
--- a/cloudflare.tf
+++ b/cloudflare.tf
@@ -52,3 +52,10 @@ resource "cloudflare_rate_limit" "login-limit" {
   disabled = false
   description = "Block failed login attempts (5 in 1 min) for 5 minutes."
 }
+resource "cloudflare_record" "www-asia" {
+  domain  = "${var.domain}"
+  name    = "www"
+  value   = "198.51.100.15"
+  type    = "A"
+  proxied = true
+}</code></pre>
            
    <div>
      <h4>3. Redeploying the previous configuration</h4>
      <a href="#3-redeploying-the-previous-configuration">
        
      </a>
    </div>
    <p>Imagine that shortly after we <a href="#usingpagerules">deployed the Page Rules</a>, we got a call from the Product team that manages this page: "The URL was only being used by one customer and is no longer needed, let's drop the security setting and redirect.”</p><p>While you could always edit the config file directly and delete those entries, it's easier to let git do it for us. To begin with, let's ask git to revert the last commit (without rewriting history).</p>
    <div>
      <h5>i. Revert the branch to the previous commit</h5>
      <a href="#i-revert-the-branch-to-the-previous-commit">
        
      </a>
    </div>
    
            <pre><code>$ git revert HEAD~1..HEAD
[master f9a6f7d] Revert "Step 6 - Bug fix."
 1 file changed, 1 insertion(+), 1 deletion(-)

$ git log -2
commit f9a6f7db72ea1437e146050a5e7556052ecc9a1a
Author: Me
Date:   Wed Apr 18 23:28:09 2018 -0700

    Revert "Step 6 - Add two Page Rules."
    
    This reverts commit d4fec164581bec44684a4d59bb80aec1f1da5a6e.

commit d4fec164581bec44684a4d59bb80aec1f1da5a6e
Author: Me
Date:   Wed Apr 18 22:04:52 2018 -0700

    Step 6 - Add two Page Rules.</code></pre>
            
    <div>
      <h5>ii. Preview the changes</h5>
      <a href="#ii-preview-the-changes">
        
      </a>
    </div>
    <p>As expected, Terraform is indicating it will remove the two Page Rules we just created.</p>
            <pre><code>$ terraform plan
...
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  - destroy

Terraform will perform the following actions:

  - cloudflare_page_rule.increase-security-on-expensive-page

  - cloudflare_page_rule.redirect-to-new-db-page


Plan: 0 to add, 0 to change, 2 to destroy.</code></pre>
            
    <div>
      <h5>iv. Apply the changes</h5>
      <a href="#iv-apply-the-changes">
        
      </a>
    </div>
    <p>The changes look good, so let's ask Terraform to roll our Cloudflare configuration back.</p>
            <pre><code>$ terraform apply --auto-approve
...
cloudflare_page_rule.redirect-to-new-db-page: Destroying... (ID: c5c40ff2dc12416b5fe4d0541980c591)
cloudflare_page_rule.increase-security-on-expensive-page: Destroying... (ID: 1c13fdb84710c4cc8b11daf7ffcca449)
cloudflare_page_rule.increase-security-on-expensive-page: Destruction complete after 0s
cloudflare_page_rule.redirect-to-new-db-page: Destruction complete after 1s

Apply complete! Resources: 0 added, 0 changed, 2 destroyed.</code></pre>
            <p>Two resources destroyed, as expected. We've rolled back to the previous version.</p>
    <div>
      <h3>Importing existing state and configuration</h3>
      <a href="#importing-existing-state-and-configuration">
        
      </a>
    </div>
    <p>An important point to understand about Terraform is that it is only able to manage configuration that it created, or was explicitly told about after the fact. The reason for this limitation is that Terraform relies on a local <a href="https://www.terraform.io/docs/state/">state file</a> that maps the resource names defined in your configuration file, e.g., <code>cloudflare_load_balancer.www-lb</code> to the IDs generated by Cloudflare's API.</p><p>When Terraform makes calls to Cloudflare's API to create new resources, it persists those IDs to a state file; by default, the <code>terraform.tfstate</code> file in your directory is used, but this can be a remote location as will be discussed in a future blog post. These IDs are later looked up and refreshed when you call <code>terraform plan</code> and <code>terraform apply</code>.</p><p>If you've configured Cloudflare through other means, e.g., by logging into the Cloudflare Dashboard or making <code>curl</code> calls to <code>api.cloudflare.com</code>, Terraform does not (yet) have these resource IDs in the state file. To manage this preexisting configuration you will need to first i) reproduce the configuration in your config file and; ii) import resources one-by-one by providing their IDs and resource names.</p>
    <div>
      <h4>1. Reviewing your current state file</h4>
      <a href="#1-reviewing-your-current-state-file">
        
      </a>
    </div>
    <p>Before importing resources created by other means, let's take a look at how an existing DNS records is represented in the state file.</p>
            <pre><code>$ cat terraform.tfstate | jq '.modules[].resources["cloudflare_record.www"]'
{
  "type": "cloudflare_record",
  "depends_on": [],
  "primary": {
    "id": "c38d3103767284e7cd14d5dad3ab8669",
    "attributes": {
      "created_on": "2018-04-08T00:37:33.76321Z",
      "data.%": "0",
      "domain": "example.com",
      "hostname": "www.example.com",
      "id": "c38d3103767284e7cd14d5dad3ab8669",
      "metadata.%": "2",
      "metadata.auto_added": "false",
      "metadata.managed_by_apps": "false",
      "modified_on": "2018-04-08T00:37:33.76321Z",
      "name": "www",
      "priority": "0",
      "proxiable": "true",
      "proxied": "true",
      "ttl": "1",
      "type": "A",
      "value": "203.0.113.10",
      "zone_id": "e2e6491340be87a3726f91fc4148b126"
    },
    "meta": {
      "schema_version": "1"
    },
    "tainted": false
  },
  "deposed": [],
  "provider": "provider.cloudflare"
}</code></pre>
            <p>As shown in the above JSON, the <code>cloudflare_record</code> resource named "www" has a unique ID of <code>c38d3103767284e7cd14d5dad3ab8669</code>. This ID is what gets interpolated into the API call that Terraform makes to Cloudflare to pull the latest configuration during the plan stage, e.g.,</p>
            <pre><code>GET https://api.cloudflare.com/client/v4/zones/:zone_id/dns_records/c38d3103767284e7cd14d5dad3ab8669</code></pre>
            
    <div>
      <h4>2. Importing existing Cloudflare resources</h4>
      <a href="#2-importing-existing-cloudflare-resources">
        
      </a>
    </div>
    <p>To import an existing record, e.g., another DNS record, you need two things:</p><ol><li><p>The unique identifier that Cloudflare uses to identify the record</p></li><li><p>The resource name to which you wish to map this identifier</p></li></ol>
    <div>
      <h5>i. Download IDs and configuration from api.cloudflare.com</h5>
      <a href="#i-download-ids-and-configuration-from-api-cloudflare-com">
        
      </a>
    </div>
    <p>We start by making an API call to Cloudflare to enumerate the DNS records in our account. The output below has been filtered to show only MX records, as these are what we'll be importing.</p>
            <pre><code>$ curl https://api.cloudflare.com/client/v4/zones/$EXAMPLE_COM_ZONEID \
       -H "X-Auth-Email: you@example.com" -H "X-Auth-Key: $CF_API_KEY" \
       -H "Content-Type: application/json" | jq .

{
  "result": [
    {
      "id": "8ea8c36c8530ee01068c65c0ddc4379b",
      "type": "MX",
      "name": "example.com",
      "content": "alt1.aspmx.l.google.com",
      "proxiable": false,
      "proxied": false,
      "ttl": 1,
      "priority": 15,
      "locked": false,
      "zone_id": "e2e6491340be87a3726f91fc4148b126",
      "zone_name": "example.com",
      "modified_on": "2016-11-06T01:11:50.163221Z",
      "created_on": "2016-11-06T01:11:50.163221Z",
      "meta": {
        "auto_added": false,
        "managed_by_apps": false
      }
    },
    {
      "id": "ad0e9ff2479b13c5fbde77a02ea6fa2c",
      "type": "MX",
      "name": "example.com",
      "content": "alt2.aspmx.l.google.com",
      "proxiable": false,
      "proxied": false,
      "ttl": 1,
      "priority": 15,
      "locked": false,
      "zone_id": "e2e6491340be87a3726f91fc4148b126",
      "zone_name": "example.com",
      "modified_on": "2016-11-06T01:12:00.915649Z",
      "created_on": "2016-11-06T01:12:00.915649Z",
      "meta": {
        "auto_added": false,
        "managed_by_apps": false
      }
    },
    {
      "id": "ad6ee69519cd02a0155a56b6d64c278a",
      "type": "MX",
      "name": "example.com",
      "content": "alt3.aspmx.l.google.com",
      "proxiable": false,
      "proxied": false,
      "ttl": 1,
      "priority": 20,
      "locked": false,
      "zone_id": "e2e6491340be87a3726f91fc4148b126",
      "zone_name": "example.com",
      "modified_on": "2016-11-06T01:12:12.899684Z",
      "created_on": "2016-11-06T01:12:12.899684Z",
      "meta": {
        "auto_added": false,
        "managed_by_apps": false
      }
    },
    {
      "id": "baf6655f33738b7fd902630858878206",
      "type": "MX",
      "name": "example.com",
      "content": "alt4.aspmx.l.google.com",
      "proxiable": false,
      "proxied": false,
      "ttl": 1,
      "priority": 20,
      "locked": false,
      "zone_id": "e2e6491340be87a3726f91fc4148b126",
      "zone_name": "example.com",
      "modified_on": "2016-11-06T01:12:22.599272Z",
      "created_on": "2016-11-06T01:12:22.599272Z",
      "meta": {
        "auto_added": false,
        "managed_by_apps": false
      }
    },
    {
      "id": "a96d72b3c6afe3077f9e9c677fb0a556",
      "type": "MX",
      "name": "example.com",
      "content": "aspmx.lo.google.com",
      "proxiable": false,
      "proxied": false,
      "ttl": 1,
      "priority": 10,
      "locked": false,
      "zone_id": "e2e6491340be87a3726f91fc4148b126",
      "zone_name": "example.com",
      "modified_on": "2016-11-06T01:11:27.700386Z",
      "created_on": "2016-11-06T01:11:27.700386Z",
      "meta": {
        "auto_added": false,
        "managed_by_apps": false
      }
    },

    ...
  ]
}</code></pre>
            
    <div>
      <h5>ii. Create Terraform configuration for existing records</h5>
      <a href="#ii-create-terraform-configuration-for-existing-records">
        
      </a>
    </div>
    <p>In the previous step, we found 5 MX records that we wish to add.</p><table><tr><td><p><b>ID</b></p></td><td><p><b>Priority</b></p></td><td><p><b>Content</b></p></td></tr><tr><td><p>a96d72b3c6afe3077f9e9c677fb0a556</p></td><td><p>10</p></td><td><p>aspmx.lo.google.com</p></td></tr><tr><td><p>8ea8c36c8530ee01068c65c0ddc4379b</p></td><td><p>15</p></td><td><p>alt1.aspmx.l.google.com</p></td></tr><tr><td><p>ad0e9ff2479b13c5fbde77a02ea6fa2c</p></td><td><p>15</p></td><td><p>alt2.aspmx.l.google.com</p></td></tr><tr><td><p>ad6ee69519cd02a0155a56b6d64c278a</p></td><td><p>20</p></td><td><p>alt3.aspmx.l.google.com</p></td></tr><tr><td><p>baf6655f33738b7fd902630858878206</p></td><td><p>20</p></td><td><p>alt4.aspmx.l.google.com</p></td></tr></table><p>Before importing, we need to create Terraform configuration and give each record a unique name that can be referenced during the import.</p>
            <pre><code>$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'
resource "cloudflare_record" "mx-10" {
  domain  = "${var.domain}"
  name    = "${var.domain}"
  value   = "aspmx.lo.google.com"
  type    = "MX"
  priority = "10"
}
resource "cloudflare_record" "mx-15-1" {
  domain  = "${var.domain}"
  name    = "${var.domain}"
  value   = "alt1.aspmx.l.google.com"
  type    = "MX"
  priority = "15"
}
resource "cloudflare_record" "mx-15-2" {
  domain  = "${var.domain}"
  name    = "${var.domain}"
  value   = "alt2.aspmx.l.google.com"
  type    = "MX"
  priority = "15"
}
resource "cloudflare_record" "mx-20-1" {
  domain  = "${var.domain}"
  name    = "${var.domain}"
  value   = "alt3.aspmx.l.google.com"
  type    = "MX"
  priority = "20"
}
resource "cloudflare_record" "mx-20-2" {
  domain  = "${var.domain}"
  name    = "${var.domain}"
  value   = "alt3.aspmx.l.google.com"
  type    = "MX"
  priority = "20"
}
EOF</code></pre>
            
    <div>
      <h5>iii. Import resources into Terraform state</h5>
      <a href="#iii-import-resources-into-terraform-state">
        
      </a>
    </div>
    <p>Before we import the records, let's look at what would happen if we ran a <code>terraform apply</code>.</p>
            <pre><code>$ terraform plan | grep Plan
Plan: 5 to add, 0 to change, 0 to destroy.</code></pre>
            <p>Terraform does not know that these records already exist on Cloudflare, so until the import completes it will attempt to create them as new records. Below we import them one-by-one, specifying the name of the resource and the <code>zoneName/resourceID</code> returned by api.cloudflare.com.</p>
            <pre><code>$ terraform import cloudflare_record.mx-10 example.com/a96d72b3c6afe3077f9e9c677fb0a556
cloudflare_record.mx-10: Importing from ID "example.com/a96d72b3c6afe3077f9e9c677fb0a556"...
cloudflare_record.mx-10: Import complete!
  Imported cloudflare_record (ID: a96d72b3c6afe3077f9e9c677fb0a556)
cloudflare_record.mx-10: Refreshing state... (ID: a96d72b3c6afe3077f9e9c677fb0a556)

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

$ terraform import cloudflare_record.mx-15-1 example.com/8ea8c36c8530ee01068c65c0ddc4379b
cloudflare_record.mx-15-1: Importing from ID "example.com/8ea8c36c8530ee01068c65c0ddc4379b"...
cloudflare_record.mx-15-1: Import complete!
  Imported cloudflare_record (ID: 8ea8c36c8530ee01068c65c0ddc4379b)
cloudflare_record.mx-15-1: Refreshing state... (ID: 8ea8c36c8530ee01068c65c0ddc4379b)

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

$ terraform import cloudflare_record.mx-15-2 example.com/ad0e9ff2479b13c5fbde77a02ea6fa2c
cloudflare_record.mx-15-2: Importing from ID "example.com/ad0e9ff2479b13c5fbde77a02ea6fa2c"...
cloudflare_record.mx-15-2: Import complete!
  Imported cloudflare_record (ID: ad0e9ff2479b13c5fbde77a02ea6fa2c)
cloudflare_record.mx-15-2: Refreshing state... (ID: ad0e9ff2479b13c5fbde77a02ea6fa2c)

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

$ terraform import cloudflare_record.mx-20-1 example.com/ad6ee69519cd02a0155a56b6d64c278a
cloudflare_record.mx-20-1: Importing from ID "example.com/ad6ee69519cd02a0155a56b6d64c278a"...
cloudflare_record.mx-20-1: Import complete!
  Imported cloudflare_record (ID: ad6ee69519cd02a0155a56b6d64c278a)
cloudflare_record.mx-20-1: Refreshing state... (ID: ad6ee69519cd02a0155a56b6d64c278a)

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.

$ terraform import cloudflare_record.mx-20-2 example.com/baf6655f33738b7fd902630858878206
cloudflare_record.mx-20-2: Importing from ID "example.com/baf6655f33738b7fd902630858878206"...
cloudflare_record.mx-20-2: Import complete!
  Imported cloudflare_record (ID: baf6655f33738b7fd902630858878206)
cloudflare_record.mx-20-2: Refreshing state... (ID: baf6655f33738b7fd902630858878206)

Import successful!

The resources that were imported are shown above. These resources are now in
your Terraform state and will henceforth be managed by Terraform.</code></pre>
            <p>Now when we run <code>terraform plan</code> it no longer wants to (re-)create the above records.</p>
            <pre><code>$ terraform plan | grep changes
No changes. Infrastructure is up-to-date.</code></pre>
            
    <div>
      <h3>Wrapping up</h3>
      <a href="#wrapping-up">
        
      </a>
    </div>
    <p>That's it for today! We covered the <a href="#addingloadbalancing">Load Balancing</a> and <a href="#usingpagerules">Page Rules</a> resources, as well as demonstrated how to <a href="#reviewingandrollingbackchanges">review and roll back configuration changes</a>, and <a href="#importingexistingstateandconfiguration">import state</a>.</p><p>Stay tuned for future Terraform blog posts, where we plan to show how to manage state effectively in a group setting, go multi-cloud with Terraform, and much more.</p> ]]></content:encoded>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Terraform]]></category>
            <category><![CDATA[Load Balancing]]></category>
            <category><![CDATA[Page Rules]]></category>
            <category><![CDATA[HashiCorp]]></category>
            <category><![CDATA[Programming]]></category>
            <guid isPermaLink="false">1MMQdxQ3AKGQ3JVvoMYFgB</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Getting started with Terraform and Cloudflare (Part 1 of 2)]]></title>
            <link>https://blog.cloudflare.com/getting-started-with-terraform-and-cloudflare-part-1/</link>
            <pubDate>Fri, 27 Apr 2018 20:18:10 GMT</pubDate>
            <description><![CDATA[ Write code to manage your Cloudflare configuration using Terraform, and store it in your source code repository of choice for versioned history and rollback. ]]></description>
            <content:encoded><![CDATA[ <p><i>You can read Part 2 of Getting Started with Terraform </i><a href="/getting-started-with-terraform-and-cloudflare-part-2/"><i>here</i></a><i>.</i></p><p>As a Product Manager at Cloudflare, I spend quite a bit of my time talking to customers. One of the most common topics I'm asked about is configuration management. Developers want to know how they can write code to manage their Cloudflare config, without interacting with our APIs or UI directly.</p><p>Following best practices in software development, they want to store configuration in their own source code repository (be it <a href="https://github.com">GitHub</a> or otherwise), institute a change management process that includes code review, and be able to track their configuration versions and history over time. Additionally, they want the ability to quickly and easily roll back changes when required.</p><p>When I first spoke with our engineering teams about these requirements, they gave me the best answer a Product Manager could hope to hear: there's already an open source tool out there that does all of that (and more), with a strong community and plugin system to boot—it's called <a href="https://terraform.io">Terraform</a>.</p><p>This blog post is about getting started using Terraform with Cloudflare and the new version 1.0 of our Terraform provider. A "provider" is simply a plugin that knows how to talk to a specific set of APIs—in this case, Cloudflare, but there are also providers available for AWS, Azure, Google Cloud, Kubernetes, VMware, and <a href="https://www.terraform.io/docs/providers/">many more services</a>. Today's release extends our existing provider that previously only supported DNS records with support for Zone Settings, Rate Limiting, Load Balancing, and Page Rules.</p>
    <div>
      <h3>Before and after Terraform</h3>
      <a href="#before-and-after-terraform">
        
      </a>
    </div>
    <p>Before we jump into some real-world examples of using Terraform with Cloudflare, here is a set of diagrams that depicts the paradigm shift.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/2VfXSQWtmvcXHDMG27XO5T/018f57def84f3a2d66f33d29a8a8727d/before-terraform-_3x.png" />
            
            </figure><p>Before Terraform, you needed to learn how to use the configuration interfaces or <a href="https://www.cloudflare.com/learning/security/api/what-is-an-api/">APIs</a> of each cloud and edge provider, e.g., Google Cloud and Cloudflare below. Additionally, your ability to store your configuration in your own source code control system depends on vendor-specific configuration export mechanisms (which may or may not exist).</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1PfbFLbgtZrfToqvJNr4SD/7b9be75ae4d633f6e54ab7ecdc9f3b5f/with-terraform-_3x-2.png" />
            
            </figure><p>With Terraform, you can store and version your configuration in GitHub (or your source code control system of choice). Once you learn Terraform's configuration syntax, you don't need to bother learning how to use providers' UIs or APIs—you just tell Terraform what you want and it figures out the rest.</p>
    <div>
      <h3>Installing Terraform</h3>
      <a href="#installing-terraform">
        
      </a>
    </div>
    <p>The installation process for Terraform is extremely simple as it ships as a single binary file. Official instructions for installing Terraform can be found <a href="https://www.terraform.io/intro/getting-started/install.html">here</a>, and for purposes of this example we'll show to do so on a macOS using <a href="https://brew.sh/">Homebrew</a>:</p>
            <pre><code>$ brew install terraform
==&gt; Downloading https://homebrew.bintray.com/bottles/terraform-0.11.7.sierra.bottle.tar.gz
######################################################################## 100.0%
==&gt; Pouring terraform-0.11.7.sierra.bottle.tar.gz
?  /usr/local/Cellar/terraform/0.11.7: 6 files, 80.2MB

$ terraform version
Terraform v0.11.7</code></pre>
            <p>The following instructions are adapted from the <a href="https://developers.cloudflare.com/terraform/">Cloudflare Developers - Terraform documentation</a> site, which includes a <a href="https://developers.cloudflare.com/terraform/tutorial/">full tutorial</a> and coverage of <a href="https://developers.cloudflare.com/terraform/advanced-topics/">advanced topics</a>.</p><p>If you're interested in seeing how to use a specific Terraform resource or technique, click on one of the following anchor links:</p><ul><li><p><a href="#installingterraform">Installing Terraform</a></p></li><li><p><a href="#helloworld">Hello, world!</a></p></li><li><p><a href="#trackingchangehistory">Tracking Change History</a></p></li><li><p><a href="#applyingzonesettings">Applying Zone Settings</a></p></li><li><p><a href="#managingratelimits">Managing Rate Limits</a></p></li><li><p>Load Balancing Resource (next post!)</p></li><li><p>Page Rules Resource (next post!)</p></li><li><p>Reviewing and Rolling Back Configuration (next post!)</p></li><li><p>Importing Existing State and Configuration (next post!)</p></li></ul>
    <div>
      <h3>Hello, world!</h3>
      <a href="#hello-world">
        
      </a>
    </div>
    <p>Now that Terraform is installed, it's time to start using it. Let's assume you have a web server for your domain that's accessible on <code>203.0.113.10</code>. You just signed up your domain, <code>example.com</code>, on Cloudflare and want to manage everything with Terraform.</p>
    <div>
      <h4>1. Define your first Terraform config file</h4>
      <a href="#1-define-your-first-terraform-config-file">
        
      </a>
    </div>
    <p>First we'll create a initial Terraform config file. Any files ending in <code>.tf</code> will be processed by Terraform. As you configuration gets more complex you'll want to split the config into separate files and modules, but for now we'll proceed with a single file:</p>
            <pre><code>$ cat &gt; cloudflare.tf &lt;&lt;'EOF'
provider "cloudflare" {
  email = "you@example.com"
  token = "your-api-key"
}

variable "domain" {
  default = "example.com"
}

resource "cloudflare_record" "www" {
  domain  = "${var.domain}"
  name    = "www"
  value   = "203.0.113.10"
  type    = "A"
  proxied = true
}
EOF</code></pre>
            
    <div>
      <h4>2. Initialize Terraform and the Cloudflare provider</h4>
      <a href="#2-initialize-terraform-and-the-cloudflare-provider">
        
      </a>
    </div>
    <p>Now that you've created your basic configuration in HCL let's initialize Terraform and ask it to apply the configuration to Cloudflare. HCL stands for HashiCorp Configuration Lanaguage, and is named after the maker of Terraform.</p>
            <pre><code>$ terraform init

Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "cloudflare" (1.0.0)...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.cloudflare: version = "~&gt; 1.0"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
When you run terraform init, any plugins required, such as the Cloudflare Terraform provider, are automatically downloaded and saved locally to a .terraform directory:

$ find .terraform/
.terraform/
.terraform//plugins
.terraform//plugins/darwin_amd64
.terraform//plugins/darwin_amd64/lock.json
.terraform//plugins/darwin_amd64/terraform-provider-cloudflare_v1.0.0_x4</code></pre>
            
    <div>
      <h4>3. Review the execution plan</h4>
      <a href="#3-review-the-execution-plan">
        
      </a>
    </div>
    <p>With the Cloudflare provider installed, let's ask Terraform to show the changes it's planning to make to your Cloudflare account so you can confirm it matches the configuration you intended:</p>
            <pre><code>$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + cloudflare_record.www
      id:          &lt;computed&gt;
      created_on:  &lt;computed&gt;
      domain:      "example.com"
      hostname:    &lt;computed&gt;
      metadata.%:  &lt;computed&gt;
      modified_on: &lt;computed&gt;
      name:        "www"
      proxiable:   &lt;computed&gt;
      proxied:     "true"
      ttl:         &lt;computed&gt;
      type:        "A"
      value:       "203.0.113.10"
      zone_id:     &lt;computed&gt;


Plan: 1 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.</code></pre>
            <p>As you can see in the above "execution plan”, Terraform is going to create a new DNS record, as requested. Values that you've explicitly specified are displayed, e.g., the value of the <code>A</code> record—<code>203.0.113.10</code>—while values that are derived based on other API calls, e.g., looking up the zone_id, or returned after the object is created, are displayed as <code>&lt;computed&gt;</code>.</p>
    <div>
      <h4>4. Applying Your Changes</h4>
      <a href="#4-applying-your-changes">
        
      </a>
    </div>
    <p>The plan command is important, as it allows you to preview the changes for accuracy before actually making them. Once you're comfortable with the execution plan, it's time to apply it:</p>
            <pre><code>$ terraform apply --auto-approve
cloudflare_record.www: Creating...
  created_on:  "" =&gt; "&lt;computed&gt;"
  domain:      "" =&gt; "example.com"
  hostname:    "" =&gt; "&lt;computed&gt;"
  metadata.%:  "" =&gt; "&lt;computed&gt;"
  modified_on: "" =&gt; "&lt;computed&gt;"
  name:        "" =&gt; "www"
  proxiable:   "" =&gt; "&lt;computed&gt;"
  proxied:     "" =&gt; "true"
  ttl:         "" =&gt; "&lt;computed&gt;"
  type:        "" =&gt; "A"
  value:       "" =&gt; "203.0.113.10"
  zone_id:     "" =&gt; "&lt;computed&gt;"
cloudflare_record.www: Creation complete after 1s (ID: c38d3103767284e7cd14d5dad3ab8668)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
</code></pre>
            <p>Note that I specified –auto-approve on the command line for briefer output; without this flag, Terraform will show you the output of <code>terraform plan</code> and then ask for confirmation before applying it.</p>
    <div>
      <h4>Verify the results</h4>
      <a href="#verify-the-results">
        
      </a>
    </div>
    <p>Logging back into the Cloudflare Dashboard and selecting the DNS tab, I can see the record that was created by Terraform:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3eWL2qsaFsPrzVG9d3A4tD/9a054125bc8170e171aa654cc0dfd5b0/Verify-DNS.png" />
            
            </figure><p>If you'd like to see the full results returned from the API call (including the default values that you didn't specify but let Terraform compute), you can run <code>terraform show</code>:</p>
            <pre><code>$ terraform show
cloudflare_record.www:
  id = c38d3103767284e7cd14d5dad3ab8668
  created_on = 2018-04-08T00:37:33.76321Z
  data.% = 0
  domain = example.com
  hostname = www.example.com
  metadata.% = 2
  metadata.auto_added = false
  metadata.managed_by_apps = false
  modified_on = 2018-04-08T00:37:33.76321Z
  name = www
  priority = 0
  proxiable = true
  proxied = true
  ttl = 1
  type = A
  value = 203.0.113.10
  zone_id = e2e6391340be87a3726f91fc4148b122</code></pre>
            
            <pre><code>$ curl https://www.example.com
Hello, this is 203.0.113.10!</code></pre>
            
    <div>
      <h3>Tracking change history</h3>
      <a href="#tracking-change-history">
        
      </a>
    </div>
    <p>In the <code>terraform apply</code> step above, you created and applied some basic Cloudflare configuration. Terraform was able to apply this configuration to your account because you provided your email address and API token at the top of the cloudflare.tf file:</p>
            <pre><code>$ head -n4 cloudflare.tf 
provider "cloudflare" {
  email = "you@example.com"
  token = "your-api-key"
}</code></pre>
            <p>We're now going to store your configuration in GitHub where it can be tracked, peer-reviewed, and rolled back to as needed. But before we do so, we're going to remove your credentials from the Terraform config file so it doesn't get committed to a repository.</p>
    <div>
      <h4>1. Use environment variables for authentication</h4>
      <a href="#1-use-environment-variables-for-authentication">
        
      </a>
    </div>
    <p>As a good security practice we need to remove your Cloudflare credentials from anything that will be committed to a repository. The Cloudflare Terraform provider supports reading these values from the <code>CLOUDFLARE_EMAIL</code> and <code>CLOUDFLARE_TOKEN</code> environment variables, so all we need to do is:</p>
            <pre><code>$ sed -ie 's/^.*email =.*$/  # email pulled from $CLOUDFLARE_EMAIL/' cloudflare.tf
$ sed -ie 's/^.*token =.*$/  # token pulled from $CLOUDFLARE_TOKEN/' cloudflare.tf

$ head -n4 cloudflare.tf 
provider "cloudflare" {
  # email pulled from $CLOUDFLARE_EMAIL
  # token pulled from $CLOUDFLARE_TOKEN
}

$ export CLOUDFLARE_EMAIL=you@example.com
$ export CLOUDFLARE_TOKEN=your-api-key</code></pre>
            <p>Note that you need to leave the empty provider definition in the file, so that Terraform knows to install the Cloudflare plugin.</p><p>After completing the above step, it's a good idea to make sure that you can still authenticate to Cloudflare. By running <code>terraform plan</code> we can get Terraform to pull the current state (which requires a valid email and API key):</p>
            <pre><code>$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

cloudflare_record.www: Refreshing state... (ID: c38d3102767284e7ca14d5dad3ab8b69)

------------------------------------------------------------------------

No changes. Infrastructure is up-to-date.

This means that Terraform did not detect any differences between your
configuration and real physical resources that exist. As a result, no
actions need to be performed.</code></pre>
            <ol><li><p>Store your configuration in GitHubNow that credentials have been removed, it's time to initialize a git repository with your Cloudflare configuration and then push it to GitHub.</p></li></ol><p>First we'll create the GitHub repository to store the config. This can be done via the GitHub UI or with a simple API call:</p>
            <pre><code>$ export GITHUB_USER=your-github-user
$ export GITHUB_TOKEN=your-github-token

$ export GITHUB_URL=$(curl -sSXPOST https://api.github.com/user/repos?access_token=$GITHUB_TOKEN -H 'Content-Type: application/json' \
-d '{"name": "cf-config", "private":"true"}' 2&gt;/dev/null | jq -r .ssh_url)

$ echo $GITHUB_URL
git@github.com:$GITHUB_USER/cf-config.git</code></pre>
            <p>Now we'll initialize a git repository and make our first commit:</p>
            <pre><code>$ git init
Initialized empty Git repository in $HOME/cf-config/.git/

$ git remote add origin $GITHUB_URL
$ git add cloudflare.tf

$ git commit -m "Step 2 - Initial commit with webserver definition."
[master (root-commit) 5acea17] Step 2 - Initial commit with webserver definition.
 1 file changed, 16 insertions(+)
 create mode 100644 cloudflare.tf</code></pre>
            <p>An astute reader may have noticed that we did not commit the <code>.terraform</code> directory nor did we commit the <code>terraform.tfstate</code> file. The former was not committed because this repository may be used on a different architecture, and the plugins contained in this directory are built for the system on which terraform init was run. The latter was not committed as i) it may eventually contain sensitive strings and ii) it is not a good way to keep state in sync, as HashiCorp [explains].</p><p>To prevent git from bugging us about these files, let's add them to a new <code>.gitignore</code> file, commit it, and push everything to GitHub:</p>
            <pre><code>$ cat &gt; .gitignore &lt;&lt;'EOF'
.terraform/
terraform.tfstate*
EOF

$ git add .gitignore

$ git commit -m "Step 2 - Ignore terraform plugin directory and state file."
[master 494c6d6] Step 2 - Ignore terraform plugin directory and state file.
 1 file changed, 2 insertions(+)
 create mode 100644 .gitignore

$ git push
Counting objects: 6, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (6/6), 762 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
To git@github.com:$GITHUB_USER/cf-config.git
 * [new branch]      master -&gt; master</code></pre>
            
    <div>
      <h3>Applying zone settings</h3>
      <a href="#applying-zone-settings">
        
      </a>
    </div>
    <p>Now that you've got a basic website proxied through Cloudflare, it's time to use Terraform to adjust some additional settings on your zone. Below we'll configure some optional HTTPS settings, and then push the updated configuration to GitHub for posterity.</p><p>We'll use a new git branch for the changes, and then merge it into master before applying. On a team, you might consider using this step as an opportunity for others to review your change before merging and deploying it. Or you may integrate Terraform into your <a href="https://www.cloudflare.com/learning/serverless/glossary/what-is-ci-cd/">CI/CD system</a> to perform tests automatically using another Cloudflare domain.</p>
    <div>
      <h4>1. Create a new branch and append the new zone settings</h4>
      <a href="#1-create-a-new-branch-and-append-the-new-zone-settings">
        
      </a>
    </div>
    <p>Here, we modify the Terraform configuration to enable the following settings: <a href="https://www.cloudflare.com/learning-resources/tls-1-3/">TLS 1.3</a>, <a href="/how-to-make-your-site-https-only/">Always Use HTTPS</a>, <a href="/introducing-strict-ssl-protecting-against-a-man-in-the-middle-attack-on-origin-traffic/">Strict SSL mode</a>, and the <a href="https://www.cloudflare.com/waf/">Cloudflare WAF</a>. Strict mode requires a valid SSL certificate on your origin, so be sure to use the <a href="/cloudflare-ca-encryption-origin/">Cloudflare Origin CA</a> to generate one.</p>
            <pre><code>$ git checkout -b step3-https
Switched to a new branch 'step3-https'

$ cat &gt;&gt; cloudflare.tf &lt;&lt;'EOF'

resource "cloudflare_zone_settings_override" "example-com-settings" {
  name = "${var.domain}"

  settings {
    tls_1_3 = "on"
    automatic_https_rewrites = "on"
    ssl = "strict"
    waf = "on"
  }
}
EOF</code></pre>
            
    <div>
      <h4>2. Preview and merge the changes</h4>
      <a href="#2-preview-and-merge-the-changes">
        
      </a>
    </div>
    <p>Let's take a look at what Terraform is proposing before we apply it. We filter the <code>terraform plan</code> output to ignore those values that will be "computed”—in this case, settings that will be left at their default values. For brevity from here on out, we'll omit some extranneous Terraform output; if you'd like to see the output exactly as run, please see the <a href="https://developers.cloudflare.com/terraform/tutorial/">full tutorial</a>.</p>
            <pre><code>$ terraform plan | grep -v "&lt;computed&gt;"
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

cloudflare_record.www: Refreshing state... (ID: c38d3103767284e7cd14d5dad3ab8668)

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  + cloudflare_zone_settings_override.example-com-settings
      name:                                   "example.com"
      settings.#:                             "1"
      settings.0.automatic_https_rewrites:    "on"
      settings.0.ssl:                         "strict"
      settings.0.tls_1_3:                     "on"
      settings.0.waf:                         "on"


Plan: 1 to add, 0 to change, 0 to destroy.</code></pre>
            <p>The proposed changes look good, so we'll merge them into primary and then apply them with <code>terraform apply</code>. When working on a team, you may want to require pull requests and use this opportunity to peer review any proposed configuration changes.</p>
            <pre><code>$ git add cloudflare.tf
$ git commit -m "Step 3 - Enable TLS 1.3, Always Use HTTPS, and SSL Strict mode."
[step3-https d540600] Step 3 - Enable TLS 1.3, Always Use HTTPS, and SSL Strict mode.
 1 file changed, 11 insertions(+)

$ git checkout master
Switched to branch 'master'

$ git merge step3-https
Updating d26f40b..d540600
Fast-forward
 cloudflare.tf | 11 +++++++++++
 1 file changed, 11 insertions(+)

$ git push
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 501 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To git@github.com:$GITHUB_USER/cf-config.git
   d26f40b..d540600  master -&gt; master</code></pre>
            
    <div>
      <h4>3. Apply and verify the changes</h4>
      <a href="#3-apply-and-verify-the-changes">
        
      </a>
    </div>
    <p>Before applying the changes, let's see if we can connect with TLS 1.3. Hint: we should <i>not</i> be able to with default settings. If you want to follow along with this test, you'll need to [compile curl against BoringSSL].</p>
            <pre><code>$ curl -v --tlsv1.3 https://www.upinatoms.com 2&gt;&amp;1 | grep "SSL connection\|error"
* error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION
curl: (35) error:1000042e:SSL routines:OPENSSL_internal:TLSV1_ALERT_PROTOCOL_VERSION</code></pre>
            <p>As shown above, we receive an error as TLS 1.3 is not yet enabled on your zone. Let's enable it by running terraform apply and try again:</p>
            <pre><code>$ terraform apply --auto-approve
cloudflare_record.www: Refreshing state... (ID: c38d3103767284e7cd14d5dad3ab8668)
cloudflare_zone_settings_override.example-com-settings: Creating...
  initial_settings.#:                     "" =&gt; "&lt;computed&gt;"
  initial_settings_read_at:               "" =&gt; "&lt;computed&gt;"
  name:                                   "" =&gt; "example.com"
  readonly_settings.#:                    "" =&gt; "&lt;computed&gt;"
  settings.#:                             "" =&gt; "1"
  settings.0.advanced_ddos:               "" =&gt; "&lt;computed&gt;"
  settings.0.always_online:               "" =&gt; "&lt;computed&gt;"
  settings.0.always_use_https:            "" =&gt; "&lt;computed&gt;"
  settings.0.automatic_https_rewrites:    "" =&gt; "on"
  settings.0.brotli:                      "" =&gt; "&lt;computed&gt;"
  settings.0.browser_cache_ttl:           "" =&gt; "&lt;computed&gt;"
  settings.0.browser_check:               "" =&gt; "&lt;computed&gt;"
  settings.0.cache_level:                 "" =&gt; "&lt;computed&gt;"
  settings.0.challenge_ttl:               "" =&gt; "&lt;computed&gt;"
  settings.0.cname_flattening:            "" =&gt; "&lt;computed&gt;"
  settings.0.development_mode:            "" =&gt; "&lt;computed&gt;"
  settings.0.edge_cache_ttl:              "" =&gt; "&lt;computed&gt;"
  settings.0.email_obfuscation:           "" =&gt; "&lt;computed&gt;"
  settings.0.hotlink_protection:          "" =&gt; "&lt;computed&gt;"
  settings.0.http2:                       "" =&gt; "&lt;computed&gt;"
  settings.0.ip_geolocation:              "" =&gt; "&lt;computed&gt;"
  settings.0.ipv6:                        "" =&gt; "&lt;computed&gt;"
  settings.0.max_upload:                  "" =&gt; "&lt;computed&gt;"
  settings.0.minify.#:                    "" =&gt; "&lt;computed&gt;"
  settings.0.mirage:                      "" =&gt; "&lt;computed&gt;"
  settings.0.mobile_redirect.#:           "" =&gt; "&lt;computed&gt;"
  settings.0.opportunistic_encryption:    "" =&gt; "&lt;computed&gt;"
  settings.0.origin_error_page_pass_thru: "" =&gt; "&lt;computed&gt;"
  settings.0.polish:                      "" =&gt; "&lt;computed&gt;"
  settings.0.prefetch_preload:            "" =&gt; "&lt;computed&gt;"
  settings.0.privacy_pass:                "" =&gt; "&lt;computed&gt;"
  settings.0.pseudo_ipv4:                 "" =&gt; "&lt;computed&gt;"
  settings.0.response_buffering:          "" =&gt; "&lt;computed&gt;"
  settings.0.rocket_loader:               "" =&gt; "&lt;computed&gt;"
  settings.0.security_header.#:           "" =&gt; "&lt;computed&gt;"
  settings.0.security_level:              "" =&gt; "&lt;computed&gt;"
  settings.0.server_side_exclude:         "" =&gt; "&lt;computed&gt;"
  settings.0.sha1_support:                "" =&gt; "&lt;computed&gt;"
  settings.0.sort_query_string_for_cache: "" =&gt; "&lt;computed&gt;"
  settings.0.ssl:                         "" =&gt; "strict"
  settings.0.tls_1_2_only:                "" =&gt; "&lt;computed&gt;"
  settings.0.tls_1_3:                     "" =&gt; "on"
  settings.0.tls_client_auth:             "" =&gt; "&lt;computed&gt;"
  settings.0.true_client_ip_header:       "" =&gt; "&lt;computed&gt;"
  settings.0.waf:                         "" =&gt; "on"
  settings.0.webp:                        "" =&gt; "&lt;computed&gt;"
  settings.0.websockets:                  "" =&gt; "&lt;computed&gt;"
  zone_status:                            "" =&gt; "&lt;computed&gt;"
  zone_type:                              "" =&gt; "&lt;computed&gt;"
cloudflare_zone_settings_override.example-com-settings: Creation complete after 2s (ID: e2e6491340be87a3726f91fc4148b125)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.</code></pre>
            <p>Now we can try the same command as above, and see that it succeeds. Niiice, TLS 1.3!</p>
            <pre><code>$ curl -v --tlsv1.3 https://www.example.com 2&gt;&amp;1 | grep "SSL connection\|error"
* SSL connection using TLSv1.3 / AEAD-AES128-GCM-SHA256</code></pre>
            
    <div>
      <h3>Managing rate limits</h3>
      <a href="#managing-rate-limits">
        
      </a>
    </div>
    <p><i>Before proceeding, make sure that your account is enabled for Rate Limiting. If you’re on an Enterprise plan, you should ask your Customer Success Manager to do this; otherwise, you can subscribe to Rate Limiting within the Cloudflare Dashboard.</i></p><p>With our zone settings locked down, and our site starting to get some more attention, it's unfortunately begun attracting some of the less scrupulous characters on the internet. Our server access logs show attempts to brute force our login page at <code>https://www.example.com/login</code>. Let's see what we can do with Cloudflare's <a href="https://www.cloudflare.com/application-services/products/rate-limiting/">rate limiting product</a>) to put a stop to these efforts.</p>
    <div>
      <h4>1. Create a new branch and append the rate limiting settings</h4>
      <a href="#1-create-a-new-branch-and-append-the-rate-limiting-settings">
        
      </a>
    </div>
    <p>After creating a new branch we specify the rate limiting rule:</p>
            <pre><code>$ git checkout -b step4-ratelimit
Switched to a new branch 'step4-ratelimit'

$ cat &gt;&gt; cloudflare.cf &lt;&lt;'EOF'
resource "cloudflare_rate_limit" "login-limit" {
  zone = "${var.domain}"

  threshold = 5
  period = 60
  match {
    request {
      url_pattern = "${var.domain}/login"
      schemes = ["HTTP", "HTTPS"]
      methods = ["POST"]
    }
    response {
      statuses = [401, 403]
      origin_traffic = true
    }
  }
  action {
    mode = "simulate"
    timeout = 300
    response {
      content_type = "text/plain"
      body = "You have failed to login 5 times in a 60 second period and will be blocked from attempting to login again for the next 5 minutes."
    }
  }
  disabled = false
  description = "Block failed login attempts (5 in 1 min) for 5 minutes."
}
EOF</code></pre>
            <p>This rule is a bit more complex than the zone settings rule, so let's break it down:</p>
            <pre><code>00: resource "cloudflare_rate_limit" "login-limit" {
01:   zone = "${var.domain}"
02:
03:   threshold = 5
04:   period = 60</code></pre>
            <p>The threshold is an integer count of how many times an event (defined by the match block below) has to be detected in the period before the rule takes action. The period is measured in seconds, so the above rule says to take action if the match fires 5 times in 60 seconds.</p>
            <pre><code>05:   match {
06:     request {
07:       url_pattern = "${var.domain}/login"
08:       schemes = ["HTTP", "HTTPS"]
09:       methods = ["POST"]
10:     }
11:     response {
12:       statuses = [401, 403]
13:     }
14:   }</code></pre>
            <p>The match block tells the Cloudflare edge what to be on the lookout for, i.e., HTTP or HTTPS POST requests to <code>https://www.example.com/login</code>. We further restrict the match to HTTP <code>401/Unauthorized</code> or <code>403/Forbidden</code> response codes returned from the origin.</p>
            <pre><code>15:   action {
16:     mode = "simulate"
17:     timeout = 300
18:     response {
19:       content_type = "text/plain"
20:       body = "You have failed to login 5 times in a 60 second period and will be blocked from attempting to login again for the next 5 minutes."
21:     }
22:   }
23:   disabled = false
24:   description = "Block failed login attempts (5 in 1 min) for 5 minutes."
25: }</code></pre>
            <p>After matching traffic, we set the action for our edge to take. When testing, it's a good idea to set the mode to simulate and review logs before taking enforcement action (see below). The timeout field here indicates that we want to enforce this action for 300 seconds (5 minutes) and the response block indicates what should be sent back to the caller that tripped the rate limit.</p>
    <div>
      <h4>2. Preview and merge the changes</h4>
      <a href="#2-preview-and-merge-the-changes">
        
      </a>
    </div>
    <p>As usual, we take a look at the proposed plan before we apply any changes:</p>
            <pre><code>$ terraform plan
...
Terraform will perform the following actions:

  + cloudflare_rate_limit.login-limit
      id:                                     &lt;computed&gt;
      action.#:                               "1"
      action.0.mode:                          "simulate"
      action.0.response.#:                    "1"
      action.0.response.0.body:               "You have failed to login 5 times in a 60 second period and will be blocked from attempting to login again for the next 5 minutes."
      action.0.response.0.content_type:       "text/plain"
      action.0.timeout:                       "300"
      description:                            "Block failed login attempts (5 in 1 min) for 5 minutes."
      disabled:                               "false"
      match.#:                                "1"
      match.0.request.#:                      "1"
      match.0.request.0.methods.#:            "1"
      match.0.request.0.methods.1012961568:   "POST"
      match.0.request.0.schemes.#:            "2"
      match.0.request.0.schemes.2328579708:   "HTTP"
      match.0.request.0.schemes.2534674783:   "HTTPS"
      match.0.request.0.url_pattern:          "www.example.com/login"
      match.0.response.#:                     "1"
      match.0.response.0.origin_traffic:      "true"
      match.0.response.0.statuses.#:          "2"
      match.0.response.0.statuses.1057413486: "403"
      match.0.response.0.statuses.221297644:  "401"
      period:                                 "60"
      threshold:                              "5"
      zone:                                   "example.com"
      zone_id:                                &lt;computed&gt;


Plan: 1 to add, 0 to change, 0 to destroy.</code></pre>
            <p>The plan looks good so let's go ahead, merge it in, and apply it.</p>
            <pre><code>$ git add cloudflare.tf
$ git commit -m "Step 4 - Add rate limiting rule to protect /login."
[step4-ratelimit 0f7e499] Step 4 - Add rate limiting rule to protect /login.
 1 file changed, 28 insertions(+)

$ git checkout master
Switched to branch 'master'

$ git merge step4-ratelimit
Updating 321c2bd..0f7e499
Fast-forward
 cloudflare.tf | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

$ terraform apply --auto-approve
cloudflare_record.www: Refreshing state... (ID: c38d3103767284e7cd14d5dad3ab8668)
cloudflare_zone_settings_override.example-com-settings: Refreshing state... (ID: e2e6491340be87a3726f91fc4148b125)
cloudflare_rate_limit.login-limit: Creating...
  action.#:                               "" =&gt; "1"
  action.0.mode:                          "" =&gt; "simulate"
  action.0.response.#:                    "" =&gt; "1"
  action.0.response.0.body:               "" =&gt; "You have failed to login 5 times in a 60 second period and will be blocked from attempting to login again for the next 5 minutes."
  action.0.response.0.content_type:       "" =&gt; "text/plain"
  action.0.timeout:                       "" =&gt; "300"
  description:                            "" =&gt; "Block failed login attempts (5 in 1 min) for 5 minutes."
  disabled:                               "" =&gt; "false"
  match.#:                                "" =&gt; "1"
  match.0.request.#:                      "" =&gt; "1"
  match.0.request.0.methods.#:            "" =&gt; "1"
  match.0.request.0.methods.1012961568:   "" =&gt; "POST"
  match.0.request.0.schemes.#:            "" =&gt; "2"
  match.0.request.0.schemes.2328579708:   "" =&gt; "HTTP"
  match.0.request.0.schemes.2534674783:   "" =&gt; "HTTPS"
  match.0.request.0.url_pattern:          "" =&gt; "www.example.com/login"
  match.0.response.#:                     "" =&gt; "1"
  match.0.response.0.origin_traffic:      "" =&gt; "true"
  match.0.response.0.statuses.#:          "" =&gt; "2"
  match.0.response.0.statuses.1057413486: "" =&gt; "403"
  match.0.response.0.statuses.221297644:  "" =&gt; "401"
  period:                                 "" =&gt; "60"
  threshold:                              "" =&gt; "5"
  zone:                                   "" =&gt; "example.com"
  zone_id:                                "" =&gt; "&lt;computed&gt;"
cloudflare_rate_limit.login-limit: Creation complete after 1s (ID: 8d518c5d6e63406a9466d83cb8675bb6)

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.</code></pre>
            <p>Note that if you haven't purchased rate limiting yet, you will see the following error when attempting to apply the new rule:</p>
            <pre><code>Error: Error applying plan:

1 error(s) occurred:

* cloudflare_rate_limit.login-limit: 1 error(s) occurred:

* cloudflare_rate_limit.login-limit: error creating rate limit for zone: error from makeRequest: HTTP status 400: content "{\n  \"result\": null,\n  \"success\": false,\n  \"errors\": [\n    {\n      \"code\": 10021,\n      \"message\": \"ratelimit.api.not_entitled.account\"\n    }\n  ],\n  \"messages\": []\n}\n"</code></pre>
            
    <div>
      <h4>3. Update the rule to ban (not just simulate)</h4>
      <a href="#3-update-the-rule-to-ban-not-just-simulate">
        
      </a>
    </div>
    <p>After confirming that the rule is triggering as planned in logs (but not yet enforcing), it's time to switch from simulate to ban:</p>
            <pre><code>$ git checkout step4-ratelimit
$ sed -i.bak -e 's/simulate/ban/' cloudflare.tf

$ git diff
diff --git a/cloudflare.tf b/cloudflare.tf
index ed5157c..9f25a0c 100644
--- a/cloudflare.tf
+++ b/cloudflare.tf
@@ -42,7 +42,7 @@ resource "cloudflare_rate_limit" "login-limit" {
     }
   }
   action {
-    mode = "simulate"
+    mode = "ban"
     timeout = 300
     response {
       content_type = "text/plain"</code></pre>
            
            <pre><code>$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.

cloudflare_zone_settings_override.example-com-settings: Refreshing state... (ID: e2e6491340be87a3726f91fc4148b126)
cloudflare_rate_limit.login-limit: Refreshing state... (ID: 8d518c5d6e63406a9466d83cb8675bb6)
cloudflare_record.www: Refreshing state... (ID: c38d3103767284e7cd14d5dad3ab8669)

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  ~ cloudflare_rate_limit.login-limit
      action.0.mode: "simulate" =&gt; "ban"

Plan: 0 to add, 1 to change, 0 to destroy.</code></pre>
            
    <div>
      <h4>4. Merge and deploy the updated rule, then push config to GitHub</h4>
      <a href="#4-merge-and-deploy-the-updated-rule-then-push-config-to-github">
        
      </a>
    </div>
    
            <pre><code>$ git add cloudflare.tf

$ git commit -m "Step 4 - Update /login rate limit rule from 'simulate' to 'ban'."
[step4-ratelimit e1c38cf] Step 4 - Update /login rate limit rule from 'simulate' to 'ban'.
 1 file changed, 1 insertion(+), 1 deletion(-)

$ git checkout master &amp;&amp; git merge step4-ratelimit &amp;&amp; git push
Switched to branch 'master'
Updating 0f7e499..e1c38cf
Fast-forward
 cloudflare.tf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 361 bytes | 0 bytes/s, done.
Total 3 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To git@github.com:$GITHUB_USER/cf-config.git
   0f7e499..e1c38cf  master -&gt; master</code></pre>
            
            <pre><code>$ terraform apply --auto-approve
cloudflare_rate_limit.login-limit: Refreshing state... (ID: 8d518c5d6e63406a9466d83cb8675bb6)
cloudflare_record.www: Refreshing state... (ID: c38d3103767284e7cd14d5dad3ab8669)
cloudflare_zone_settings_override.example-com-settings: Refreshing state... (ID: e2e6491340be87a3726f91fc4148b126)
cloudflare_rate_limit.login-limit: Modifying... (ID: 8d518c5d6e63406a9466d83cb8675bb6)
  action.0.mode: "simulate" =&gt; "ban"
cloudflare_rate_limit.login-limit: Modifications complete after 0s (ID: 8d518c5d6e63406a9466d83cb8675bb6)

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.</code></pre>
            
    <div>
      <h4>5. Confirm the rule works as expected</h4>
      <a href="#5-confirm-the-rule-works-as-expected">
        
      </a>
    </div>
    <p>This step is optional, but it's a good way to demonstrate that the rule is working as expected (note the final <code>429</code> response):</p>
            <pre><code>$ for i in {1..6}; do curl -XPOST -d '{"username": "foo", "password": "bar"}' -vso /dev/null https://www.example.com/login 2&gt;&amp;1 | grep "&lt; HTTP"; sleep 1; done
&lt; HTTP/1.1 401 Unauthorized
&lt; HTTP/1.1 401 Unauthorized
&lt; HTTP/1.1 401 Unauthorized
&lt; HTTP/1.1 401 Unauthorized
&lt; HTTP/1.1 401 Unauthorized
&lt; HTTP/1.1 429 Too Many Requests</code></pre>
            
    <div>
      <h3>Wrapping up</h3>
      <a href="#wrapping-up">
        
      </a>
    </div>
    <p>That's it for today! Stay tuned next week for <a href="/getting-started-with-terraform-and-cloudflare-part-2/">part 2 of this post</a>, where we continue the tour through the following resources and techniques:</p><ul><li><p>Load Balancing Resource</p></li><li><p>Page Rules Resource</p></li><li><p>Reviewing and Rolling Back Changes</p></li><li><p>Importing Existing State and Configuration</p></li></ul><p></p> ]]></content:encoded>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Terraform]]></category>
            <category><![CDATA[HashiCorp]]></category>
            <category><![CDATA[Programming]]></category>
            <guid isPermaLink="false">5fWuZ4Wj15WUKG0kNZnWUk</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[A tour through Merkle Town, Cloudflare's Certificate Transparency dashboard]]></title>
            <link>https://blog.cloudflare.com/a-tour-through-merkle-town-cloudflares-ct-ecosystem-dashboard/</link>
            <pubDate>Sat, 24 Mar 2018 02:59:29 GMT</pubDate>
            <description><![CDATA[ The success of Certificate Transparency rests on the existence of a robust ecosystem of logs and log operators.  ]]></description>
            <content:encoded><![CDATA[ <p><i>For a quick primer on </i><a href="/introducing-certificate-transparency-and-nimbus"><i>Certificate Transparency</i></a><i>, please read my colleague Nick Sullivan’s post from earlier today. The discussion below expands on that post and details how Cloudflare monitors the health and performance of Certificate Transparency (CT) logs.</i></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1vH4aWBui9mA6DKcTeR4YA/39761d996b3838dc4b66aafce0c9b25e/merkle-town.png" />
            
            </figure><p>The success of Certificate Transparency rests on the existence of a robust ecosystem of logs and log operators. Without logs that CAs can depend on, it’s not practical for browsers to require that <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL certificates</a> have been logged to be trusted—as Chrome <a href="https://groups.google.com/a/chromium.org/forum/#!topic/ct-policy/wHILiYf31DE">plans to do</a> on April 30. With this deadline fast approaching and others browsers likely to follow suit, it’s critical that the CT ecosystem continues to strengthen and expand with new log operators.</p><p>As we <a href="/introducing-certificate-transparency-and-nimbus/">wrote about</a> earlier today, Cloudflare recently joined this group of <a href="https://github.com/chromium/ct-policy#qualified-logs">trusted log operators</a>, helping strengthen this critical ecosystem. Now, we’d like to take you on a quick guide through our new publicly accessible tool that tracks the health of all trusted logs. In addition to basic uptime and response times, <a href="https://ct.cloudflare.com/">Merkle Town</a> provides statistics on the type and frequency of certificates issued, the top issuers, and the inter-dependencies CAs have on existing logs and each other. Click here to jump right into our CT ecosystem dashboard, or continue reading for a quick overview of what we’ve built.</p>
    <div>
      <h2>Dashboard Overview</h2>
      <a href="#dashboard-overview">
        
      </a>
    </div>
    <p>The dashboard is divided into two pages: the list of monitored logs and analyses of certificates found while monitoring. The latter can be grouped into the following sections:</p><ul><li><p>Certificate Breakdown by Type</p></li><li><p>Root Certificate Authorities</p></li><li><p>Global Details</p></li><li><p>Legacy Algorithms</p></li><li><p>Issuance Per Day By Certificate Authority</p></li><li><p>Log Utilization by Large Certificate Authorities</p></li></ul>
    <div>
      <h3>Log List</h3>
      <a href="#log-list">
        
      </a>
    </div>
    <p>On this page we list all of the logs that we’re actively monitoring. The set is currently comprised of all logs trusted by Chrome, with one exception: WoSign has <a href="https://groups.google.com/a/chromium.org/forum/#!topic/ct-policy/UcCqlxuz_1c">recently been distrusted</a> and will be removed soon. We also plan to expand our list once Mozilla, Apple, and others (finally) codify their CT policies.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/1GTCbLzGoF22QFyZ1udbJj/0bee1e2ea6cc6b3dadeb391d83b9eb02/log-list.png" />
            
            </figure>
    <div>
      <h3>Monitoring Methodology</h3>
      <a href="#monitoring-methodology">
        
      </a>
    </div>
    <p>For each log listed, we fetch the current Signed Tree Head (STH) and set of trusted roots once per minute. New entries that we haven’t seen yet are crawled, and we periodically submit strictly-valid unexpired certificates or pre-certificates to each log (unless the log is sharded by year, in which case we submit a certificate expiring in that year regardless of expiration status).</p><p>All requests to a log count towards our estimate of its uptime and response time. A specific endpoint's uptime, e.g., <a href="https://tools.ietf.org/html/rfc6962#section-4.3">get-sth</a> or <a href="https://tools.ietf.org/html/rfc6962#section-4.6">get-entries</a>, is computed as the percentage of requests to that endpoint that succeed—return a 200 status code with a valid response—in a 90 day rolling window. An endpoint's response time is computed as the average amount of time it takes to fully receive and parse a response after sending the request (again over a 90 day rolling window). Putting these together, we can compute the log's uptime and response times by taking the fair average of the uptime and response times for all monitored endpoints.</p><p>Note that some parts of the monitor may enforce different timeouts or will retry in the event that a request fails, while others will not. For example, <code>get-roots</code> and <code>get-sth</code> will start retrying more often if there's a failure, but if <code>add-chain</code> fails that doesn't change when the next <code>add-chain</code> will get sent. This behavior means that downtime may be penalized unfairly relative to a more intuitive interpretation of “downtime”. Lastly, the response time of the get-entries endpoint is strongly correlated with the number of entries it returns, but this information is currently ignored by our monitor.</p>
    <div>
      <h3>Certificate Breakdown by Type</h3>
      <a href="#certificate-breakdown-by-type">
        
      </a>
    </div>
    <p>On this section of the dashboard we group all certificates found across CT logs we monitor into the following categories: Validation Level; Public Key Algorithm; Signature Algorithm; Entry Type; and Expired v. Current. Selecting one slice of a chart will filter the other charts by this selection, as well as the Root Certificate Authorities section below the pie charts.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/45obK1BTk6zdZRV7k5aCwZ/262a3892ad692265de67589b1242860d/ev-gif.gif" />
            
            </figure><p>In the example shown above, I start by clicking “Other” in the Validation Level chart to discard the 315 million DV certs found. Then, I click on “Extended” to show only EV certificates and “Current” in the Expired v. Current chart to filter out expired certificates. From here I hover over the Root Certificate Authorities horizontal bar chart to see the distribution of unexpired EVs across roots. Note that we don’t (yet) group roots by owner, e.g., GeoTrust is listed separately rather than part of DigiCert, who purchased the brand along with the rest of Symantec’s CA business.</p><p>EV was the first type of certificate that was <a href="https://github.com/chromium/ct-policy/blob/master/ct_policy.md">required to have been logged</a> in CT. Chrome enforced this starting in 2015 and any EV certificates that are not logged do not receive the semi-standardized treatment of showing the organization’s legal name and country.</p><p>Another interesting observation from Merkle Town, as observed the day this post was published, is that RSA represents 93% of all certificates in our database but only 91% of unexpired certificates. This data indicates increased adoption of <a href="/ecdsa-the-digital-signature-algorithm-of-a-better-internet/">elliptic curve cryptography</a>, a technology that uses smaller keys than RSA (at equivalent cryptographic strength), resulting in less load on the terminating server and fewer bytes sent over the wire during the TLS handshake.</p>
    <div>
      <h3>Root Certificate Authorities</h3>
      <a href="#root-certificate-authorities">
        
      </a>
    </div>
    <p>Here we break down certificate count based on the root to which it chains. The animation below has been filtered to show only current certificates, across all validation types. Note also that the roots displayed have not been grouped by owner.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/66hNPZ3bTZtXWzhB3pXi5m/4dbe773525d76709b4ea327f27fbb7c2/root-gif.gif" />
            
            </figure><p>As can be seen as I continuously drill into the “Other” category, there is a long tail of browser-trusted CAs with very few unexpired certificates. Certificate Transparency and policy enforcement does not discriminate based on issuer size: soon any certificate issued worldwide must be logged or risk not being trusted.</p>
    <div>
      <h3>Global Details</h3>
      <a href="#global-details">
        
      </a>
    </div>
    <p>This section is quite simple, but helps put into perspective the scale at which web PKI operates. As captured on the day this post was written, we’re observing 33,906 certificates issued and 28,955 expiring per hour.</p><p>Remarkably, roughly three-quarters of this issuance can be <a href="https://letsencrypt.org/stats/#daily-issuance">attributed to Let’s Encrypt</a>. Now that they <a href="https://community.letsencrypt.org/t/acme-v2-and-wildcard-certificate-support-is-live/55579">offer wildcard certificates</a>, it will be interesting to observe how this rate changes: wildcards expand the universe of users they can serve, but decreases the number of certificates required per domain.</p>
    <div>
      <h3>Legacy Algorithms</h3>
      <a href="#legacy-algorithms">
        
      </a>
    </div>
    <p>In the future we plan to offer the ability to drill down into categories to view specific certificates, especially those using deprecated algorithms. For now, you can see counts of still-valid certificates signed using deprecated algorithms such as RSA-MD2 (4), RSA-MD5 (22), and RSA-SHA1 (744,732).</p>
    <div>
      <h3>Issuance Per Day By Certificate Authority</h3>
      <a href="#issuance-per-day-by-certificate-authority">
        
      </a>
    </div>
    <p>Globally there are upwards of 1,000,000 certificates issued per day. As previously mentioned, Let’s Encrypt represents approximately 75-80% of this issuance—except for days when Cloudflare accelerates issuance through DigiCert. On these days, as shown below in the two rightmost-bars, Let’s Encrypt represents 70%.</p><p>Chrome’s upcoming "not secure" labeling of HTTP sites has been driving intense adoption of HTTPS using Cloudflare's <a href="https://www.cloudflare.com/ssl-for-saas-providers/">SSL for SaaS provider offering</a>. Our customers are moving tens of thousands of sites per day from HTTP to HTTPS using our custom hostnames API.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6vDFSsmdRVETZsmOqw3Att/16bd01e3516f94dbfbf92970bae81225/issuance-by-day.png" />
            
            </figure>
    <div>
      <h3>Log Utilization by Large Certificate Authorities</h3>
      <a href="#log-utilization-by-large-certificate-authorities">
        
      </a>
    </div>
    <p>As we <a href="/introducing-certificate-transparency-and-nimbus#lettingbrowsersknowthatcertificatesarelogged">explained earlier today</a>, the most popular way to let browsers that know that a SSL certificate has been logged to CT is by embedding SCTs in the certificate. This process takes place before the certificate has been signed and provided to the website operator, so it is critical that it be performed reliably and quickly.</p><p>The chart below shows that CAs typically obtain their SCTs from the same set of logs, operated by other CAs. In some cases, CAs will allow other CAs to log for free, while in other cases they may charge a modest sum to offset the cost of operating the log. Cloudflare has been working with CAs to help them streamline this process, by providing APIs that (in parallel) acquire SCTs in accordance with browsers’ CT policies.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3M9WKOeTgDUwLMqIaio23K/8e32fc0ac92cf192db5dba88c793408d/ca-interdependencies.png" />
            
            </figure>
    <div>
      <h2>Help spread the transparency</h2>
      <a href="#help-spread-the-transparency">
        
      </a>
    </div>
    <p>Merkle Town was built by Cloudflare Cryptography Team Engineer, Brendan McMillion. Want to work with Brendan, <a href="/author/nick-sullivan/">Nick Sullivan</a>, and the rest of the Cloudflare Crypto team? You're in luck as <a href="https://www.cloudflare.com/careers/jobs/?department=Engineering">they're hiring</a> full time Cryptography Engineers and interns in San Francisco and London. Apply today and help us further strengthen encryption on the web.</p><p>Additionally, as I said at the outset of this post, Certificate Transparency relies on a robust ecosystem of logs and log operators. CT improves the security of everyone using HTTPS, so if your organization has the resources to stand up a log, free to reach out to us at <a>ct-logs@cloudflare.com</a>. Drop us a line and we’d be happy to point you in the right direction.</p> ]]></content:encoded>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[Security]]></category>
            <category><![CDATA[Dashboard]]></category>
            <category><![CDATA[Certificate Authority]]></category>
            <category><![CDATA[Certificate Transparency]]></category>
            <guid isPermaLink="false">33ozLn8pBgiSgCOPSW07yk</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[Deprecating TLS 1.0 and 1.1 on api.cloudflare.com]]></title>
            <link>https://blog.cloudflare.com/deprecating-old-tls-versions-on-cloudflare-dashboard-and-api/</link>
            <pubDate>Mon, 12 Mar 2018 16:00:47 GMT</pubDate>
            <description><![CDATA[ On June 4, Cloudflare will end support for TLS 1.0 and 1.1 on api.cloudflare.com. The dashboard will shift from www.cloudflare.com/a to dash.cloudflare.com, requiring a browser with TLS 1.2 or higher. ]]></description>
            <content:encoded><![CDATA[ <p>On June 4, Cloudflare will be dropping support for TLS 1.0 and 1.1 on api.cloudflare.com. Additionally, the dashboard will be moved from <a href="http://www.cloudflare.com/a">www.cloudflare.com/a</a> to dash.cloudflare.com and will require a browser that supports TLS 1.2 or higher.</p><p>No changes will be made to customer traffic that is proxied through <a href="https://www.cloudflare.com/network/">our network</a>, though you may decide to enforce a minimum version for your own traffic. We will soon expose TLS analytics that indicate the percent of connections to your sites using TLS 1.0-1.3, and controls to set a specific minimum version. Currently, you may enforce version 1.2 or higher using the <a href="https://support.cloudflare.com/hc/en-us/articles/206029258-How-to-use-Cloudflare-s-Require-Modern-TLS-Feature">Require Modern TLS</a> setting.</p><p>Prior to June 4, API calls made with TLS 1.0 or 1.1 will have warning messages inserted into responses and dashboard users will see a banner encouraging you to upgrade your browser. Additional details on these changes, and a complete schedule of planned events can be found in the <a href="#detailedtimeline">timeline below</a>.</p>
    <div>
      <h3>Background</h3>
      <a href="#background">
        
      </a>
    </div>
    <p>Transport Layer Security (TLS) is the protocol used on the web today to encrypt HTTPS connections. Version 1.0 was standardized <a href="https://www.ietf.org/rfc/rfc2246.txt">almost 20 years ago</a> as the successor to <a href="https://tools.ietf.org/html/rfc6101">SSL 3.0</a>, but is universally considered insecure due to being vulnerable to attacks such as <a href="https://blog.qualys.com/ssllabs/2013/09/10/is-beast-still-a-threat">BEAST</a> and <a href="https://blog.qualys.com/ssllabs/2014/12/08/poodle-bites-tls">POODLE</a>.<a href="#fn1">[1]</a> Version 1.1 <a href="https://www.ietf.org/rfc/rfc4346.txt">followed in 2006</a> and mitigated BEAST, but adoption was minimal as some major browsers opted to make the <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=422232#c2">jump directly to TLS 1.2</a> (codified <a href="https://www.ietf.org/rfc/rfc5246.txt">in 2008</a>).</p><p>In addition to the documented vulnerabilities, standards bodies such as the Payment Cards Industry Security Standards Council (PCI SSC) and the National Institute of Standards and Technology (NIST) recommend disabling TLS 1.0 and 1.1. Specifically, <a href="https://blog.pcisecuritystandards.org/migrating-from-ssl-and-early-tls">PCI requires</a> that sites use a minimum of TLS 1.1, with TLS 1.2 recommended, and <a href="https://csrc.nist.gov/publications/detail/sp/800-52/rev-2/draft">NIST requires</a> at least TLS 1.2.</p><p>Fortunately, almost all (&gt;96%) the traffic we see on api.cloudflare.com is already using TLS 1.2 or greater, so most users will not need to make any changes. However, if you’re using one of the user agents or operating systems <a href="#problematicuseragents">listed below</a>, you may need to upgrade. To check which version your browser or API client is using, make a request to <a href="https://version.tls.fun">https://version.tls.fun</a>.</p>
    <div>
      <h3>Problematic user agents</h3>
      <a href="#problematic-user-agents">
        
      </a>
    </div>
    <p>Below are the user agents with the highest frequency of TLS 1.0 or 1.1 requests to api.cloudflare.com. If you recognize your API client in this list, please take steps to upgrade as soon as possible.</p>
    <div>
      <h5>curl running on outdated operating systems</h5>
      <a href="#curl-running-on-outdated-operating-systems">
        
      </a>
    </div>
    <p>Many developers use <a href="https://curl.haxx.se/">curl</a>, an excellent tool built by Daniel Stenberg, to make API calls to api.cloudflare.com. As is common with command-line tools, curl relies on the underlying crypto library that it is built against for SSL/TLS support, e.g., <a href="https://www.openssl.org/">OpenSSL</a>, <a href="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS">NSS</a>, etc.</p><p>Therefore, users running curl on operating systems with outdated crypto libraries are likely to encounter problems. TLS 1.2 support was <a href="https://github.com/openssl/openssl/blob/OpenSSL_1_0_1-stable/CHANGES">first added</a> to OpenSSL in v1.0.1, which was released in March 2012.</p>
    <div>
      <h5>Java 1.7 or earlier</h5>
      <a href="#java-1-7-or-earlier">
        
      </a>
    </div>
    <p>TLS 1.2 support was added to the JRE in <a href="http://www.oracle.com/technetwork/java/javase/7u131-relnotes-3338543.html">1.7.0_131-b12</a>, so API calls made using ancient versions of Java may fail.</p>
    <div>
      <h5>Internet Explorer 10 or earlier</h5>
      <a href="#internet-explorer-10-or-earlier">
        
      </a>
    </div>
    <p>Internet Explorer did not ship with TLS 1.2 enabled by default until v11 on Windows 7 and Windows Server 2008 R2. While these versions went End of Life (EOL) in January 2015, many still exist in the wild as observed on our edge.</p>
    <div>
      <h3>Detailed timeline</h3>
      <a href="#detailed-timeline">
        
      </a>
    </div>
    <p>While TLS 1.0 and 1.1 will be permanently disabled on June 4 (12 weeks from today), we will take steps before then to encourage users still running outdated browsers and operating systems to upgrade.<a href="#fn2">[2]</a></p><table><tr><td><p><b>Date</b></p></td><td><p><b>Days from Today</b></p></td><td><p><b>Event</b></p></td></tr><tr><td><p>2018/03/12</p></td><td><p>0</p></td><td><p>Publication date of this blog post.</p></td></tr><tr><td><p>2018/04/30</p></td><td><p>49</p></td><td><p>Cloudflare Dashboard available for use at <a href="http://web.archive.org/web/20181208134816/https://dash.cloudflare.com/">dash.cloudflare.com</a>. Some percent of users will automatically be redirected here.</p><p>API responses from api.cloudflare.com will include a deprecation warning in the <code>messages </code>field (when request is made using TLS 1.0 or 1.1).</p></td></tr><tr><td><p>2018/05/07</p></td><td><p>56</p></td><td><p>Twenty-four (24) hour brownout of TLS 1.0 and 1.1 on api.cloudflare.com.</p><p>All API responses for calls made using either of these versions will be returned as an HTTP 400/Bad Request with a detailed error message in the payload.</p></td></tr><tr><td><p>2018/06/04</p></td><td><p>84</p></td><td><p>TLS 1.0 and 1.1 permanently disabled on api.cloudflare.com.</p><p>Cloudflare Dashboard available exclusively at <a href="http://web.archive.org/web/20181208134816/https://dash.cloudflare.com/">dash.cloudflare.com</a> and will require TLS 1.2 or higher.</p></td></tr></table>
    <div>
      <h3>Deprecation message in API responses</h3>
      <a href="#deprecation-message-in-api-responses">
        
      </a>
    </div>
    <p>Beginning on April 30, API responses from api.cloudflare.com will include a deprecation warning in the messages' field when the request is made using TLS 1.0 or 1.1:</p>
            <pre><code>{
  "result": {
    "id":"2d4d028de3015345da9420df5514dad0",
    ...
  },
  "success": true,
  "errors": [],
  "messages": [
  {"code": "1911", "message": "This API call was made using TLS v1.0. TLS versions below 1.2 will no longer be supported as of June 4, 2018. You must upgrade your client before then or your API calls will fail. See https://blog.cloudflare.com/deprecating-old-tls-versions-on-cloudflare-dashboard-and-api/."}
  ],
  "result_info": {
    "page": 1,
    ...
  }
}</code></pre>
            
    <div>
      <h3>Twenty-four (24) hour brownout</h3>
      <a href="#twenty-four-24-hour-brownout">
        
      </a>
    </div>
    <p>On May 7, we will temporarily disable TLS 1.0 and 1.1 for a 24-hour "brownout" period. All calls made to api.cloudflare.com using TLS 1.0 or 1.1 will be immediately returned with an <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400">HTTP 400</a> (Bad Request) error and the requested action will not be processed. Additionally, the Cloudfare Dashboard will be inaccessible using TLS 1.0 or 1.1 during this time.</p><p>The purpose of this brownout is to provide a warning to Cloudflare customers still using legacy browsers or operating systems. If your API calls suddenly stop working on this date, take a look at your technical stack.</p>
    <div>
      <h3>Permanent disabling of TLS 1.0 and 1.1</h3>
      <a href="#permanent-disabling-of-tls-1-0-and-1-1">
        
      </a>
    </div>
    <p>On June 4, we will permanently disable TLS 1.0 and 1.1 on api.cloudflare.com. All users accessing the dashboard will also require TLS 1.2 or greater.</p><p>As a reminder, we will not be making any changes to <i>your</i> traffic. While we recommend that you also disable TLS 1.0 and 1.1 for security reasons, we prefer to let our customers decide what is best for them. Continue reading to see how we will provide you with the data and controls you need to make and enforce this decision.</p>
    <div>
      <h3>Upcoming controls and analytics</h3>
      <a href="#upcoming-controls-and-analytics">
        
      </a>
    </div>
    <p>Currently, you have the ability in the Crypto tab of the dashboard to disable TLS 1.0 and 1.1 together, but not 1.0 only:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/61PQSC3j3jCJSf2vDnRGkI/57fdcc2524221450a6f5c2036a7cce45/require-modern-tls.png" />
            
            </figure><p>Flip the toggle on, as shown in the above screenshot, and only TLS 1.2 or higher will be permitted on your site. Even though TLS 1.1 represents ~0.2% of traffic we see at the edge, some customers have indicated they wish to continue to support it but not TLS 1.0. To address this request, we will soon make the two changes detailed below.</p>
    <div>
      <h5>1. Replace Require Modern TLS control with Minimum TLS Version</h5>
      <a href="#1-replace-require-modern-tls-control-with-minimum-tls-version">
        
      </a>
    </div>
    <p>Replacing the "Require Modern TLS" card above will be the "Minimum TLS Version" card:</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3TGKFNa9iRSQ2dow5AFk2j/30aeab8ebd98fe231acd1afbd80a613a/min-tls-version.png" />
            
            </figure><p>Note that while the Require Modern TLS UI control will be removed as soon as the Minimum TLS Version card is deployed, the existing API endpoint will continue to function for 60 days from that date. We will enforce the greater of the two settings (if both are used).</p>
    <div>
      <h5>2. Update analytics to show percent usage by TLS version</h5>
      <a href="#2-update-analytics-to-show-percent-usage-by-tls-version">
        
      </a>
    </div>
    <p>The current "Traffic Served Over SSL" pie chart will be enhanced to show the percent of requests by TLS version with slices for HTTP, TLS 1.0, TLS 1.1, TLS 1.2, and TLS 1.3. Hovering over any section will pop up the number of requests in the selected time period.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/59LjU9F2gks9LDLvrrSbm0/cdef9605b7f6757ea1e5355a8de08025/tls-analytics.png" />
            
            </figure>
    <div>
      <h3>Additional communications</h3>
      <a href="#additional-communications">
        
      </a>
    </div>
    <p>We will update this blog post with any changes, as well as publish new posts as the changes outlined above take effect (including availability of the new TLS analytics for your domain and ability to enforce a specific minimum version).</p><p>Enterprise customers who are still making API calls with TLS 1.0 or 1.1 will receive an email from your Customer Success Manager with problematic user agents and frequencies.</p><p>Everyone else should contact <a href="https://support.cloudflare.com">Cloudflare Support</a> with any questions.</p><ol><li><p>There is a client-side mitigation to BEAST, but it's not universally deployed. Additionally, TLS POODLE only affects some implementations. <a href="#fnref1">↩︎</a></p></li><li><p>Operating systems matter as some browsers, such as IE and Edge, rely on the crypto stack that is bundled with the underlying OS for SSL/TLS support. <a href="#fnref2">↩︎</a></p></li></ol><p></p> ]]></content:encoded>
            <category><![CDATA[TLS]]></category>
            <category><![CDATA[API]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">2fArPumsZhPLe973lc8gu3</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
        <item>
            <title><![CDATA[HTTPS or bust: Chrome’s plan to label sites as "Not Secure"]]></title>
            <link>https://blog.cloudflare.com/https-or-bust-chromes-plan-to-label-sites-as-not-secure/</link>
            <pubDate>Wed, 14 Feb 2018 20:00:00 GMT</pubDate>
            <description><![CDATA[ Google just announced that beginning in July 2018, with the release of Chrome 68, web pages loaded without HTTPS will be marked as “not secure”.  More than half of web visitors will soon see this warning when visiting unencrypted HTTP sites. ]]></description>
            <content:encoded><![CDATA[ <p>Google <a href="https://security.googleblog.com/2018/02/a-secure-web-is-here-to-stay.html">just announced</a> that beginning in July 2018, with the release of Chrome 68, web pages loaded without HTTPS will be marked as “not secure”.</p><p>More than half of web visitors will soon see this warning when browsing unencrypted HTTP sites, according to data from Cloudflare’s edge that shows 56.62% of desktop requests originate from Chrome. Users presented with this warning will be less likely to interact with these sites or trust their content, so it’s imperative that site operators not yet using HTTPS have a plan to do so by July.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5V9DjMCaycXsrWiaHH6Ayx/d6a6ea538e1e0d4898e950fb097af486/chrome68.png" />
            
            </figure>
    <div>
      <h3>How did we get here (and why)?</h3>
      <a href="#how-did-we-get-here-and-why">
        
      </a>
    </div>
    <p>To those who have followed the Chrome team’s public statements, this announcement comes as no surprise. Google has been gearing up for this change since 2014, as Chrome boss Parisa Tabriz <a href="https://twitter.com/laparisa/status/961925743121977346">tweeted</a> and Chris Palmer <a href="https://groups.google.com/a/chromium.org/forum/#!topic/security-dev/DHQLv76QaEM%5B1-25%5D">memorialized</a> in a widely distributed email. While this step is an important and potentially jarring one for users, it’s by no means the last step that Google will take to influence website administrator behavior for the better.</p><p>But why are they making this change (now)? Google’s primary motivation for driving HTTPS adoption is simple: a safe browsing experience is good for business. Users that feel safe on the web spend more time viewing and interacting with ads and other services that Google gets paid to deliver. (To be clear: these motivations do not in any way diminish the outstanding work of the Chrome team, whose members are passionate about protecting users for a myriad of non-business reasons. We applaud their efforts in making the web a safer place and are excited to see other browsers follow their lead.)</p><p>Google must feel the time is right to make the change thanks to HTTPS page loads continuing to climb steadily and minimal fallout from their <a href="#importantmilestonestowardshttpsubiquityalongsidepercentofpageloadsusinghttps">previous, incremental steps</a>. Emily Schechter, the Chrome Security Product Manager who announced the change, <a href="https://twitter.com/emschec/status/961719363223957504">writes</a>: “we believe https usage will be high enough by july [2018] that this will be OK”. Currently, the ratio of user interaction with secure origins to non-secure sits at 69.7%; five months ago it was just 62.5% and thus it’s easy to imagine Chris Palmer’s <a href="https://groups.google.com/a/chromium.org/forum/#!topic/security-dev/DHQLv76QaEM%5B1-25%5D">suggested threshold of 75%</a> will have been met by July.</p><p>Such a change would have been far too disruptive just one year ago, but thanks to the efforts of Google and other participants in the webPKI ecosystem (including Cloudflare), a path has been paved towards 100% adoption. Today, HTTPS is <a href="https://istlsfastyet.com/#cdn-paas">fast</a>, simple to deploy, and cost-effective if not free—and there’s no longer an excuse for not using <a href="https://www.cloudflare.com/application-services/products/ssl/">SSL/TLS</a>. Even static sites need encryption to prevent malicious third-parties from <a href="https://www.wired.com/2014/10/verizons-perma-cookie/">tracking your users</a> or <a href="https://arstechnica.com/tech-policy/2014/09/why-comcasts-javascript-ad-injections-threaten-security-net-neutrality/">injecting ads</a> into your site.</p>
    <div>
      <h4>Important milestones towards HTTPS ubiquity, alongside percent of page loads using HTTPS</h4>
      <a href="#important-milestones-towards-https-ubiquity-alongside-percent-of-page-loads-using-https">
        
      </a>
    </div>
    <table>
    <tbody>
        <tr>
            <th>Date
            </th><th>Action
            </th><th>% HTTPS<sup>1</sup>
        </th></tr>
        <tr>
            <td>2H 2013</td>
            <td>NSA: Edward Snowden releases thousands of pages of classified documents, confirming that the NSA has been passively collecting plaintext communication. At the time, very few sites used HTTPS by default, including the traffic between Google's data centers, making it far easier for these communications to be monitored.</td>
            <td>~25%</td>
        </tr>
        <tr>
            <td>2014/08/06</td>
            <td>Google publishes a <a href="https://security.googleblog.com/2014/08/https-as-ranking-signal_6.html">blog post</a> disclosing that they're starting to use the availability of a site over HTTPS as a positive ranking signal for SEO purposes.</td>
            <td>31.7%</td>
        </tr>
        <tr>
            <td>2014/09/24</td>
            <td>Cloudflare <a href="https://blog.cloudflare.com/introducing-universal-ssl">announces</a> Universal SSL, which provides [free SSL certificates](https://www.cloudflare.com/application-services/products/ssl/) and SSL/TLS termination to the then-two million sites on our network.</td>
            <td>31.8%</td>
        </tr>
        <tr>
            <td>2014/12/12</td>
            <td>Google's Chris Palmer <a href="https://groups.google.com/a/chromium.org/forum/%23!topic/blink-dev/DHQLv76QaEM%255B1-25%255D">emails</a> blink-dev with "Proposal: Marking HTTP As Non-Secure". This original proposal has been memorialized <a href="https://www.chromium.org/Home/chromium-security/marking-http-as-non-secure">here</a>.</td>
            <td>32.3%</td>
        </tr>
        <tr>
            <td>2015/02/26</td>
            <td>Google's Joel Weinberger <a href="https://groups.google.com/a/chromium.org/forum/%23!msg/blink-dev/2LXKVWYkOus/gT-ZamfwAKsJ">emails</a> the blink-dev mailing list with an "Intent to deprecate" for certain features unless used with secure origins (i.e., HTTPS). Initially this list includes: device motion/orientation, EME, fullscreen, geolocation, and getUserMedia.</td>
            <td>33.7%</td>
        </tr>
        <tr>
            <td>2015/04/30</td>
            <td>Mozilla's Richard Barnes <a href="https://blog.mozilla.org/security/2015/04/30/deprecating-non-secure-http">publishes</a> "Deprecating Non-Secure HTTP", announcing Mozilla's intent to eventually  "phase out non-secure HTTP" from Firefox.</td>
            <td>35.4%</td>
        </tr>
        <tr>
            <td>2015/10/19</td>
            <td>ISRG's Josh Aas <a href="https://letsencrypt.org/2015/10/19/lets-encrypt-is-trusted.html">announces</a> that Let's Encrypt, a new free CA, is now trusted by all major browsers, thanks to a cross-sign from IdenTrust.</td>
            <td>37.9%</td>
        </tr>
        <tr>
            <td>2015/12/03</td>
            <td>Let's Encrypt <a href="https://letsencrypt.org/2015/12/03/entering-public-beta.html">officially launches</a> into public beta.</td>
            <td>39.5%</td>
        </tr>
        <tr>
            <td>2016/06/14</td>
            <td>Apple <a href="https://developer.apple.com/videos/play/wwdc2016/706">announces</a> at WWDC16 that, by the end of 2016, the App Store will require that applications be built with App Transport Security (ATS) in order to be accepted. ATS prohibits the use of plaintext HTTP and thus helps drive the adoption of HTTPS.</td>
            <td>45.0%</td>
        </tr>
        <tr>
            <td>2016/06/22</td>
            <td>Google's Adriana Porter Felt et al. present <a href="https://www.usenix.org/system/files/conference/soups2016/soups2016-paper-porter-felt.pdf">Rethinking Connection Security Indicators</a> at USENIX's Twelfth Symposium On Usable Privacy and Security. In this paper Adriana and team "select and propose three indicators", which have already been adopted by Chrome (including the "Not secure" label).</td>
            <td>45.1%</td>
        </tr>
        <tr>
            <td>2016/09/08</td>
            <td>Google's Emily Schechter publishes <a href="https://security.googleblog.com/2016/09/moving-towards-more-secure-web.html">Moving towards a more secure web</a>, in which she writes that "Beginning in January 2017 (Chrome 56), we'll mark HTTP pages that collect passwords or credit cards as non-secure, as part of a long-term plan to mark all HTTP sites as non-secure."
<img src="https://blog.cloudflare.com/content/images/2018/02/chrome56.png" />
<p>She also reiterates Google's plan to eventually "label all HTTP pages as non-secure, and change the HTTP security indicator to the red triangle that we use for broken HTTPS."</p>
<img src="https://blog.cloudflare.com/content/images/2018/02/chrome-eventual.png" />
</td>
<td>44.8%</td>
</tr>
<tr>
<td>2017/01/20</td>
<td>Mozilla: A <a href="https://blog.mozilla.org/security/2017/01/20/communicating-the-dangers-of-non-secure-http">post</a> on the Mozilla Security Blog titled Communicating the Dangers of Non-Secure HTTP informs users that in upcoming releases, Firefox will show an in-context message when a user clicks into a username or password field on a page that doesn't use HTTPS". Firefox's in-context warnings are even more prominent than those implemented by Chrome.
<img src="https://blog.cloudflare.com/content/images/2018/02/firefox-inline.png" />
</td>
<td>50.78%</td>
</tr>
        <tr>
            <td>2017/01/31</td>
            <td>Google: As announced in September of 2016, Chrome 56 begins marking pages as "Not secure" if they i) contain a password field or ii) if a user interacts with a credit card field.</td>
            <td>51.9%</td>
        </tr>
        <tr>
            <td>2017/03/30</td>
            <td>Cloudflare: To assist SaaS providers in driving HTTPS adoption for their customers' custom/vanity domains, Cloudflare announces our <a href="https://www.cloudflare.com/ssl-for-saas-providers/">SSL for SaaS Provider</a> offering. Historically, it has been difficult and time consuming for SaaS providers to obtain (and renew) SSL certificates on behalf of their end-users, and thus very few offered free SSL for all customers.</td>
            <td>55.1%</td>
        </tr>
        <tr>
            <td>2017/04/27</td>
            <td>Google's Emily Schecter <a href="https://blog.chromium.org/2017/04/next-steps-toward-more-connection.html">announces</a> that "Beginning in October 2017, Chrome will show the "Not secure" warning in two additional situations: when users enter data on an HTTP page, and on all HTTP pages visited in Incognito mode."
<img src="https://blog.cloudflare.com/content/images/2018/02/chrome62.png" />
</td>
            <td>56.3%</td>
        </tr>
        <tr>
            <td>2018/01/15</td>
            <td>Mozilla's Anne van Kesteren <a href="https://blog.mozilla.org/security/2018/01/15/secure-contexts-everywhere">publishes</a> a blog post "Secure Contexts Everywhere" in which he explains that "effective immediately, all new features that are web-exposed are to be restricted to secure contexts".</td>
            <td>69.9%</td>
        </tr>
        <tr>
            <td>2018/02/08</td>
            <td>Google's Emily Schecter <a href="https://security.googleblog.com/2018/02/a-secure-web-is-here-to-stay.html">writes</a> that "Beginning in July 2018 with the release of Chrome 68, Chrome will mark all HTTP sites as "not secure".
<img src="https://blog.cloudflare.com/content/images/2018/02/chrome68-1.png" />
</td>
            <td>69.7%</td>
        </tr>
    </tbody>
</table><p><sup>1</sup> % of pages loaded over HTTPS by Firefox, 14-day moving average. Source: Firefox Telemetry <a href="https://docs.telemetry.mozilla.org/datasets/other/ssl/reference.html">data</a> and <a href="https://letsencrypt.org/stats/">Let's Encrypt</a>. Google also publishes figures on Chrome: <a href="https://transparencyreport.google.com/https/overview.">https://transparencyreport.google.com/https/overview.</a></p>
    <div>
      <h3>What’s coming next? What should I expect after July 2018?</h3>
      <a href="#whats-coming-next-what-should-i-expect-after-july-2018">
        
      </a>
    </div>
    <p>The "lock" in the address bar was always about motivating sites to migrate to HTTPS, but along the way <a href="http://www.usablesecurity.org//emperor/emperor.pdf">studies</a> <a href="https://www.usenix.org/system/files/conference/soups2016/soups2016-paper-porter-felt.pdf">showed</a> that positive trust indicators don’t work. Google’s introduction of "Not secure" is one important step towards the ultimate goal of deprecating HTTP, but as mentioned earlier, will not be their last.</p><p>We expect Google’s assault on HTTP to continue throughout the year, culminating with an announcement that the lock will be removed entirely (and replaced by a negative indicator shown only when a site does not utilize HTTPS). Below is some additional detail on this expected next step, along with some additional predictions for the webPKI ecosystem.</p>
    <div>
      <h4>1. Google will announce the lock icon’s demise in 2018 and remove it in January 2019 with the release of Chrome 72</h4>
      <a href="#1-google-will-announce-the-lock-icons-demise-in-2018-and-remove-it-in-january-2019-with-the-release-of-chrome-72">
        
      </a>
    </div>
    <p>Chris Palmer’s <a href="https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/DHQLv76QaEM%5B1-25%5D">email to blink-dev</a> in 2014 included this "strawman proposal" for introducing negative indicators and phasing out the marking of secure origins entirely:</p><blockquote><p>Secure &gt; 65%: Non-secure origins marked as DubiousSecure &gt; 75%: Non-secure origins marked as Non-secureSecure &gt; 85%: Secure origins unmarked</p></blockquote><p>True to plan, Chrome 68 will go stable right around the time HTTPS page loads reach 75%. (Our initial forecast for this date, based on connections to our edge and telemetry data from Firefox, was 74.8%; however, we expect last week’s Chrome announcement to accelerate this ratio to &gt;75% before July 24.)</p><p>Looking forward, the <a href="https://www.chromium.org/developers/calendar">estimated stable dates</a> for future Chrome releases are as follows:</p><ul><li><p>Chrome 69 – September 4, 2018</p></li><li><p>Chrome 70 – October 16, 2018</p></li><li><p>Chrome 71 – December 4, 2018</p></li></ul><p>At approximately 6-7 weeks between stable releases, Chrome 72 should hit sometime in late January 2019. By this time, we expect HTTPS page loads to be &gt;85%, a high enough ratio where Google can be confident the change won’t be too disruptive. Given the significance of this UI change we expect they’ll announce it sometime in mid 2018.</p>
    <div>
      <h4>2. Firefox will soon announce their own schedule for marking insecure origins</h4>
      <a href="#2-firefox-will-soon-announce-their-own-schedule-for-marking-insecure-origins">
        
      </a>
    </div>
    <p>Google is not the only major browser taking steps to drive the web to HTTPS only.</p><p>Back in April 2015, the Mozilla team <a href="https://blog.mozilla.org/security/2015/04/30/deprecating-non-secure-http/">announced</a> their intent to (eventually) deprecate HTTP. Since then, Firefox has adopted <a href="https://blog.mozilla.org/security/2017/01/20/communicating-the-dangers-of-non-secure-http/">similar UI indications</a> to Chrome for pages with passwords, <a href="https://blog.mozilla.org/security/2018/01/15/secure-contexts-everywhere/">announced</a> that “all new features that are web-exposed are to be restricted to secure contexts”, and merged (default disabled) <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1310447">code</a> to mark sites loaded over HTTP as “not secure”.</p><p>Beginning in Firefox 59, this “not secure” labeling can be manually enabled (instructions shown below), but no date has officially been set by Mozilla for when this will turned on by default. We expect them to announce a date shortly.</p>
    <div>
      <h4>3. Microsoft and Apple will continue to lag Google and Mozilla, but will start to enact similar changes</h4>
      <a href="#3-microsoft-and-apple-will-continue-to-lag-google-and-mozilla-but-will-start-to-enact-similar-changes">
        
      </a>
    </div>
    <p>Historically, Microsoft and Apple have moved slower in adopting new browser security policies due in part to the fact they release (and update) their browsers far less frequently than Google and Mozilla.</p><p>However, Apple in the past shown shown leadership in driving HTTPS adoption, as can be seen by their <a href="https://developer.apple.com/videos/play/wwdc2016/706">WWDC2016 announcement</a> requiring iOS applications to use ATS and TLS 1.2. Our hope is that Microsoft and Apple follow Google and Mozilla’s lead as Edge, IE, and Safari collectively represent almost 20% of the desktop requests hitting Cloudflare’s edge.</p>
    <div>
      <h4>4. Browsers will start attempting connections over HTTPS before trying HTTP</h4>
      <a href="#4-browsers-will-start-attempting-connections-over-https-before-trying-http">
        
      </a>
    </div>
    <p>Analogous to how Apple <a href="https://www.ietf.org/mail-archive/web/v6ops/current/msg22455.html">prioritizes IPv6 over IPv4</a>, major browsers will start to try addresses entered without a scheme over HTTPS before falling back to HTTP. The Google Chrome team has <a href="https://twitter.com/emschec/status/961748992051720192">already indicated</a> they plan to do this, and we expect (hope!) they’ll announce a timeline for this change sometime in 2018.</p>
    <div>
      <h4>5. More CAs (including nascent ones) will follow Let’s Encrypt’s lead in issuing free certs using the ACME protocol</h4>
      <a href="#5-more-cas-including-nascent-ones-will-follow-lets-encrypts-lead-in-issuing-free-certs-using-the-acme-protocol">
        
      </a>
    </div>
    <p>One of the primary complaints from site operators as they react to Chrome and Firefox’s user-facing changes (with the potential to affect their traffic) is that “SSL certificates are expensive”. Even though Cloudflare began issuing free certificates for our reverse proxy users in late 2014 and Let’s Encrypt followed not too long after, there still aren’t many other easy, free options available.</p><p>We expect that additional CAs will begin to embrace the <a href="https://github.com/ietf-wg-acme/acme/blob/master/draft-ietf-acme-acme.md">ACME protocol</a> for validation and issuance, helping to harden the protocol and increase its adoption. We further expect that new, free-of-charge CAs will enter the market and at least one will be operated by a large, well-funded incumbent such as Google.</p>
    <div>
      <h4>6. The CA/B Forum will vote in 2018 to further reduce certificate lifetimes from 27 months to 18 months or less, encouraging more automation</h4>
      <a href="#6-the-ca-b-forum-will-vote-in-2018-to-further-reduce-certificate-lifetimes-from-27-months-to-18-months-or-less-encouraging-more-automation">
        
      </a>
    </div>
    <p>The CA/Browser Forum is a group of CAs and browsers that collaborate on (among other things) a document known as the "<a href="https://cabforum.org/baseline-requirements-documents/">Baseline Requirements</a>" or the "BRs". These BRs dictate the minimum requirements that CAs are to adhere to, and a <a href="https://cabforum.org/2017/03/17/ballot-193-825-day-certificate-lifetimes/">recent change</a> to them goes into affect March 1, 2018; as of that date, the maximum validity period for a certificate drops from 39 months to ~27 months (825 days).</p><p>The <a href="https://cabforum.org/pipermail/public/2017-January/009373.html">initial proposal</a>, by Ryan Sleevi of Google, was to reduce the lifetime to 12 months, but this was met with strong opposition by the CAs (outside of Let's Encrypt which already caps lifetimes at 3 months and DigiCert who supported 13 months). A compromise was reached and goes into affect shortly, but we expect this topic to come to a vote again for either 18 or 13 months. CAs will again likely oppose this cap (with a few exceptions for the more automated ones), but browsers and root trust store operators may force the change anyway as it strengthens user security.</p><p>As site operators manually replace their expiring 3 year certificates, our hope and expectation is that they see the <a href="https://www.cloudflare.com/application-services/solutions/certificate-lifecycle-management/">benefits and ease of automating the certificate lifecycle</a>, encouraging them to deploy HTTPS more broadly across their organizations.</p>
    <div>
      <h3>OK, I understand what’s going to happen, but how can I tell now if my site is going to show a warning in July?</h3>
      <a href="#ok-i-understand-whats-going-to-happen-but-how-can-i-tell-now-if-my-site-is-going-to-show-a-warning-in-july">
        
      </a>
    </div>
    <p>The simplest way to tell if your site will soon show a "Not secure" label is by viewing it in a current version of Chrome or Firefox. If you do not see a lock, your site will soon have a more ominous warning. To get a preview of this warning, you can try browsing your site with a development version of either of these browsers by following the instructions below.</p>
    <div>
      <h4>Chrome</h4>
      <a href="#chrome">
        
      </a>
    </div>
    <ul><li><p>Use Chrome 65 or later.</p><ul><li><p>The easiest way to do this is to install Chrome Canary, which runs bleeding edge builds. Alternatively, you can install the <a href="https://www.chromium.org/getting-involved/dev-channel">dev channel</a> alongside stable, but this can be confusing to launch as the applications look identical.</p></li></ul></li><li><p>Browse to chrome://flags/#enable-mark-http-as.</p></li><li><p>Change the setting from Default to Enabled and click the RELAUNCH NOW button.</p></li><li><p>Browse to a site that does not use HTTPS, such as neverssl.com.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3cOV0Q8QiU8jqO67Xup8Xx/f512efbc4cf0bdfe05421bd0cc8715a5/chrome-notsecure.png" />
            
            </figure>
    <div>
      <h4>Firefox</h4>
      <a href="#firefox">
        
      </a>
    </div>
    <p><i>Firefox has not announced a date yet when this change will go into effect, but you can preview what it will look like when they do.</i></p><ul><li><p>Use Firefox 59 or later.</p><ul><li><p>You will need to download <a href="https://www.mozilla.org/en-US/firefox/channel/desktop/">Firefox Nightly</a> to use this version.</p></li></ul></li><li><p>Enter "about:config" in the address bar.</p></li><li><p>Click "I accept the risk!" to view the advanced config.</p></li><li><p>Search for “security.insecure_connection” and flip all false values to true.</p></li><li><p>Browse to a site that does not use HTTPS, such as neverssl.com.</p></li></ul>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/3bPwidy9MV9bCyAVA9B2sx/aa889fece5a08cad5964376e34f14cc6/firefox-notsecure.png" />
            
            </figure>
    <div>
      <h3>What can I do to avoid this warning?</h3>
      <a href="#what-can-i-do-to-avoid-this-warning">
        
      </a>
    </div>
    <p>Quite simply, all you need to do to avoid this warning is protect your site with HTTPS using a valid SSL certificate. Cloudflare makes it <a href="https://www.cloudflare.com/ssl">incredibly simple</a> to do this.</p><p>If you sign up with us and point your nameservers to Cloudflare, we take care of the rest for free: validating your domain with one of our Certificate Authority partners, issuing a certificate that covers the apex of your domain and any subdomains (e.g., example.com and *.example.com), deploying that certificate to our 120+ data centers around the world for optimal performance, and renewing the certificate automatically when needed.</p><p>If you’re not able to sign up with us directly, for example you’re using a subdomain of a SaaS provider that has not yet deployed HTTPS for all users, you may want to suggest they look at our <a href="https://www.cloudflare.com/application-services/products/ssl-for-saas-providers/">SSL for SaaS Providers</a> offering.</p><p>Lastly, if you want to help others avoid these warnings, we're hiring Software Engineers and Product Managers on the Security Engineering team at Cloudflare. Check out our open positions <a href="https://www.cloudflare.com/careers/departments/">here</a> and come help us drive HTTPS adoption to 100%!</p> ]]></content:encoded>
            <category><![CDATA[HTTPS]]></category>
            <category><![CDATA[SSL]]></category>
            <category><![CDATA[Chrome]]></category>
            <category><![CDATA[Security]]></category>
            <guid isPermaLink="false">4iFdDq3WAVTVzSMyt4x6QO</guid>
            <dc:creator>Patrick R. Donahue</dc:creator>
        </item>
    </channel>
</rss>