cloudflare / serverless-registry

A container registry backed by Workers and R2.
Apache License 2.0
994 stars 35 forks source link

Allow only READONLY_USERNAME and READONLY_PASSWORD to be set for auth #72

Closed jingyuanliang closed 2 weeks ago

jingyuanliang commented 2 weeks ago

This is useful for registries that are supposed to be just mirrors of upstream registries (using REGISTRIES_JSON).

jingyuanliang commented 2 weeks ago

uhm I found the new test case not effective. I mean, it still passes without the src/authentication-method.ts change. Any idea?

gabivlj commented 2 weeks ago

Oh yeah. Good catch. https://github.com/jingyuanliang/serverless-registry/blob/ea743e310b5c4a7f87b5da6956567b5f1590434d/test/index.test.ts#L117-L135

Probably take inspiration of this test. I think the manifest test doesn't take the auth path as it uses the client directly!

jingyuanliang commented 2 weeks ago

Regardless of auth, I wanted to test that it starts without error at least...