Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

vnc authentication seems to be not working #1231

@h-bahrami

Description

@h-bahrami

Hi,
I am trying to secure the VNC traffic by Nginx's secure_link_module or something like that, after finding it not working I tried to understand what's the problem then I see that VncAuthenticationServlet implemented to do the authentication, but it seems that it does not receive/check the requests.

So based on the Nginx config (below) all the requests to proxy/ip:port/websockify should be authenticated by VncAuthenticationServlet, I put a couple of LOGGER.info calls to see how can I customize it for my own purpose, but no logs were captured.

Please help me figure out if this part is not working at all or I'm missing something here.
It worth mentioning that the Zalenium is hosted inside Kubernetes the noVNC client works perfectly through HTTPS (WSS).

location ~ ^{{contextPath}}/proxy/(.*):(\d+)/websockify$ {
            
            # secure_link_secret @mysecret;
            # if ($secure_link = "") { return 403; }

            auth_request {{contextPath}}/auth;
            proxy_http_version 1.1;
            proxy_pass http://$1:$2/;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";

            # VNC connection timeout
            proxy_read_timeout 61s;

            # Disable cache
            proxy_buffering off;
        }
        location {{contextPath}}/auth {
            internal;
            proxy_pass http://127.0.0.1:4445/vnc/auth;
            proxy_pass_request_body off;
            proxy_set_header        Content-Length "";
            proxy_set_header        X-Original-URI $request_uri;
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions