Cloudflare is expanding Cloudflare for SaaS with new controls aimed at providers who need to protect not only their own zones but also the applications of their customers. The additions span tiered WAF deployment for Enterprise accounts, a Free tier of the SaaS product, a significant price cut on custom hostnames, and a set of WAF rules extended to Free plan customers.

Segmented protections for Enterprise SaaS providers

SaaS providers serve widely varied customer bases, and the platform's existing behavior has been that security rules and settings configured on the SaaS zone are automatically inherited by customers. That single-tier model does not accommodate customers with different protection requirements.

WAF for SaaS lets Enterprise providers create distinct sets of WAF rules and offer them to customers as separate security packages. The result is that end users receive different levels of protection according to their needs. The toolset draws on Cloudflare's existing WAF portfolio, including managed rules that provide advanced zero-day vulnerability protections and OWASP rules that block popular attack techniques.

There is no cap on the number of rulesets a provider can create — configurations can range from a few shared buckets to a dedicated ruleset per customer.

Free tier and lower hostname pricing

Cloudflare for SaaS is now available as a Free tier on the Free, Pro, and Biz plans, granting 100 custom hostnames at no charge so developers can provision and test across their account. The 100 hostnames are allocated automatically, to both new and existing Cloudflare for SaaS customers.

Separately, the custom hostname price drops from $2 to $0.10 a month, lowering the cost of onboarding and scaling an application. Existing Cloudflare for SaaS customers will see the new pricing on their next billing cycle.

The product originally launched as a TLS certificate issuance tool for SaaS providers and has since extended into protecting those providers' own customers. In line with that intent, a new selection of WAF rules is being extended to Free customers, so all customers can secure both their applications and their customers' applications.

Configuring rules per customer

WAF for SaaS supports custom hostnames that name a specific domain, such as example.com, as well as wildcards like *.example.com, which routes subdomains to the SaaS service. Both types can be used, giving providers flexibility over the scope of protection. Setup follows three steps: define a custom hostname, attach custom metadata to it, and use that metadata to trigger security products.

Security for SaaS providers

Attaching metadata to a hostname

The second step associates the custom hostname with the ruleset intended for it. This uses Custom Metadata, which binds a JSON blob to a custom hostname through the API. There is no predetermined schema — field names and structure are fully customizable.

The example below associates a JSON blob with two fields, customer_id and security_level, to every request for *.example.com and example.com. The security_level tag is expected to take three values — low, medium, or high — each triggering a different set of rules.

curl -X POST "https://api.cloudflare.com/client/v4/zones/{zone:id}/custom_hostnames" \
     -H "X-Auth-Email: {email}" -H "X-Auth-Key: {key}"\
     -H "Content-Type: application/json" \
     --data '{

"Hostname":{“example.com”},
"Ssl":{wildcard: true}
}'

Triggering products from tags

Custom metadata fields such as security_level are exposed in the Ruleset Engine where the WAF runs. Rules can be built in the dashboard or via the API and can drive configurations of WAF, Firewall Rules, Advanced Rate Limiting, and Transform Rules. In the example, a rate limiting rule fires on traffic where security_level is set to low.

curl -sXPATCH "https://api.cloudflare.com/client/v4/zones/{zone:id}/custom_hostnames/{custom_hostname:id}"\
    -H "X-Auth-Email: {email}" -H "X-Auth-Key: {key}"\
    -H "Content-Type: application/json"\
    -d '{
"Custom_metadata":{
"customer_id":"12345",
“security_level”: “low”
}
}'