You've already forked registry-auth
mirror of
https://github.com/alauda/registry-auth.git
synced 2026-10-25 01:19:23 +03:00
ClaimAccess fields had no `json:` tags, so the JWT's `access` array was marshalled with the Go field names — `Type`/`Name`/`Actions`. Distribution v2.8.1 happened to accept that (Go's encoding/json does a case-insensitive fallback), but distribution v3 uses go-jose v3's JSON fork which dropped that fallback. v3 parsed the access entries as empty and returned "insufficient scope" on blob HEAD/GET, even though registry-auth had signed a token covering pull,push. Tag the fields with the lowercase keys mandated by the Docker token spec (type/name/actions) and extend TestSign_EmitsX5cHeaderAndVerifies to assert the raw payload uses those keys, so this can't regress. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>