Gate local repo writes behind OIDC tokens #169
Reference in New Issue
Block a user
Delete Branch "benvin/upload-write-auth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Local repo writes (file uploads/deletes, object evictions, native publishes, docker push) are open to anyone who can reach the service; only remote/virtual config is token-gated.
ARTIFACTAPI_AUTH_UPLOADS(default false) gating every local write path behind the OIDC verifier/v2/tokenBearer challenge flow sodocker loginwith the token enables push; missing, expired or invalid credentials get an anonymous token so pulls stay opentoken()is shared withRequire, so Basic and bare-header credentials are now also accepted on/api/v2/remotesand/virtualsconfig writes, which the why does not mention → keep config writes Bearer-only, or state the widening in the body./v2/tokenwith any Authorization header that is not a valid JWT returns 401, so a pull from a client with unrelated stored creds for this host fails instead of falling back to the anonymous token → on verify failure for/v2/token, issue the anonymous token (writes stay gated bywritesOnly), or document the behaviour./v2/tokenechoes a long-lived JWT with noCache-Control→ setCache-Control: no-store(andPragma: no-cache) on the response.r.Host/X-Forwarded-Proto, and docker sends the Basic credential to that realm → build the realm from a configured external URL, or confirm the ingress pins Host.