
<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 09:11:29 GMT</lastBuildDate>
        <item>
            <title><![CDATA[R2 adds event notifications, support for migrations from Google Cloud Storage, and an infrequent access storage tier]]></title>
            <link>https://blog.cloudflare.com/r2-events-gcs-migration-infrequent-access/</link>
            <pubDate>Wed, 03 Apr 2024 13:30:00 GMT</pubDate>
            <description><![CDATA[ We’re excited to announce three new features for Cloudflare R2: event notifications, support for migrations from Google Cloud Storage, and an infrequent access storage tier ]]></description>
            <content:encoded><![CDATA[ <p></p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5Flc3qGmiXyzHl6OvpYwie/f574acf452142205171995e892627fb6/image3-1.png" />
            
            </figure><p>We’re excited to announce three new features for <a href="https://www.cloudflare.com/developer-platform/r2/">Cloudflare R2</a>, our zero <a href="https://www.cloudflare.com/learning/cloud/what-are-data-egress-fees/">egress fee</a> <a href="https://www.cloudflare.com/learning/cloud/what-is-object-storage/">object storage</a> platform:</p><ul><li><p><a href="#event-notifications-open-beta">Event Notifications</a>: Automatically trigger Workers and take action when data in your R2 bucket changes.</p></li><li><p><a href="#super-slurper-for-google-cloud-storage">Super Slurper for Google Cloud Storage</a>: Easily migrate data from Google Cloud Storage to Cloudflare R2.</p></li><li><p><a href="#infrequent-access-private-beta">Infrequent Access Private Beta</a>: Pay less to store data that isn’t frequently accessed. Now in private beta (<a href="https://forms.gle/hnwHFjaZktWyzmbd9">sign up now</a>).</p></li></ul>
    <div>
      <h2>Event Notifications Open Beta</h2>
      <a href="#event-notifications-open-beta">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/4v4otsf4CByl5P9mxtohmm/8a499739b8616fb70e3b9b1090817cb9/image1-1.png" />
            
            </figure><p>The lifecycle of data often doesn’t stop immediately after upload to an R2 bucket – event data may need to be transformed and loaded into a data warehouse, media files may need to go through a post-processing step, etc. We’re releasing event notifications for R2 in open beta to enable building applications and workflows driven by your changing data.</p><p>Event notifications work by sending messages to your <a href="https://developers.cloudflare.com/queues/">queue</a> each time there is a change to your data. These messages are then received by a <a href="https://developers.cloudflare.com/queues/get-started/#5-create-your-consumer-worker">consumer Worker</a> where you can then define any subsequent action that needs to be taken.</p><p>To get started enabling event notifications on your R2 bucket, you can run the following <a href="https://developers.cloudflare.com/workers/wrangler/">Wrangler</a> command (replacing bucket_name and queue_name with your bucket and queue names respectively):</p>
            <pre><code>wrangler r2 bucket notification create &lt;bucket_name&gt; --event-type object-create --queue &lt;queue_name&gt;</code></pre>
            <p>For more information on how to set up event notifications on your R2 buckets today and limitations during beta, please refer to the <a href="https://developers.cloudflare.com/r2/buckets/event-notifications/">documentation</a>.</p>
    <div>
      <h2>Super Slurper for Google Cloud Storage</h2>
      <a href="#super-slurper-for-google-cloud-storage">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6laBf0PdVhtHWnwoQDwd7V/b3ae6bfe81fbffaeb20589b642e5738a/image4-1.png" />
            
            </figure><p><a href="https://developers.cloudflare.com/r2/data-migration/super-slurper/">Super Slurper</a> can now migrate data from Google Cloud Storage (GCS) to <a href="https://developers.cloudflare.com/r2/">Cloudflare R2</a>. We released Super Slurper <a href="/r2-super-slurper-ga">last year</a> with the goal of making one-time comprehensive data migrations fast, reliable, and easy: there’s no need to spin up migration VMs and implement complicated retry logic. Since then, thousands of developers have used Super Slurper to migrate petabytes of data from AWS S3 to R2. Now Google Cloud Storage customers can migrate data to Cloudflare R2 to benefit from Cloudflare’s zero egress fees, whether you are permanently moving data to another provider or not.</p><p>To get started migrating data from GCS:</p><ol><li><p>From the Cloudflare dashboard, select <b>R2 &gt; Data Migration</b>.</p></li><li><p>Select <b>Migrate files</b>.</p></li><li><p>Select <b>Google Cloud Storage</b> for the source bucket provider.</p></li><li><p>Enter your bucket name and associated credentials and select <b>Next</b>.</p></li><li><p>Enter your R2 bucket name and associated credentials and select <b>Next</b>.</p></li><li><p>After you finish reviewing the details of your migration, select <b>Migrate files</b>.</p></li></ol><p>You can view the status of your migration job at any time on the dashboard. For more information on how to use Super Slurper, please refer to the documentation <a href="https://developers.cloudflare.com/r2/data-migration/super-slurper/">here</a>.</p>
    <div>
      <h2>Infrequent Access Private Beta</h2>
      <a href="#infrequent-access-private-beta">
        
      </a>
    </div>
    
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/5XdMiwOIf7GV8TRjOrto2y/1bc2a4eab754b529ff9c29a9d492ce12/image2-1.png" />
            
            </figure><p>We’re excited to introduce the private beta of our new Infrequent Access storage class. For use cases that involve data that isn’t frequently accessed (long tail user-generated content, logs, etc), Infrequent Access gives you the ability to pay less for storage while maintaining performance and durability.</p><p>Here’s an example of how you can upload an object to your R2 bucket with the new Infrequent Access storage class using <a href="https://developers.cloudflare.com/workers/">Workers</a>:</p>
            <pre><code># wrangler.toml
[[r2_buckets]]
binding = 'MY_BUCKET'
bucket_name = '&lt;YOUR_BUCKET_NAME&gt;'

# index.ts
export default {
   async fetch(request: Request, env: Env): Promise&lt;Response&gt; {
      if (request.method === "PUT") {
         await env.MY_BUCKET.put("myobject", request.body, storageClass: "InfrequentAccess");
         return new Response("Put object successfully!");
      }
      return new Response("Not a PUT!");
   }
}</code></pre>
            <p>In addition to uploading objects directly to Infrequent Access, you can define an <a href="https://developers.cloudflare.com/r2/buckets/object-lifecycles/">object lifecycle policy</a> to move data to Infrequent Access after a period of time goes by and you no longer need to access your data as often. In the future, we plan to automatically optimize storage classes for data so you can avoid manually creating rules and better adapt to changing data access patterns.</p><p>For data stored in the Infrequent Access storage class, the pricing components will be similar to <a href="https://developers.cloudflare.com/r2/pricing/">what you’re used to with R2</a>: storage, <a href="https://developers.cloudflare.com/r2/pricing/#class-a-operations">Class A operations</a> (writes, lists), <a href="https://developers.cloudflare.com/r2/pricing/#class-b-operations">Class B operations</a> (reads), and data retrieval (processing). Data retrieval is charged per GB when data in the Infrequent Access storage class is retrieved and is what allows us to provide storage at a lower price. It reflects the additional computational resources required to fetch data from underlying storage optimized for less frequent access. And when the time comes, and you do need to use your data, there are still no egress fees.</p>
<table>
<colgroup>
<col></col>
<col></col>
</colgroup>
<thead>
  <tr>
    <th><span>Component</span></th>
    <th><span>Price</span></th>
  </tr>
</thead>
<tbody>
  <tr>
    <td><span>Storage</span></td>
    <td><span>$0.01 / GB-month</span></td>
  </tr>
  <tr>
    <td><span>Class A Operations</span></td>
    <td><span>$9.00 / million requests</span></td>
  </tr>
  <tr>
    <td><span>Class B Operations</span></td>
    <td><span>$0.90 / million requests</span></td>
  </tr>
  <tr>
    <td><span>Data Retrieval (Processing)</span></td>
    <td><span>$0.01 / GB</span></td>
  </tr>
  <tr>
    <td><span>Egress (or Data Transfer)</span></td>
    <td><span>$0 - No Charge</span></td>
  </tr>
</tbody>
</table>
    <div>
      <h4>Are you interested in participating in the private beta for Infrequent Access?</h4>
      <a href="#are-you-interested-in-participating-in-the-private-beta-for-infrequent-access">
        
      </a>
    </div>
    <p><a href="https://forms.gle/hnwHFjaZktWyzmbd9">Join the private beta waitlist</a> to get access.</p>
    <div>
      <h3>Have any feedback?</h3>
      <a href="#have-any-feedback">
        
      </a>
    </div>
    <p>We would love to hear from you! To share your feedback about R2 and our data migration services, please join the <a href="https://discord.com/invite/cloudflaredev">Cloudflare Developer Discord</a>. If you're interested in learning more about R2, get started by visiting R2's <a href="https://developers.cloudflare.com/r2/">developer documentation</a> or see how much you could save with our <a href="https://r2-calculator.cloudflare.com/">pricing calculator</a>.</p> ]]></content:encoded>
            <category><![CDATA[Developer Week]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[undefined]]></category>
            <category><![CDATA[Product News]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <category><![CDATA[Connectivity Cloud]]></category>
            <guid isPermaLink="false">4cQAhEQJBDLDLNuvJq3IdC</guid>
            <dc:creator>Matt DeBoard</dc:creator>
            <dc:creator>Siddhant Sinha</dc:creator>
            <dc:creator>Mengqi Chen</dc:creator>
            <dc:creator>Erin Thames</dc:creator>
        </item>
        <item>
            <title><![CDATA[Bringing OAuth 2.0 to Wrangler]]></title>
            <link>https://blog.cloudflare.com/wrangler-oauth/</link>
            <pubDate>Thu, 23 Sep 2021 12:59:07 GMT</pubDate>
            <description><![CDATA[ In this blog, we will look into what the OAuth 2.0 protocol is, and how it can help improve the authorization process in the command-line interface tool Wrangler used to manage your Cloudflare Workers. ]]></description>
            <content:encoded><![CDATA[ <p>Over the course of this summer, I had the incredible opportunity to join the Workers Developer Productivity team and help improve the developer experience of Workers. Today, I’ll talk about my project to implement the OAuth 2.0 login protocol for <a href="https://github.com/cloudflare/wrangler">Wrangler</a>, the Workers command line interface (CLI).</p><p>Wrangler needs to be authorized in order to carry out its job. API tokens are one way to authorize Wrangler, but they do not provide the best user experience as the user needs to manually copy and paste their tokens. This is where the OAuth 2.0 protocol comes into play.</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6prT6vWuey4xFTsR91Z1ue/87ec6eae381905664e37e8991a7da7f5/image2-32.png" />
            
            </figure>
    <div>
      <h2>Wrangler login and OAuth 2.0</h2>
      <a href="#wrangler-login-and-oauth-2-0">
        
      </a>
    </div>
    <p>Previously, the <code>wrangler login</code> command used <a href="/improving-the-wrangler-startup-experience/">API tokens</a> to authenticate Wrangler. However, managing API tokens can sometimes be cumbersome, since you need to go to the Cloudflare dashboard to create or modify a token. By using OAuth 2.0, we can allow users to directly choose permissions or scopes from Wrangler. OAuth 2.0 helps simplify the login process while making it more secure.</p><p>OAuth 2.0 is an industry-standard protocol for allowing users to authorize applications without having to share a password. In order to understand this protocol, we need to define some terminology:</p><ul><li><p><b><b><b>Resource Owner:</b></b></b> an entity capable of granting access to a protected resource. This is the user.</p></li><li><p><b><b><b>Resource Server:</b></b></b> the server hosting the protected resource. This is the Cloudflare API.</p></li><li><p><b><b><b>Client:</b></b></b> an application making protected resource requests on behalf of the resource owner and with its authorization. This is Wrangler, making API calls on the behalf of the user.</p></li><li><p><b><b><b>Authorization Server:</b></b></b> The server issuing access tokens to the client after successfully authenticating the resource owner and obtaining authorization. This is our OAuth 2.0 service provider.</p></li></ul><p>The protocol has several flows, but they all share the same objective. The resource owner needs to explicitly grant permission to the client, which can then receive an access token from the authorization server. With this access token, the client is authorized to access protected resources stored on the resource server.</p>
    <div>
      <h3>Authorization Code Flow</h3>
      <a href="#authorization-code-flow">
        
      </a>
    </div>
    <p>Among the different types of flows that make up the OAuth 2.0 protocol, Wrangler implements the Authorization Code Flow with PKCE challenges. Let’s take a look at what this entails!</p>
            <figure>
            
            <img src="https://cf-assets.www.cloudflare.com/zkvhlag99gkb/6vlJMwWGD9MD4xuLYUBiLi/f4a044f5e8e8086ef605a2afa032ce58/image1-28.png" />
            
            </figure><p>When running <code>wrangler login</code>, the user is first prompted to log in to the Cloudflare dashboard. Once they are logged in, they are redirected to an authorization page, where they can decide to grant or deny authorization to Wrangler. If authorization is granted, Wrangler receives an authorization grant from the OAuth service provider. Once received, Wrangler exchanges the authorization grant for an access token and a refresh token. At this point, Wrangler stores both of these tokens on disk and uses the access token to make authorized API calls. Since the access token is short-lived, refresh tokens are used to update an expired access token. Throughout this flow, Wrangler and the OAuth service provider also use additional measures to verify the identity of each other, as later described in the Security section of this blog.</p><div></div>
<p></p>
    <div>
      <h3>Use what you need, only when you need it</h3>
      <a href="#use-what-you-need-only-when-you-need-it">
        
      </a>
    </div>
    <p>In addition to providing a smoother developer experience, the new <code>wrangler login</code> also allows a user to specify which scopes they need. For example, if you would like to have an OAuth token with just account and user read permissions, you can do so by running:</p>
            <pre><code>wrangler login --scopes account:read user:read</code></pre>
            <p>For more information about the currently available scopes, you can run <code>wrangler login --scopes-list</code> or visit the Wrangler login <a href="https://developers.cloudflare.com/workers/cli-wrangler/commands#login">documentation</a>.</p>
    <div>
      <h3>Revoke access at any time</h3>
      <a href="#revoke-access-at-any-time">
        
      </a>
    </div>
    <p>The OAuth 2.0 protocol also defines a flow to revoke authorization from Wrangler. In this workflow, a user can deny Wrangler access to protected resources by simply using the command <code>wrangler logout</code>. This command will make a request to the OAuth 2.0 service provider and invalidate the refresh token, which will automatically invalidate the associated access token.</p>
    <div>
      <h2>Security</h2>
      <a href="#security">
        
      </a>
    </div>
    <p>The OAuth integration also brings improved security by using Cross-Site Request Forgery (CSRF) states, Proof Key for Code Exchange (PKCE) challenges, and short-lived access tokens.</p><p>Throughout the first part of the <code>wrangler login</code> flow, Wrangler needs to request an authorization grant. In order to avoid the possibility of a forged response, Wrangler includes a CSRF state in the parameters of the authorization code request. The CSRF state is a unique randomly generated value, which is used to confirm the response received from the OAuth service provider. In addition to the CSRF state, Wrangler will also include a PKCE <code>code_challenge</code>. This <code>code_challenge</code> will be used by the OAuth service provider to verify that Wrangler is the same application when exchanging the authorization grant for an access token. The PKCE challenge is a protection against stolen authorization grants. As the OAuth service provider will reject access token requests if it cannot verify the PKCE <code>code_challenge</code>.</p><p>The final way the new OAuth workflow improves security is by making access tokens short-lived. In this sense, if an access token gets stolen, how can we notify the resource server that the access token should not be trusted? Well, we can’t really. So, there are three options: 1) wait until the expiration time; 2) use the refresh token to get a new access token, which invalidates the previous access token; or 3) invalidate both refresh and access tokens. This provides us with three ways to protect resources from bad actors with stolen access tokens.</p>
    <div>
      <h2>What’s next</h2>
      <a href="#whats-next">
        
      </a>
    </div>
    <p>OAuth 2.0 integration is now available in the 1.19.3 version release of <a href="https://github.com/cloudflare/wrangler">Wrangler</a>. Try it out and let us know your experience. If you prefer the API tokens or global API keys, no worries. You can still access them using the <a href="https://developers.cloudflare.com/workers/cli-wrangler/commands#config"><code>wrangler config</code></a> command.</p><p>I would also like to thank the Workers team and other Cloudflare teams for the incredible internship experience. This opportunity gave me a glimpse into what industry software development looks like, and the opportunity to dive deep into a meaningful project. I enjoyed the responsiveness and teamwork during the internship, making this a great summer.</p> ]]></content:encoded>
            <category><![CDATA[Wrangler]]></category>
            <category><![CDATA[Cloudflare Workers]]></category>
            <category><![CDATA[Serverless]]></category>
            <category><![CDATA[Developers]]></category>
            <category><![CDATA[Developer Platform]]></category>
            <guid isPermaLink="false">1o4lGmSFlwdyOAv24Hl4ua</guid>
            <dc:creator>Mengqi Chen</dc:creator>
        </item>
    </channel>
</rss>