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

How to use auth-plugin or token-plugin to authenticate session instead of prompting user for vnc password? #577

Closed
kevin-niland opened this issue May 30, 2024 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@kevin-niland
Copy link

kevin-niland commented May 30, 2024

I have a Docker image that when I run it, runs a bash script that has the following content:

#!/bin/bash

VNC_PASSWORD="password"

vncpasswd <<EOF
$VNC_PASSWORD
$VNC_PASSWORD
n
EOF

xinit /etc/X11/xdm/Xsession startxfce4 -- /usr/bin/Xvnc :10 -auth /home/myuser/.Xauthority -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -pn -rfbauth /home/myuser/.vnc/passwd -rfbport 5910 2>&1 &

websockify -D --web /usr/share/novnc/ 6080 localhost:5910 2>&1 &

sleep infinity

The reason I'm running the xinit command is because vncsession can't be run as root (I'm working on a non-root solution). With the above script running once I docker run my image, I am able to visit http://localhost:6080/vnc.html whereby I am first prompted to click on "Connect" and then enter a password - the password in this context would be VNC password (which in my example is just 'password').

I have been looking through the following novnc/noVNC#522 and I am wondering if anyone could provide an example of how I could use --auth-pligin' or --token-plugin` to authenticate the user's session instead of prompting the user for the VNC password, as in the end product, the user wouldn't know of the VNC password/shouldn't have to enter a VNC password.

If this is not possible, can the VNC password be propagated to this form instead?

UPDATE: For reference, these are the packages I am installing:

# RUN zypper install --no-recommends -y vncserver
RUN zypper install --no-recommends -y xorg-x11-server
RUN zypper install --no-recommends -y xorg* xterm xauth xorg-x11-fonts xorg-x11-fonts-core xorg-x11-Xvnc tigervnc

# python3-numpy to accelerate processing in python websockify
RUN zypper install -y xorg-x11-Xvnc-novnc python3-numpy python3-websockify python3-PyJWT python-websockify-common
RUN zypper install -y nginx
@CendioOssman
Copy link
Member

As you've already asked this on the noVNC group, let's continue the discussion there and avoid duplication.

@CendioOssman CendioOssman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 3, 2024
@CendioOssman CendioOssman added the duplicate This issue or pull request already exists label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants