mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-03 01:17:56 +03:00
fixed uds master key name and added global *_enterprise to .gitignore
This commit is contained in:
parent
cc3cd7999d
commit
0689bafa9c
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
*.orig
|
*.orig
|
||||||
|
|
||||||
|
*_enterprise
|
||||||
.settings/
|
.settings/
|
||||||
|
|
||||||
# Debian buildings
|
# Debian buildings
|
||||||
@ -60,7 +61,7 @@
|
|||||||
/rdptransport/java/jar/*.jar
|
/rdptransport/java/jar/*.jar
|
||||||
|
|
||||||
# /server/
|
# /server/
|
||||||
/server/*_enterprise
|
*_enterprise
|
||||||
/server/openuds.sublime-project
|
/server/openuds.sublime-project
|
||||||
/server/openuds.sublime-workspace
|
/server/openuds.sublime-workspace
|
||||||
|
|
||||||
|
@ -46,7 +46,6 @@ from uds.models import UserService
|
|||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import six
|
import six
|
||||||
import simplejson as json
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
@ -54,7 +53,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
# Actor key, configurable in Security Section of administration interface
|
# Actor key, configurable in Security Section of administration interface
|
||||||
actorKey = Config.Config.section(Config.SECURITY_SECTION).value('actorKey',
|
actorKey = Config.Config.section(Config.SECURITY_SECTION).value('Master Key',
|
||||||
cryptoManager().uuid(datetime.datetime.now()).replace('-', ''),
|
cryptoManager().uuid(datetime.datetime.now()).replace('-', ''),
|
||||||
type=Config.Config.TEXT_FIELD)
|
type=Config.Config.TEXT_FIELD)
|
||||||
actorKey.get()
|
actorKey.get()
|
||||||
@ -65,6 +64,7 @@ ERR_HOST_NOT_MANAGED = 2
|
|||||||
ERR_USER_SERVICE_NOT_FOUND = 3
|
ERR_USER_SERVICE_NOT_FOUND = 3
|
||||||
ERR_OSMANAGER_ERROR = 4
|
ERR_OSMANAGER_ERROR = 4
|
||||||
|
|
||||||
|
|
||||||
# Enclosed methods under /actor path
|
# Enclosed methods under /actor path
|
||||||
class Actor(Handler):
|
class Actor(Handler):
|
||||||
'''
|
'''
|
||||||
@ -160,9 +160,12 @@ class Actor(Handler):
|
|||||||
|
|
||||||
inUse = service.in_use
|
inUse = service.in_use
|
||||||
|
|
||||||
|
username = ''
|
||||||
# Preprocess some messages, common to all clients, such as "log"
|
# Preprocess some messages, common to all clients, such as "log"
|
||||||
if message == 'log':
|
if message == 'log':
|
||||||
data = '\t'.join((self._params.get('message'), six.text_type(self._params.get('level', 10000))))
|
data = '\t'.join((self._params.get('message'), six.text_type(self._params.get('level', 10000))))
|
||||||
|
elif message in ('login', 'logout', 'logon', 'logoff'):
|
||||||
|
username = data
|
||||||
|
|
||||||
try:
|
try:
|
||||||
res = service.getInstance().osmanager().process(service, message, data)
|
res = service.getInstance().osmanager().process(service, message, data)
|
||||||
@ -172,10 +175,10 @@ class Actor(Handler):
|
|||||||
# Force service reload to check if inUse has changed, so we can log login/logout
|
# Force service reload to check if inUse has changed, so we can log login/logout
|
||||||
service = UserService.objects.get(uuid=uuid)
|
service = UserService.objects.get(uuid=uuid)
|
||||||
if service.in_use != inUse: # If state changed, log it
|
if service.in_use != inUse: # If state changed, log it
|
||||||
type_ = inUse and 'login' or 'logout'
|
instance = service.getInstance()
|
||||||
|
type_ = 'login' if service.in_use else 'logout'
|
||||||
uniqueId = service.unique_id
|
uniqueId = service.unique_id
|
||||||
serviceIp = ''
|
serviceIp = instance.getIp()
|
||||||
username = ''
|
|
||||||
log.useLog(type_, uniqueId, serviceIp, username)
|
log.useLog(type_, uniqueId, serviceIp, username)
|
||||||
|
|
||||||
return Actor.result(res)
|
return Actor.result(res)
|
||||||
|
233
windowsActor/setup-dialog.ui
Normal file
233
windowsActor/setup-dialog.ui
Normal file
@ -0,0 +1,233 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>UdsActorSetupDialog</class>
|
||||||
|
<widget class="QDialog" name="UdsActorSetupDialog">
|
||||||
|
<property name="windowModality">
|
||||||
|
<enum>Qt::WindowModal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>399</width>
|
||||||
|
<height>192</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>UDS Actor Configuration</string>
|
||||||
|
</property>
|
||||||
|
<property name="autoFillBackground">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="locale">
|
||||||
|
<locale language="English" country="UnitedStates"/>
|
||||||
|
</property>
|
||||||
|
<property name="sizeGripEnabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="modal">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QPushButton" name="testButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>120</y>
|
||||||
|
<width>361</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Click to test the selecter parameters</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>Click on this button to test the server host and master key parameters.</p><p>A window will be displayed with results after the test is executed.</p><p><br/></p><p>This button will only be active if all parameters are filled.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Test parameters</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="saveButton">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>101</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Accepts changes and saves them</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Clicking on this button will accept all changes and save them, closing the configuration window</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Accept && Save</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton" name="cancelButton">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>264</x>
|
||||||
|
<y>150</y>
|
||||||
|
<width>111</width>
|
||||||
|
<height>23</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>111</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Cancel all changes and discard them</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Discards all changes and closes the configuration window</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Cancel && Discard</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>361</width>
|
||||||
|
<height>94</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QFormLayout" name="formLayout">
|
||||||
|
<property name="fieldGrowthPolicy">
|
||||||
|
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>UDS Server Host</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="host">
|
||||||
|
<property name="acceptDrops">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Uds Broker Server Addres. Use IP or FQDN</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string>Enter here the UDS Broker Addres using either its IP address or its FQDN address</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string>UDS Master Key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="masterKey">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Master key to communicate with UDS Broker</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>Enter the Master Key (found on<span style=" font-weight:600;"> UDS Configuration</span> section) of the UDS Broker to allow communication of the Actor with Broker</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>Security</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QComboBox" name="comboBox">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Select communication security with broker</string>
|
||||||
|
</property>
|
||||||
|
<property name="whatsThis">
|
||||||
|
<string><html><head/><body><p>Select the security for communications with UDS Broker.</p><p>The recommended method of communication is <span style=" font-weight:600;">Use SSL</span>, but selection needs to be acording to your broker configuration.</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Do not use SSL</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>Use SSL</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections>
|
||||||
|
<connection>
|
||||||
|
<sender>host</sender>
|
||||||
|
<signal>textChanged(QString)</signal>
|
||||||
|
<receiver>UdsActorSetupDialog</receiver>
|
||||||
|
<slot>textChanged()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>123</x>
|
||||||
|
<y>31</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>143</x>
|
||||||
|
<y>48</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>masterKey</sender>
|
||||||
|
<signal>textChanged(QString)</signal>
|
||||||
|
<receiver>UdsActorSetupDialog</receiver>
|
||||||
|
<slot>textChanged()</slot>
|
||||||
|
<hints>
|
||||||
|
<hint type="sourcelabel">
|
||||||
|
<x>258</x>
|
||||||
|
<y>75</y>
|
||||||
|
</hint>
|
||||||
|
<hint type="destinationlabel">
|
||||||
|
<x>299</x>
|
||||||
|
<y>84</y>
|
||||||
|
</hint>
|
||||||
|
</hints>
|
||||||
|
</connection>
|
||||||
|
</connections>
|
||||||
|
<slots>
|
||||||
|
<slot>textChanged()</slot>
|
||||||
|
</slots>
|
||||||
|
</ui>
|
Loading…
Reference in New Issue
Block a user