Skip to content
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

More V5.0.0 docker woes #262

Closed
1 task done
rouilj opened this issue Dec 24, 2023 · 4 comments
Closed
1 task done

More V5.0.0 docker woes #262

rouilj opened this issue Dec 24, 2023 · 4 comments
Labels
bug Something isn't working fixed The issue is fixed (in a coming release)
Milestone

Comments

@rouilj
Copy link
Contributor

rouilj commented Dec 24, 2023

Version

5.0.0 (e3ded66)

Details & Steps to reproduce

I had a working prior release in the 4.x range.
I did a docker pull to get the current release and restarted it using the existing .env file.

I am running in docker behind a TLS terminating reverse proxy. It is also accessed at the /2fauth subdirectory/path.
I initially had the blank page issue where the first page was returned, but the subsequent pages used a URL that was missing the /2fauth/ path prefix. I was able to "fix" this by setting the new variable ASSET_URL so that it matched APP_URL. I also set TRUSTED_PROXIES to * as well as trying the actual source IP logged by the server (172...).

After restarting, I get an error: 404 resource not found. According to docker log the displayed page is:

"GET /build/assets/Error-975ed5c3.js

with referer:

https://hostname.dom.ain/2fauth/build/assets/app-1b332c21.js

The page is titled "titles.notFound".

If I click on the Close button, I am presented with the 2FAuth login page, but the displayed URL is incorrect.
It should be: https://hostname.dom.ain/2fauth/login but is https://hostname.dom.ain/login. As part of loading the login page, I also see it fetching build and other assets without the /2fauth prefix which all fail with 404.

What else is odd is that the displayed page does seem to be using the proper /2fauth url under the hood as I can navigate using the links to go to the home page and the about page. They both show the wrong URL in the address bar, but do make it to the server running under docker.

I have also stopped the server, deleted storage/framework/cache/data and restarted the server. The problem persists.

Ideas?

Also publishing release notes that said that ASSET_URL and TRUSTED_PROXIES were now required would have helped
in the initial troubleshooting.

Also docker run command is:

docker run --name 2fauth -d -p 127.0.0.1:8090:8000 -v $PWD:/2fauth --restart unless-stopped --security-opt no-new-privileges --env-file .env 2fauth/2fauth -e AUTHENTICATION_GUARD=web-guard

env file contents below.

Expectation

Login page retrieving proper URL's.

Error & Logs

No logs generated since 2023-12-17 and I upgraded 2fauth on the 23rd.

Execution environment

All I get for env vars from the /2fauth/about page is:

💀 Something went wrong during data fetching

My .env file has:

APP_DEBUG=true
SITE_OWNER=user@localhost
APP_URL=https://hostname.dom.ain/2fauth
ASSET_URL=https://hostname.dom.ain/2fauth
APP_SUBDIRECTORY=2fauth
TRUSTED_PROXIES=*
LOG_LEVEL=notice
MAIL_HOST=172.17.0.1
MAIL_PORT=25
MAIL_FROM_NAME=2fauth
MAIL_FROM_ADDRESS=2fauth@localhost
MAIL_VERIFY_SSL_PEER=false

Containerization

  • Docker

Additional information

No response

@Bubka Bubka added the bug Something isn't working label Dec 28, 2023
@Bubka
Copy link
Owner

Bubka commented Dec 28, 2023

Sorry, I forgot the custom base url configuration in the vue router instantiation 😕
A fix is coming.

@rouilj
Copy link
Contributor Author

rouilj commented Dec 28, 2023

Thanks. for the coming fix.

Is there a way to roll back a database migration so I could use the prior version to gain access to my
one time keys while I am waiting?

@Bubka Bubka added the fixed The issue is fixed (in a coming release) label Dec 28, 2023
@Bubka Bubka added this to the v5.0.1 milestone Dec 28, 2023
@Bubka Bubka closed this as completed in 5fd7f43 Dec 28, 2023
@Bubka
Copy link
Owner

Bubka commented Dec 29, 2023

v5.0.1 is now available. It should fix the mess with the /2fauth/ custom base url.

@rouilj
Copy link
Contributor Author

rouilj commented Dec 29, 2023

Thanks you, it does. However I can now see the issue described in #265 8-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed The issue is fixed (in a coming release)
Projects
Status: Released
Development

No branches or pull requests

2 participants