Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Bug] Unable to use WEB_AUTHENTICATION and routing based on URL Path #258

Open
Nuclearsphere opened this issue Sep 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Nuclearsphere
Copy link

Nuclearsphere commented Sep 16, 2024

Current Behavior

Unable to use routing based on URL path and user authentication.
If you use in nginx reverse-proxy smth like

...
  server_name example.com;
  location /abc/ {
      proxy_pass https://firefox-docker/ ;
  }

with
WEB_AUTHENTICATION=1

it always redirects you to
https://example.com/#
which doesn't exist in root location.

Expected Behavior

There should be an additional variable to forward into the app additional path prefix.
For example:
URL_PREFIX=/abc/

So now with this variable if you use in nginx

...
  server_name example.com;
  location /abc/ {
      proxy_pass https://firefox-docker/ ;
  }

with
WEB_AUTHENTICATION=1
the app will return
https://example.com/abc/#

Steps To Reproduce

  1. deploy docker or docker-compose container with
    WEB_AUTHENTICATION=1
  2. deploy nginx as reverse-proxy
  3. try to set up routing based on URL path

Container creation

sudo docker compose up -d

Container log

Container log
-igor-1  | [init        ] container is starting...
firefox-igor-1  | [cont-env    ] loading container environment variables...
firefox-igor-1  | [cont-env    ] APP_NAME: loading...
firefox-igor-1  | [cont-env    ] APP_VERSION: loading...
firefox-igor-1  | [cont-env    ] DISPLAY: executing...
firefox-igor-1  | [cont-env    ] DISPLAY: terminated successfully.
firefox-igor-1  | [cont-env    ] DISPLAY: loading...
firefox-igor-1  | [cont-env    ] DOCKER_IMAGE_PLATFORM: loading...
firefox-igor-1  | [cont-env    ] DOCKER_IMAGE_VERSION: loading...
firefox-igor-1  | [cont-env    ] EGL_LOG_LEVEL: executing...
firefox-igor-1  | [cont-env    ] EGL_LOG_LEVEL: terminated successfully.
firefox-igor-1  | [cont-env    ] EGL_LOG_LEVEL: loading...
firefox-igor-1  | [cont-env    ] GSK_RENDERER: executing...
firefox-igor-1  | [cont-env    ] GSK_RENDERER: terminated successfully.
firefox-igor-1  | [cont-env    ] GSK_RENDERER: loading...
firefox-igor-1  | [cont-env    ] GTK2_RC_FILES: executing...
firefox-igor-1  | [cont-env    ] GTK2_RC_FILES: terminated successfully.
firefox-igor-1  | [cont-env    ] GTK2_RC_FILES: not setting variable.
firefox-igor-1  | [cont-env    ] GTK_THEME: executing...
firefox-igor-1  | [cont-env    ] GTK_THEME: terminated successfully.
firefox-igor-1  | [cont-env    ] GTK_THEME: not setting variable.
firefox-igor-1  | [cont-env    ] HOME: loading...
firefox-igor-1  | [cont-env    ] LIBGL_DRIVERS_PATH: executing...
firefox-igor-1  | [cont-env    ] LIBGL_DRIVERS_PATH: terminated successfully.
firefox-igor-1  | [cont-env    ] LIBGL_DRIVERS_PATH: not setting variable.
firefox-igor-1  | [cont-env    ] PULSE_CONFIG_PATH: executing...
firefox-igor-1  | [cont-env    ] PULSE_CONFIG_PATH: terminated successfully.
firefox-igor-1  | [cont-env    ] PULSE_CONFIG_PATH: not setting variable.
firefox-igor-1  | [cont-env    ] PULSE_COOKIE: executing...
firefox-igor-1  | [cont-env    ] PULSE_COOKIE: terminated successfully.
firefox-igor-1  | [cont-env    ] PULSE_COOKIE: not setting variable.
firefox-igor-1  | [cont-env    ] PULSE_SERVER: executing...
firefox-igor-1  | [cont-env    ] PULSE_SERVER: terminated successfully.
firefox-igor-1  | [cont-env    ] PULSE_SERVER: not setting variable.
firefox-igor-1  | [cont-env    ] QT_STYLE_OVERRIDE: executing...
firefox-igor-1  | [cont-env    ] QT_STYLE_OVERRIDE: terminated successfully.
firefox-igor-1  | [cont-env    ] QT_STYLE_OVERRIDE: not setting variable.
firefox-igor-1  | [cont-env    ] TAKE_CONFIG_OWNERSHIP: loading...
firefox-igor-1  | [cont-env    ] XDG_CACHE_HOME: loading...
firefox-igor-1  | [cont-env    ] XDG_CONFIG_HOME: loading...
firefox-igor-1  | [cont-env    ] XDG_DATA_HOME: loading...
firefox-igor-1  | [cont-env    ] XDG_RUNTIME_DIR: loading...
firefox-igor-1  | [cont-env    ] XDG_STATE_HOME: loading...
firefox-igor-1  | [cont-env    ] container environment variables initialized.
firefox-igor-1  | [cont-secrets] loading container secrets...
firefox-igor-1  | [cont-secrets] container secrets loaded.
firefox-igor-1  | [cont-init   ] executing container initialization scripts...
firefox-igor-1  | [cont-init   ] 10-certs.sh: executing...
firefox-igor-1  | [cont-init   ] 10-certs.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-check-app-niceness.sh: executing...
firefox-igor-1  | [cont-init   ] 10-check-app-niceness.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-clean-logmonitor-states.sh: executing...
firefox-igor-1  | [cont-init   ] 10-clean-logmonitor-states.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-clean-tmp-dir.sh: executing...
firefox-igor-1  | [cont-init   ] 10-clean-tmp-dir.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-fontconfig-cache-dir.sh: executing...
firefox-igor-1  | [cont-init   ] 10-fontconfig-cache-dir.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-init-users.sh: executing...
firefox-igor-1  | [cont-init   ] 10-init-users.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-nginx.sh: executing...
firefox-igor-1  | [cont-init   ] 10-nginx.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-openbox.sh: executing...
firefox-igor-1  | [cont-init   ] 10-openbox.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-pkgs-mirror.sh: executing...
firefox-igor-1  | [cont-init   ] 10-pkgs-mirror.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-pulse.sh: executing...
firefox-igor-1  | [cont-init   ] 10-pulse.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-set-tmp-dir-perms.sh: executing...
firefox-igor-1  | [cont-init   ] 10-set-tmp-dir-perms.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-vnc-password.sh: executing...
firefox-igor-1  | [cont-init   ] 10-vnc-password.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-web-data.sh: executing...
firefox-igor-1  | [cont-init   ] 10-web-data.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-webauth.sh: executing...
firefox-igor-1  | [cont-init   ] 10-webauth.sh: Adding password for user igor_ney
firefox-igor-1  | [cont-init   ] 10-webauth.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-x11-unix.sh: executing...
firefox-igor-1  | [cont-init   ] 10-x11-unix.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 10-xdg-runtime-dir.sh: executing...
firefox-igor-1  | [cont-init   ] 10-xdg-runtime-dir.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 15-cjk-font.sh: executing...
firefox-igor-1  | [cont-init   ] 15-cjk-font.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 15-install-pkgs.sh: executing...
firefox-igor-1  | [cont-init   ] 15-install-pkgs.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 55-check-snd.sh: executing...
firefox-igor-1  | [cont-init   ] 55-check-snd.sh: sound not supported: device /dev/snd not exposed to the container.
firefox-igor-1  | [cont-init   ] 55-check-snd.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 55-firefox.sh: executing...
firefox-igor-1  | [cont-init   ] 55-firefox.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 56-firefox-set-prefs-from-env.sh: executing...
firefox-igor-1  | [cont-init   ] 56-firefox-set-prefs-from-env.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 85-take-config-ownership.sh: executing...
firefox-igor-1  | [cont-init   ] 85-take-config-ownership.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] 89-info.sh: executing...
firefox-igor-1  |     ╭――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╮
firefox-igor-1  |     │                                                                      │
firefox-igor-1  |     │ Application:           Firefox                                       │
firefox-igor-1  |     │ Application Version:   128.0.3-r0                                    │
firefox-igor-1  |     │ Docker Image Version:  24.08.1                                       │
firefox-igor-1  |     │ Docker Image Platform: linux/amd64                                   │
firefox-igor-1  |     │                                                                      │
firefox-igor-1  |     ╰――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――╯
firefox-igor-1  | [cont-init   ] 89-info.sh: terminated successfully.
firefox-igor-1  | [cont-init   ] all container initialization scripts executed.
firefox-igor-1  | [init        ] giving control to process supervisor.
firefox-igor-1  | [supervisor  ] loading services...
firefox-igor-1  | [supervisor  ] loading service 'default'...
firefox-igor-1  | [supervisor  ] loading service 'logrotate'...
firefox-igor-1  | [supervisor  ] loading service 'logmonitor'...
firefox-igor-1  | [supervisor  ] service 'logmonitor' is disabled.
firefox-igor-1  | [supervisor  ] loading service 'app'...
firefox-igor-1  | [supervisor  ] loading service 'gui'...
firefox-igor-1  | [supervisor  ] loading service 'pulseaudio'...
firefox-igor-1  | [supervisor  ] service 'pulseaudio' is disabled.
firefox-igor-1  | [supervisor  ] loading service 'xcompmgr'...
firefox-igor-1  | [supervisor  ] loading service 'openbox'...
firefox-igor-1  | [supervisor  ] loading service 'xvnc'...
firefox-igor-1  | [supervisor  ] loading service 'nginx'...
firefox-igor-1  | [supervisor  ] loading service 'webauth'...
firefox-igor-1  | [supervisor  ] loading service 'certsmonitor'...
firefox-igor-1  | [supervisor  ] loading service 'audiorecorder'...
firefox-igor-1  | [supervisor  ] service 'audiorecorder' is disabled.
firefox-igor-1  | [supervisor  ] all services loaded.
firefox-igor-1  | [supervisor  ] starting services...
firefox-igor-1  | [supervisor  ] starting service 'xvnc'...
firefox-igor-1  | [xvnc        ] Xvnc TigerVNC 1.13.1 - built Jun 29 2024 04:32:59
firefox-igor-1  | [xvnc        ] Copyright (C) 1999-2022 TigerVNC Team and many others (see README.rst)
firefox-igor-1  | [xvnc        ] See https://www.tigervnc.org for information on TigerVNC.
firefox-igor-1  | [xvnc        ] Underlying X server release 12014000
firefox-igor-1  | [xvnc        ] Mon Sep 16 07:42:08 2024
firefox-igor-1  | [xvnc        ]  vncext:      VNC extension running!
firefox-igor-1  | [xvnc        ]  vncext:      Listening for VNC connections on /tmp/vnc.sock (mode 0660)
firefox-igor-1  | [xvnc        ]  vncext:      created VNC server for screen 0
firefox-igor-1  | [supervisor  ] starting service 'openbox'...
firefox-igor-1  | [supervisor  ] starting service 'xcompmgr'...
firefox-igor-1  | [supervisor  ] starting service 'webauth'...
firefox-igor-1  | [supervisor  ] starting service 'nginx'...
firefox-igor-1  | [nginx       ] Listening for HTTPs connections on port 5800.
firefox-igor-1  | [supervisor  ] starting service 'app'...
firefox-igor-1  | [app         ] Mozilla Firefox 128.0.3
firefox-igor-1  | [supervisor  ] all services started.

Container inspect

No response

Anything else?

No response

@Nuclearsphere Nuclearsphere added the bug Something isn't working label Sep 16, 2024
@jlesage
Copy link
Owner

jlesage commented Nov 18, 2024

Do you still have issue with this? This should now work with the latest images.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants