A worker that can be used for doing basic CRL checks. It assumes that the request has gone through Access MTLS.
This worker fetches a CRL from a given endpoint and uses it to check if a certificate used with Cloudflare Access Mutual TLS is valid.
There are a few setup steps needed to use this worker
Create or reuse a Cloudflare Workers KV namespace and put the ID in your wrangler.toml
file on the kv-namespaces
line.
$ wrangler kv:namespace create CRL_NAMESPACE
wrangler.toml
file and replace the stub.Set the URL of your CRL
CRL_URL
variable in your wrangler.toml
file to your CRL URL.index.js
with the location of your CRL. Remove the vars
line in the wrangler.toml
file.Make sure you have set the needed configuration and then run the following.
wrangler publish
By default we rely on the next update field in the CRL to know when to refresh the CRL. However you can force a refresh of the CRL by adding a force-crl-refresh: 1
header to the your request