2 Commits

Author SHA1 Message Date
unkin-agent 6429e62f17 Run the dockerised e2e suite with write auth enabled (#181)
ci/woodpecker/tag/docker Pipeline failed
Write auth broke buildkit pushes in production because the dockerised e2e suite runs artifactapi with auth disabled, so no real client ever authenticated a publish.

- serve a static mock OIDC issuer; TestMain generates the key, writes the JWKS and mints tokens
- run the stack with ARTIFACTAPI_AUTH_UPLOADS=true
- authenticate each local publish the way its client does (curl Bearer/Basic, docker login, npm, gem, ansible-galaxy)
- assert publishes without a token or with a foreign-key token get 401 and anonymous reads still work
- add docker CLI, buildx and helm OCI push cases; skip the last two until unkin/artifactapi#180 lands

Reviewed-on: #181
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-11-08 11:08:00 +11:00
unkin-agent 42998a80f4 Add local npm registry publish and install (#139)
In-house npm packages have nowhere to publish: npm locals only accept raw file uploads, which `npm publish` and `npm install` cannot use.

- accept `npm publish` (`PUT /api/v1/local/<repo>/<pkg>`, scoped included) on local npm repos, capping the body at 256MiB and verifying the tarball against dist integrity
- write tarball, then manifest, then dist-tags; publishing an existing version returns 409 and leaves tags alone, while a matching leftover tarball from a failed publish is reused so retries complete
- serve packuments with tarball URLs pointing back at the local repo, dropping dist-tags that name unpublished versions
- document the `.npmrc` registry + `_authToken` setup in the UI and `docs/npm/local.md`
- add a stock `node:22` publish/install e2e-docker case

Reviewed-on: #139
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
2026-10-17 17:18:05 +11:00