Skip to content

🐛 support multiple registry token scopes - #2

Open
YusongXiao wants to merge 1 commit into
ret2shell:mainfrom
YusongXiao:fix/registry-token-scopes
Open

🐛 support multiple registry token scopes#2
YusongXiao wants to merge 1 commit into
ret2shell:mainfrom
YusongXiao:fix/registry-token-scopes

Conversation

@YusongXiao

Copy link
Copy Markdown

Summary

  • Accept repeated scope query parameters on /v2/token.
  • Validate and normalize every requested repository scope.
  • Include all requested scopes in the generated token access entries.
  • Keep existing single-scope token requests compatible.

Motivation

Docker may request source repository pull access together with target repository pull,push access when performing a cross-repository blob mount.

The token endpoint previously deserialized scope as a single optional string, causing repeated scope parameters to fail with 400 Bad Request.

Fixes #1

Testing

  • Manually verified a Docker push using cross-repository blob mounting.
  • docker build --target builder .
  • cargo test --release --target x86_64-unknown-linux-musl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Docker push fails when token requests contain multiple scopes

1 participant