When I first started at Cloudflare over two years ago, one of the first things I was tasked with was to help evolve our partner platform to support the changes in our service and the expanding needs of our partners and customers. Cloudflare’s existing partner platform was released in 2010. It is a testament to those who built it, that it was, and still is, in use today—but it was also clear that the landscape had substantially changed.
Since the launch of the existing partner platform, we had built and expanded multi-user access, and launched many new products: Argo, Load Balancing, and Cloudflare Workers, to name a few. Retrofitting the existing offering was not practical. Cloudflare needed a new partner platform that could meet the needs of partners and their customers.
As the team started to develop a new solution, we needed to find a partner who could keep us on the right path. The number of hypotheticals were infinite and we needed a first customer to ground ourselves. Lo and behold, not long after I had begun putting pen to paper, we found the perfect partner for the new platform.
The IBM Partnership
IBM was looking for a partner to bring various edge services to market quickly, and our suite of capabilities was what they were looking for. If you are not familiar with our partnership with IBM, you can learn a bit more about it in our blog post and on the IBM Cloud Internet Services landing page. We signed the contract in November 2017, and we had to be ready to launch by IBM Think the following February. Given that IBM’s engineering team needed time to integrate with us, we were on a tight timeline to deliver.
A number of team members and I jumped on a plane and flew to Austin, Texas (Hook ‘em!) to work with IBM and determine the minimum viable product (MVP). Over kolaches (for the Czech readers at home: Klobásník), IBM and Cloudflare nailed down the MVP requirements. Briefly, they were as follows:
Over the next couple of months, many teams at Cloudflare came together to deliver this solution at breakneck speed. Given that the midpoint of this effort happened over the holiday season, I’m personally proud of our company not sacrificing employee’s time with their friends and families in order to deliver. Even when it feels like a sprint, it is still a marathon.
During this time, the engineering team we were working with at IBM felt like another team at Cloudflare. Their ability to move quickly, integrate, and validate our work was critical to the success of the project. At THINK in February 2018, we were able to announce the Beta of IBM CIS (Cloud Internet Services) powered by Cloudflare!
Following the initial release, we continued to add functionality to further enrich the IBM CIS offering, while behind the scenes we continued our work to redefine Cloudflare’s partner platform.
The New Partner Platform
Over the past year we have expanded the capabilities and completed the necessary work to enable more partners to be able to use what we initially built for the IBM partnership. Out of that comes our new partner platform we are announcing today. The new partner platform allows partners of Cloudflare to sell and provision Cloudflare for their customers in a scalable fashion.
Our new partner platform is the combination of two systems designed to fulfill specific needs:
1. Tenants: an abstraction on top of our existing accounts and users for easier management
2. Subscriptions: a new way of packaging and provisioning services
Tenants
An absolute necessity for partners is the ability to provision accounts for each of their customers. Normally the only way to get a Cloudflare account is to sign up on the dashboard. We needed a way for partners to be able to create end customer accounts at their discretion to support their specific onboarding needs. This also ensures proper separation of ownership between customers and allows end customers to access the Cloudflare dashboard directly.
With the introduction of tenants, our data model now looks like the following:
Cloudflare Resource Data Model
Tenants provide partners the ability to create and manage the accounts for their customers. Each account created is a separate container of resources (zones, workers, etc) for each of customer. Users can be invited to each account as necessary for self service management, while the partner retains control of the capabilities enabled for each account. How a partner manages those capabilities brings us to the second major system that makes up the new partner platform.
Subscriptions
While not as obvious as the need for account provisioning, the ability to package and provision services is critical to providing differentiated offerings for partners of Cloudflare. One drawback of our old partner platform was the difficulty in ensuring new products and services were available to those partners. As Cloudflare grew, it reached the point where new paid services could not be added into the existing partner platform.
With subscriptions, this is no longer the case. What started as just a way to provision services for IBM, has now grown into the standard of how all customer services are provisioned at Cloudflare. Whether you purchase services through IBM CIS or buy Cloudflare Workers in our dashboard, behind the scenes, Subscriptions is what ensures you get exactly the right services enabled.
Enough talk, let’s show things in action!
The Partner Platform in Action
The full details of using the new partner platform can be found in our Provisioning API docs, but here we provide a walkthrough of a typical use case.
Using the new partner platform involves 4 steps:
Provisioning Customer Accounts
Granting Customer Access
Enabling Services
Service Configuration
1) Provisioning Customer Accounts
When onboarding customers, you want each to have their own Cloudflare account. This ensures one customer can not affect any resources belonging to another. By making a `POST /accounts` request, you can create an account for an individual customer.
Request:
curl -X POST \
https://api.cloudflare.com/client/v4/accounts \
-H 'Content-Type: application/json' \
-H 'x-auth-email: <x-auth-email>' \
-H 'x-auth-key: <x-auth-key>' \
-d '{ "name": "Customer Account",
"type": "standard"
}'
Response:
{
"result": {
"id": "2bab6ace8c72ed3f09b9eca6db1396bb",
"name": "Customer Account",
"type": "standard",
"settings": {
"enforce_twofactor": false
}
},
"success": true,
"errors": [],
"messages": []
}
This new account is owned by the partner. It can be managed by API, or in the UI by the partner or any additional administrators that are invited.
2) Granting Customer Access
Now that the customer’s account is created, let’s give them access to it. This step uses existing APIs and if you have shared access to a Cloudflare account before, then you have already done this.
Request:
curl -X POST \
'https://api.cloudflare.com/client/v4/accounts/2bab6ace8c72ed3f09b9eca6db1396bb/members' \
-H 'Content-Type: application/json' \
-H 'x-auth-email: <x-auth-email>' \
-H 'x-auth-key: <x-auth-key>' \
-d '{ "email": "mycustomer@theircompany.com",
"roles": ["05784afa30c1afe1440e79d9351c7430"],
"status": "accepted"
}'
Response:
{
"result": {
"id": "47bd8083af8516a20c410090d2f53655",
"user": {
"id": "fccad3c46f26dc2d6ba47ad19f639707",
"first_name": null,
"last_name": null,
"email": "mycustomer@theircompany.com",
"two_factor_authentication_enabled": false
},
"status": "pending",
"roles": [
{
"id": "05784afa30c1afe1440e79d9351c7430",
"name": "Administrator",
"description": "Can access the full account, except for membership management and billing.",
"permissions": {
"organization": {
"read": true,
"edit": true
},
"zone": {
"read": true,
"edit": true
},
truncated...
}
}
]
},
"success": true,
"errors": [],
"messages": []
}
Alternatively, you can do this in the UI, from the Members section for the newly created account.
3) Enabling Services
Now the fun part! With the ability to provision subscriptions, you can enable paid services for your customers. Before we do that though, we will create a zone so we can attach a zone subscription to it.
Adding a zone as a partner is no different than adding a zone as a regular customer. It can also be done by the customer.
Request:
curl -X POST \
https://api.cloudflare.com/client/v4/zones \
-H 'Content-Type: application/json' \
-H 'x-auth-email: <x-auth-email>' \
-H 'x-auth-key: <x-auth-key>' \
-d '{ "name": "theircompany.com",
"account": { "id": "2bab6ace8c72ed3f09b9eca6db1396bb" }
}'
Response:
{
"result": {
"id": "cae181e41197e2eb875d9bcb9396abe7",
"name": "theircompany.com",
"status": "pending",
"paused": false,
"type": "full",
"development_mode": 0,
"name_servers": [
"lana.ns.cloudflare.com",
"lynn.ns.cloudflare.com"
],
"original_name_servers": null,
"original_registrar": "cloudflare, inc.",
"original_dnshost": null,
"modified_on": "2019-05-30T17:51:08.510558Z",
"created_on": "2019-05-30T17:51:08.510558Z",
"activated_on": null,
"meta": {
"step": 4,
"wildcard_proxiable": false,
"custom_certificate_quota": 0,
"page_rule_quota": 3,
"phishing_detected": false,
"multiple_railguns_allowed": false
},
"owner": {
"id": null,
"type": "user",
"email": null
},
"account": {
"id": "2bab6ace8c72ed3f09b9eca6db1396bb",
"name": "Customer Account"
},
"permissions": [
"#access:edit",
"#access:read",
...truncated
],
"plan": {
"id": "0feeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"name": "Free Website",
"price": 0,
"currency": "USD",
"frequency": "",
"is_subscribed": true,
"can_subscribe": false,
"legacy_id": "free",
"legacy_discount": false,
"externally_managed": false
}
},
"success": true,
"errors": [],
"messages": []
}
For this customer we will provision a Pro plan for the newly created zone. If you are not familiar with our zone plans, then you can read about them here. For this, we make a call to the subscriptions service.
Request:
curl -X POST \
https://api.cloudflare.com/client/v4/zones/cae181e41197e2eb875d9bcb9396abe7/subscription \
-H 'Content-Type: application/json' \
-H 'X-Auth-Email: <x-auth-email>' \
-H 'X-Auth-Key: <x-auth-key>' \
-d '{"rate_plan": {
"id": "PARTNERS_PRO"}
}'
Response:
{
"success": true,
"result": {
"id": "ff563a93e11c46e7b278be46f49cdd2f",
"product": {
"name": "partners_cloudflare_zones",
"period": "",
"billing": "",
"public_name": "CloudFlare Services",
"duration": 0
},
"rate_plan": {
"id": "partners_pro",
"public_name": "Partners Professional Plan",
"currency": "USD",
"scope": "zone",
"externally_managed": false,
"sets": [
"zone",
"partner"
],
"is_contract": true
},
"component_values": [
{
"name": "dedicated_certificates",
"value": 0,
"price": 0
},
{
"name": "dedicated_certificates_custom",
"value": 0,
"price": 0
},
{
"name": "page_rules",
"value": 20,
"default": 20,
"price": 0
},
{
"name": "zones",
"value": 1,
"default": 1,
"price": 0
}
],
"zone": {
"id": "cae181e41197e2eb875d9bcb9396abe7",
"name": "theircompany.com"
},
"frequency": "monthly",
"currency": "USD",
"app": {
"install_id": null
},
"entitled": true
},
"messages": null,
"api_version": "2.0.0"
}
Now that the customer is set up with an account, zone, and zone subscription, the only thing left is configuring the resources appropriately.
4) Service Configuration
Service configuration can be done by either you, the partner, or the end customer. Most commonly, DNS records need to be added, security settings verified and updated, and customizations made. These can all be done either through our Client v4 APIs or the Cloudflare Dashboard.
Once that is done, the customer is all set!
This is just the beginning
With our announcement today, partners can protect and accelerate their customer’s internet services with Cloudflare’s partner platform. We have battled tested the underlying systems over the last year and are excited to partner with others to help make a better internet. We are not done yet though. We will be continually investing in the tenant and subscription services to expand their capabilities and simplify usage.
Some of the latest partners using the new partner platform
If you are interested in partnering with Cloudflare, then reach out to partners@cloudflare.com. If building the future of how Cloudflare’s partners and customers use our service sounds interesting then take a look at our career page.
For more information, see the following resources:
Announcing the new Cloudflare Partner Platform (you are here)