-
Notifications
You must be signed in to change notification settings - Fork 44
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
Feature request : hauth check #123
Comments
What's hauth and how is it configured / used with Tinfoil? |
hauth is a http header send by tinfoil on authentication/index refresh. This is unique per protocol+domain Checking the HTTP_HAUTH on login/shop index, you can keep your links 'secret' |
Thanks for the explanation, so that's why the index could not be downloaded from a non Tinfoil client even with the correct headers with the older public shops... This definitely needs to be implemented then, the thing is that the shop can be reachable from multiple hosts (reverse proxy, lan...) so I'll test all of them to make it won't break. |
Yeah that's exactly how its done. |
I gave it more thoughts and decided not to implement the
For these two reasons it is obvious that the Instead I implemented a new configuration in Ownfoil to set the Shop URL:
I added explicit messages to be displayed in Tinfoil in case the URL is not configured or if the host verification fails, see the linked commit. What do you think about this approach? Maybe the host verification can be optional if the URL is not configured and it is too harsh to disable remote access entirely. |
Now I've made it so it only display a warning in Tinfoil if the Shop URL is not set, instead of disabling the remote access entirely. |
Actually, it's a common security measure for any shop to actually use the HAUTH verification. "2. The hauth key is trivial for anyone to figure out" But, it's not my project :) I was just giving my 2 cents. |
Please add a conditional check and 2 variables in the configuration for hauth (a static prod, and a "test/scan" variable)
if set, on the access_tinfoil_shop() first check if http_hauth IS the value from configuration.
if not set, update the test/scan variable with the http_hauth that was given.
if hauth has been set in the config, but the check fails > just give a http 400 response
This way admins can lock their index from being downloaded without knowing the actual hauth key.
The text was updated successfully, but these errors were encountered: