registry(auth): require auth for image pulls (audit F11)
Forgejo 16 mints an anonymous ("ghost user") registry token on /v2/token and
grants it Read on every package regardless of repo visibility, so all 18 app
images were world-downloadable — including images of private repos
(siriusdevops-site, phs-site, sirius-growth-*, sgs-leadgen).
* FORGEJO__service__REQUIRE_SIGNIN_VIEW=true: /v2/token answers UNAUTHORIZED
to anonymous clients, anonymous manifests get 401. This is the documented
switch in routers/api/packages/container (Authenticate) and
services/context/package.go (determineAccessMode). Side effect: the Forgejo
web UI/API becomes login-only for anonymous visitors.
* imagePullSecrets: [forgejo-pull] on all 18 workloads that pull from the
registry (osint, piedmont, sirius-growth, siriusdevops). The
kubernetes.io/dockerconfigjson Secret is per-namespace and out of band
(never in git); docs/registry-pull-auth.md documents why, how to recreate
it, and the verification commands. No containerd-level credential.
This commit is contained in:
parent
cea26863ec
commit
bc942e2571
20 changed files with 169 additions and 0 deletions
|
|
@ -23,6 +23,8 @@ spec:
|
|||
labels:
|
||||
app: osint-db
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: forgejo-pull
|
||||
tolerations:
|
||||
- key: dedicated
|
||||
operator: Exists
|
||||
|
|
|
|||
Loading…
Reference in a new issue