[ZBX-18862] Zabbix CDN blocking PycURL user-agent at cloudflare - Breaks automated testing Created: 2021 Jan 12  Updated: 2024 Apr 10  Resolved: 2021 Sep 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Packages (C)
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Tim White Assignee: Gatis Rumbens
Resolution: Fixed Votes: 0
Labels: packages
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team D
Sprint: Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021), Sprint 75 (Apr 2021), Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021), Sprint 80 (Sep 2021)

 Description   

Attempts to download (or even just a HEAD request) a file from cdn.zabbix.com with an automated test tool that uses PycURL in the user-agent fails.

https://github.com/saltstack/salt-winrepo-ng/pull/1773

The Saltstack salt-winrepo-ng repository uses a Travis test script that checks that referenced URLs are valid. This worked fine using the older https://www.zabbix.com/downloads/ urls, but fails with the cdn.zabbix.com URLs. The travis script doesn't actually download the whole file, but uses a RANGE (c.setopt(curl.RANGE, "0-2047")) to check that the file exists and is an actual binary file as expected (checking the initial bytes downloaded).

We are happy to set a custom user-agent that identifies the project (salt-winrepo-ng) and that it's a CI Travis script making the requests if that's desirable. Spoofing another browsers user-agent would allow the requests through, but we'd like to come to an understanding with Zabbix before we do that.

Steps to reproduce:

  1. curl -A "PycURL" -v https://cdn.zabbix.com/zabbix/binaries/stable/5.2/5.2.0/zabbix_agent-5.2.0-windows-amd64-openssl.msi

Result:
HTTP 403 error code, HTML body of "error code: 1010" (which refers to https://support.cloudflare.com/hc/en-us/articles/360029779472-Troubleshooting-Cloudflare-1XXX-errors#error1010)

Expected:
HTTP 200 code with the Zabbix Agent MSI downloaded.



 Comments   
Comment by Gatis Rumbens [ 2021 Jan 12 ]

Can't reproduce! I have tried from several locations (regions) and got 200 or 304 HTTP status code.

Don't use verbose download directly in to the shell on binary files! Use -O or --output in curl command

Like

# curl -A "PycURL" -O https://cdn.zabbix.com/zabbix/binaries/stable/5.2/5.2.0/zabbix_agent-5.2.0-windows-amd64-openssl.msi
# curl -A "PycURL" https://cdn.zabbix.com/zabbix/binaries/stable/5.2/5.2.0/zabbix_agent-5.2.0-windows-amd64-openssl.msi --output /tmp/zabbix_agent-5.2.0-windows-amd64-openssl.msi
Comment by Gatis Rumbens [ 2021 Jan 12 ]

I think i found the problem on CDN side....it's related with access agent integrity check rules. This is not proxy endpoint problem. Will be fixed ASAP

Comment by Gatis Rumbens [ 2021 Jan 12 ]

Should be fixed now

Comment by Tim White [ 2021 Jan 13 ]

Thanks Gatis, that appears to be working correctly now.

Generated at Fri May 16 09:02:36 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.