Potential caching issue affecting plugin downloads via plugins.traefik.io

Hello! I'm trying to use the JWT And OPA Access Management plugin on my traefik instance.

Using the following config:

experimental:
  plugins:
    jwt:
      moduleName: github.com/traefik-plugins/traefik-jwt-plugin
      version: v0.9.0

In the logs I get the following:

2024-11-21T14:10:57Z ERR github.com/traefik/traefik/v3/cmd/traefik/traefik.go:242 > Plugins are disabled because an error has occurred. error="unable to set up plugins environment: unable to download plugin github.com/traefik-plugins/traefik-jwt-plugin: error: 404: <!DOCTYPE html><html lang=\"en\"><head><meta charSet=\"utf-8\"/><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"/><title>404: This page could not be found</title>
...

It looks like there is a caching issue because I can reproduce the 404 with curl, but can download the plugin if I add a query string parameter to bypass the server side caching.

Output from curl is shown below (removed some response headers for clarity):

curl https://plugins.traefik.io/public/download/github.com/traefik-plugins/traefik-jwt-plugin/v0.9.0 -I
HTTP/2 404 
date: Fri, 22 Nov 2024 10:36:58 GMT
content-type: text/html; charset=utf-8
vary: Accept-Encoding
cache-control: max-age=3600
cf-cache-status: HIT
age: 157532
server: cloudflare
cf-ray: 8e68480ece131b83-DUB

With the query param:

curl https://plugins.traefik.io/public/download/github.com/traefik-plugins/traefik-jwt-plugin/v0.9.0?a=a -I
HTTP/2 200 
date: Fri, 22 Nov 2024 10:47:54 GMT
content-type: application/zip
cache-control: max-age=3600
cf-cache-status: MISS
last-modified: Fri, 22 Nov 2024 10:47:54 GMT
server: cloudflare
cf-ray: 8e68581509c4bdbd-DUB

Noticed the same issue on CF side. Cache is invalid and cannot download plugin.
You may run it via local mode to make sure it's valid -> GitHub - traefik/plugindemo: This repository includes an example plugin, for you to use as a reference for developing your own plugins

1 Like