Skip to content

Failed to parse Www-Authenticate if auth-param has empty value #6376

@shizhMSFT

Description

@shizhMSFT

Description

In remotes/docker/auth/parse.go#L136-L139, empty value of auth-param is treated as error and returned. Rest params are not parsed. However, empty values are valid as defined by

Steps to reproduce the issue

No response

Describe the results you received and expected

Given the Www-Authenticate challenge below

Bearer realm="https://auth.example.io/token",empty="",service="registry.example.io",scope="repository:library/hello-world:pull,push"

Actual:

  • realm: https://auth.example.io/token

Expected:

  • realm: https://auth.example.io/token
  • empty: empty string
  • service: registry.example.io
  • scope: repository:library/hello-world:pull,push

What version of containerd are you using?

v1.6.0-beta.3

Any other relevant information

No response

Show configuration if it is related to CRI plugin.

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions