mortensteenrasmussen / docker-registry-manifest-cleanup

Cleans up docker registry by removing untagged manifests from the registry
Apache License 2.0
146 stars 33 forks source link

Token-based authentication not work if service have space in name. #19

Open BigOHenry opened 5 years ago

BigOHenry commented 5 years ago

Token-based authentication not work if service have space in name. Example: service="Service name with spaces"

version: master

docker registry config:

auth:
  token:
  realm: ""
  service: "Docker registry"
  issuer: ""
  rootcertbundle: ""

Thank you

mortensteenrasmussen commented 5 years ago

Thanks for the report. I don't have the time to fix this right now, but it should be the way I parse the auth headers.

Note to self: Check line 68 - if the header has more spaces (due to service name containing space), the auth_header var should have [1] till last [#]:

            auth_header = r.headers["Www-Authenticate"].split(" ")[1]