staticman icon indicating copy to clipboard operation
staticman copied to clipboard

Gracefully ignore absent SSH key

Open shaftoe opened this issue 4 years ago • 2 comments

I believe one of the biggest sources of confusion for new users is the need to provide an SSH private key in order to have the API process running.

I believe a better default behavior should be to require the minimum possible amount of configuration and simply respond with an error when trying to access a disabled functionality.

I'd bet that for most new users (me included) the main reason to use Staticman is because they need a mean to add comments to a statically generated web site. The /encrypt feature might be a nice to have feature but I believe is not core and should definitely not be the cause of any confusion.

For example, a call to GET /v2/encrypt/ should return either a 404 or a 503 Service Unavailablewhen key is missing and/or malformatted

shaftoe avatar Jul 17 '20 11:07 shaftoe

@alexwaibel any thoughts on this too? we can definitely improve the docs to a certain extent but I think this is paramount to improve the UX

shaftoe avatar Jul 18 '20 08:07 shaftoe

I agree this seems like a helpful addition. It's been a while since I dug through the full codebase so when adding this we should make sure to go look for all the places the key is used and ensure the core flow will work without it.

alexwaibel avatar Jul 19 '20 21:07 alexwaibel