Replies: 1 comment 1 reply
-
You're analysis is right on. It's a known issue/bug: #5281 (see my comment). @juanpicado has it on his agenda already. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I deployed verdaccio's base docker image to a Google Cloud Run container. I mounted
/verdaccio/conf
and/verdaccio/storage
to a Google Cloud Storage (GCS) bucket.This is my config.yaml:
I also configured the env variable VERDACCIO_PUBLIC_URL to
https://pkg.mydomain.io
.So far, everything seems to be working great:
@myscope
in .npmrcnpm publish
, they appear in in the/storage/data/@myscope
folder in GCS and in my/.verdaccio-db.json
file:npm install
However, the web UI keeps saying "No Package Published Yet". This is the case immediately after publishing, and after a container restart.
The
GET /-/verdaccio/data/packages
call returns[]
.The container logs don't indicate anything going wrong:
I did some digging through the in the source code for that /packages endpoint and the get() and init() methods of the local storage plug in which I believe should return and actually read the data from the json file, respectively.
From this, a couple questions:
EDIT: This appears to be an authentication issue. If I set
access: $all
everything works. Then I tried logging in in the web UI withaccess: $authenticated
and trace logging enabled. Form the client side, everything looks good:POST https://pkg.mydomain.io/-/verdaccio/sec/login
with my username,password. This succeed and returns:GET https://pkg.mydomain.io/-/verdaccio/data/packages
is made, with that exact token passed as the headerAuthorization: Bearer [token]
.EDIT2 (solved): After many hours of sleuthing, enabling debug logs with
DEBUG=verdaccio:*
, I found debug logs indicating that my JWT auth token from my web request was being validated by authentication middleware for the api which was expecting a legacy token. I fixed my installation by enabling JWT authentication for the API by adding the following to config.yaml:But it looks like applying the API validation, which has separate configuration, for a request originating from the web UI would be a bug?
Beta Was this translation helpful? Give feedback.
All reactions