-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per book/user access permissions #12
Comments
No. This feature is much more complicated and is currently not implemented. For a quick workaround, you can run PyWebScrapBook behind a reverse proxy and apply HTTP authorization rules for each sub-path at the reverse proxy server. But this cannot prevent sub-directories from being listed for unauthorized users. |
No problem. I just wanted to know if there is such feature implemented or not.
Not so much elegant, however should work. |
This also works, but the sidebar won't list all scrapbooks and you'd have to modify the backend server URL in the options every time when you want to switch between them. |
I have tried this attempt with apache as reverse proxy but when selecting an unauthorized folder, unfortunately WebScrapBook doesn't like being rejected by a 40X status code:
Do you have any other suggestion how the reverse proxy should react on unauthorized access? My apache config lookes like that:
|
@leo-b I don't get you. Please elaborate what you're trying to achieve. Fundamentally, an unauthorized user means he has no right to access the site, and cannot access the scrapbooks through the browser extension, no matter how the UI actually shows to reject him. |
This issue is about using the same PyWebScrapBook instance for different users while controlling access to the sub-directories at the reverse proxy. My example shows several ways to achieve that at reverse proxy level. |
That's why I say that per-book access control is not supported. The current backend APIs are site-wide. When a user has full access to a book, he must have access to the APIs, and as a result have access to any other books under the same site. It will be a very large code rework to make the APIs support per book access control. If you really want to do some further access control, consider creating multiple webscrapbook servers that access some folders through symlink with OS-level access control, such as:
However there may still be many caveats, such as a conflict when multiple servers attempt to write to the same book simultaneously. |
I've running wsb on my web host and would like to keep several scrapbooks for different users. E.g, if I create books as:
is it possible to limit access to these directories depending on the user, e.g:
Or may be I've missed something in config settings?
P.S. Thanks a lot for your extension. I've missed such functionality since FF migrated to WE
The text was updated successfully, but these errors were encountered: