[pve-devel] noVNC via External Application
Entwickler (centron GmbH)
entwickler at centron.de
Fri Oct 20 09:04:47 CEST 2017
Hello,
we have problems with using noVNC from our own Administration Panel with Proxmox.
We created a vnc ticket with /api2/json/nodes/#PROXMOXNODE#/qemu/#VMID#/vncproxy
But to get the vnc console working from external Site with wss an authentication to Proxmox user is required and a ticket authentication.
To have no double authentication and get this working we patched our PVE Proxy:
Is it possible to implement this patch, or do a solution for this?
Here ist he patch:
patch /usr/share/perl5/PVE/HTTPServer.pm vnc.patch
+++ /usr/share/perl5/PVE/HTTPServer.pm 2017-09-05 11:34:49.384362071 +0200
@@ -77,11 +77,16 @@ sub auth_handler {
if ($require_auth) {
- die "No ticket\n" if !$ticket;
-
- ($username, $age) = PVE::AccessControl::verify_ticket($ticket);
-
- $rpcenv->set_user($username);
+ if ($rel_uri =~ /vncwebsocket/ && $method eq 'GET' && !$ticket)
+ {
+ $rpcenv->set_user("vnc\@pve");
+ $username = "vnc\@pve";
+ $age = 60;
+ } else {
+ die "No ticket\n" if !$ticket;
+ ($username, $age) = PVE::AccessControl::verify_ticket($ticket);
+ $rpcenv->set_user($username);
+ }
if ($method eq 'POST' && $rel_uri =~ m|^/nodes/([^/]+)/storage/([^/]+)/upload$|) {
my ($node, $storeid) = ($1, $2);
More information about the pve-devel
mailing list