<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>43646</bug_id>
          
          <creation_ts>2022-08-29 16:52:23 +0300</creation_ts>
          <short_desc>Не работает подключение по протоколу SPICE</short_desc>
          <delta_ts>2023-02-08 16:48:21 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>openuds-server</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Elena Mishina">lepata</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>shaba</cc>
    
    <cc>thatman</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>214156</commentid>
    <comment_count>0</comment_count>
    <who name="Elena Mishina">lepata</who>
    <bug_when>2022-08-29 16:52:23 +0300</bug_when>
    <thetext>При попытке подключения, на клиенте, формируется файл вида:
[virt-viewer]
type=spice
host=kvm
port=5942
password=123
tls-port=-1
fullscreen=0
title=UDS Enterprise:%d - Press SHIFT+F12 to Release Cursor
enable-smartcard=0
enable-usb-autoshare=1
enable-usbredir=1
delete-this-file=1
usb-filter=-1,-1,-1,-1,0
tls-ciphers=DEFAULT
host-subject=
ca=
toggle-fullscreen=shift+f11
release-cursor=shift+f12
secure-attention=ctrl+alt+end
secure-
channels=main;inputs;cursor;playback;record;display;usbredir;smartcard

Подключения не происходит с ошибкой (Linux/Windows): &quot;Не удалось 
установить соединение с графическим сервером 
/tmp/.private/username/filename&quot;

Проблема оказалась в последней строке:  secure-channels=
если она закомментирована, или если из неё убрать параметры main и 
display, то всё работает так как ожидалось.

(Рабочий лог:
{&apos;as_file&apos;: &apos;[virt-viewer]\ntype=spice\nhost=kvm\nport=5942\npassword=123\ntls-port=-1\nfullscreen=1\ntitle=UDS Enterprise:%d - Press SHIFT+F12 to Release Cursor\nenable-smartcard=1\nenable-usb-autoshare=1\nenable-usbredir=1\ndelete-this-file=1\nusb-filter=-1,-1,-1,-1,1\ntls-ciphers=DEFAULT\nhost-subject=\nca=\ntoggle-fullscreen=shift+f11\nrelease-cursor=shift+f12\nsecure-attention=ctrl+alt+end\n#secure-channels=main;inputs;cursor;playback;record;display;usbredir;smartcard\n&apos;}
)

Эта строка формируется в файле 
/usr/share/openuds/uds/transports/SPICE/remote_viewer_file.py:

secure_channel=&apos;secure-
channels=main;inputs;cursor;playback;record;display;usbredir;smartcar
d&apos; 
if tls_port != &apos;-1&apos; else &apos;&apos;

Получается, что либо нужно настраивать SPICE TLS в OpenNebula (но в 
веб-интерфейсе этого не сделать), либо что-то еще делать)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220175</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2023-01-16 15:02:38 +0300</bug_when>
    <thetext>openuds-server-3.5.0-alt3 ошибка воспроизводится.

Если в файле подключения не изменить параметр secure-channels, то подключение падает с ошибкой:
(remote-viewer:54946): GSpice-WARNING **: 14:55:44.824: Invalid port value -1
(remote-viewer:54946): GSpice-DEBUG: 14:55:44.824: ../src/spice-channel.c:2570 main-1:0: Connect error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>220185</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Shabalin">shaba</who>
    <bug_when>2023-01-16 17:18:26 +0300</bug_when>
    <thetext>Планируем реализовать отдельную галку вкючения/выключения для ssl.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>221359</commentid>
    <comment_count>3</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2023-02-08 16:48:21 +0300</bug_when>
    <thetext>openuds-server-3.5.0-alt6 -&gt; sisyphus:

 Wed Feb 08 2023 Alexander Burmatov &lt;thatman@altlinux&gt; 3.5.0-alt6
 - Add checkbox to enable SSL connection for SPICE (ALT #43646)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>