-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
add token service support for docker registry #14919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- repo name ruler <owner>/<repo_name>[/<image_name>] (note: if `<image_name>` not set, will use `<repo_name>` as default) - add a new repo permission unit named as `package`, it's not a real unit in gitea, just use for permission check. - add a small api `GET /repos/{owner}/{repo}/packages/{type}/{name}` for test, maybe can add more later ref: - https://docs.docker.com/registry/spec/auth/token/ - https://docs.docker.com/registry/notifications/ - https://github.com/cesanta/docker_auth Signed-off-by: a1012112796 <[email protected]>
Co-authored-by: techknowlogick <[email protected]>
because if using token serve, it will be difficut to use docker registry api directly, try do someting to simplify it.` Signed-off-by: a1012112796 <[email protected]>
@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf Thanks for your carefully check |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚀
I was thinking on maybe this could be somehow refactored that this configuration is in database so that it could be extended so that we could have server-wide or per-organization/user docker registry server so that for example I could host my own docker registry server but connect it to external gitea service (like gitea.com or codeberg.org) just for my organization |
@lafriks you could do exactly that currently with https://github.com/cesanta/docker_auth/ (I am the maintainer of that project) |
An alternative to external docker registry integration is necessary because the primary aim of Gitea is to be a package store. |
How this would allow integration with gitea auth? |
I know it's steps, It's a littile long. steps:
but user can't used password or api token on gitea or github to request |
Codecov Report
@@ Coverage Diff @@
## master #14919 +/- ##
==========================================
- Coverage 43.85% 43.64% -0.21%
==========================================
Files 678 686 +8
Lines 81503 81966 +463
==========================================
+ Hits 35741 35775 +34
- Misses 39971 40400 +429
Partials 5791 5791
Continue to review full report at Codecov.
|
Fix #2316
<owner>/<repo_name>/<image_name>
package
, it's not areal unit in gitea, just use for permission check.
GET /repos/{owner}/{repo}/packages/{type}/{name}
fortest, maybe can add more later
ref:
TODO:
- [ ] handle delete event(can't real delet a repo in docker registry, so this work is not necessary ...)