Joxit / docker-registry-ui

The simplest and most complete UI for your private registry
https://joxit.dev/docker-registry-ui/
GNU Affero General Public License v3.0
2.6k stars 323 forks source link

docs: Improve `examples/read-only-auth` #371

Closed silverwind closed 7 months ago

silverwind commented 8 months ago

Fix multiple issues with this example:

  1. The filenames were confusingly named. read-write.htpasswd did not actually grant read-write access as one might think, only write access. So I renamed these files to read and write to accurately picture what they do.
  2. The sentence "All users in read-only.htpasswd should be in read-write.htpasswd." is incorrect because you never want that, you want the inverse.
  3. Changed mount of read file to ro as well as nginx would never write to it.
  4. Reversed the auth_basic_user_file logic in nginx because there are less read methods than write methods and from security perspective in regards to future HTTP methods, it's better to fail those to the read file than the write file.