{"id":29986251,"url":"https://github.com/ftcunion/cloudflare-aop-scripts","last_synced_at":"2026-04-18T17:32:57.478Z","repository":{"id":305136482,"uuid":"1021489133","full_name":"ftcunion/cloudflare-aop-scripts","owner":"ftcunion","description":"Minimal bash scripts to work with custom certificates for Cloudflare's authenticated origin pulls feature","archived":false,"fork":false,"pushed_at":"2025-07-18T10:46:27.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-04T22:52:15.346Z","etag":null,"topics":["authenticated-origin-pulls","bash-script","cloudflare","cloudflare-api","mutual-tls"],"latest_commit_sha":null,"homepage":"https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ftcunion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T13:25:05.000Z","updated_at":"2025-07-19T19:32:22.000Z","dependencies_parsed_at":"2025-07-18T14:48:40.491Z","dependency_job_id":"438e342a-f2ec-4752-a0a0-500804fbcff7","html_url":"https://github.com/ftcunion/cloudflare-aop-scripts","commit_stats":null,"previous_names":["ftcunion/cloudflare-aop-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ftcunion/cloudflare-aop-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftcunion%2Fcloudflare-aop-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftcunion%2Fcloudflare-aop-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftcunion%2Fcloudflare-aop-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftcunion%2Fcloudflare-aop-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftcunion","download_url":"https://codeload.github.com/ftcunion/cloudflare-aop-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftcunion%2Fcloudflare-aop-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31977964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authenticated-origin-pulls","bash-script","cloudflare","cloudflare-api","mutual-tls"],"created_at":"2025-08-04T22:02:16.531Z","updated_at":"2026-04-18T17:32:57.461Z","avatar_url":"https://github.com/ftcunion.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloudflare Authenticated Origin Pulls Bash Scripts\n\nThis repository contains several minimal bash scripts which help you follow the instructions provided by Cloudflare to set up authenticated origin pulls:\n\n- [Zone level instructions](https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up/zone-level/): scripts are in the `zone` directory.\n- [Hostname level instructions](https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up/per-hostname/): scripts are in the `hostname` directory.\n\nTo generate the certificates, you can use the `generate_certs.sh` script in the root directory. This script follows the instructions in the \"Before you begin\" section of the Cloudflare documentation.\n\nIn each directory, there are scripts to:\n\n- `upload_cert.sh`: Upload the generated certificate and private key to Cloudflare. It assumes the paths from the `generate_certs.sh` script.\n- `enable_cert.sh`: Enable the uploaded certificate for authenticated origin pulls.\n- `list_cert.sh`: List the certificates uploaded for the zone or hostname.\n- `status_cert.sh`: Check the status of a certificate.\n- `delete_cert.sh`: Delete a certificate.\n\nOf these, only the first two are required to set up authenticated origin pulls. The others are for managing the certificates and debugging. Each script just calls curl with the appropriate parameters.\n\n## Dependencies\n\nEvery script except for `generate_certs.sh` requires `curl` (which is not preinstalled on Debian/Ubuntu). The `generate_certs.sh` script requires `openssl`.\n\n## Usage\n\nTo use the scripts, you need to create a `CONFIG` file in the root directory with your Cloudflare account details:\n\n```bash\nMYAUTHEMAIL=\"\"    # Email for Cloudflare account\nMYAUTHKEY=\"\"      # Global API Key for Cloudflare account, https://dash.cloudflare.com/profile/api-tokens\nZONEID=\"\"         # Zone ID for domain, available in overview tab of Cloudflare dashboard\nHOSTNAME=\"\"       # Hostname for hostname-level scripts\n```\n\nYou can also start by copying the `CONFIG.template` file to `CONFIG` (i.e., `cp CONFIG.template CONFIG`) and filling in your details. You can then run the scripts from the root of this repository. For example, if you were following the instructions to set up a zone-level certificate, you would run:\n\n```bash\n./generate_certs.sh         # Step 0\n./zone/upload_cert.sh | jq  # Step 1\n./zone/enable_cert.sh | jq  # Step 4\n```\n\nPiping to `jq` is optional. It just makes the json output look nice.\n\nAfter running those three commands, you just have to switch on the SSL/TLS \u003e Origin Server \u003e Authenticated Origin Pulls option in the Cloudflare dashboard (step 3) and enforce the validation check on your origin server using the `rootca.crt` file generated by `generate_certs.sh` (steps 2 and 5).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftcunion%2Fcloudflare-aop-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftcunion%2Fcloudflare-aop-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftcunion%2Fcloudflare-aop-scripts/lists"}