restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
943 stars 140 forks source link

Readme: Fixed SSL certificate generation #178

Closed JsBergbau closed 2 years ago

JsBergbau commented 2 years ago

What is the purpose of this change? What does it change?

Added -nodes option for ssl certificate generation. Otherwise a password with at least 4 characters length for the private_key must be given. However there is no option for providing a password for the private_key. It would also add no additional security, because for automatic server startup key file should/must be unencrypted.

Soruce for the new flag: https://serverfault.com/questions/366372/is-it-possible-to-generate-rsa-key-without-pass-phrase

Was the change discussed in an issue or in the forum before?

No. Just wanted to generate a new certificate for a new server and struggled.

Checklist

rawtaz commented 2 years ago

Cheers! Can you also change the sentence Signed certificate is normally required by the restic backend, but if you just want to test the feature you can generate unsigned keys with the following commands to Signed certificate is normally required by the restic backend, but if you just want to test the feature you can generate password-less unsigned keys with the following command (note, a few small changes, so best to copy the entire sentence) and then squash the commits?

JsBergbau commented 2 years ago

Text is updated. Regarding squashing the commits you should be able to do this when merging them, so only one additional commit will be in the rest-server repo.

rawtaz commented 2 years ago

Unfortunately GitHub isn't sane enough on that part. If we choose to squash when merging, we don't get a merge commit saying which PR was merged. So we don't do that, instead we always use the "Create a merge commit" merge type. But I can squash it for you later.

I wish GitHub wasn't this dumb. There should be an option to squash commits and create the merge commit. But no, that would make sense so why have it.

JsBergbau commented 2 years ago

Now I understand. Since it is easier for you to sqash the commits, please go ahead.

rawtaz commented 2 years ago

It's actually not :)

To squash the commit I have to 1) Go you your repository and grab the URL. 2) Add that as a remote in my local restic repo. 3) Fetch that remote. 4) Check out your branch. 5) Squash. 6) Push. 7) Delete your remote.

I Imagine it's much easier for you, so if you don't mind that'd be great. Otherwise I'll do it at some point.

JsBergbau commented 2 years ago

Save your time, I'll do that later, because it seems it can't be done via webbrowser, but I'll do it.

JsBergbau commented 2 years ago

I've squashed the commits. Hope I've done it right.

rawtaz commented 2 years ago

Thanks! Unfortunately it's still two commits though, so I guess at the very least you didn't force-push your local branch after doing the squashing in there.

Also, sorry, I for some reason assumed that you already were using Git for this branch, but if you were just using the GitHub web GUI to edit the changes, then it's no simpler for you than it is for me to squash stuff :)

I don't know if you are new to Git or not (possibly you are?), but if that is the case I'd be happy to help guide you with finalizing the squashing here, if you want to get it done. If so, please let me know what you did so far (commands work). Or if you want to do it yourself that's fine of course, I'm just offering help for educational purposes. Cheers!

JsBergbau commented 2 years ago

Unfortunately it's still two commits though, so I guess at the very least you didn't force-push your local branch after doing the squashing in there.

Thanks that was the case. Now it should be one commit.

Thanks for your help offer with git. I've used the command line long time ago just to learn it a bit and then I've noticed that most and almost all useful stuff for me can be done via github web so I use it really seldom. In that case I found it easier to use Github Desktop because there was this link https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/managing-commits/squashing-commits as first result when searching for github squash commit.