-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add ability to encrypt entire folders with the same password for deployment #47
base: main
Are you sure you want to change the base?
Conversation
Thanks for the initiative! Sounds like an important use case and your description seems to me very good (although I cannot evaluate the implementation). I'd like to use that in my use case. |
You're very welcome! You can use this straight away from my branch at https://github.com/souramoo/pagecrypt (upon which this pull request is based). I have added some usage instructions for this use case in the readme file there, i.e. assuming a source folder
Will produce the encrypted version of the website in |
Thanks, sounds great. But I don't seem to get it running. I have created two folders |
Sure, what errors do you get? |
bump @Greenheart |
A few small tweaks to extend support to non-Single Page Applications, i.e. the ability to encrypt an entire folder of html pages, with the same password, and then to publish these encrypted html files such that the user only needs to enter the password once to then access the whole site.
The intention is to act similarly to a JS-version of HTTP basic auth-like behaviour (i.e. assumes that the client holding the password is trusted [kind of needs to be for any of this to work!], and so the security model is intentionally broken in a very specific way to enable this - by storing the password entered in localStorage, along with caching the different
k
's based on the URL in localStorage).The idea is to be able to use pagecrypt as a drop-in replacement for situations where HTTP Basic auth is not possible (e.g. Google Cloud Storage, S3, Github Pages), in order to prevent access from strangers stumbling across a website.
These patches also mean that different pages with different passwords hosted on the same server do not log you out of the other pages once you enter a password for another page (by storing the
k
values separately perwindow.location.href
) (e.g. in theverify:test
suite, logging into one page and then another, and then going back to the first page will not reprompt for the password again as happens in the current master branch)