https authentication unavailable when using cloudflare tunnels #7070
Replies: 2 comments 9 replies
-
I am having the same issue, although I am using a docker deployment. |
Beta Was this translation helpful? Give feedback.
-
Having played around with it for a bit, I was able to have success with the following configuration. The only issue is that I haven't worked out why it suddenly started working. # .env file
# Site URL - update this to match your host
INVENTREE_SITE_URL="http://inventree.domain.com"
INVENTREE_TRUSTED_ORIGINS="http://inventree.domain.com,https://inventree.domain.com" Cloudflare tunnel public hostname: This next step shouldn't make any difference, but I have had issues in the past where this appears to have solved the problem. |
Beta Was this translation helpful? Give feedback.
-
I'm having difficulty troubleshooting authentication on a small instance of inventree that I'm using for testing.
Error Description
When accessing this instance over HTTPS, no user is able to authenticate. On the standard login page this presents as an immediate redirect to an Authentication Failure page. For browsers that had an authentication cookie already, this presents as 403 Permission Denied when trying to do any action.
When accessing over HTTP, there is no such issue.
The issue seemed to arise following an upgrade from an earlier version in which i seemed to encounter the same problem as discussed in Issue 6751.
Much like benpayne, on setting INVENTREE_SITE_URL, the issue resolved - but only for HTTP.
Deployment Description
This is a bare metal deployment of inventree 0.14.2.
The server resides in the same network as a Cloudflared client.
Cloudflare is configured to route https://inventree.[mydomain].com to the IP of the inventree server. My understanding is that the traffic from cloudflare to the cloudflared client is encrypted over HTTPS (with cloudflare certs), while the last bit of traffic from cloudflared client to inventree server is then over HTTP.
I have set
INVENTREE_SITE_URL to https://inventree.[mydomain].com and
INVENTREE_TRUSTED_ORIGINS to https://inventree.[mydomain].com, http://inventree.[mydomain].com, http://localhost
I have also temporarily set INVENTREE_ALLOWED_HOSTS to *
Questions
Is there anything obvious I'm missing here?
I've reviewed the error logs at the /admin/errors url and can't identify anything; Does inventree keep login attempt logs that might help me troubleshoot this - if so where?
Beta Was this translation helpful? Give feedback.
All reactions