optiopay / klar

Integration of Clair and Docker Registry
MIT License
505 stars 138 forks source link

Support basic authentication #76

Closed alexppg closed 3 years ago

alexppg commented 6 years ago

It would be nice to support basic authentication, since the default behavior is to be open to everybody.

hashmap commented 6 years ago

@alexppg Do you mean request to Clair, right?

alexppg commented 6 years ago

Yes. @hashmap

Johannestegner commented 6 years ago

This would really be great, or basically any type of auth for the Clair server, so that it can be exposed to the web. Is anyone working on this? :)

qiq commented 5 years ago

Just checked, basic auth works out-of-the-box in Klar (at least for v1 API):

CLAIR_ADDR=https://LOGIN:PASSWORD@HOST:PORT

To add basic authentication to Clair when using ingress-nginx, follow the official docs: https://github.com/kubernetes/ingress-nginx/tree/master/docs/examples/auth/basic

qiq commented 5 years ago

Pull request with README update: https://github.com/optiopay/klar/pull/130

alexppg commented 3 years ago

I have not tried it, but since it's done a looot ago, I'll just open another issue if I need to. Thanks for your efforts!