Base domain names must match on private tld #210
Labels
No labels
bug
chore
documentation
enhancement
help
in-progress
question
ready-for-release
released
translation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
adam/gate#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug:
Hey, I am running a private zone for the TLD “.lan”.
This is not supported when I use the proxy auth feature.
To Reproduce:
Expected behavior:
serve myapp.lan after login
Thank you for opening an issue! I think I can make a patch for this 😊
@notquitenothing thanks for the quick fix. Any plans to create an new release in the next days? Wishing you a wonderful holiday season!
Planning on a release in the next few days 😊 🎄
This should be fixed in the latest release v1.7.0, let me know if it works/does not work for you
Not quietd sure if I mess something up. But I am trap in a redirect loop.
This may relate to changes in 1.7.0 in general 1.6.0 seems to work for me.
Well bummer! Releasing a patch now (v1.7.1) to revert that change until more test cases can be put together. ProxyAuth Domains will continue to not work with custom private DNS zones until a fix can be found, but it should fix the login redirect loop. Please let me know if updating to this version fixes the redirect loop for you.
Root cause of this issue is that browsers will not let you set cookies on top level domains (
.com,.org,.co.uk), but will maybe(?) let you set them on top level custom domains (.lan) but it is not clear how to detect those cases reliably.The redirect loop is fixed.
Do you have to set cookies on the tld? Are cookies for "auth.lan" not enough?
For ProxyAuth to work the VoidAuth session cookie needs to be set on a base (root) domain that covers both VoidAuth itself and the domain to be protected. Then, when accessing the protected domain the VoidAuth session cookie is sent as well, which the reverse proxy will use to determine if access should be granted.
This can get complicated, browsers only let you set cookies on domains you would own if you owned the setting-domain. (From
auth.example.comyou can setexample.combut notcom. And if you try to set a cookie on a domain that isn’t allowed, there is no error the cookie is just not set. I am going to add an optional environment variable to override the session domain to allow experimentation on what works without breaking the default setup.This is related to (closed) #177 I believe.
https://www.rfc-editor.org/rfc/rfc6762#appendix-G
.lan should be cover by the rfc.
Ya, after reading appx. G of that RFC I agree, the initial change (that caused the redirect loop) seems like it should have worked. There must be some other spec that browser makers are following to disallow setting cookies at
lan. Once #217 is merged you should be able to override the session cookie domain yourself and see what works.The SESSION_DOMAIN environment variable should be available in v1.7.2, to attempt to get proxyAuth working between
auth.lanandsonarr.lanyou can set it likeSESSION_DOMAIN: 'lan'. I would also recommend clearing your cookies onauth.lanbeforehand. If this does not work and you get a redirect loop or just sent back to the login page after completing a login, you have a couple of options:auth.example.lanandsonarr.example.lanThis might be a technical limitation that VoidAuth cannot overcome due to browser cookie/tracking policies, let me know how it goes.
Also let me know if you have used a different Identity Provider that does overcome this issue, and I will research how they are doing it 😊
mhmm using .lan still resulting in redirect loop
just change to a proper tld "examlple.dev", now with proper lets encrypt instead driving an own CA.
Thanks @notquitenothing !
Assumed resolved (as much as it can be) in v1.8.0 . Please re-open if it is not