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/confand/verdaccio/storageto 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:
@myscopein .npmrcnpm publish, they appear in in the/storage/data/@myscopefolder in GCS and in my/.verdaccio-db.jsonfile:npm installHowever, 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/packagescall 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: $alleverything works. Then I tried logging in in the web UI withaccess: $authenticatedand trace logging enabled. Form the client side, everything looks good:POST https://pkg.mydomain.io/-/verdaccio/sec/loginwith my username,password. This succeed and returns:GET https://pkg.mydomain.io/-/verdaccio/data/packagesis 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