ScottG489 / conjob

Simple web interface to run containers as jobs or serverless functions
MIT License
12 stars 0 forks source link

Add support for basic auth #3

Closed ScottG489 closed 3 years ago

ScottG489 commented 4 years ago

Anyone with access to the build server's URL can run jobs at will and with no limit. A good initial solution to this would be to add basic auth to the endpoint so it can be somewhat restricted.

ScottG489 commented 4 years ago

One issue with this is sending requests from a website. We obviously can't just bake in the credentials to the website. So I think we'd have to at least request them from the user. However, I think the only website that is using this right now is the diff info UI which isn't a valid use case we are going for right now. But it isn't something outside the realm of possibility in the future.

Another solution to the broader problem of trying to avoid abuse is whitelisting certain containers. However, I believe this would require state which is not something we want and wouldn't scale.

ScottG489 commented 3 years ago

Closed by 16a83ecbe879899abd1ca7a93117bba077b774a8.

Note that we haven't actually required auth for non-admin endpoints. This just adds support so it can be enabled by adding the proper configuration.