The branch, build-59a18b6e3b5d3f1dd8f07f26433d37fe5984a57d has been updated via eba734c45a3b62effec934404e1b8f78804b25a7 (commit) from 4e7c22e6c1994cc74348e8c8ee808e5e31886de1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: debian/changelog | 2 + pyhoca/wxgui/profilemanager.py | 149 +++++++++++++++++++++++++++++++++++++--- 2 files changed, 141 insertions(+), 10 deletions(-) The diff of changes is: diff --git a/debian/changelog b/debian/changelog index 6c2b1b0..c4c9400 100644 --- a/debian/changelog +++ b/debian/changelog @@ -31,6 +31,8 @@ pyhoca-gui (0.2.1.0-0~x2go1) UNRELEASED; urgency=low - Introduce profile manager tab ,,Link Quality''. Move printing into renamed tab ,,Resource Sharing''. Shrink profile manager window, closes upstream issue: #13. + - Implement SSH agent, automatic key discovery, and SSH agent authentication + request forwarding in session profile manager. * /debian/control: + Maintainer change in package: X2Go Developers <x2go-dev@lists.berlios.de>. diff --git a/pyhoca/wxgui/profilemanager.py b/pyhoca/wxgui/profilemanager.py index 6b80fcf..a3d3976 100644 --- a/pyhoca/wxgui/profilemanager.py +++ b/pyhoca/wxgui/profilemanager.py @@ -250,6 +250,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHKeyFileLabel = wx.StaticText(self.tab_Connection, -1, _(u"Key")+": ") self.SSHKeyFile = wx.TextCtrl(self.tab_Connection, -1, style=wx.TE_PROCESS_ENTER) self.SSHKeyFileBrowseButton = wx.BitmapButton(self.tab_Connection, -1, wx.Bitmap('%s/PyHoca/16x16/system-search.png' % _icons_location, wx.BITMAP_TYPE_ANY), size=wx.Size(self._textfield_height,self._textfield_height), ) + self.SSHAutoLogin = wx.CheckBox(self.tab_Connection, -1, _(u"Discover SSH keys or use SSH agent for X2Go authentication")) + self.SSHForwardAuthAgent = wx.CheckBox(self.tab_Connection, -1, _(u"Enable forwarding of SSH authentication agent connections")) self.UseSSHProxy = wx.CheckBox(self.tab_Connection, -1, _(u"Server behind SSH proxy")) self.SSHProxyUserLabel = wx.StaticText(self.tab_Connection, -1, _(u"User")+": ") self.SSHProxyUser = wx.TextCtrl(self.tab_Connection, -1, "", size=wx.Size(80,20)) @@ -268,6 +270,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHProxyTunnelBetweenLabel = wx.StaticText(self.tab_Connection, -1, " -> ") self.SSHProxyTunnelToHost = wx.TextCtrl(self.tab_Connection, -1, "", size=wx.Size(200,20)) self.SSHProxyTunnelToPort = wx.SpinCtrl(self.tab_Connection, -1, "22", min=1, max=65534) + self.SSHProxyAutoLogin = wx.CheckBox(self.tab_Connection, -1, _(u"Discover SSH keys or use SSH agent for proxy authentication")) self.LinkSpeed = wx.Slider(self.tab_LinkQuality, -1, 0, 0, 4) self.ModemLabel = wx.StaticText(self.tab_LinkQuality, -1, "|\n "+_(u"Modem"), style=wx.ALIGN_CENTRE) @@ -361,9 +364,11 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.Bind(wx.EVT_TEXT, self.OnSSHKeyFileKeyPressed, self.SSHKeyFile) self.Bind(wx.EVT_BUTTON, self.OnSSHKeyFileBrowse, self.SSHKeyFileBrowseButton) self.Bind(wx.EVT_BUTTON, self.OnSSHProxyKeyFileBrowse, self.SSHProxyKeyFileBrowseButton) + self.Bind(wx.EVT_CHECKBOX, self.OnSSHAutoLogin, self.SSHAutoLogin) self.Bind(wx.EVT_CHECKBOX, self.OnUseSSHProxy, self.UseSSHProxy) self.Bind(wx.EVT_CHECKBOX, self.OnSSHProxySameUser, self.SSHProxySameUser) self.Bind(wx.EVT_CHECKBOX, self.OnSSHProxySamePassword, self.SSHProxySamePassword) + self.Bind(wx.EVT_CHECKBOX, self.OnSSHProxyAutoLogin, self.SSHProxyAutoLogin) self.Bind(wx.EVT_TEXT, self.OnUpdateSSHProxyTunnelFromHost, self.SSHProxyTunnelFromHost) self.Bind(wx.EVT_TEXT, self.OnUpdateSSHProxyTunnelFromPort, self.SSHProxyTunnelFromPort) self.Bind(wx.EVT_COMBOBOX, self.OnCompressionSelected, self.Compression) @@ -563,7 +568,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): ## CONNECTION TAB sizer_3 = wx.BoxSizer(wx.VERTICAL) sizer_3_1 = wx.StaticBoxSizer(self.staticbox_Server, wx.VERTICAL) - sizer_3_1_1 = wx.GridBagSizer(hgap=3,vgap=6) + sizer_3_1_1 = wx.GridBagSizer(hgap=5,vgap=6) sizer_3_1_1.Add(self.UserNameLabel, pos=(0,0), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_1_1.Add(self.UserName, pos=(0,1)) sizer_3_1_1.Add((16,0), pos=(0,2)) @@ -574,11 +579,13 @@ class PyHocaGUI_ProfileManager(wx.Dialog): sizer_3_1_1.Add(self.Host, pos=(1,1)) sizer_3_1_1.Add(self.SSHPortLabel, pos=(1,3), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_1_1.Add(self.SSHPort, pos=(1,4), span=(1,2)) - sizer_3_1_1.Add(self.UseSSHProxy, pos=(2,0), span=(1,6), flag=wx.ALIGN_CENTRE_VERTICAL) + sizer_3_1_1.Add(self.SSHAutoLogin, pos=(2,0), span=(1,6), flag=wx.ALIGN_CENTRE_VERTICAL) + sizer_3_1_1.Add(self.SSHForwardAuthAgent, pos=(3,0), span=(1,6), flag=wx.ALIGN_CENTRE_VERTICAL) + sizer_3_1_1.Add(self.UseSSHProxy, pos=(4,0), span=(1,6), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_1.Add(sizer_3_1_1, flag=wx.EXPAND|wx.ALL, border=7) sizer_3_2 = wx.StaticBoxSizer(self.staticbox_Proxy, wx.VERTICAL) - sizer_3_2_1 = wx.GridBagSizer(hgap=5,vgap=6) + sizer_3_2_1 = wx.GridBagSizer(hgap=6,vgap=6) sizer_3_2_1.Add(self.SSHProxySameUser, pos=(0,0), span=(1,6)) sizer_3_2_1.Add(self.SSHProxySamePassword, pos=(1,0), span=(1,6), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_2_1.Add(self.SSHProxyUserLabel, pos=(2,0), flag=wx.ALIGN_CENTRE_VERTICAL) @@ -591,6 +598,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): sizer_3_2_1.Add(self.SSHProxyHost, pos=(3,1), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_2_1.Add(self.SSHProxyPortLabel, pos=(3,3), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_2_1.Add(self.SSHProxyPort, pos=(3,4), span=(1,2), flag=wx.ALIGN_CENTRE_VERTICAL) + sizer_3_2_1.Add(self.SSHProxyAutoLogin, pos=(4,0), span=(1,6), flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_2_1_1 = wx.BoxSizer(wx.HORIZONTAL) sizer_3_2_1_1.Add(self.SSHProxyTunnelLabel, flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_2_1_1.Add(self.SSHProxyTunnelFromHost, flag=wx.ALIGN_CENTRE_VERTICAL) @@ -603,7 +611,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): sizer_3_2_1_1.Add((4, 0)) sizer_3_2_1_1.Add(self.SSHProxyTunnelToPort, flag=wx.ALIGN_CENTRE_VERTICAL) sizer_3_2_1_1.Add((0,32)) - sizer_3_2_1.Add(sizer_3_2_1_1, pos=(4,0), span=(1,6)) + sizer_3_2_1.Add(sizer_3_2_1_1, pos=(5,0), span=(1,6)) sizer_3_2.Add(sizer_3_2_1, flag=wx.EXPAND|wx.ALL, border=7) sizer_3.Add(sizer_3_1, flag=wx.EXPAND|wx.ALL, border=5) @@ -834,8 +842,17 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.Host.SetValue(self.profile_config['host']) self.UserName.SetValue(self.profile_config['user']) self.SSHPort.SetValue(self.profile_config['sshport']) - self.SSHKeyFile.SetValue(self.profile_config['key']) + self.SSHAutoLogin.SetValue(self.profile_config['autologin']) + self.SSHForwardAuthAgent.SetValue(self.profile_config['forwardsshagent']) + if not self.profile_config['autologin']: + self.SSHKeyFile.SetValue(self.profile_config['key']) + else: + self.SSHKeyFile.SetValue("") + self.SSHKeyFileLabel.Enable(False) + self.SSHKeyFile.Enable(False) + self.SSHKeyFileBrowseButton.Enable(False) self.UseSSHProxy.SetValue(self.profile_config['usesshproxy']) + self.SSHProxyAutoLogin.SetValue(self.profile_config['sshproxyautologin']) _ssh_proxy = self.profile_config['usesshproxy'] _ssh_proxy_host = self.profile_config['sshproxyhost'] @@ -1014,6 +1031,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.PulseAudio.SetValue(True) self._toggle_DefaultSoundPort() self.SSHPort.SetValue(self.profile_config['rdpport']) + self.SSHAutoLogin.SetValue(False) + self.SSHForwardAuthAgent.SetValue(False) self.RDPOptions.SetValue(self.profile_config['directrdpsettings']) self.RDPServerLabel.Enable(True) self.RDPServer.Enable(False) @@ -1026,6 +1045,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): else: self.disable_DirectRDP() self._toggle_SetKeyboard() + self._toggle_SSHProxy() self.RDPServerLabel.Enable(True) self.RDPServer.Enable(True) self.RDPOptionsLabel.Enable(True) @@ -1037,6 +1057,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): else: self.disable_DirectRDP() self._toggle_SetKeyboard() + self._toggle_SSHProxy() self.RDPServerLabel.Enable(False) self.RDPServer.Enable(False) self.RDPOptionsLabel.Enable(False) @@ -1199,8 +1220,29 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHPort.Enable(False) self.SSHKeyFileLabel.Enable(False) self.SSHKeyFile.Enable(False) + self.SSHAutoLogin.Enable(False) + self.SSHForwardAuthAgent.Enable(False) self.UseSSHProxy.Enable(False) self.staticbox_Proxy.Enable(False) + self.SSHProxyUserLabel.Enable(False) + self.SSHProxyUser.Enable(False) + self.SSHProxySameUser.Enable(False) + self.SSHProxySamePassword.Enable(False) + self.SSHProxyKeyFileLabel.Enable(False) + self.SSHProxyKeyFile.Enable(False) + self.SSHProxyKeyFileBrowseButton.Enable(False) + self.SSHProxyHostLabel.Enable(False) + self.SSHProxyHost.Enable(False) + self.SSHProxyPortLabel.Enable(False) + self.SSHProxyPort.Enable(False) + self.SSHProxyTunnelLabel.Enable(False) + self.SSHProxyTunnelFromHost.Enable(False) + self.SSHProxyTunnelFromPort.Enable(False) + self.SSHProxyTunnelBetweenLabel.Enable(False) + self.SSHProxyTunnelToHost.Enable(False) + self.SSHProxyTunnelToPort.Enable(False) + self.SSHProxyAutoLogin.Enable(False) + def __update_from_screen(self): """\ @@ -1216,6 +1258,8 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.profile_config['sessiontitle'] = self.CustomSessionWindowTitle.GetValue() self.profile_config['autostart'] = self.AutoStartSession.GetValue() self.profile_config['autoconnect'] = self.AutoConnectSessionProfile.GetValue() + self.profile_config['autologin'] = self.SSHAutoLogin.GetValue() + self.profile_config['forwardsshagent'] = self.SSHForwardAuthAgent.GetValue() self.profile_config['published'] = self.UsePublishedApplications.GetValue() if not self.default_icon: self.profile_config['icon'] = self.IconPath @@ -1225,12 +1269,10 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.profile_config['key'] = self.SSHKeyFile.GetValue() if self.UseSSHProxy.GetValue(): self.profile_config['usesshproxy'] = True - self.profile_config['sshproxyautologin'] = self.profile_config['autologin'] self.profile_config['host'] = self.SSHProxyTunnelFromHost.GetValue() self.profile_config['sshport'] = self.SSHProxyTunnelFromPort.GetValue() else: self.profile_config['usesshproxy'] = False - self.profile_config['sshproxyautologin'] = False self.profile_config['host'] = self.Host.GetValue() if _session_type != 'DirectRDP': self.profile_config['sshport'] = self.SSHPort.GetValue() @@ -1244,6 +1286,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHProxyTunnelToHost.GetValue(), self.SSHProxyTunnelToPort.GetValue(), ) + self.profile_config['sshproxyautologin'] = self.SSHProxyAutoLogin.GetValue() if self.profile_config['sshproxysameuser']: self.profile_config['sshproxyuser'] = '' else: @@ -1269,6 +1312,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): elif _session_type == 'DirectRDP': _command = 'RDP' self.profile_config['usesshproxy'] = False + self.profile_config['autologin'] = False self.profile_config['rootless'] = False self.profile_config['directrdp'] = True self.profile_config['directrdpsettings'] = self.RDPOptions.GetValue() @@ -1445,8 +1489,30 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHPort.SetValue(self.profile_config_bak['rdpport']) self.SSHKeyFileLabel.Enable(False) self.SSHKeyFile.Enable(False) + self.SSHKeyFileBrowseButton.Enable(False) + self.SSHAutoLogin.Enable(False) + self.SSHForwardAuthAgent.Enable(False) self.UseSSHProxy.Enable(False) self.staticbox_LinkSpeed.Enable(False) + self.staticbox_Proxy.Enable(False) + self.SSHProxyUserLabel.Enable(False) + self.SSHProxyUser.Enable(False) + self.SSHProxySameUser.Enable(False) + self.SSHProxySamePassword.Enable(False) + self.SSHProxyKeyFileLabel.Enable(False) + self.SSHProxyKeyFile.Enable(False) + self.SSHProxyKeyFileBrowseButton.Enable(False) + self.SSHProxyHostLabel.Enable(False) + self.SSHProxyHost.Enable(False) + self.SSHProxyPortLabel.Enable(False) + self.SSHProxyPort.Enable(False) + self.SSHProxyTunnelLabel.Enable(False) + self.SSHProxyTunnelFromHost.Enable(False) + self.SSHProxyTunnelFromPort.Enable(False) + self.SSHProxyTunnelBetweenLabel.Enable(False) + self.SSHProxyTunnelToHost.Enable(False) + self.SSHProxyTunnelToPort.Enable(False) + self.SSHProxyAutoLogin.Enable(False) self.LinkSpeed.Enable(False) self.ModemLabel.Enable(False) self.ISDNLabel.Enable(False) @@ -1493,9 +1559,16 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHPort.SetValue(self.profile_config_bak['sshport']) else: self.SSHPort.SetValue(self.SSHProxyTunnelFromPort.GetValue()) - self.SSHKeyFileLabel.Enable(True) - self.SSHKeyFile.Enable(True) + self.SSHAutoLogin.Enable(True) + self.SSHForwardAuthAgent.Enable(True) + self.SSHAutoLogin.SetValue(self.profile_config_bak['autologin']) + self.SSHForwardAuthAgent.SetValue(self.profile_config_bak['forwardsshagent']) + if not self.SSHAutoLogin.GetValue(): + self.SSHKeyFileLabel.Enable(True) + self.SSHKeyFile.Enable(True) + self.SSHKeyFileBrowseButton.Enable(True) self.UseSSHProxy.Enable(True) + self.staticbox_Proxy.Enable(True) self.staticbox_LinkSpeed.Enable(True) self.LinkSpeed.Enable(True) self.ModemLabel.Enable(True) @@ -1583,6 +1656,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.profile_config_bak['rdpserver'] = self.RDPServer.GetValue() self.profile_config_bak['rdpoptions'] = self.RDPOptions.GetValue() self.profile_config_bak['soundsystem'] = self._get_SoundSystem() + self.profile_config_bak['usesshproxy'] = self.UseSSHProxy.GetValue() + self.profile_config_bak['autologin'] = self.SSHAutoLogin.GetValue() + self.profile_config_bak['forwardsshagent'] = self.SSHForwardAuthAgent.GetValue() + self.UseSSHProxy.SetValue(False) + self.SSHAutoLogin.SetValue(False) + self.SSHForwardAuthAgent.SetValue(False) self.PulseAudio.SetValue(True) self.Arts.SetValue(False) self.Esd.SetValue(False) @@ -1603,8 +1682,12 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.profile_config_bak['directrdpsettings'] = self.RDPOptions.GetValue() self.disable_DirectRDP() self._toggle_SetKeyboard() + self.UseSSHProxy.SetValue(self.profile_config_bak['usesshproxy']) + self._toggle_SSHProxy() self._set_SoundSystem(self.profile_config_bak['soundsystem']) self._toggle_DefaultSoundPort() + self.SSHAutoLogin.SetValue(self.profile_config_bak['autologin']) + self.SSHForwardAuthAgent.SetValue(self.profile_config_bak['forwardsshagent']) self.RDPServerLabel.Enable(True) self.RDPServer.Enable(True) self.RDPOptionsLabel.Enable(True) @@ -1621,6 +1704,10 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.profile_config_bak['rdpoptions'] = self.RDPOptions.GetValue() self.disable_DirectRDP() self._toggle_SetKeyboard() + self.SSHAutoLogin.SetValue(self.profile_config_bak['autologin']) + self.SSHForwardAuthAgent.SetValue(self.profile_config_bak['forwardsshagent']) + self.UseSSHProxy.SetValue(self.profile_config_bak['usesshproxy']) + self._toggle_SSHProxy() self._set_SoundSystem(self.profile_config_bak['soundsystem']) self._toggle_DefaultSoundPort() self.RDPServerLabel.Enable(False) @@ -1742,6 +1829,42 @@ class PyHocaGUI_ProfileManager(wx.Dialog): path = dlg.GetPath() self.SSHProxyKeyFile.SetValue(path) + def OnSSHAutoLogin(self, event): + """\ + Gets called if the ssh-proxy-auto-login checkbox gets marked. + + @param event: event + @type event: C{obj} + + """ + if self.SSHAutoLogin.GetValue(): + self.SSHKeyFileLabel.Enable(False) + self.SSHKeyFile.Enable(False) + self.SSHKeyFile.SetValue("") + self.SSHKeyFileBrowseButton.Enable(False) + else: + self.SSHKeyFileLabel.Enable(True) + self.SSHKeyFile.Enable(True) + self.SSHKeyFile.SetValue(self.profile_config_bak['key']) + self.SSHKeyFileBrowseButton.Enable(True) + + def OnSSHProxyAutoLogin(self, event): + """\ + Gets called if the ssh-proxy-auto-login checkbox gets marked. + + @param event: event + @type event: C{obj} + + """ + if self.SSHProxyAutoLogin.GetValue(): + self.SSHProxyKeyFileLabel.Enable(False) + self.SSHProxyKeyFile.Enable(False) + self.SSHProxyKeyFileBrowseButton.Enable(False) + else: + self.SSHProxyKeyFileLabel.Enable(True) + self.SSHProxyKeyFile.Enable(True) + self.SSHProxyKeyFileBrowseButton.Enable(True) + def OnUseSSHProxy(self, event): """\ Gets called if the use-ssh-proxy checkbox gets marked. @@ -1804,13 +1927,18 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHProxyUser.Enable(True) if self.SSHProxySamePassword.GetValue(): self.SSHProxyKeyFile.SetValue(self.SSHKeyFile.GetValue()) + else: + self.SSHProxyKeyFile.SetValue(self.profile_config_bak['sshproxykeyfile']) + if self.SSHProxySamePassword.GetValue() or self.SSHProxyAutoLogin.GetValue(): self.SSHProxyKeyFile.Enable(False) self.SSHProxyKeyFileBrowseButton.Enable(False) else: - self.SSHProxyKeyFile.SetValue(self.profile_config_bak['sshproxykeyfile']) self.SSHProxyKeyFileLabel.Enable(True) self.SSHProxyKeyFile.Enable(True) self.SSHProxyKeyFileBrowseButton.Enable(True) + if self.SSHProxyAutoLogin.GetValue(): + self.SSHProxyKeyFileLabel.Enable(False) + self.SSHProxyAutoLogin.Enable(True) self.SSHProxyTunnelLabel.Enable(True) self.SSHProxyTunnelFromHost.Enable(True) self.SSHProxyTunnelFromPort.Enable(True) @@ -1842,6 +1970,7 @@ class PyHocaGUI_ProfileManager(wx.Dialog): self.SSHProxyTunnelBetweenLabel.Enable(False) self.SSHProxyTunnelToHost.Enable(False) self.SSHProxyTunnelToPort.Enable(False) + self.SSHProxyAutoLogin.Enable(False) self.Host.Enable(True) self.HostLabel.Enable(True) self.Host.SetValue(self.profile_config_bak['host']) hooks/post-receive -- pyhoca-gui.git (Python X2Go Client (wxPython GUI)) This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "pyhoca-gui.git" (Python X2Go Client (wxPython GUI)).