Zone-level authenticated origin pulls
When you enable Authenticated Origin Pulls for a zone, all proxied traffic to your zone is authenticated at the origin web server.
Before you begin
Make sure your zone is using an SSL/TLS encryption mode of Full or higher.
1. Upload certificate to origin
First, upload a certificate to your origin.
To use a Cloudflare certificate (which uses a specific CA), download the .PEM file and upload it to your origin.
To use a custom certificate, follow the API instructions to upload a custom certificate to Cloudflare, but use the origin_tls_client_auth
endpoint. Then, upload the certificate to your origin.
2. Configure origin to accept client certs
With the certificate installed, set up your origin web server to accept client certificates. For this example, you would have saved the certificate For this example, you would have saved the your certificate to Apache example
/path/to/origin-pull-ca.pem
.NGINX example
/etc/nginx/certs/cloudflare.crt
.
3. Enable Authenticated Origin Pulls (globally)
Then, enable Authenticated Origin Pulls as an option for your Cloudflare zone.
To enable Authenticated Origin Pulls in the dashboard:
- Log in to your Cloudflare account and go to a specific domain.
- Go to SSL/TLS > Origin Server.
- For Authenticated Origin Pulls, switch the toggle to On.
PATCH
request with the value
parameter set to your desired setting ("on"
or "off"
). 4. Enable Authenticated Origin Pulls for zone
Finally, use the Cloudflare API to send a PUT
request to enable or disable zone-level authenticated origin pulls.