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

Add view-only switch to vnc configuration #704

Closed
xlemmingx opened this issue Sep 15, 2021 · 3 comments
Closed

Add view-only switch to vnc configuration #704

xlemmingx opened this issue Sep 15, 2021 · 3 comments
Labels

Comments

@xlemmingx
Copy link

Description of the problem: By default the vnc session allows interactions including moving/closing the browser and accessing the underlying container. To avoid confusion and minimize security risks, a switch or configuration property to only allow view mode on server side would be great. The client switch in novnc is not a proper alternative.

Browser and version: All Browsers affected

Operating system: Debian 10 64 bit

WebDriverManager version: WDM 5.0.1

WebDriverManager call: WebDriverManager.getInstance(String.valueOf(type)).browserInDocker().enableVnc().dockerScreenResolution("1920x1080x24").create();

Thanks for your great work, loving v5 and the docker features so far!

@bonigarcia
Copy link
Owner

At this moment, to achieve that, you simply need to set to true the URL parameter view_only to your noVNC URL. For instance:

http://localhost:49161/?view_only=true

@xlemmingx
Copy link
Author

Yes but every user can remove that URL parameter and therefore get full access again. That's why I'm looking for a server sided solution as mentioned here (via environment variable): https://github.com/SeleniumHQ/docker-selenium

If you want to run VNC in view-only mode you can set the environment variable VNC_VIEW_ONLY=1.

But I think I currently don't have the possibility to add environment variables to the browser containers since WDM is starting them for me. Or did I miss something?

@bonigarcia
Copy link
Owner

I added an API method to configure this in version 5.0.3, just released. See doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants