patrickhener/goshs

[Feature Request] Password protected folders

IIpho3nix opened this issue · 5 comments

[Feature Request] Password-Protected Folders

Description

Add the ability to password protect folders. This feature would allow users to secure specific folders with either a single password for all protected folders or a unique password for each folder.

I don't think this is really necessary. There is the option to use Basic Authentication:

...
Authentication options:
  -b, --basic-auth    Use basic authentication (user:pass - user can be empty)
...

This should be sufficient I think. Or why would you need such a feature?

I have a server set up that has multiple users and it would be nice to be able to protect a folder with extra security as some folders have some rsa keys in them that i wouldn't want anyone thats able to access the main server have access to

tho its kinda a unexistant problem since you can run diffrent instances on diffrent ports

Well, I see. Goshs was never meant to be used this way though. It is supposed to be a drop in replacement for python http Server. To be honest the project already grew way bigger than I thought it would. But for your special scenario I would recommend running a real webserver like caddy.

Nonetheless I am intrigued how one could handle this scenario. I will look into a file based solution I think.

For example you put a file called .goshs in a folder. The content will be like user:some_hash and then there will be a custom basic auth for that folder.

This would be the solution to your problem, right?

indeed that would solve the problem

Your request has been implemented with version v0.3.5 (see PR: #44)