1
0
mirror of https://github.com/dkmstr/openuds.git synced 2025-10-05 07:33:41 +03:00

2566 Commits

Author SHA1 Message Date
Janier Rodríguez
8054bf3ea2 Merge remote-tracking branch 'origin/dev/andres/v4.0' into dev/janier/v4.0 2025-09-18 17:40:04 +02:00
aschumann-virtualcable
e4377b83e4 Corrects Mac RDP file usage and field mapping
Aligns Mac-specific RDP file logic to use the appropriate configuration and updates legacy field naming for better clarity and migration. Ensures Mac connections consistently respect intended custom parameter and file options, reducing potential confusion with Linux settings.
2025-09-18 13:59:48 +02:00
aschumann-virtualcable
6763de2bab Merge remote-tracking branch 'origin/v4.0' into dev/andres/v4.0 2025-09-17 12:35:22 +02:00
Adolfo Gómez García
b4ca743d7c Refactor server management to use atomic transactions for server updates and improve code formatting in service pool model
Fixed is_usable on ServicePool to include locked as a velid is_usable state
2025-09-16 17:45:35 +02:00
Adolfo Gómez García
20f7ae7fcd Update script and preload links in admin index.html with new integrity and timestamp values 2025-09-16 17:34:38 +02:00
Adolfo Gómez García
8aac4f9aa5 Improve error handling in UserServiceManager for non-active elements and task errors 2025-09-16 16:00:37 +02:00
aschumann-virtualcable
f494c706fc Updates RDP signature files for macOS with new parameters 2025-09-15 12:34:00 +02:00
Janier Rodríguez
38b3f3ac47 Merge remote-tracking branch 'origin/dev/andres/v4.0' into dev/janier/v4.0 2025-09-15 12:07:06 +02:00
aschumann-virtualcable
76b488dc1d Extends RDP custom parameter support for macOS clients
Unifies logic for applying custom RDP parameters to macOS alongside Windows and Linux, improving compatibility and flexibility for connecting from Apple platforms.

Refactors script handling to better support Thincast and MSRDC clients on macOS, allowing password injection into RDP files and debugging RDP file content. Adds consistent type hints to suppress type checking warnings in subprocess and file operations.

Enhances tunnel scripts to properly apply RDP file logic for Thincast and improves debugging output.

No issue reference provided.
2025-09-15 11:23:47 +02:00
aschumann-virtualcable
826cc7aed8 Add macOS support for RDP file usage in Thincast connections
Adds macOS RDP file support for Thincast connections

Introduces a configurable option to use RDP files for Thincast and xfreerdp on macOS, enabling seamless file-based connections. Updates logic to open Thincast with the RDP file when the option is enabled, improving compatibility and user experience for macOS users.
2025-09-12 15:38:14 +02:00
aschumann-virtualcable
4da15d66fe Improves Thincast client detection and launch on macOS
Switches Thincast detection from file to directory check to match macOS app bundle structure.

Updates Thincast launch logic to use the 'open' command with appropriate arguments, improving compatibility and reliability.

Removes unused code for opening .rdp files with Thincast and applies consistent resolution handling.

Ensures signature files are updated accordingly.
2025-09-12 12:09:54 +02:00
aschumann-virtualcable
79495fc3b1 Enables Thincast support for RDP transport on macOS
Uncomments and activates logic for launching Thincast client,
allowing users to initiate RDP sessions via Thincast.

Updates the related signature file for integrity validation.
2025-09-12 11:24:31 +02:00
Janier Rodríguez
a07ee92496 Merge remote-tracking branch 'origin/dev/andres/v4.0' into dev/janier/v4.0 2025-09-12 10:06:33 +02:00
Adolfo Gómez García
f438a9241e Remove unused import of DynamicUserService in Xen service module 2025-09-11 17:12:34 +02:00
aschumann-virtualcable
e37b345aff Adds support for RDP file custom params on Linux
Enables the use of Windows custom parameters in RDP file generation when specified for Linux targets, aligning Linux behavior with Windows.

Improves flexibility for custom connection settings across platforms.
2025-09-11 13:15:07 +02:00
aschumann-virtualcable
ce1330066f Enhance XFREERDP and Thincast support to conditionally use RDP files, improving parameter handling and logging.
Improves RDP client handling with conditional file usage

Allows XFREERDP and Thincast to use RDP files when provided, enhancing parameter management and execution flexibility.
Refines logging for better traceability of client launch logic.
2025-09-10 19:22:37 +02:00
aschumann-virtualcable
20e86cd8c7 Refactor Thincast support: rename lnx_thincast_rdp_file to lnx_use_rdp_file, update related logic in RDPTransport and BaseRDPTransport, and enhance RDP file handling in direct.py and tunnel.py.
Refactors Thincast RDP file support for Linux clients

Renames and consolidates configuration for using RDP files with Thincast and xfreerdp, streamlines related logic, and enhances RDP file handling in Linux scripts. Improves clarity, maintainability, and user experience for Linux RDP connections.
2025-09-10 18:33:59 +02:00
Adolfo Gómez García
dc52e37abc Fix proxy handling in secure_requests_session to check for None instead of truthiness 2025-09-09 21:40:17 +02:00
Adolfo Gómez García
69fae6a1a6 Refactor access denial handling in blocker decorator and update frequency for DeployedServiceInfoItemsCleaner 2025-09-09 18:58:13 +02:00
Adolfo Gómez García
7c14923afe Add string representation method to Environment class 2025-09-09 18:07:02 +02:00
Adolfo Gómez García
9e66583b4e Enhance MAC address handling in Proxmox and Xen services; add maintenance command for cleaning unused MACs 2025-09-09 16:58:49 +02:00
aschumann-virtualcable
34676c817f Enhance Thincast support by updating RDPTransport to conditionally handle 'as_file' and improve logging in direct.py for better debugging. 2025-09-09 11:16:52 +02:00
aschumann-virtualcable
d17224c9cb Merge branch 'dev/andres/v4.0' of github.com:VirtualCable/openuds into dev/andres/v4.0 2025-09-09 10:43:02 +02:00
aschumann-virtualcable
b57b00f3fc Add lnx_thincast_rdp_file field to RDPTransport and BaseRDPTransport for Thincast support 2025-09-09 10:42:40 +02:00
Janier Rodríguez
39dd25dfeb Merge remote-tracking branch 'origin/dev/andres/v4.0' into dev/janier/v4.0 2025-09-08 13:31:15 +02:00
aschumann-virtualcable
f82041da1e Add debug logging for Thincast RDP file processing and update signatures 2025-09-08 13:10:04 +02:00
aschumann-virtualcable
03a837f865 Add Thincast support and improve logging in RDP scripts 2025-09-08 13:08:12 +02:00
Adolfo Gómez García
473dc2577f Add MAC Address field to ServersTokens API response 2025-09-05 16:42:31 +02:00
Adolfo Gómez García
49dfaf3709 Add NO_MORE_MACS constant and update error handling in DynamicUserService and UniqueMacGenerator 2025-09-04 22:01:18 +02:00
Adolfo Gómez García
f5afb79a2b Limit length of server group name and comments in migrate function for consistency 2025-09-04 20:18:43 +02:00
Adolfo Gómez García
bd26fb38d9 Add error logging for unavailable IDs in UniqueGenerator and UniqueMacGenerator 2025-09-04 19:20:35 +02:00
Janier Rodríguez
2e7cd1b768 Add logging for Thincast and RDP client discovery in direct.py and tunnel.py 2025-09-04 13:13:32 +02:00
Janier Rodríguez
ec84a77280 Merge remote-tracking branch 'origin/dev/andres/v4.0' into dev/janier/v4.0 2025-09-04 12:02:41 +02:00
aschumann-virtualcable
95f0b0ab26 Update tunnel.py.signature with new signature data 2025-09-04 11:59:05 +02:00
aschumann-virtualcable
28433fc33e Add support for Thincast in RDP scripts and improve executable search logic 2025-09-04 11:55:41 +02:00
aschumann-virtualcable
fc4e7414df Update subproject commits for actor and client modules 2025-09-04 11:26:01 +02:00
aschumann-virtualcable
e61cb1f855 Add logging for client discovery in RDP scripts 2025-09-04 11:25:24 +02:00
Adolfo Gómez García
689214cf84 Refactor code formatting in ServerManager and Server classes for improved readability 2025-09-04 02:05:41 +02:00
Adolfo Gómez García
d268478767 Add server stats weights handling and update load calculation 2025-09-04 02:04:17 +02:00
Adolfo Gómez García
4a5ad5dc09 Update max user limit in ServerStats comment from 1000 to 100 for accuracy 2025-09-03 16:06:41 +02:00
Adolfo Gómez García
7365ee8cc6 Fix CryptoManager call in generate_uuid function to use manager method 2025-09-03 15:44:54 +02:00
Adolfo Gómez García
5a93aa15e8 Add HA group handling for Proxmox version 9 and update tests accordingly 2025-08-25 17:29:08 +02:00
Janier Rodríguez
fbe861638f Merge remote-tracking branch 'origin/v4.0' into dev/janier/v4.0 2025-08-22 10:18:07 +02:00
Janier Rodríguez
55865c87f6 init dev 2025-08-21 18:11:28 +02:00
aschumann-virtualcable
1fddc17b75 initial dev enviroment 2025-08-21 18:04:11 +02:00
Adolfo Gómez García
ca540d7725 Improve logging message in RadiusClient and change secret field to PasswordField in RadiusOTP for better security 2025-08-21 16:30:39 +02:00
Adolfo Gómez García
fe11b485ed Rename _ensure_local_db_exists method to ensure_local_db_exists for clarity 2025-08-19 17:16:38 +02:00
Adolfo Gómez García
12394c873c Rename force_new parameter to for_unique_id in multiple services for clarity and consistency
Fixed NutanixPrism getting the mac at the end of the generation
2025-08-08 18:27:30 +02:00
Adolfo Gómez García
5904a9c9c5 Add timeit context manager for measuring code execution time 2025-08-07 18:17:55 +02:00
Adolfo Gómez García
6ecefbabe8 Add checks for VM state and delete_vm calls in TestXenPublication and TestProxmoxPublication 2025-08-07 05:42:56 +02:00
Adolfo Gómez García
74908f186c Rename domain_allowed parameter to allow_domain in validate_hostname function for consistency 2025-08-07 05:37:07 +02:00
Adolfo Gómez García
102b36d090 Rename new_func to connect_and_execute for improved clarity in ensure_connected decorator 2025-07-31 17:24:11 +02:00
Adolfo Gómez García
52f8a91f75 Add docstring to validate_hostname function for improved clarity and usage 2025-07-31 17:01:30 +02:00
Adolfo Gómez García
ad9a0c3f11 Improve logging for future job execution warnings with detailed timestamps 2025-07-31 16:54:38 +02:00
Adolfo Gómez García
c5299378cf Refactor AssignedService and CachedService classes to improve field handling and structure 2025-07-30 16:19:56 +02:00
Adolfo Gómez García
6c315ef8a8 Add persistent database configuration for SQLite with connection options 2025-07-23 21:04:03 +02:00
Adolfo Gómez García
6f192a8f7c Improve error logging in process function to include stack trace 2025-07-23 20:13:21 +02:00
Adolfo Gómez García
890f00b111 Refactor logging in process_log function for improved readability 2025-07-23 20:12:53 +02:00
Adolfo Gómez García
3e67e3ba30 Add MAC address display to ServersServers detail response 2025-07-23 18:09:35 +02:00
Adolfo Gómez García
e5ea6d6a33 Update RDP security handling to use TLS when no credentials are provided 2025-07-22 17:05:14 +02:00
Adolfo Gómez García
3009ae601a Refactor RDP security handling to use no_credentials flag instead of force_rdp_security for improved clarity 2025-07-22 16:59:36 +02:00
Adolfo Gómez García
ed2e3c557d Enhance UDSClusterNode representation with as_dict method and update tree command to use dictionary format for cluster nodes 2025-07-22 16:02:54 +02:00
Adolfo Gómez García
7ca96e4262 Enhance get_serialized_from_managed_object function with callback support and update system tree structure to include connectivity details, scheduled jobs, and delayed tasks 2025-07-21 21:54:16 +02:00
Adolfo Gómez García
46546a837e Add network interface utilities and update SystemInformation job frequency 2025-07-21 19:38:27 +02:00
Adolfo Gómez García
f1ffe0cb9c Add support for proxy configuration in secure_requests_session function 2025-07-21 17:32:56 +02:00
Adolfo Gómez García
7ce0fb0f22 Enhance logging in XenPublication and XenClient classes for better traceability; refactor variable naming for consistency 2025-07-19 02:31:34 +02:00
Adolfo Gómez García
a90d2719a3 Add SystemInformation job for periodic cluster info storage 2025-07-19 02:31:27 +02:00
Adolfo Gómez García
e8d7da650c Fix type hinting for value field in Properties model by using typing.cast 2025-07-19 02:31:08 +02:00
Adolfo Gómez García
6f4d14bdf2 Enhance TimeTrack class: fix last_check assignment logic and add get_my_ip_from_db function for retrieving server IP from the database 2025-07-19 02:30:27 +02:00
Adolfo Gómez García
9f303b8cfa Implement cluster management functionality: add UDSClusterNode class, store_cluster_info, and enumerate_cluster_nodes methods; integrate with task manager and tree commands. 2025-07-19 02:29:52 +02:00
Adolfo Gómez García
8db36ac964 Adjust delayed task execution timing and improve logging for task handling 2025-07-19 02:28:31 +02:00
Adolfo Gómez García
921abfe0bb Use sql_stamp_seconds to adjust timestamp in StatsCountersAccum 2025-07-17 15:27:00 +02:00
Adolfo Gómez García
15b13b00ae Refactor delayed task and scheduler logic to improve time checks; rename maintenance cleanup method for consistency 2025-07-17 03:29:15 +02:00
Adolfo Gómez García
763ca4bd07 Updated translations 2025-06-27 16:25:46 +02:00
Adolfo Gómez García
faf852cdaa updated admin interface to improve some texts 2025-06-27 15:39:28 +02:00
Adolfo Gómez García
35e4422e0e Handle MaxServicesReachedError in UserServiceManager to log error and delete assigned service 2025-06-25 18:37:02 +02:00
Adolfo Gómez García
288757c984 Refactor get_unique_id method in IPMachinesUserService to return MAC address or IP address 2025-06-25 18:03:20 +02:00
Adolfo Gómez García
9b0ea5f893 Updated actor 2025-06-25 16:50:36 +02:00
Adolfo Gómez García
af2178d338 Refactor get_unique_id method in IPMachinesUserService to return IP address instead of hashed VMID 2025-06-25 16:49:50 +02:00
Adolfo Gómez García
3ec748eba6 Enhance operation handling in DynamicUserService to check FINISH state for deferred operations 2025-06-24 13:39:58 +02:00
Adolfo Gómez García
429700d4c1 Enhance deferred operation handling in DynamicUserService for improved state management 2025-06-24 13:33:17 +02:00
Adolfo Gómez García
91184a24b0 Refactor state handling and logging in DynamicUserService for improved clarity 2025-06-22 04:04:55 +02:00
Adolfo Gómez García
8ae073bc27 Improve state update efficiency in PublicationLauncher by specifying updated fields 2025-06-21 19:17:51 +02:00
Adolfo Gómez García
d4b90c387b Refactor destroy operation handling in DynamicPublication for improved clarity 2025-06-21 16:51:17 +02:00
Adolfo Gómez García
bf1b4a3d31 Refactor type hinting in AutoSpecMethodInfo and enhance logging functions in helpers.py 2025-06-21 06:03:37 +02:00
Adolfo Gómez García
ed99412e71 fixed logging info 2025-06-20 01:32:14 +02:00
Adolfo Gómez García
d387366d15 Refactor username and domain handling in HTML5RDP and RDP transports for improved clarity and consistency 2025-06-20 01:25:25 +02:00
Adolfo Gómez García
f781a8001c Add retry_on_exception decorator for enhanced error handling 2025-06-20 01:25:10 +02:00
Adolfo Gómez García
1be33751d9 fixed tag and domain auths 2025-06-17 18:17:27 +02:00
Adolfo Gómez García
b2baf61d0e Remove exception info from IP retrieval error logging in DynamicUserService 2025-06-17 16:20:57 +02:00
Adolfo Gómez García
6d1e999b1f Refactor get_by_tag method to improve tag filtering and update uds_js to handle global login configuration 2025-06-13 17:59:32 +02:00
Adolfo Gómez García
076a300751 Fix username formatting in preconnect request to include domain from transport 2025-06-13 15:40:00 +02:00
Adolfo Gómez García
43406e10f6 Refactor cookie handling and decorators for consistency and clarity 2025-06-12 18:28:48 +02:00
Adolfo Gómez García
87974bf745 Add visibility check for authenticators in uds_js function 2025-06-10 23:08:18 +02:00
Adolfo Gómez García
95e02593c5 Fix variable naming for clarity and adjust condition for dummy record insertion in StatsCountersAccum 2025-06-08 02:21:38 +02:00
Adolfo Gómez García
0f7f08fb4f Fixed stats acummulation in case of interval without data, and added "accumulate" as manage command 2025-06-07 14:44:57 +02:00
Adolfo Gómez
2be6f93964 Update README.md 2025-06-04 16:42:54 +02:00
Adolfo Gómez
28cbf6196a Update README.md 2025-06-04 16:40:11 +02:00
Adolfo Gómez García
4ca4981d97 Rename 'username' to 'account' in LinuxAdOsManagerActorTest for consistency 2025-05-28 21:05:51 +02:00
Adolfo Gómez García
a06d9c0d5c Fixed conversion from stored timestamp to datetime when checking cookies 2025-05-26 16:46:46 +02:00
Adolfo Gómez García
889c10b451 Add field_name property to FieldInfo and set it in UserInterfaceType 2025-05-23 15:46:51 +02:00
Adolfo Gómez García
dcbc252df6 Update log management to clarify log clearing and prevent orphan logs 2025-05-22 17:40:37 +02:00
Adolfo Gómez García
2e29790d57 Fix type hint for parameters in TransportScript to specify value types 2025-05-22 17:20:29 +02:00
Adolfo Gómez García
85b940375d Rename variable 'username' to 'full_username' for clarity in UserServiceManager 2025-05-19 17:12:18 +02:00
Adolfo Gómez García
74abc6c3e7 updated actor 2025-05-14 18:47:12 +02:00
Adolfo Gómez García
de86a999b1 Fix type hint for custom field in ActorData to specify value types 2025-05-14 18:26:48 +02:00
Adolfo Gómez García
583e6220bd Fix logging message to correctly reference DynamicUserService in exception handling 2025-05-12 20:55:33 +02:00
Adolfo Gómez García
11d7a1cad1 Change logging level from info to debug for VM selection and cloning processes; update error logging to warning for guest IP retrieval 2025-05-09 19:32:39 +02:00
Adolfo Gómez García
cd82071bf0 fixed logging info 2025-05-09 19:31:01 +02:00
Adolfo Gómez García
d572d0bff7 Rename 'username' to 'account' in custom user service data to match actor usage 2025-05-09 19:30:26 +02:00
Adolfo Gómez García
28d5895edd Cast parent to support both ServicePool and MetaPool in delete_item method 2025-05-08 17:24:47 +02:00
Adolfo Gómez García
22a5d3dee5 Restore CACHE_TIME_TIMEOUT to 60 seconds for less frequent database refresh 2025-04-30 12:13:43 +02:00
Adolfo Gómez García
ca63c3decf Reduce CACHE_TIME_TIMEOUT to 10 seconds for more frequent database refresh 2025-04-30 12:11:58 +02:00
Adolfo Gómez García
3072eabc74 Add 'data_type' field to service response for compatibility with old code 2025-04-25 14:29:43 +02:00
Adolfo Gómez García
bf93c2cbe4 Fix type hint for disks field in ServerStats and simplify stamp assignment in from_dict method 2025-04-23 20:33:17 +02:00
Adolfo Gómez García
ae1009d1a0 Refactor error handling and improve code readability in ServerApiRequester methods 2025-04-23 20:33:07 +02:00
Adolfo Gómez García
7347c6fb49 Enhance AssignedService to support IP address changes and validate user ownership updates 2025-04-23 20:23:28 +02:00
Adolfo Gómez García
46c03a84f5 Handle Server.DoesNotExist exception when retrieving server by UUID in ServerManager 2025-04-23 20:23:11 +02:00
Adolfo Gómez García
ed739c62ac Add is_managed method to Server class to determine server management status 2025-04-23 17:02:18 +02:00
Adolfo Gómez García
52d947cb7d Increase IDP metadata field length and improve metadata fetching logic with enhanced error handling and type casting 2025-04-23 16:44:39 +02:00
Adolfo Gómez García
2f23b12f4e Enhance email MFA notifications by improving message content in plain text and HTML formats 2025-04-21 17:15:15 +02:00
Adolfo Gómez García
f73a727107 Enhance email MFA notifications by including additional message content in both plain text and HTML formats 2025-04-21 15:32:29 +02:00
Adolfo Gómez García
f6e7143415 Refactor error handling and logging in ServicesPools to improve clarity and maintainability 2025-04-16 19:00:12 +02:00
Adolfo Gómez García
c6ef43826a Handle AccessDenied exception in blocker decorator to improve error management 2025-04-16 17:53:32 +02:00
Adolfo Gómez García
439a07297f Add error logging for invalid token access and implement report generation for deferred deletion state 2025-04-16 17:30:14 +02:00
Adolfo Gómez García
bef5896c32 Refactor services_pools and user_services to improve code clarity and maintainability 2025-04-15 16:27:06 +02:00
Adolfo Gómez García
086366a2a1 Enhance ChromeOS detection by refining SSL header handling and adding fallback tests for User-Agent 2025-04-11 14:46:20 +02:00
Adolfo Gómez García
10b6850a64 Refactor service pool state checks and add test for locked service pool behavior 2025-04-10 18:58:05 +02:00
Adolfo Gómez García
1bf80722a0 Add docstring to db_value method in KnownOS enum for clarity 2025-04-10 17:48:23 +02:00
Adolfo Gómez García
177536e77a Enhance Chrome OS detection by adding alternative name and unit test for SSL headers 2025-04-10 17:46:20 +02:00
Adolfo Gómez García
166c407db9 Fix ChromeOS user agent string in test_detect_chromeos 2025-04-10 17:10:23 +02:00
Adolfo Gómez García
2d45e43cd1 Add unit test for ChromeOS detection in os_detector 2025-04-10 17:07:02 +02:00
Adolfo Gómez García
b5b1cc276a Refactor server activity enumeration and update test fixture to set last_ping 2025-04-10 05:15:07 +02:00
Adolfo Gómez García
decb02ed64 Add method to enumerate servers with recent activity and refactor excluded servers logic 2025-04-09 21:35:11 +02:00
Adolfo Gómez García
85e948a447 Enhance authentication logic to exclude disabled authenticators and filter visible ones in configjs 2025-04-09 16:48:46 +02:00
Adolfo Gómez García
e2f8d47b7f Fixed network uuid retrieval that was {'id': ...} and must be {...} 2025-04-09 16:47:17 +02:00
Adolfo Gómez García
f592647f70 Add last_activity_period parameter to exclude inactive servers in selection 2025-04-09 05:00:45 +02:00
Adolfo Gómez García
b5a91d5ea8 Update script and preload links in admin index.html with new version stamps and integrity hashes 2025-04-08 17:25:55 +02:00
Adolfo Gómez García
938dfeaa15 Refactor user service field retrieval to conditionally include state, cache level, and actor version based on service pool state 2025-04-08 17:10:22 +02:00
Adolfo Gómez García
cffc8ff368 Fix MAC address display in ServersGroups to handle unknown MACs 2025-04-08 16:56:28 +02:00
Adolfo Gómez García
78f5e59a40 Add response stamp and additional fields to server management responses 2025-04-08 16:50:00 +02:00
Adolfo Gómez García
47e329fdf4 Enhance user service removal logic to allow forced removal and improve GPU availability check in Proxmox client 2025-04-07 18:29:00 +02:00
Adolfo Gómez García
ff21166e87 Add message authenticator verification to RadiusClient authentication 2025-04-06 21:06:09 +02:00
Adolfo Gómez García
eec65716d9 Add 'Use Message Authenticator' option to Radius authentication and MFA 2025-04-06 13:38:06 +02:00
Adolfo Gómez García
eba9fb02d6 Fix filter syntax in LogMaintenance to use correct field lookup for created date 2025-04-03 19:13:55 +02:00
Adolfo Gómez García
47f835186c Refactor test_migration.py for improved readability and maintainability 2025-04-02 22:56:35 +02:00
Adolfo Gómez García
99855aa982 Refactor user_uuid assignment in ServerManager to simplify logic and remove unused parameter 2025-04-02 22:56:26 +02:00
Adolfo Gómez García
26ee2dbc9c Remove unused parameter from authenticate function in auth.py 2025-04-02 22:31:48 +02:00
Adolfo Gómez García
08e11b0287 Refactor IPMachinesService code for improved readability and maintainability 2025-04-01 17:01:12 +02:00
Adolfo Gómez García
82fda13468 Improve error logging in IPMachinesService during post-migration data retrieval 2025-04-01 17:00:31 +02:00
Adolfo Gómez García
eabcda81af Improve error handling in migrator and IPMachinesService to log exceptions during post-migration and data retrieval 2025-04-01 16:59:41 +02:00
Adolfo Gómez García
15d975d3f8 Fix file sharing options in HTML5RDPTransport to correctly handle upload and download settings 2025-04-01 16:27:33 +02:00
Adolfo Gómez García
7c75cbd211 Fix transport OS validation logic and improve error logging in Windows OS Manager 2025-03-27 17:19:09 +01:00
Adolfo Gómez García
a7d948de85 Refactor tunnel_wait_time_field to use a default parameter for improved flexibility 2025-03-26 16:03:47 +01:00
Adolfo Gómez García
668a3f5353 Fix state field handling and improve OS Manager error handling in ServicesPools 2025-03-20 19:12:10 +01:00
Adolfo Gómez García
a760c18072 Refactor error handling to include CSRF token in context and clean up imports 2025-03-19 17:11:53 +01:00
Adolfo Gómez García
1098152054 Refactor RDP scripts to enhance xfreerdp detection and improve error messaging for missing clients 2025-03-19 00:55:38 +01:00
Adolfo Gómez García
aefa4e830e Enhance RDP script to prioritize Thincast client and improve executable detection logic 2025-03-19 00:40:21 +01:00
Adolfo Gómez García
8699bfb64c Update integrity signatures for macOS RDP scripts 2025-03-18 22:09:30 +01:00
Adolfo Gómez García
279b2a74f7 Add support for Thincast Remote Desktop Client in macOS RDP scripts 2025-03-18 22:08:59 +01:00
Adolfo Gómez García
d34e7e32e8 Add 'macOS' to KnownOS enum and type hint for sec_ch_ua_platform in OS detector 2025-03-18 21:16:46 +01:00
Adolfo Gómez García
255d0c9abd Update script integrity hashes in admin index.html for improved security 2025-03-14 20:38:42 +01:00
Adolfo Gómez García
af9e8b9faa Add mock patch for test connectivity in user service tests 2025-03-14 18:37:02 +01:00
Adolfo Gómez García
aaed98d3b8 Remove 'optimize teams' functionality from RDP transport classes and scripts 2025-03-12 19:17:14 +01:00
Adolfo Gómez García
d94e15a340 updated tranlations 2025-03-12 19:05:10 +01:00
Adolfo Gómez García
a93e31cb93 Set must_stop_before_deletion to False in OpenStackLiveService for proper deletion handling 2025-03-12 18:56:32 +01:00
Adolfo Gómez García
813e85a4f6 Change cookies consent text field type from TEXT to LONGTEXT for improved flexibility 2025-03-10 17:15:53 +01:00
Adolfo Gómez García
d96ed763ec Add cookies consent URLs to configuration and update template to use them 2025-03-07 17:48:21 +01:00
Adolfo Gómez García
fcc141138c Update script references in admin index.html to latest versions 2025-03-07 16:26:31 +01:00
Adolfo Gómez García
0b80ce9843 Update script references in admin index.html to latest versions 2025-03-07 16:23:07 +01:00
Adolfo Gómez García
0085dfc41d Add translations for locked service pool and restrict actions for locked state 2025-03-03 20:25:23 +01:00
Adolfo Gómez García
3f7e194713 Clean up whitespace and improve connection check in OpenNebulaClient (fixed connection error) 2025-03-03 19:19:17 +01:00
Adolfo Gómez García
1be79a8246 Fix state filtering in ServicePool and related models to use state__in for querying PROCESABLE_STATES 2025-03-03 16:31:53 +01:00
Adolfo Gómez García
393e2f41c9 Add optional state field to ServicesPools and ensure default handling in pre_save method 2025-03-02 17:37:02 +01:00
Adolfo Gómez García
14fe9e19cf Refactor state filtering in ServicePool and related models to use PROCESABLE_STATES for improved state management. Added support for LOCKED (non editable, but removable) state on service pools 2025-03-02 16:10:23 +01:00
Adolfo Gómez García
cc2fb5ddaa Refactor ServicesPools to use processed_macros_len for name length validation and add processed_macros_len method in UsageInfoVars 2025-03-02 15:32:05 +01:00
Adolfo Gómez García
9c45afaa23 Add counts for OS managers, transports, networks, calendars, tunnels, and authenticators in system status response 2025-02-28 19:02:11 +01:00
Adolfo Gómez García
208c96bad9 Fix regex in ProxmoxServiceLinked to allow underscores in VM names (and sanitize them to -) 2025-02-28 18:06:39 +01:00
Adolfo Gómez García
7791a67ed5 Refactor PublicationOldMachinesCleaner to log user service updates and improve readability. Alsi fixed and now only removes its own old user services 2025-02-26 17:50:40 +01:00
Adolfo Gómez García
bf62e390df Refactor ProxmoxUserserviceLinked to use get_vmname for VM naming in op_create 2025-02-25 18:32:17 +01:00
Adolfo Gómez García
3efeeb4df5 Enhance server lock documentation and improve port connectivity handling in IPMachinesService 2025-02-19 19:19:22 +01:00
Adolfo Gómez García
2c2c6d5fa5 Add port connectivity check for server selection in IPMachinesService 2025-02-19 19:16:13 +01:00
Adolfo Gómez García
0d614aaef5 Update script preload links and integrity hashes in admin index.html 2025-02-19 18:37:32 +01:00
Adolfo Gómez García
6f692e439f Refactor server stats to use load instead of weight for performance metrics 2025-02-19 18:10:38 +01:00
Adolfo Gómez García
01a46600dc updated tranlations 2025-02-18 21:18:47 +01:00
Adolfo Gómez García
cddb096048 Add translation strings for user and service counts; update variable names for clarity 2025-02-18 20:58:16 +01:00
Adolfo Gómez García
5d8f9efaa5 Enhance system overview to include counts of users with valid services and assigned user services 2025-02-18 20:29:55 +01:00
Adolfo Gómez García
91b4eae2d5 Update server and tunnel management methods to filter items based on group assignments 2025-02-18 18:45:43 +01:00
Adolfo Gómez García
0c31080765 Update script and preload links in admin index.html with new integrity stamps 2025-02-18 18:01:01 +01:00
Adolfo Gómez García
e3be9aeefc Add weight attribute to server stats in ServersGroups class 2025-02-18 17:07:33 +01:00
Adolfo Gómez García
3c1266cc11 Refactor SMSMFA class to use _transform_placeholders method for SMS content generation and update method signatures to include real_name parameter 2025-02-17 17:36:23 +01:00
Adolfo Gómez García
f3a8335998 Refactor save_item methods to return item IDs and update get_real_name logic in user registration 2025-02-14 17:13:07 +01:00
Adolfo Gómez García
a10f05766d Disable mfa_data_enabled attribute in IPAuth class 2025-02-13 17:25:33 +01:00
Adolfo Gómez García
419c828cc0 Use singleton instance of CryptoManager for password encryption in Tickets handler 2025-02-12 17:48:53 +01:00
Adolfo Gómez García
1c81c4e76c Add mfa_data_enabled attribute to authenticator classes and update related methods 2025-02-12 17:43:09 +01:00
Adolfo Gómez García
67b58f62ee Add force_new parameter to get_mac method for DynamicService and its implementations 2025-02-11 18:34:16 +01:00
Adolfo Gómez García
a25b510f0e Refactor support parameters handling in HTML5RDPTransport to use dictionary comprehension for cleaner code 2025-02-11 17:05:20 +01:00
Adolfo Gómez García
3edabec51e Refactor CryptoManager usage to use singleton instance for random string and encryption 2025-02-11 16:56:25 +01:00
Adolfo Gómez García
92eee92b29 Add support parameters field to HTML5RDPTransport for configurable options 2025-02-11 16:19:25 +01:00
Adolfo Gómez García
0a45c06284 Remove unused weblogin_required decorator from download view to allow downloads 2025-02-10 17:03:08 +01:00
Adolfo Gómez García
b9594013a0 Remove unnecessary comment on DBConfig enumeration in Config class 2025-02-05 13:38:32 +01:00
Adolfo Gómez García
354040c051 Add 'state' field to save_fields in Authenticators model 2025-01-30 18:23:57 +01:00
Adolfo Gómez García
45d1ad17e9 Clarify interval parameter in stats methods and improve performance logging in authenticator stats report 2025-01-22 19:52:17 +01:00
Adolfo Gómez García
0964a38aef Updated admin interface 2025-01-22 18:20:49 +01:00
Adolfo Gómez García
77f582a8cf Clean up OU values by removing spaces around commas and equals signs in Linux and Windows OS managers 2025-01-22 17:46:52 +01:00
Adolfo Gómez García
0f218cbeba Refactor imports in servers_management.py to avoid circular dependencies 2025-01-21 17:33:05 +01:00
Adolfo Gómez García
2d83f3a32b updated client (minor fixes 2025-01-21 14:50:06 +01:00
Adolfo Gómez García
0fefd8864a Fix key name in server response to use 'hostname' instead of 'name' 2025-01-20 23:51:36 +01:00
Adolfo Gómez García
f5dedb1cde Add server stats method and improve server management logic, due to using select_for_update when no transaction where used... 2025-01-20 23:51:02 +01:00
Adolfo Gómez García
70c865c862 updated client 2025-01-20 23:27:36 +01:00
Adolfo Gómez García
defd2ddd7c Removed by now the inclussion of x2goclient inside appimages 2025-01-20 18:10:50 +01:00
Adolfo Gómez García
79a1fe5e80 Fixed client 2025-01-20 18:10:15 +01:00
Adolfo Gómez García
793f6fda18 Update domain handling in update_transport_ticket to format username correctly 2025-01-15 18:22:49 +01:00
Adolfo Gómez García
4224f9be66 Enhance PoolPerformanceReport to include 'ALL POOLS' option and improve data handling for user and access graphs 2025-01-10 17:12:50 +01:00
Adolfo Gómez García
5d2ae3285c Refactor owner_id filtering logic and enhance pool field definition in UsageSummaryByUsersPool 2025-01-10 16:48:33 +01:00
Adolfo Gómez García
735ccd22c0 Add PasswordExpired exception for handling expired passwords 2025-01-10 16:37:12 +01:00
Adolfo Gómez García
a5e94bfa9a Update permissions validation to allow single argument requests 2025-01-08 18:17:07 +01:00
Adolfo Gómez García
a449c93464 Change client_secret and secret fields to PasswordField for enhanced security 2025-01-08 17:20:17 +01:00
Adolfo Gómez García
59af07590b Remove logging of decoded password fields for security enhancement 2025-01-08 17:11:41 +01:00
Adolfo Gómez García
08b7fd549a Add compatibility for decoding text fields converted to password fields 2025-01-08 17:10:59 +01:00
Adolfo Gómez García
4d2ddd3909 Added "Password expired" message error 2025-01-08 16:43:17 +01:00
Adolfo Gómez García
99305c17e7 Refactor user filtering in DeployedServiceStatsCollector to include only valid user services 2024-12-30 16:50:42 +01:00
Adolfo Gómez García
9b3caed641 Added support for checking id the service pool is active before trying to create "new" userservices 2024-12-25 00:52:32 +01:00
Adolfo Gómez García
a881509502 Convert max_services_count_type to string for consistent data handling in services response 2024-12-23 17:32:20 +01:00
Adolfo Gómez García
a4cc9fc750 Fixed admin storage 2024-12-23 17:00:57 +01:00
Adolfo Gómez García
51fbb7b613 Add User-Agent header to OpenGnsysClient requests to be the requests headers, because opengsnsys filters by that. 2024-12-23 16:59:10 +01:00
Adolfo Gómez García
3863236afd Set FAKE constant to False for accurate behavior in OpenGnsys service 2024-12-23 16:39:30 +01:00
Adolfo Gómez García
ad33b1f57a Update integrity hashes in admin index HTML and enhance permissions handling for server groups 2024-12-20 17:07:59 +01:00
Adolfo Gómez García
f97c776399 Fixed admin interface 2024-12-19 16:44:14 +01:00
Adolfo Gómez García
1962f1a55f Normalize OS name comparison in Transport model for case insensitivity 2024-12-19 16:19:45 +01:00
Adolfo Gómez García
5a788e0ed5 Normalize OS name comparison in Transport model for case insensitivity 2024-12-19 16:18:35 +01:00
Adolfo Gómez García
571c56e64b Update script integrity hashes in admin and modern index HTML files 2024-12-18 16:26:40 +01:00
Adolfo Gómez García
2e7032b980 Refactor showconfig command to ensure section names are consistently converted to strings for CSV and YAML outputs 2024-12-16 18:04:47 +01:00
Adolfo Gómez García
fdbf91cbc1 added some < and > validations for enhaced security 2024-12-16 17:55:12 +01:00
Adolfo Gómez García
f868607740 Restored release version (mistake) 2024-12-09 18:18:16 +01:00
Adolfo Gómez García
cef086a3c3 Upgrading to next expected release verseion 2024-12-09 17:44:55 +01:00
Adolfo Gómez García
176cf31e48 Fixed tunnel server stats 2024-12-06 03:54:27 +01:00
Adolfo Gómez García
0d604d04b6 Updated admin interface to disallow html titles, etc.. 2024-12-06 03:54:21 +01:00
Adolfo Gómez García
d19991523c Fixed tunnel server stats 2024-12-05 04:27:59 +01:00
Adolfo Gómez García
6bf7055ac2 Updated admin interface 2024-12-04 18:09:39 +01:00
Adolfo Gómez García
3b34990843 updated tunnel server 2024-12-04 17:46:54 +01:00
Adolfo Gómez García
70d3e386af Refactor UserServiceManager methods for clarity and improved logging 2024-12-04 17:13:54 +01:00
Adolfo Gómez García
f6f7f7d7b5 fixed cache usage check in ServicePool to include initial servers 2024-12-04 15:58:06 +01:00
Adolfo Gómez García
2f5e8c5f53 Updating actor to add some more resilience to network problems 2024-12-03 17:10:01 +01:00
Adolfo Gómez García
a1daeb78b4 Added caching to JavaScript catalog view and minor gui fix 2024-12-02 01:23:11 +01:00
Adolfo Gómez García
1485d7dd9e Updated translations 2024-11-19 23:41:39 +01:00
Adolfo Gómez García
d0e13b5643 Updating frontends 2024-11-19 23:31:50 +01:00
Adolfo Gómez García
a7b64504fe Some minor type checking fixes and updated basic non supported platform script 2024-11-13 22:03:47 +01:00
Adolfo Gómez García
90ba463fb9 Updated translations 2024-11-13 20:17:19 +01:00
Adolfo Gómez García
553bff614d * Added support for enabling client_logging 2024-11-13 20:10:06 +01:00
Adolfo Gómez García
78aefbcfec updated client 2024-11-13 19:25:15 +01:00
Adolfo Gómez García
a8f77a05de Removed exception log and added base for allow client logs upload 2024-11-13 18:59:53 +01:00
Adolfo Gómez García
beea237758 Enhance logging capabilities and refactor matcher function usage
- Added 'CLIENT' as a log source in LogSource enum.
- Updated translations to include "Logs".
- Refactored matcher function to match for consistency across multiple files.
- Modified log method in UserService and User classes to accept a source parameter.
- Adjusted LogMaintenance job frequency from two hours to one hour and added a condition for log removal based on creation time.
2024-11-13 18:30:06 +01:00
Adolfo Gómez García
4a32800545 Update subproject reference to latest commit 2024-11-13 06:19:19 +01:00
Adolfo Gómez García
c7014c95ff Adding capacity to ask client for execution logs 2024-11-13 06:18:37 +01:00
Adolfo Gómez García
5a5c68fef7 Some minor improvements to tunneling, related to connection close and logging 2024-11-13 05:05:33 +01:00
Adolfo Gómez García
6ba08a361a Refactor authentication method names for consistency: replaced 'web_login' and 'web_logout' with 'weblogin' and 'weblogout' across multiple files
Fixed security to, in case of ip change on secured sessions, redirect to login instead of showing a "forbidden"
2024-11-13 03:03:48 +01:00
Adolfo Gómez García
14278daa14 Convert policy and ha_policy to string representation in MetaPools response to allow compat with choices 2024-11-12 18:18:40 +01:00
Adolfo Gómez García
75852519aa Reverted changes to tunnel.py. Not working as expected 2024-11-12 18:11:05 +01:00
Adolfo Gómez García
d697ac5ee4 Added exception handling on request close 2024-11-11 23:48:57 +01:00
Adolfo Gómez García
8680146fba For improving that client using tunnel detects that the tunnel closed abruptly, also added "close" to request 2024-11-11 23:38:50 +01:00
Adolfo Gómez García
a1b63920ab After some tests, an real improvement to treating connection lost. Now if the client reties the connection using the tunnel, and the tunnel ticket lives long enought, the client may restablish the connection. The inverval given for this is currently 5 seconds, hope this is enough... 2024-11-11 23:28:42 +01:00
Adolfo Gómez García
7b1e55cf8f Minor improvements to client to try to reconnect to tunnel server and new tunnel server error 2024-11-11 23:10:22 +01:00
Adolfo Gómez García
6c8d7b1bd9 Minor improvements to client to try to reconnect to tunnel server and new tunnel server error 2024-11-11 23:06:47 +01:00
Adolfo Gómez García
8eedbe7b09 Minor improvements to client to try to reconnect to tunnel server and new tunnel server error 2024-11-11 23:02:22 +01:00
Adolfo Gómez García
c06bf292ce Minor improvements to client to try to reconnect to tunnel server and new tunnel server error 2024-11-11 22:18:49 +01:00
Adolfo Gómez García
b8825c19af Refactor service pool handling and streamline accumulated stats emission 2024-11-11 18:18:56 +01:00
Adolfo Gómez García
93db2388bb Refactor StatsManager and StatsCountersAccum for improved data handling and logging 2024-11-11 18:12:49 +01:00
Adolfo Gómez García
7311044165 Updated client 2024-11-08 16:25:53 +01:00
Adolfo Gómez García
5a9f6e46d9 Fixed the use of disabled members of metapools 2024-11-08 16:22:53 +01:00
Adolfo Gómez García
f4ea7e88cc updated clients build process 2024-11-07 16:02:42 +01:00
Adolfo Gómez García
d2a4db2c39 Added support for searching also "xfreerdp2" 2024-11-07 16:01:55 +01:00
Adolfo Gómez García
885db91705 updated tranlations 2024-11-06 18:19:38 +01:00
Adolfo Gómez García
d03af24e23 fixed admin 2024-11-06 17:40:35 +01:00
Adolfo Gómez García
0ccd8adcde Updated translations 2024-11-05 23:34:13 +01:00
Adolfo Gómez García
9ee2bd94ea Refactor stats handling for improved accuracy and performance 2024-11-05 23:12:46 +01:00
Adolfo Gómez García
de54abcbdd Fixed admin interface and small change to users_groups 2024-11-05 19:47:23 +01:00
Adolfo Gómez García
b3d11dee7b Refactor ServerManager weight calculation for improved accuracy and clarity 2024-11-04 19:03:05 +01:00
Adolfo Gómez García
4861a10134 Refactor ServerStats weight calculation for improved clarity and accuracy 2024-11-04 18:15:49 +01:00
Adolfo Gómez García
e1747bee13 Updated tunnel-server 2024-11-03 22:25:33 +01:00
Adolfo Gómez García
530b3acfb1 Refactor TelegramReceiver register method for consistency 2024-10-31 17:33:16 +01:00
Adolfo Gómez García
6f1bf4a55d Increase TelegramReceiver frequency from 10 to 60 seconds 2024-10-31 17:32:41 +01:00
Adolfo Gómez García
4eb4c2c7d7 Fixed Telegram notifier to adapt it to new api 2024-10-31 17:31:47 +01:00
Adolfo Gómez García
053601a4e1 Fixed MFA issue on internal DB and not sending account on correct field 2024-10-31 16:19:26 +01:00
Adolfo Gómez García
37956262ef Add MISSING section type and update handling for missing sections 2024-10-30 20:00:37 +01:00
Adolfo Gómez García
3fbdea1e23 Fixed user service manager to treat correctly "reset" an instance 2024-10-30 19:56:51 +01:00
Adolfo Gómez García
5ac2e2a73d Updated actio to use match instead of ifs 2024-10-30 16:40:23 +01:00
Adolfo Gómez García
e8db21b7ed Some minor updates to tunnel error treating 2024-10-30 03:05:52 +01:00
Adolfo Gómez García
2cb99669ed Updated translations 2024-10-29 19:34:43 +01:00
Adolfo Gómez García
354ff27e2a Refactor cache.set to cache.put for improved code readibility 2024-10-25 20:40:04 +02:00
Adolfo Gómez García
c3d9a34c4a Fixed username/pass for ad osmanager 2024-10-23 16:40:36 +02:00
Adolfo Gómez García
3d57cb9bec Refactor connection bar property in RDPTransport and TRDPTransport and added, by default, the connection bar in linux if configured. 2024-10-21 18:20:01 +02:00
Adolfo Gómez García
8c2ba3403d Simple reformating 2024-10-21 16:33:20 +02:00
Adolfo Gómez García
e1ac39e67f Refactor storage to use dictionary views for improved performance and convenience 2024-10-19 22:35:20 +02:00
Adolfo Gómez García
cfd2ad6b57 Small comment added to hash.py.
Note that we use sha256 as hasing function on all "db storeables" items (such as cache or storage). The probability of clash with the low length keys that we use is, basically, 0, and it's fine this way. Althouth there is faster hashing methods, the los usage and the db itself maky insignificant if it's faster or not
2024-10-19 20:51:19 +02:00
Adolfo Gómez García
1e893240cd updated client 2024-10-18 21:16:20 +02:00
Adolfo Gómez García
051b23eb92 Cleaned up IPMachinesUserService 2024-10-18 17:55:02 +02:00
Adolfo Gómez García
4388ed0f1b Added correct exception type to service_multi on assign 2024-10-18 17:45:37 +02:00
Adolfo Gómez García
f7d10a4f4b Refactorized and moved some "forgotten" services to it place under "core.exceptions" 2024-10-18 17:39:44 +02:00
Adolfo Gómez García
9c70a84977 * Fixed typo on nx remote script
* Added overrided_fields to neded places
2024-10-18 16:36:11 +02:00
Adolfo Gómez García
a165122422 updated client 2024-10-17 18:45:04 +02:00
Adolfo Gómez García
1bf44bd5a2 Refactor Radius MFA to handle MFA identifier and strip domain from username 2024-10-17 18:23:40 +02:00
Adolfo Gómez García
14a58dc423 Refactor config update method to handle non-existing config values and fixed Radius to allow stripping the domain part from the username 2024-10-17 18:19:19 +02:00
Adolfo Gómez García
a318e8ca2b Added functionalty so Fixed Services (at least those derived from Generic one), overrides the max_countent.... because must be always CONSERVATIVE in order to work correctly 2024-10-16 18:04:06 +02:00
Adolfo Gómez García
418e1f7c0b Refactor UserServiceManager to raise MaxServicesReachedError when the maximum number of preparing services is reached 2024-10-15 23:05:10 +02:00
Adolfo Gómez García
e1c68f3895 Fixed group manager not yielding groups after refactoring :S 2024-10-15 22:58:58 +02:00
Adolfo Gómez García
9641776ce1 Final refactoring, i hope :) 2024-10-15 22:07:00 +02:00
Adolfo Gómez García
83521cfd7a Refactor get_services_info_dict function to use valid_trans instead of validTrans 2024-10-15 20:22:53 +02:00
Adolfo Gómez García
9357d61e02 Refactor code to fix CryptoManager method call and improve code readability ad added optional transport instance to userservice creations fixtures 2024-10-15 20:22:38 +02:00
Adolfo Gómez García
ec4d8cc8ad renamed tunnels.py on REST to more convenient tunnel_tickets.py 2024-10-15 18:17:05 +02:00
Adolfo Gómez García
b2e3471512 Refactor tunnel_ticket.py and tunnels_management.py
- Refactor tunnel_ticket.py to adapt to snake_case and improve code readability
- Add validation to prevent deletion of tunnel server group with attached transports in tunnels_management.py
2024-10-15 18:16:34 +02:00
Adolfo Gómez García
c976716871 Added docs as non git folder 2024-10-14 04:00:44 +02:00
Adolfo Gómez García
58fb367a60 Fixed "itemor" that was in fact "author" 2024-10-14 03:48:37 +02:00
Adolfo Gómez García
2f69c18ad9 Massive refactoring to adapt to snake_case and some improvements to code for groups manager, etc... 2024-10-13 18:54:56 +02:00
Adolfo Gómez García
aa7ce6aad2 Massive refactoring to adapt to snake_case and some improvements to code for groups manager, etc... 2024-10-13 18:02:58 +02:00
Adolfo Gómez García
ac450880c9 snake_case fixin before stabilizing... :) 2024-10-12 19:21:01 +02:00
Adolfo Gómez García
bd53926c81 snake_case fixin before stabilizing... :) 2024-10-12 17:55:14 +02:00
Adolfo Gómez García
25aa09309b Some improvements to type checking on decorators 2024-10-12 14:52:36 +02:00
Adolfo Gómez García
203a46a804 Refactor ensure_connected decorator to support classes with connect method 2024-10-12 07:04:32 +02:00
Adolfo Gómez García
c041284588 Refactoring for mypy complains... most of them are weird :S 2024-10-12 03:17:54 +02:00
Adolfo Gómez García
dd71811045 Refactor variable names for logging in auth.py and log.py 2024-10-12 02:46:10 +02:00
Adolfo Gómez García
c42b5f270b Update copyright year in LICENSE file 2024-10-12 02:12:56 +02:00
Adolfo Gómez García
cd136fa750 updated client 2024-10-12 02:06:21 +02:00
Adolfo Gómez García
5b29db9fe8 resigned rdp scripts 2024-10-10 16:38:43 +02:00
Adolfo Gómez García
3f8554fd87 Refactor function names in RDP scripts 2024-10-10 16:37:08 +02:00
Adolfo Gómez García
a39da82971 updated client 2024-10-10 16:21:52 +02:00
Adolfo Gómez García
3b5128c5fd Fixed location for snapshot type template on fixedservice and updated cached cred deletion on openstack 2024-10-10 16:21:40 +02:00
Adolfo Gómez García
5edc920e01 added comments for cached endpoints on openstack 2024-10-10 00:14:12 +02:00
Adolfo Gómez García
0e3120f3fe Refactor OpenStackClient cache key generation and storage
This commit refactors the cache key generation and storage in the OpenStackClient class. The cache key is now generated using a combination of the authentication method, identity endpoint, port, domain, username, project ID, and region. The cache key is used to store authentication information in the cache. Additionally, the token validity is calculated and stored in the cache. This improves the caching mechanism and ensures that the token remains valid for the appropriate duration.

This miscalculation, in conjuntion with storing cached credentials WITHOUT a catalog, leads to failure
2024-10-09 18:51:00 +02:00
Adolfo Gómez García
ed9499211d Add tests directory to pyrightconfig.json 2024-10-09 18:49:49 +02:00
Adolfo Gómez García
1fd286c73a Refactor imports in REST4.py 2024-10-09 18:49:37 +02:00
Adolfo Gómez García
64d91a7d70 Moved outside src tests (Again... :) ) 2024-10-09 17:06:13 +02:00
Adolfo Gómez García
b38c1c591a Refactor comment to clarify the purpose of recovering userservice limit from machines list 2024-10-09 16:42:03 +02:00
Adolfo Gómez García
a263bdc100 Refactor NotificationsManager to handle creation of local notifications table 2024-10-09 15:45:06 +02:00
Adolfo Gómez García
83a61b57cc Removed __slots__ from Job (nonsense... :S) 2024-10-08 23:02:16 +02:00
Adolfo Gómez García
a8f8568c34 Refactor variable names for better readability and consistency
Refactor stats_collector.py for improved performance and readability
Add ITEMS_LIMIT constant to rest.py
Add AccumStat dataclass to stats.py
Update get_servicepools_counters method in system.py
Update CountersPoolAssigned class in pools_usage_day.py
Update actor_data method in linux_ad_osmanager.py
Remove AccumStat dataclass from stats.py
2024-10-08 22:28:38 +02:00
Adolfo Gómez García
66dcad2d8d Refactor variable names for better readability and consistency 2024-10-08 21:13:27 +02:00
Adolfo Gómez García
bfa474d3f1 Refactor stats_collector.py for improved performance and readability 2024-10-08 21:08:36 +02:00
Adolfo Gómez García
a8b1eeb291 Updated actor 2024-10-07 20:29:47 +02:00
Adolfo Gómez García
a12998bef8 Upgraded actor data definition to a dataclass instead of a dict 2024-10-07 20:28:24 +02:00
Adolfo Gómez García
7d76704e7b Fixed Send Memory over 2Gb and storage size display 2024-10-07 17:09:40 +02:00
Adolfo Gómez García
cce564371c Fix security of token_aliases 2024-10-04 18:38:58 +02:00
Adolfo Gómez García
c21652fe83 Fixing up unmanaged hosts mesh 2024-10-03 21:54:35 +02:00
Adolfo Gómez García
9e0266d26b Refactor suggested check interval for fixed user service 2024-10-03 17:57:49 +02:00
Adolfo Gómez García
fa24a5e4f4 Refactor variable names in user_service_status function and ProxmoxClient 2024-10-03 17:49:25 +02:00
Adolfo Gómez García
1a7a4865af Refactor variable names in user_service_status function 2024-10-03 17:46:18 +02:00
Adolfo Gómez García
b473160400 Refactor ProxmoxClient to improve IP address retrieval logic 2024-10-03 17:34:30 +02:00
Adolfo Gómez García
1c388f62c1 The purpose of these changes was primarily to enhance code readability and maintenance, and secondly to improve performance through caching.
In `userservice.py`, a change was made on how `can_grow_service_pool` method's result is evaluated, from explicitly comparing it with `False` to a pythonic approach of using `not`. This makes the code cleaner and easier to read.

In `service.py` file, a variable name was changed from `services_limit` to `userservices_limit_field`. It appears much more logical namewise as the variable deals with limiting the number of user services.

In the `fixed/service.py` file, the code was refactored for readability and DRY (Don't Repeat Yourself) principle, avoiding code repetition by extracting a recurring pattern into a separate method called `_get_machines_field`.

In `authenticator.py`, a caching mechanism was introduced. If an Authenticator object is already created and no update in values is needed, the existing Authenticator object is returned. This prevents unnecessary creation of new Authenticator objects, thereby improving performance.

In the `managed_object_model.py` file, the instruction to clear the cache was removed. This coincides with the caching strategy introduced in `authenticator.py`.

Lastly, in `OpenGnsys/service.py`, `services_limit` was renamed to `userservices_limit_field`, consistent with the changes in `service.py`, improving code consistency.
2024-10-02 21:19:16 +02:00
Adolfo Gómez García
4a68ebfb6d Fixed Proxmox fixed service 2024-10-02 18:01:58 +02:00
Adolfo Gómez García
752ae78ce7 Refactor ChoiceItem id field to accept only string values and fixed 2024-10-02 17:30:00 +02:00
Adolfo Gómez García
1c80fb6ac9 Refactor network_from_str function to include a check mode parameter 2024-10-02 03:10:31 +02:00
Adolfo Gómez García
e05678dbcd Refactor variable name in test_client.py 2024-10-02 01:45:28 +02:00
Adolfo Gómez García
ccefa7867c Addind support for older proxmox versions (6.x), where some returns from API calls where different 2024-10-02 01:37:12 +02:00
Adolfo Gómez García
e2ec608ead Fixed invalid node and redundant info on Proxmox. Also added empty result if an vm does not supports spice 2024-10-02 00:48:32 +02:00
Adolfo Gómez García
33d3b5d14a Fixed node on ExecResult on clone 2024-10-02 00:26:08 +02:00
Adolfo Gómez García
ad2b746f03 Removed caching from contains due to the use of a list (non hashable) as parameter 2024-10-02 00:15:09 +02:00
Adolfo Gómez García
81c5429f40 Refactor network_from_str function to handle IPv6 addresses
Added sample set proxies list from cloudflare list
2024-09-30 20:53:39 +02:00
Adolfo Gómez García
093c7b3094 Refactor variable names in rdptunnel.py for better readability 2024-09-30 04:13:23 +02:00
Adolfo Gómez García
0306ed567f Refactor web views to be more congruent 2024-09-29 14:04:41 +02:00
Adolfo Gómez García
d4696b1c12 Refactor error handling in web views 2024-09-29 13:42:17 +02:00
Adolfo Gómez García
3461bd4963 Updated translations 2024-09-28 18:05:41 +02:00
Adolfo Gómez García
9b5655fa41 Updated frontend 2024-09-28 17:28:15 +02:00
Adolfo Gómez García
f7df9b2ae8 Refactor weblogin callback to use secure request session and constant timeout
Extracted client plugins downloadables to its own file for readibility and code maintenance
2024-09-28 16:45:14 +02:00
Adolfo Gómez García
f53c9bb793 added secure request session for weblogin callback, and used constant for timeout 2024-09-27 16:27:50 +02:00
Adolfo Gómez García
69087f46fe Refactor callback group name handling in perform_login_callback 2024-09-26 22:34:58 +02:00
Adolfo Gómez García
c60332a4aa Adding support for companion auth apps 2024-09-26 21:02:05 +02:00
Adolfo Gómez García
602374dad6 Refactoriced Cache "put" to "set" 2024-09-26 19:48:37 +02:00
Adolfo Gómez García
4af39858bd Refactor ServerManager counter_storage method to clear counters if they are too old 2024-09-26 19:10:38 +02:00
Adolfo Gómez García
fa31a30ba2 Updated user and admin interfaces
Updated download logic
2024-09-26 17:05:51 +02:00
Adolfo Gómez García
dca747969e Refactor logger variable names in ServerManager 2024-09-26 16:22:22 +02:00
Adolfo Gómez García
386a0650b9 Refactor ServerManager counter_storage method to clear counters if they are too old 2024-09-26 16:21:46 +02:00
Adolfo Gómez García
e4a9b89d32 Removed legacy non working actor as downloadables and updated required python version to 3.9 2024-09-26 03:23:27 +02:00
Adolfo Gómez García
6b002a540e Fixed tree generation to include some more info 2024-09-26 03:04:19 +02:00
Adolfo Gómez García
f8ab0b09d3 Refactor some opchecker methods to use cached instances (by the model instance itself) insead of using 2 variables to hold model an instance 2024-09-26 02:46:58 +02:00
Adolfo Gómez García
fce9e81509 Adding test for actor_v3 and some minor fixes 2024-09-26 02:28:58 +02:00
Adolfo Gómez García
c04a2b7396 Added support for "delayed network" on OpenStack... 2024-09-25 17:52:08 +02:00
Adolfo Gómez García
d973e89842 Updated client 2024-09-23 23:34:53 +02:00
Adolfo Gómez García
821ee3ecc1 Fixing up connection scripts for RDP. Preparing them for future client change on how these are executed 2024-09-23 17:34:21 +02:00
Adolfo Gómez García
af3a03d7f7 Remove 'Max Audit Logs duration' from Security section in Config 2024-09-23 16:07:46 +02:00
Adolfo Gómez García
58b845efd2 Fixed tests 2024-09-23 16:07:38 +02:00
Adolfo Gómez García
27d8432d6d Refactor OAuth2Test to include code challenge verification and state value retrieval
Refactor the OAuth2Authenticator class in the authenticator.py file to use the cache.pop() method instead of cache.get() and cache.remove()
2024-09-20 00:14:38 +02:00
Adolfo Gómez García
55f3a697ca Refactor pyrightconfig.json to include src/**/*.py and add stubPath for enterprise/stubs
Working on oauth2 tests
2024-09-19 22:21:57 +02:00
Adolfo Gómez García
6ce5cbe10e Some improvements to Authentication limitation by network (Extended to REST api and whatever uses authenticator) 2024-09-19 19:32:42 +02:00
Adolfo Gómez García
fc671f2a7a Now the IP is checked always on authenticate to allow login 2024-09-19 19:03:29 +02:00
Adolfo Gómez García
ec52e0a16f Removing old legacy nonsese code froma auth (internal authentication is a nonsense...) 2024-09-19 18:41:34 +02:00
Adolfo Gómez García
1d5cd65858 Refactor authentication event logging to use service pool instead of deployed service
Fixing up oauth to use secure sessions
2024-09-19 13:02:40 +02:00
Adolfo Gómez García
95b79f6af1 Renamed test and fixed a warning to debug log on ui 2024-09-18 22:36:27 +02:00
Adolfo Gómez García
50449c79f2 Refactor OAuth2Authenticator to use ResponseType alias and handle logout URL in test_code_flow.py 2024-09-18 22:18:42 +02:00
Adolfo Gómez García
3fbd033964 Refactor OAuth2Authenticator to add support for logout URL in test_code_flow.py 2024-09-18 22:11:37 +02:00
Adolfo Gómez García
4d9ce8b11d Refactor OAuth2Authenticator to handle different callback scenarios in test_code_flow.py 2024-09-18 22:10:21 +02:00
Adolfo Gómez García
8e51026336 Refactor OAuth2Authenticator to handle logout URL and store token on session 2024-09-18 22:09:51 +02:00
Adolfo Gómez García
fcac2d4d23 Refactor Cache class to add support for removing cached items
The Cache class in cache.py has been refactored to include a new method, `pop()`, which removes a stored cached item and returns it. This method takes a key as input and removes the corresponding item from the cache. If the item is not found, it returns a default value.

This change enhances the functionality of the Cache class by providing a convenient way to remove cached items when needed.

Refactor cache.py to improve cache management
2024-09-18 22:09:12 +02:00
Adolfo Gómez García
c6d9dac602 Adding support for oauth2 authenticator tests 2024-09-18 18:57:56 +02:00
Adolfo Gómez García
ac72b88554 Refactor authorize.py to ignore type checking 2024-09-18 18:57:35 +02:00
Adolfo Gómez García
e4a49ed763 Refactor OAuth2Authenticator to handle missing redirection endpoint and request object 2024-09-18 18:57:21 +02:00
Adolfo Gómez García
2cb262a6db Refactor security key and secret sizes, and added support for generating public/private pem keys and public/private keys for openssh 2024-09-18 18:57:05 +02:00
Adolfo Gómez García
72e2204c3e Refactor to use snake_case naming convention and taken away paramiko dependencie (Not needed, because we already use cryptography module) 2024-09-18 18:56:06 +02:00
Adolfo Gómez García
2e541c6cbf Refactor user_interface.py for improved code readability and maintainability 2024-09-17 18:31:31 +02:00
Adolfo Gómez García
aaeed2d24c Fixed tag processing flow... was a mess :S 2024-09-17 18:27:48 +02:00
Adolfo Gómez García
7365364b36 fixed import models 2024-09-17 17:05:52 +02:00
Adolfo Gómez García
e9c6b117b8 Refactor authentication URLs to use enum values 2024-09-17 17:05:25 +02:00
Adolfo Gómez García
b6a8892a63 Removed nonvalid links 2024-09-17 03:08:14 +02:00
Adolfo Gómez García
27f950e2b6 Several minor fixes
- Error exception show fix
- Oauth2 tokeninfo fix
- Extracted common fields from ldap, etc.. to fields
- Removed "rereading" tag from main.py, nonsense...
2024-09-17 02:47:34 +02:00
Adolfo Gómez García
735a447334 Updating icons 2024-09-16 19:04:08 +02:00
Adolfo Gómez García
c7666bb4f2 Refactor authentication logging to include error flag 2024-09-16 16:22:42 +02:00
Adolfo Gómez García
c67eee8b73 Refactor pickle imports to use pickletools.optimize 2024-09-13 19:50:10 +02:00
Adolfo Gómez García
33508e0ba0 Refactor variable names in Authenticator class 2024-09-13 19:04:13 +02:00
Adolfo Gómez García
3bbf9ec99a Refactor deferred deletion worker imports 2024-09-13 00:01:08 +02:00
Adolfo Gómez García
a170596f1d Improved some user service logs 2024-09-12 21:07:43 +02:00
Adolfo Gómez García
ba78eb7f33 Fixed Rest Userservice to honor "cache" or "assigned" on deletion 2024-09-12 17:59:35 +02:00
Adolfo Gómez García
0524a1bc78 some minor refactoring of userservice names 2024-09-11 17:39:35 +02:00
Adolfo Gómez García
efc4244367 Update HTML5RDPTransport drive name configuration to allow reading from settings file GUACAMOLE_DRIVE_NAME 2024-09-11 16:18:33 +02:00
Adolfo Gómez García
a61514cd3d Update translations 2024-09-11 15:47:56 +02:00
Adolfo Gómez García
e0fdd8878a Upgraded user interfaces 2024-09-11 03:42:15 +02:00
Adolfo Gómez García
ab1e807f36 Added tests for validate initialization by ip also 2024-09-10 09:57:05 +02:00
Adolfo Gómez García
4c755f548e Fixed cache decorator for functions without arguments and fixed server registration certification validation to allow empty certificate 2024-09-10 03:45:52 +02:00
Adolfo Gómez García
b0ffdb5492 Minor aclarations for ActorV3 2024-09-10 03:25:16 +02:00
Adolfo Gómez García
0c6afef707 Refactor code to allow optional prefix in the cached decorator, and improved cache selector for better avoidande of cache collisions 2024-09-10 03:00:11 +02:00
Adolfo Gómez García
a3868190a1 Refactor SAMLAuthenticator to always generate HTTPS URLs 2024-09-09 17:24:38 +02:00
Adolfo Gómez García
6544f194db Minor fixes and finished actor_initialization implementation
Improved deferred deletion to, in process_to_stop, check must_stop_before_deletion also
2024-09-09 00:44:49 +02:00
Adolfo Gómez García
b01cd25648 Refactor code to remove unused import and fix formatting in SAML authentication module 2024-09-08 21:45:31 +02:00
Adolfo Gómez García
320e97b85d Refactor code to use validate_certificate instead of validate_server_certificate in server registration 2024-09-08 21:45:03 +02:00
Adolfo Gómez García
6a0244e83d Refactor code to remove unused imports and fix formatting 2024-09-07 23:47:56 +02:00
Adolfo Gómez García
3f8797f4d0 Refacotiriced actor_data return value, and added "actor_initialization". Also normalized the list of ids, so all methods use same mechanincs to obtain it 2024-09-07 21:12:11 +02:00
Adolfo Gómez García
e42e3e4fbd Refactor code to update client version check 2024-09-06 17:09:34 +02:00
Adolfo Gómez García
1e028d5fdc Refactor code to initialize modules in uds/mfas, uds/notifiers, uds/osmanagers, uds/services, and uds/transports packages 2024-09-06 04:15:59 +02:00
Adolfo Gómez García
6248ac69af Refactor code to generate ServiceInfo and some minor fixes 2024-09-06 04:06:51 +02:00
Adolfo Gómez García
c794b2befa Fixed external url lauchern 2024-09-05 19:29:59 +02:00
Adolfo Gómez García
01c41704a9 Fixed default retries to 1 day (failures) and state checks (lock on an single state) to 3 hours... 2024-09-04 22:36:59 +02:00
Adolfo Gómez García
e90099bcac Added "is_deleted" to proxmox 2024-09-04 22:24:11 +02:00
Adolfo Gómez García
8e5418d792 chore: Update logger level in dispatcher.py 2024-09-04 19:41:08 +02:00
Adolfo Gómez García
20496327bb Fixed OSManager process unused machine 2024-09-04 18:51:18 +02:00
Adolfo Gómez García
ba0dd1f46a chore: Added capacity to put_back_to_cache to all Dynamic services 2024-09-03 23:36:55 +02:00
Adolfo Gómez García
a47e5b2d93 Updated admin interface 2024-09-03 20:28:20 +02:00
Adolfo Gómez García
722cfae7ae fixed stats for use on returning back service to cache. 2024-09-03 19:26:14 +02:00
Adolfo Gómez García
f836bbf73a chore: Fix assigned value decrement in UserServiceManager 2024-09-02 23:04:47 +02:00
Adolfo Gómez García
aab94bffbc Adding tests for userservice manager 2024-09-02 23:03:55 +02:00
Adolfo Gómez García
207a784b8f Adding support for putting back userservices into cache instead of removing them (if possible) 2024-09-02 19:11:49 +02:00
Adolfo Gómez García
7c2a8168fa Adding support for returning back to cache 2024-09-02 18:55:12 +02:00
Adolfo Gómez García
0a39939659 Adding support for "return user service to cache" support 2024-09-02 18:04:16 +02:00
Adolfo Gómez García
629d4622a7 feat: Add assertions for task state in test_dynamic_publication and test_dynamic_service 2024-09-01 20:18:41 +02:00
Adolfo Gómez García
457c1e25e8 Fixed dynamic service and done tests for deletion and deletion tests 2024-08-31 20:21:23 +02:00
Adolfo Gómez García
f4ee6e50c0 Fixed missing method for testing publication queue 2024-08-31 19:49:24 +02:00
Adolfo Gómez García
ef4b7e5bac Adding support for waiting the userservice mark as "deleted" until the deferred deletion is completed, so limits can be correctly respected. 2024-08-30 20:42:20 +02:00
Adolfo Gómez García
3f60e7509e Moving types of deferred deletion to a better place, and fixing up left-begind not needed behaviors 2024-08-30 19:39:40 +02:00
Adolfo Gómez García
eb62997bde chore: Disable bytes type promotions in pyrightconfig.json 2024-08-30 18:58:45 +02:00
Adolfo Gómez García
e19805f081 chore: Move constants and types from deferred deletion
Simple update for storage, now using contextmanager instead of an intermediary class for "as dict"
2024-08-30 18:40:32 +02:00
Adolfo Gómez García
bf6e1674d2 Moving constants and types from deferred deletion 2024-08-30 16:26:50 +02:00
Adolfo Gómez García
c69d880c40 Added tests for jobs factory 2024-08-29 18:35:21 +02:00
Adolfo Gómez García
206947cbe3 Moved workers out of uds.core, where in fact it should be... 2024-08-29 17:36:20 +02:00
Adolfo Gómez García
7526132f96 Removed old config vaule and updated user interface 2024-08-29 17:07:21 +02:00
Adolfo Gómez García
1fd5c5b49a chore: Update user interface field info name. and fixed not respecting "Lazy" translations on choiceitems 2024-08-29 16:39:49 +02:00
Adolfo Gómez García
a4a07be77f chore: Update LinuxOsADManager type_name to 'Linux Active Directory OS Manager' 2024-08-29 16:14:42 +02:00
Adolfo Gómez García
6d6b8e07d9 chore: Update function names and parameters for OpenNebula storage and template enumeration 2024-08-29 03:59:10 +02:00
Adolfo Gómez García
bb9073891c Removed nonused PayloadType 2024-08-28 01:43:45 +02:00
Adolfo Gómez García
708a3e22af chore: Update get_vm_config method to include force parameter from cache decorator 2024-08-23 20:46:49 +02:00
Adolfo Gómez García
022b620edc chore: Remove unused configuration elements 2024-08-23 20:17:45 +02:00
Adolfo Gómez García
fb83d801b4 chore: Update Config class to include removal of config values 2024-08-23 20:10:21 +02:00
Adolfo Gómez García
40f24fd316 Done proxy client tests and some minor fixes/improvements on Proxmox (such as waiting for template conversion finish) 2024-08-23 04:59:26 +02:00
Adolfo Gómez García
155a74178a added ellidable to runpython for future migrations squash 2024-08-23 02:12:07 +02:00
Adolfo Gómez García
0001fca79e chore: Update MAC address handling in network tests for consistency. Upgraded also proxmox client 2024-08-23 02:01:03 +02:00
Adolfo Gómez García
bb448d2876 chore: Update restrain_server function signature to specify return type 2024-08-23 02:00:25 +02:00
Adolfo Gómez García
a568ff9a28 Refactor tunnel transport migrations to include schema_editor parameter 2024-08-23 02:00:07 +02:00
Adolfo Gómez García
ccc1aa66ce Updated admin interface 2024-08-22 00:23:08 +02:00
Adolfo Gómez García
aba2ea1245 chore: Update communication endpoint method parameter name for consistency 2024-08-21 21:56:47 +02:00
Adolfo Gómez García
338a4d1ecc Added migration of old net filterring format to new format 2024-08-21 17:13:57 +02:00
Adolfo Gómez García
8aaed4d41e Refactor VM fixtures to include HA and protection settings 2024-08-21 16:59:59 +02:00
Adolfo Gómez García
6df00254af chore: Update Transports class to use db_value() method for sorting allowed OS choices 2024-08-21 16:55:02 +02:00
Adolfo Gómez García
2cd6f21c07 Fixed validator of host and port to allow FQDN 2024-08-21 16:33:09 +02:00
Adolfo Gómez García
0d79b90b84 Removed skip_locked for now 2024-08-21 16:32:44 +02:00
Adolfo Gómez García
94a3a791cd Refactor network tests and update MAC address handling for consistency 2024-08-21 16:32:26 +02:00
Adolfo Gómez García
afa8757264 Refactor ChoiceItem id field to accept both string and integer values 2024-08-21 16:31:57 +02:00
Adolfo Gómez García
fd66a226da chore: Update ProxmoxClient method name from remove_snapshot to delete_snapshot
Added some more tests and fixes
2024-08-20 04:09:54 +02:00
Adolfo Gómez García
4bc3947dc1 chore: Update ProxmoxClient content-type header to use application/x-www-form-urlencoded 2024-08-19 22:56:52 +02:00
Adolfo Gómez García
30fb0d0183 chore: Update Content-Security-Policy to include frame-ancestors 'none' for improved security 2024-08-19 22:56:39 +02:00
Adolfo Gómez García
5ba08e2896 chore: Add support for trusted IP forwarders in authentication and request middleware 2024-08-19 22:56:27 +02:00
Adolfo Gómez García
6f8eb00ad0 Adding more proxmox client tests 2024-08-19 22:56:05 +02:00
Adolfo Gómez García
23f52b363c chore: Refactor network tests and add IP conversion tests after some minor changes on ip_to_long to ensure covering better testing cases 2024-08-19 12:41:40 +02:00
Adolfo Gómez García
8234becde2 Now, trusted sources is also to identify a valid origin for a X_FORWARDED_FOR...
To be tested!
2024-08-19 04:03:24 +02:00
Adolfo Gómez García
01353528dd Refactor ProxmoxProvider to support API Token authentication 2024-08-16 18:08:34 +02:00
Adolfo Gómez García
57f70b9d4f updated version 2024-08-16 16:10:41 +02:00
Adolfo Gómez García
b402e2e117 Using first the SERVER_NAME instead of HTTP_HOST for inproved security as suggested by @meetinthemiddle-be. Thanks! ;-) 2024-08-16 16:07:41 +02:00
Adolfo Gómez García
2ec731896f chore: Update tunnelId to tunnelid in guacamole dispatcher 2024-08-14 12:57:48 +02:00
Adolfo Gómez García
9cc2afdb1a Updating translations 2024-08-07 20:01:45 +02:00
Adolfo Gómez García
4780c58e6a Updating translations 2024-08-07 20:00:19 +02:00
Adolfo Gómez García
b41a0a9331 chore: Refactor server token validation to use server_type parameter 2024-08-07 19:53:25 +02:00
Adolfo Gómez García
bd467a0bfb chore: Updated tunnel transport to generate a tunnel_key (not used right now, but will be...) 2024-08-03 02:10:51 +02:00
Adolfo Gómez García
c04a40a468 chore: Generate random key for tunnel 2024-08-03 02:09:12 +02:00
Adolfo Gómez García
cdb0f110cf Fixed some actor registration related info 2024-07-25 03:57:49 +02:00
Adolfo Gómez García
25c5c3a4d1 Improved session creation 2024-07-25 00:55:47 +02:00
Adolfo Gómez García
33554dc724 Fixed custom message 2024-07-19 21:25:37 +02:00
Adolfo Gómez García
0e097e3a12 Fixes on crypto typing and refactorized userId on mfas, and added support for using identifier instead of username in RADIUS MFA 2024-07-19 18:07:37 +02:00
Adolfo Gómez García
abedf042da Fixed implicit project id, and try to get name of project if scoped auth used 2024-07-18 17:50:00 +02:00
Adolfo Gómez García
cfdf622447 chore: Update default timeout value to 8 seconds an added cached validity to openstack auth to avoid multple auths if posssible 2024-07-18 16:39:09 +02:00
Adolfo Gómez García
4fea6e6a3e added remove duplicates to open stack 2024-07-18 16:15:11 +02:00
Adolfo Gómez García
43d0f3b4d4 Fixed test and added comment on from_dict for server_info 2024-07-17 19:53:26 +02:00
Adolfo Gómez García
7566071270 Cleaned and done openstack client tests 2024-07-17 19:41:52 +02:00
Adolfo Gómez García
9d51963903 Cleaning and fixing up Openstack Client 2024-07-17 18:27:09 +02:00
Adolfo Gómez García
b303ffc858 Adding test for openstack 2024-07-17 01:11:47 +02:00
Adolfo Gómez García
286b7cb09f Adding Openstack Client tests and fixes to client and provider 2024-07-16 22:58:40 +02:00
Adolfo Gómez García
2a4ccac195 Fixing up openstack client, adding support for Application Credentials 2024-07-16 21:21:58 +02:00
Adolfo Gómez García
773c3b5b50 Fix model detail retrieval error handling 2024-07-15 18:21:25 +02:00
Adolfo Gómez García
c1c922b87b Removed global stats from cache decorator (not really usefull in fact....) 2024-07-14 14:43:02 +02:00
Adolfo Gómez García
f6843fe11a Added postgress on sql_datetime 2024-07-12 22:39:18 +02:00
Adolfo Gómez García
31c015cb41 Fixed MFA list not being appended to gui field (Removed by mistake) 2024-07-12 04:20:06 +02:00
Adolfo Gómez García
78352cfe8b feat: Add type annotations to _ObservableList and _ObservableDict 2024-07-11 22:24:18 +02:00
Adolfo Gómez García
e880bdb228 Ensure that _fields exists on class creation (using __new__) 2024-07-11 21:45:44 +02:00
Adolfo Gómez García
c61e7e5444 Small state translation fix 2024-07-11 11:07:24 +02:00
Adolfo Gómez García
72407449be Implemented "is_dirty" for Autoserializables, to avoid publication and 2024-07-11 10:58:54 +02:00
Adolfo Gómez García
d974d5904c More addition for dirty control to Autoserializable 2024-07-11 10:49:49 +02:00
Adolfo Gómez García
8c5e2d6552 Adding support for controlling dirty state for autoserializable.
Added support for list fields
2024-07-11 10:26:47 +02:00
Adolfo Gómez García
b0cf8c5ddf Refactoring code and improved possible use of a "is_dirty".
This method is to improve in the future the storage of data (Skipping it).
Curently, no one uses is_dirty (base class always returns True), but there it is in case longs serializations requires some optimization.
2024-07-11 05:55:32 +02:00
Adolfo Gómez García
e4d5bef48a chore: Remove unused machine method in ProxmoxPublication and update references 2024-07-11 03:46:46 +02:00
Adolfo Gómez García
3016b0845c Some small cleanups and fixed ServiceNotReadyError 2024-07-10 21:44:21 +02:00
Adolfo Gómez García
930c22d8fa Fixed ReadyState on UserServiceNotReady error 2024-07-10 15:54:35 +02:00
Adolfo Gómez García
8778fa3314 Updated frontentds 2024-07-10 04:51:48 +02:00
Adolfo Gómez García
aa25ba9575 Added report method to allow debuging execution queue 2024-07-09 22:38:14 +02:00
Adolfo Gómez García
1e64b957a1 Moved ExecutionTimer to be used in other places 2024-07-09 22:30:08 +02:00
Adolfo Gómez García
a25184af52 Incorpored a max delay_rate for deletion 2024-07-09 22:19:07 +02:00
Adolfo Gómez García
1a263bf668 Added next execution factor correction based on how long it takes to execute operations on the server... 2024-07-09 22:16:07 +02:00
Adolfo Gómez García
4f6f93bba3 Updated from "last_check" to "next_check" deferred deletion info, so it's more versatile 2024-07-09 21:46:21 +02:00
Adolfo Gómez García
b1ee7656c8 Improving deferred deletion performance 2024-07-09 18:05:58 +02:00
Adolfo Gómez García
ad9d3532ee Some improvements on dynamic tests to cover previously bogus unseriralization of the queue 2024-07-09 03:54:29 +02:00
Adolfo Gómez García
6a4c9a7454 Fixed tests for proxmox and due to changes, tests for deferred deleter 2024-07-08 21:35:03 +02:00
Adolfo Gómez García
84e24fd3ae Fixed autoserializable test with new cast 2024-07-08 20:35:28 +02:00
Adolfo Gómez García
bf0d094c67 moved Operation to "types.services.Operation" 2024-07-08 20:31:43 +02:00
Adolfo Gómez García
525e9b9103 Some generic deleter improvements and fixed autoserialization with "typed" list, creating a simple mechanic to restore original types 2024-07-08 20:00:18 +02:00
Adolfo Gómez García
1cb96fd727 Fixed client ticket length 2024-07-07 17:31:13 +02:00
Adolfo Gómez García
dd9a02faa9 Some minor improvements to Proxmox, removing redundant code 2024-07-06 21:57:05 +02:00
Adolfo Gómez García
adf724101b Fixed fixture 2024-07-06 19:22:29 +02:00
Adolfo Gómez García
856563a65c Refactor Proxmox helpers to exclude differential storage types 2024-07-06 18:53:04 +02:00
Adolfo Gómez García
3c7ec1067f Working on clean Proxmox 2024-07-06 16:41:08 +02:00
Adolfo Gómez García
ea5730c857 Improving proxmox and fxing up tests 2024-07-06 15:49:47 +02:00
Adolfo Gómez García
a1499b0895 Cleaning and refactoring proxmox, and fixed tests 2024-07-06 02:31:05 +02:00
Adolfo Gómez García
28ed59e185 Some minor type fixes for mypy 2024-07-05 19:32:44 +02:00
Adolfo Gómez García
2c8ef0cbe9 chore: Import types module in provider.py 2024-07-05 17:39:30 +02:00
Adolfo Gómez García
0b7adc8b19 Refactor logging in Module and Service classes 2024-07-05 17:28:01 +02:00
Adolfo Gómez García
29179a31df Refactor logging in Module and Service classes 2024-07-05 17:09:49 +02:00
Adolfo Gómez García
6e59402747 Updated client 2024-07-05 16:35:21 +02:00
Adolfo Gómez García
1873ed46fe Fixed MFA missing db_obj method and fixed Proxmox Helpers 2024-07-05 16:27:14 +02:00
Adolfo Gómez García
e5035efafb Changed stats graphs on admin to use days instead of hours 2024-07-04 20:16:27 +02:00
Adolfo Gómez García
4163b5aae2 Improved a bit stats charts 2024-07-04 18:55:52 +02:00
Adolfo Gómez García
43389248c8 old_field_name and servers improvement.
Improved old_field_name to allow more than 1 "old field name", just in case the future. Also, improved servers manager to allow a "threshold" value, so we can get intead of the less loaded server, one with some load, but not too loaded...
2024-07-04 00:41:16 +02:00
Adolfo Gómez García
d60f47aa7a Improved InsecureRequestWarning 2024-07-03 22:19:50 +02:00
Adolfo Gómez García
e62e9875da Refactoring Proxmox 2024-07-03 19:15:59 +02:00
Adolfo Gómez García
65d7e81263 Fixed missing inheritance for Proxmox Error classes 2024-07-03 02:26:02 +02:00
Adolfo Gómez García
06bc4cae4a Finished refactoring of Proxmox client 2024-07-03 00:17:50 +02:00
Adolfo Gómez García
3f7cb8e3db Renamed client to proxmox 2024-07-02 23:25:24 +02:00
Adolfo Gómez García
1218904895 Updated frontend (minor security upgrades, related to sobresource security) 2024-06-30 23:34:22 +02:00
Adolfo Gómez García
17a184752c Fixed Notifiers to implement the now must-have db_obj method 2024-06-30 21:01:21 +02:00
Adolfo Gómez García
fc1ca9c3df some minor order fixes on default fields for dynamic service and added "key" to sorted_choices to allow customized sorts 2024-06-30 20:02:59 +02:00
Adolfo Gómez García
f23d8dd66b Added "sorted_by" parameter to filter helpers 2024-06-30 14:30:56 +02:00
Adolfo Gómez García
b5fd7c39de Added default "null" and "is_null" to UUIDModel and added db_obj to all ManagedObjectModel Instances 2024-06-27 16:15:03 +02:00
Adolfo Gómez García
96e853b5a9 Fixed FixedService to include default "get_token" method (based on token field) 2024-06-26 01:59:16 +02:00
Adolfo Gómez García
3ce03fa238 Added default "get_token" for userservice 2024-06-26 01:29:06 +02:00
Adolfo Gómez García
e4be7859e0 Added support for retry delete and shutdown/stop if check takes too long 2024-06-25 04:38:28 +02:00
Adolfo Gómez García
d279a44c24 Homogeneizing names of publications 2024-06-24 22:57:27 +02:00
Adolfo Gómez García
17027e50f4 some minor refactoring on duplicate on DynamicService 2024-06-24 21:58:30 +02:00
Adolfo Gómez García
e90193ce2a Small fix and comment add 2024-06-24 20:59:32 +02:00
Adolfo Gómez García
97cfd75066 Some minor renamings 2024-06-24 20:13:26 +02:00
Adolfo Gómez García
4ed71eda7e Fixed Xen new destroy flow (now, as the vm removal is queued if fails, there is no error on destroy if vm cannot be removed) 2024-06-23 22:16:36 +02:00
Adolfo Gómez García
2ee436e75c Fixed some minor test problems with new deferred delete implementation 2024-06-23 22:05:34 +02:00
Adolfo Gómez García
14694cdaf8 Migrated defered deletions to common worker, more versatile and common for all 2024-06-23 21:11:04 +02:00
Adolfo Gómez García
dec744a0e2 Small deferred_removal improvement and fix test to ensure services are cached correctly 2024-06-23 16:23:54 +02:00
Adolfo Gómez García
a538827155 Working new worker to unify the removal of services (jobs) 2024-06-23 06:37:35 +02:00
Adolfo Gómez García
a2e211715a Small adition to test utils 2024-06-22 21:09:33 +02:00
Adolfo Gómez García
263e9f4b5d fix: Fixed some mfa fields with choices being initialized on app start instead of on demand 2024-06-22 03:39:51 +02:00
Adolfo Gómez García
711869c657 Fixed typo on op_process_tocken 2024-06-21 22:48:45 +02:00
Adolfo Gómez García
4562a38232 Merge branch 'master' of github.com:/VirtualCable/openuds 2024-06-21 20:15:11 +02:00
Adolfo Gómez García
c0116199ed finders of test utils are now more versatile 2024-06-21 20:14:33 +02:00
Adolfo Gómez García
e96e1b6d6c Upgrading VMware an fixing up things 2024-06-21 20:13:34 +02:00
Adolfo Gómez García
9ad9ed0680 Merge branch 'master' of github.com:/VirtualCable/openuds 2024-06-20 04:24:40 +02:00
Adolfo Gómez García
8108946342 upgrading angular 2024-06-20 04:24:32 +02:00
Adolfo Gómez García
261183668f Upgraded admin interface 2024-06-20 04:02:50 +02:00
Adolfo Gómez García
9ee7e7fa8e Upgraded client submodule reference 2024-06-19 17:10:56 +02:00
Adolfo Gómez García
cd0827af07 Fixed tree generation to include id and uuid on managed objects 2024-06-19 16:54:49 +02:00
Adolfo Gómez García
8bad7d576a Fixed tooltip for GPU on proxmox 2024-06-18 16:56:07 +02:00
Adolfo Gómez García
8c702df0c6 Fixed with devl 2024-06-18 16:52:24 +02:00
Adolfo Gómez García
7cb494c4d5 Added flow to MFA description, to easy development of it
Also, added IP for "remembe device" information, so only when device stays on same ip, will not be asked for a new MFA
2024-06-18 02:41:58 +02:00
Adolfo Gómez García
2d2c20909d Fixes #115 2024-06-17 21:25:11 +02:00
Adolfo Gómez García
57284fbf50 Fixed Radius field tip 2024-06-17 17:31:15 +02:00
Adolfo Gómez García
d5c3519d18 Homogeneized All MFAs 2024-06-17 17:23:28 +02:00
Adolfo Gómez García
570c15be1b Done migration of Publication of OpenStack to new generics 2024-06-17 00:46:57 +02:00
Adolfo Gómez García
1a33f3d6d5 Fixed codes and tests... Need to upgrade OpenStack publication and test 2024-06-16 20:55:09 +02:00
Adolfo Gómez García
50f02d1169 Need to migrate OpenStack Publication to new generics 2024-06-16 19:27:27 +02:00
Adolfo Gómez García
98ff066fe7 Working on openstack tests for new model 2024-06-16 18:59:59 +02:00
Adolfo Gómez García
fe91ecbad6 Added info to fixedservice about supported operations 2024-06-16 16:29:00 +02:00
Adolfo Gómez García
ae164f7236 Added "remove duplicates" to generics service 2024-06-16 05:26:04 +02:00
Adolfo Gómez García
e5eaaf74a0 feat: Add random base name generation to basename_field
This commit adds the functionality to generate a random base name for the `basename_field` in the `fields.py` module. The generated base name will start with "UDS" followed by three random uppercase letters. This feature enhances the flexibility and usability of the `basename_field` by providing a unique and random base name option.

Note: This commit message follows the established convention of using a prefix to indicate the type of change (feat for feature).
2024-06-14 03:17:13 +02:00
Adolfo Gómez García
57e5412553 Adapting OpenStack to generics 2024-06-14 00:29:00 +02:00
Adolfo Gómez García
7db960ca92 feat: Add "soft reset" (reboot) functionality to fields
The commit adds the "soft reset" functionality to the fields module, allowing for a reboot operation. This feature enhances the flexibility and control of the fields module.

Note: This commit message follows the established convention of using a prefix to indicate the type of change (feat for feature).
2024-06-13 18:27:35 +02:00
Adolfo Gómez García
61689ad638 Small security variable change 2024-06-13 03:19:24 +02:00
Adolfo Gómez García
e3c839d70f Minor Storage class aditions 2024-06-12 18:41:45 +02:00
Adolfo Gómez García
ae240a36ed Small reformat of fields.py 2024-06-12 01:24:39 +02:00
Adolfo Gómez García
5de5ba1585 Adding "soft reset" (that is, reboot) to fields 2024-06-11 17:54:27 +02:00
Adolfo Gómez García
d4ca92fcd5 Added alternative to resolve SRV to windows domain os manager, if it cannot be resolved by UDS using DNS query 2024-06-11 17:18:47 +02:00
Adolfo Gómez García
26f48d22f8 Son minimal cosmetic refactorizations 2024-06-08 06:08:33 +02:00
Adolfo Gómez García
7b7e9193c0 Fixed Xen Client Logout, session close 2024-05-31 02:41:30 +02:00
Adolfo Gómez García
c133a74145 Done Xen Provider tests and fixes. Should work now :) 2024-05-31 02:25:39 +02:00
Adolfo Gómez García
a6deda2004 Fixed Links for download virt-viewer on Windows and Macos 2024-05-29 16:08:41 +02:00
Adolfo Gómez García
3fd1fc8b79 Advancing on client tests and improving xen client A LOT 2024-05-29 02:44:58 +02:00
Adolfo Gómez García
4d98cc3f34 Finishing Xen Tests 2024-05-28 19:37:29 +02:00
Adolfo Gómez García
9d0a6c5b6f Finishing tests for Xen provider and related fixes 2024-05-27 19:55:38 +02:00
Adolfo Gómez García
7851470059 Updating xen tests and fixing xen provider 2024-05-27 00:58:26 +02:00
Adolfo Gómez García
94186794f6 Done basic fixtures and test over them 2024-05-26 22:48:05 +02:00
Adolfo Gómez García
f2c7afbd44 Adding fixtures for xen client api 2024-05-26 20:10:27 +02:00
Adolfo Gómez García
7281fa3494 Fixed tests for pyright 2024-05-25 17:42:58 +02:00
Adolfo Gómez García
211cf4d5e6 Replaced "@author" by "Author"
Fixing pyright issues on tests
2024-05-25 17:28:44 +02:00
Adolfo Gómez García
4097c66c0a Updated actor 2024-05-16 16:53:52 +02:00
Adolfo Gómez García
850b5e35e1 Started Xen Tests for new implementation 2024-05-14 03:15:09 +02:00
Adolfo Gómez García
6d4d79f0b7 Moved tests inside src 2024-05-13 18:28:38 +02:00
Adolfo Gómez García
6b8beb27cb Upgrading Xen 2024-05-13 18:16:33 +02:00
Adolfo Gómez García
2a93c14398 Migrating Xen to new generics 2024-05-12 20:50:08 +02:00
Adolfo Gómez García
67bd9b8bd3 Adapting Xen to New generics 2024-05-12 20:48:40 +02:00
Adolfo Gómez García
40f5941db1 Updated guacamole plagin 2024-05-09 17:17:49 +02:00
Adolfo Gómez García
83abebd574 Removed OP_START_COMPLETED from fixed userservice generic 2024-05-09 02:11:10 +02:00
Adolfo Gómez García
77e45099d1 Minor fixes and added a "vars.py" utility for specific servers (with auth info) tests 2024-05-08 22:02:13 +02:00
Adolfo Gómez García
56cdee2b0d Small test fix 2024-05-06 02:22:40 +02:00
Adolfo Gómez García
6de7c65a0f fixed test_fixed_service.py to use types.services.Operation instead of userservice.Operation 2024-05-05 19:42:57 +02:00
Adolfo Gómez García
7737bbf758 REfactorign "remove" in favor of "delete" 2024-05-05 18:49:44 +02:00
Adolfo Gómez García
579e1c2a36 Fixed a couple service consts 2024-05-05 05:01:48 +02:00
Adolfo Gómez García
397523c9a3 chore: Refactor machine name sanitization method 2024-05-05 02:56:06 +02:00
Adolfo Gómez García
029224c749 Small utility method fix to allow None Search 2024-05-05 00:23:12 +02:00
Adolfo Gómez García
7b5e87dd15 Removed not needed "new format" flag 2024-05-04 22:08:33 +02:00
Adolfo Gómez García
0570a1ae27 Fixed autoserializable default assign error and related test 2024-05-04 21:57:32 +02:00
Adolfo Gómez García
04f144cd2d chore: Update UDS admin runtime, polyfills, and main scripts. Updated minor cache definitions 2024-05-03 03:34:56 +02:00
Adolfo Gómez García
6adcc3e1f4 Fixed host fqdn check to "allow" non fqdn hostname... Yes, i know its a nonsense, but for now... :)
Upddated admin to include CVS import
2024-04-29 19:48:02 +02:00
Adolfo Gómez García
7316953e75 Doney Physical Machines 2024-04-29 00:24:04 +02:00
Adolfo Gómez García
eb86784c62 Added support for importing unmanaged servers using CSV 2024-04-28 18:58:16 +02:00
Adolfo Gómez García
628f43a2e7 Removed unused (since years ago) "must_assign_manually" 2024-04-28 16:33:24 +02:00
Adolfo Gómez García
53e0cefc21 Refactorized log types and fixes 2024-04-28 02:21:47 +02:00
Adolfo Gómez García
6694b9d5bc Renamed some fields of servers to better understand what they are
Adding physical machines fixtures, tests, ,,,
2024-04-27 22:31:39 +02:00
Adolfo Gómez García
30bbf1ef0f Fixed config
Done migration tests for PhysicalMachines
2024-04-26 00:58:48 +02:00
Adolfo Gómez García
c39c8c9583 * Some minor fixes to fields
* Adding test for ensuring migration from physical machines is correct
2024-04-25 04:35:39 +02:00
Adolfo Gómez García
3f70576002 IP multi-machines services serialized data is upgraded on migration, so test are not possible 2024-04-21 23:52:52 +02:00
Adolfo Gómez García
156608b6ae Updating deployment multi migration. Needed to keep locked values correctly. 2024-04-21 23:50:45 +02:00
Adolfo Gómez García
1dcc1f71df Fixed pyright complains about pillow 2024-04-21 01:20:44 +02:00
Adolfo Gómez García
b2679104e2 Small debug text fix 2024-04-18 18:57:11 +02:00
Adolfo Gómez García
d93ed52884 Fixed Serialization ui.
From old serialization, data fields where not correctly translated.
Also the test was bad designed, as the data of original was not randomized to ensure data loaded was right.
2024-04-18 18:42:02 +02:00
Adolfo Gómez García
d84e5ac38c Heavy redone of Physical Machines using server groups as backend.
Simplified a lot, and added convenient migrators and data upgraders
2024-04-18 03:35:40 +02:00
Adolfo Gómez García
2822013b36 Fixed servers basic information 2024-04-17 19:56:22 +02:00
Adolfo Gómez García
60c5f37591 Update cache timeout constants in cache.py and client.py 2024-04-16 22:53:35 +02:00
Adolfo Gómez García
229962cbd2 Some more func documentation and small fixes 2024-04-15 21:21:36 +02:00
Adolfo Gómez García
a5bfec3aa9 Some refactoring and minor fixes 2024-04-15 15:49:04 +02:00
Adolfo Gómez García
c02c9f45a4 Improvements to generics, and fixes related to macs.
* Now correctly notes that if get_mac is with an empty vmid, should process acordly to the specific service.
* Now, before starting or stopping and vms, the state is checked by the userservice (using is_running)
2024-04-12 04:47:15 +02:00
Adolfo Gómez García
fb3b02ac2d Merge branch 'master' of github.com:/VirtualCable/openuds 2024-04-11 16:31:59 +02:00
Adolfo Gómez García
8f17f2e545 Security fixes from git 2024-04-11 16:31:45 +02:00
Adolfo Gómez
d62afebef8 Merge pull request #112 from it4joy/patch-1
Update README.md
2024-04-11 16:25:31 +02:00
Adolfo Gómez
871538f341 Merge pull request #113 from NinhDoan/fix-check-user-state
fix: check the user's state when handling a request
2024-04-11 16:20:24 +02:00
ninhdh3
839d798e56 fix: check the user's state when handling a request 2024-04-11 13:44:51 +07:00
Adolfo Gómez García
cf8498ad37 small improvement for loglevel handling in log.py 2024-04-10 20:57:55 +02:00
Adolfo Gómez García
e6778eda38 Fixed tree generation for logs 2024-04-10 20:56:52 +02:00
Adolfo Gómez García
7c16960d3a Refactor OpenGnsys views and helpers to improve code readability and maintainability 2024-04-10 17:21:09 +02:00
Adolfo Gómez García
e5e72de4b4 Fixed test for openstack 2024-04-09 23:49:55 +02:00
Adolfo Gómez García
c95d54eea8 created a default method for get_and_assign, most fixedservices will use this 2024-04-09 23:25:06 +02:00
Adolfo Gómez García
339eeb7967 Making more homogeneous the new window on brower-based transports 2024-04-09 16:01:26 +02:00
Adolfo Gómez García
fca36ead57 Adding resilence to generics 2024-04-09 02:22:31 +02:00
Adolfo Gómez García
3dedd9b7e0 Fixed problems with transports 2024-04-08 17:49:08 +02:00
Adolfo Gómez García
bab8f3965a Minor fixes ading resilence to server unreachable 2024-04-08 01:13:05 +02:00
Adolfo Gómez García
4b5913183c Fixed "fixed" service generic test 2024-04-08 00:47:02 +02:00
Adolfo Gómez García
5718c0d8c0 decoupled snapshot process into two different methods, much clearer 2024-04-08 00:36:23 +02:00
Adolfo Gómez García
0554089ecc Improving generic services 2024-04-08 00:10:28 +02:00
Adolfo Gómez García
05c434eb8a Some minor fixes on generics, order of fields... 2024-04-07 05:43:48 +02:00
Igor Ivanov
8b3c8fe81e Update README.md
Fix typos.
2024-04-04 13:11:37 +03:00
Adolfo Gómez García
fb3945975c Fixed proxmox tests 2024-04-02 23:39:51 +02:00
Adolfo Gómez García
1df9ab40a6 Fixing up generics, adding support for random & keep on error to fixed, some minor fixes 2024-04-02 23:21:32 +02:00
Adolfo Gómez García
02fb954e29 Removed FixedOperation in favor of Operation 2024-04-02 21:59:41 +02:00
Adolfo Gómez García
d264cffca2 Refectorinf fixed service so it looks more like an dynamic service (methods names, etc...) 2024-04-02 20:19:26 +02:00
Adolfo Gómez García
750715f8a2 Added support for randomizing machines assignation on service_fixed generics 2024-04-02 02:16:38 +02:00
Adolfo Gómez García
e0acbabcd2 Some minor fixes ond debug info provided 2024-04-01 04:16:51 +02:00
Adolfo Gómez García
a13b4431d0 Refactors and improvements to fixed_service generic 2024-04-01 03:54:12 +02:00
Adolfo Gómez García
2290b4f235 Some renames 2024-03-31 20:23:19 +02:00
Adolfo Gómez García
fc230d7205 Refactorized name and get_type from module to mod_name and mod_type, much more convenient and may avoid future name clashs 2024-03-31 15:21:40 +02:00
Adolfo Gómez García
d598dd5d0d Set default max number of checks to a big number on publications, because they can take a long time. 2024-03-30 17:49:39 +01:00
Adolfo Gómez García
79ddb6016f Some notes on Proxmox test 2024-03-28 19:20:39 +01:00
Adolfo Gómez García
37b0864c12 Fixed fixed service tab 2024-03-28 03:11:24 +01:00
Adolfo Gómez García
4457c4e84d Minor change to test streamed data with get_items of details 2024-03-27 22:59:35 +01:00
Adolfo Gómez García
c8f402a419 Added xperimental support for streaming some kind of results.
Currently no one streams anything, way to go to prepare everything for this.
also, removed non-unsed non-maintained filtering
2024-03-27 22:44:11 +01:00
Adolfo Gómez García
1780e6c2d9 Fixing fixtures to improve tests compat 2024-03-26 04:08:43 +01:00
Adolfo Gómez García
83fc9f2e7f Improved openstack tests to avoid problems 2024-03-26 03:36:48 +01:00
Adolfo Gómez García
93ebf82c79 Normalizing all machine ids names to "vmid" 2024-03-26 02:34:05 +01:00
Adolfo Gómez García
0322df85d5 Added default implementatio of remove_and_free_machine (very common...) 2024-03-26 01:46:06 +01:00
Adolfo Gómez García
fedd6507ae Fixed openstack tests (due to incorrect initial states of some tests) 2024-03-25 05:01:09 +01:00
Adolfo Gómez García
4a05ebe074 Fixind dynamic service generics and done tests for them 2024-03-25 04:39:33 +01:00
Adolfo Gómez García
8ec010a9bb Some minor fixes of fixed service of generics 2024-03-24 01:42:08 +01:00
Adolfo Gómez García
885fe8f31f Name fix on tests 2024-03-24 00:33:57 +01:00
Adolfo Gómez García
262f63d926 Minor fix on test 2024-03-23 23:47:47 +01:00
Adolfo Gómez García
9320eb3adf Some renaming for better significance 2024-03-23 23:12:00 +01:00
Adolfo Gómez García
8f98314c97 Some minor case fixes on dynamic 2024-03-23 03:41:56 +01:00
Adolfo Gómez García
e70dcd4f23 Some improvements (minor) to autoserializable 2024-03-22 22:34:30 +01:00
Adolfo Gómez García
15d84816fa Removed old proxmox implementetion in favor of the new, generic based, one 2024-03-22 02:50:55 +01:00
Adolfo Gómez García
967a6fe925 Finishing generic services implementations 2024-03-22 02:28:06 +01:00
Adolfo Gómez García
dfb15e8920 Refactorized "specializations" name to a more convenient "generics" 2024-03-22 01:17:34 +01:00
Adolfo Gómez García
ccce6650ba Fixing dynamic service specializations and tests 2024-03-22 01:08:17 +01:00
Adolfo Gómez García
165d3bde21 Fixing dynamic service and proxmox implementation using this 2024-03-21 04:01:24 +01:00
Adolfo Gómez García
83f4359f90 Added some improvements to Nutanix Prism Central 2024-03-19 21:55:54 +01:00
Adolfo Gómez García
08618f5dbb Fixed pools and ad test, also backup server required 2024-03-19 16:55:19 +01:00
Adolfo Gómez García
5c9bf779e3 Adding new specialization and remaking Proxmox conector based on this.
Also have left old proxmox while testing aroung (As ProxmoxOrig, but with typenames changed to avoid collisions). Will be removed as soon as all is working fine
2024-03-19 04:42:33 +01:00
Adolfo Gómez García
4fb1da1554 Fixed publication return types and advancing on custom dynamic services base 2024-03-18 22:34:55 +01:00
Adolfo Gómez García
42556d9e33 Restored removed methd by mistake 2024-03-18 19:52:03 +01:00
Adolfo Gómez García
4835035156 Started a generic "dynamic service" to simplify a lot all userservice implementations. Work in progress.. 2024-03-18 19:33:46 +01:00
Adolfo Gómez García
70738e7801 Done oVirtTests for linked deployment, with soft shutdoen 2024-03-18 04:28:46 +01:00
Adolfo Gómez García
6e2980cffc Added try soft shutdown to ovirt 2024-03-18 00:21:49 +01:00
Adolfo Gómez García
188b27eb90 Advancing on ovirt, some refactoring and fixes 2024-03-17 23:22:39 +01:00
Adolfo Gómez García
f497c388ba Adding tests and fixing ovirt 2024-03-17 04:33:12 +01:00
Adolfo Gómez García
3e8405482e Done ovirt provider tests 2024-03-17 02:04:54 +01:00
Adolfo Gómez García
a0cb8d4778 Creating provider tests for ovirt 2024-03-17 01:38:24 +01:00
Adolfo Gómez García
ce1d1eba19 Added required methods to allow fixedservice and finished client mock and data 2024-03-16 03:42:37 +01:00
Adolfo Gómez García
cbacc20909 Improving A LOT the ovirt connection
Adding test for ovirt
2024-03-16 02:33:46 +01:00
Adolfo Gómez García
760bb169bf Added comment related of tools module backwards compat 2024-03-15 17:32:03 +01:00
Adolfo Gómez García
e70f2cd07b Reverted changes on client scripts, to keep compat with 3.6 version. On next client requirement update, will make the changes again.' 2024-03-15 17:10:08 +01:00
Adolfo Gómez García
9f4c1ea28d Improved fixed services, and refatorized some methors name to be more consistent 2024-03-15 12:13:49 +01:00
Adolfo Gómez García
5e96965231 Merge branch 'master' of github.com:/VirtualCable/openuds 2024-03-15 02:35:51 +01:00
Adolfo Gómez García
1a0b83327c actorv3 fixes (cosmetic...) 2024-03-15 02:35:45 +01:00
Adolfo Gómez
bc12b4ef3a Restored loglevel on actor 2024-03-15 02:17:19 +01:00
Adolfo Gómez García
8512435a22 Updated gui to show custom message on pool launch if required 2024-03-15 01:50:14 +01:00
Adolfo Gómez García
4ee8697827 REST fixes.
Fixed several bugs arised with refactorization (Most related to type checkin on runtime), and added support for graduan moving custom methods to snake_case keeping backwards camelCase compat
2024-03-15 01:32:58 +01:00
Adolfo Gómez García
cf8660aa78 Added support to call custom methods as camelCase of snake_case (keeping backwards compat, but allowin new snake_case standard to be used) 2024-03-14 23:50:35 +01:00
Adolfo Gómez García
df5d18710a Fix service assignments and serialization issues on tests after refactoring storage 2024-03-14 23:20:44 +01:00
Adolfo Gómez García
24c2da1b4b General fixes and improvements.
Added custom messages to service pool and made miscellaneous updates.
Renamed and added new files in OVirt service, including new types.
Updated OpenStack and PhysicalMachines services.
Modified Proxmox deployment and made changes to main.js and index.html.
Fixed HTML5RDP, HTML5SSH, HTML5VNC, RDP, SPICE, X2GO transports.
Updated unit tests.
2024-03-14 22:41:27 +01:00
Adolfo Gómez García
123d3ca405 fixed logging info 2024-03-14 18:34:47 +01:00
Adolfo Gómez García
e1810a3695 fixed logging info 2024-03-14 18:16:28 +01:00
Adolfo Gómez García
cbd67c5c71 Fixed fixed_service and start working on ovirt 2024-03-13 23:26:15 +01:00
Adolfo Gómez García
189e530c3a small proxmox improvement 2024-03-13 02:21:16 +01:00
Adolfo Gómez García
7ecadee56f Fix OpenStack and Proxmox service issues. Finished tests for OpenStack. 2024-03-13 02:11:45 +01:00
Adolfo Gómez García
7be200f173 Added initial fixed service to OpenStack. Need to complete related tests 2024-03-12 18:52:09 +01:00
Adolfo Gómez García
c64a788523 Fix where data is cached on openstack, and normalized some small cache durations 2024-03-12 03:25:56 +01:00
Adolfo Gómez García
12548b44cc Many more improvements to openstack and advanced on tests. Hope to finish them by tomorrow 2024-03-12 03:17:24 +01:00
Adolfo Gómez García
d542e65a9c Fixes for OpenStack provider & tests for same provider 2024-03-10 23:22:51 +01:00
Adolfo Gómez García
f760b55561 Refactor decorators and remove unused import 2024-03-10 16:50:54 +01:00
Adolfo Gómez García
a3f50e739a Improved decorators signatures & removed transaction.atomic from cached call 2024-03-10 16:22:10 +01:00
Adolfo Gómez García
6ab0307bdd added cache to is_available 2024-03-10 04:04:55 +01:00
Adolfo Gómez García
934c43636e Added missing cache for list_snapshots 2024-03-10 02:25:20 +01:00
Adolfo Gómez García
db77332c17 Fixed New Openstack implementation. Much more convenient 2024-03-10 01:51:15 +01:00
Adolfo Gómez García
947b35bcf5 Enhacing OpenStack provider and services 2024-03-09 20:43:00 +01:00
Adolfo Gómez García
9d00766200 Added downloadables using __spec__ instead of __package__ 2024-03-09 05:52:02 +01:00
Adolfo Gómez García
62742e9438 Adding type info to OpenStack, to enhance resilence and code sanity 2024-03-09 04:59:21 +01:00
Adolfo Gómez García
466bda440e Updated OpenStack service and helper functions
In this commit, several modifications have been made to the OpenStack service and its helper functions. The changes include improvements to the efficiency and reliability of the service. Additionally, the OpenStack client has been updated to handle new scenarios and edge cases. These updates are expected to enhance the overall performance and stability of the OpenStack service.
2024-03-07 23:33:23 +01:00
Adolfo Gómez García
ac116697f4 Improving openstack, to allow more than one endpoint of a kind, and iterate over them in case of error 2024-03-07 23:20:00 +01:00
Adolfo Gómez García
14745e7f1b Some minor typing fixes and added openstack patch to allow some cloud providers listing invalid enpoints 2024-03-07 18:42:14 +01:00
Adolfo Gómez García
063385a8f1 Updated client and tunnel 2024-03-07 02:16:55 +01:00
Adolfo Gómez García
ef70b5ce76 Updating client 2024-03-06 02:51:03 +01:00
Adolfo Gómez García
2d40b5ea5b Moving to new method names. Client keeps backwards compat 2024-03-05 04:15:32 +01:00
Adolfo Gómez García
16e99aad1d Moving to new method names. Client keeps backwards compat 2024-03-05 04:04:58 +01:00
Adolfo Gómez García
ef73487473 Adding a mechaning to disallow removal of user services by internal method automatically 2024-03-04 20:22:04 +01:00
Adolfo Gómez García
f67b34e62b Upgraded client 2024-03-04 19:46:03 +01:00
Adolfo Gómez García
38340ef709 Giving a more convenient name for ready states returned from get_userservice... methods 2024-03-04 19:44:00 +01:00
Adolfo Gómez García
9d97206806 Enhaced autospec so refactoring will work fin with tests also 2024-03-04 03:37:32 +01:00
Adolfo Gómez García
071f92ab49 Updated client 2024-03-03 19:27:00 +01:00
Adolfo Gómez
beb3c905d8 Update client 2024-03-03 16:28:27 +01:00
Adolfo Gómez García
20711c5c4d Reordering client structure. Removil old "full" folder 2024-03-03 15:51:42 +01:00
Adolfo Gómez García
5ba9fdc2a8 Updating client 2024-03-03 04:56:08 +01:00
Adolfo Gómez García
cc8962c9cb updated tunnel server 2024-03-03 03:33:49 +01:00
Adolfo Gómez García
3cc36891c3 Merge branch 'master' of github.com:/VirtualCable/openuds 2024-03-02 16:27:09 +01:00
Adolfo Gómez García
3f7d5f4b2e Added helpers test to proxmox 2024-03-02 16:27:04 +01:00
Adolfo Gómez García
7250a1d499 Minor fixes to tests discovered while running them on arm 2024-03-02 05:07:28 +01:00
Adolfo Gómez García
160dda7236 Small fixes on proxmox tests 2024-03-01 00:29:36 +01:00
Adolfo Gómez García
ecdd311837 Some minor fixes 2024-03-01 00:13:40 +01:00
Adolfo Gómez García
6e7700c7e2 MASSIVE type checking fixes for even more strict checkings 2024-02-29 01:36:10 +01:00
Adolfo Gómez García
a2fc3130cd MASSIVE type checking fixes for even more strict checkings 2024-02-29 01:33:45 +01:00
Adolfo Gómez García
05d26c732e Done cancel/destroy test and user assignation for proxmox 2024-02-28 20:31:08 +01:00
Adolfo Gómez García
09858a165c Fixed and updated translations 2024-02-28 02:03:25 +01:00
Adolfo Gómez García
255a7c50c3 Updated translations 2024-02-28 01:20:40 +01:00
Adolfo Gómez García
95a9807d6a Generators, proxmox and states fixes 2024-02-28 00:51:56 +01:00
Adolfo Gómez García
c8d6fbcbd1 Moving Deploy States to its own class 2024-02-27 20:33:55 +01:00
Adolfo Gómez García
69ffbe384c Upgraded Calendar Types 2024-02-27 16:04:55 +01:00
Adolfo Gómez García
7ef34f3897 Fix various code issues 2024-02-27 00:18:13 +01:00
Adolfo Gómez García
86fe499d3a Fixed content processing of Django Promises (for tranlations) 2024-02-26 19:07:25 +01:00
Adolfo Gómez García
5d21a9086a fixed some "autoimported" by misclick modules :S 2024-02-26 17:30:36 +01:00
Adolfo Gómez García
552bdfc0cf Added rest consts 2024-02-26 17:07:24 +01:00
Adolfo Gómez García
5c7d13e890 Refactorized model to make it more manageable... 2024-02-26 17:07:05 +01:00
Adolfo Gómez García
f9e2d88529 Fixing typing also on tests 2024-02-26 14:57:10 +01:00
Adolfo Gómez García
3bf7af2e3d Fixing typing also on tests 2024-02-26 05:50:36 +01:00
Adolfo Gómez García
fc35c18fea uptaded actor 2024-02-25 19:54:25 +01:00
Adolfo Gómez García
0aec89b76b Updated tunnel-server 2024-02-23 19:11:06 +01:00
Adolfo Gómez García
4ad32931ee Very big refactoring to adapt to strict checking mode 2024-02-23 18:01:02 +01:00
Adolfo Gómez García
975dd80c5d Some more fixes 2024-02-23 04:26:38 +01:00
Adolfo Gómez García
6f85a42673 Fix method signatures and naming conventions 2024-02-23 03:07:55 +01:00
Adolfo Gómez García
bedadf24ac Fix type annotations and method signatures 2024-02-23 00:37:30 +01:00
Adolfo Gómez García
02f367efd8 more fixes and bug detection 2024-02-22 23:39:48 +01:00
Adolfo Gómez García
dc8df5bb79 More type checking enforcing and bug fixes 2024-02-22 22:17:39 +01:00
Adolfo Gómez García
73042dd76f Added type checking to all deployment tasks 2024-02-22 21:50:20 +01:00
Adolfo Gómez García
7e33f381d4 More fixes, types, etc... 2024-02-22 04:25:54 +01:00
Adolfo Gómez García
beae9271cd Fixing up more hints, and fixing found errors 2024-02-22 02:56:03 +01:00
Adolfo Gómez García
1633d0d1b1 Massive changes:
* Updated test type result type
* Fixing up mypy/pyright complains on strict mode
2024-02-21 21:48:59 +01:00
Adolfo Gómez García
05df32a739 Add type annotations to several methods and functions 2024-02-21 17:35:59 +01:00
Adolfo Gómez García
75b27af0fe Big code fixing, adapting to mypy/pyright strict checking mode 2024-02-21 03:35:36 +01:00
Adolfo Gómez García
57a8d26adc More test and fixes for proxmox 2024-02-20 05:19:40 +01:00
Adolfo Gómez García
8f902b36fa In case of error 500 on proxmox, try to get some info from journal 2024-02-20 02:07:30 +01:00
Adolfo Gómez García
6fca6c2d0a Refactor Proxmox service classes 2024-02-19 23:43:48 +01:00
Adolfo Gómez García
4b85424f56 Adding basic proxmox service tests 2024-02-19 23:31:25 +01:00
Adolfo Gómez García
05038e2e6f Retyped value setter/getters for UserInterface Fields 2024-02-19 19:01:01 +01:00
Adolfo Gómez García
3a9e48d4b6 Fix caching key function name to a more convenient one 2024-02-19 17:45:51 +01:00
Adolfo Gómez García
bf8b40be6f Update Proxmox service provider and related files 2024-02-19 17:28:30 +01:00
Adolfo Gómez García
202444f64e Cleaning "nonsense" repeated methods from proxmox service that are only direct proxies to proxmox provider< 2024-02-19 02:21:55 +01:00
Adolfo Gómez García
500cb2ed96 Adding an fixing up proxmox 2024-02-19 02:15:04 +01:00
Adolfo Gómez García
a3fa9f604a Added type to spice console connection, and fixed discovered errors :) 2024-02-18 23:46:27 +01:00
Adolfo Gómez García
b58d3e210c Fix service provider naming in code
* Renamed service "parent" to more convenient "provider"
2024-02-18 17:16:58 +01:00
Adolfo Gómez García
57be9c80b6 Adding testing mechaniccs 2024-02-18 16:48:20 +01:00
Adolfo Gómez García
9614323a1b Fixed translations 2024-02-17 19:01:51 +01:00
Adolfo Gómez García
009d10ad56 Fix import statements for UserServiceManager to new userservice instead of old user_service 2024-02-17 17:59:54 +01:00
Adolfo Gómez García
96db6ded98 Improved user service removal worker, and "removable" check 2024-02-17 17:54:12 +01:00
Adolfo Gómez García
8d26fff400 fixed specialization and specialization tests 2024-02-16 21:56:53 +01:00
Adolfo Gómez García
042a27737f simple fixes 2024-02-16 18:41:34 +01:00
Adolfo Gómez García
e6c7a80ac5 Added fixed service specialization tests and fixed it :) 2024-02-16 03:05:23 +01:00
Adolfo Gómez García
f279a503aa Updated translations 2024-02-15 21:29:14 +01:00
Adolfo Gómez García
511833d2fd Upgraded admin interface 2024-02-15 20:08:43 +01:00
Adolfo Gómez García
77e7df76bf Some minor fixes 2024-02-15 20:06:38 +01:00
Adolfo Gómez García
9defc46083 Fixing up fixed_service generalization, and starting a test for this... 2024-02-15 19:40:36 +01:00
Adolfo Gómez García
97fc8f844e Upgraded OpenGnsys connector 2024-02-15 16:31:15 +01:00
Adolfo Gómez García
9800218df9 Added some fixes to services_info_dict and finished tests for metapools transports grouping 2024-02-10 21:28:15 +01:00
Adolfo Gómez García
3d02a99b42 Remove last "autoattributes" use.
Will remove the class probably on 5.0, when sure no data is left behind using it (Probably, first will rename it just in case it's needed on some environment can recover it fast, or import conditionally...)
2024-02-04 05:25:42 +01:00
Adolfo Gómez García
34005c2af3 * updated admin
* Added Xen Fixed Services
* Fixed specializations folders name
2024-02-04 05:12:44 +01:00
Adolfo Gómez García
e921c76530 small proxmox fix and rest 2024-02-02 00:56:40 +01:00
Adolfo Gómez García
1d569d009a Moving common "specializations" algos for services to a common base 2024-02-02 00:22:17 +01:00
Adolfo Gómez García
c4a5beafd4 Small fix to service_pools (to use iexact on uuid search of user, to allow old data to be used...)
some minor formating
Now, proxmos fixed pool, seems to work correctly. Some test to be done anyway :)
2024-02-01 03:23:32 +01:00
Adolfo Gómez García
434a20254e Working on proxmox fixed pool 2024-02-01 02:36:59 +01:00
Adolfo Gómez García
70ccbc3591 Fixed "mass retrieval" of properties for items list of service pools 2024-02-01 02:36:33 +01:00
Adolfo Gómez García
d4ae8f589f Adding proxmox fixed pool service 2024-02-01 01:33:43 +01:00
Adolfo Gómez García
8ec94e0cdf Adding fixed pool of machines to ProxMox 2024-01-31 00:43:27 +01:00
Adolfo Gómez García
06f3487d2c Moved all marshallers to automatic methods (using UserInterface or AutoSerializable fields...) 2024-01-30 03:49:36 +01:00
Adolfo Gómez García
4a92cdb1e5 Migrated OpenGnsys OpenNebula and Openstack marshallers and added test to ensure compat 2024-01-29 23:50:38 +01:00
Adolfo Gómez García
9522989679 Fixing up machines by ip services 2024-01-29 19:54:43 +01:00
Adolfo Gómez García
33cdf27375 Improving environment class 2024-01-29 02:52:27 +01:00
Adolfo Gómez García
b42f93839f Some Environment improvements 2024-01-29 01:41:35 +01:00
Adolfo Gómez García
dfedbd6bf3 Fixed auto-imported regex by mistake... 2024-01-29 01:28:15 +01:00
Adolfo Gómez García
af441c13e7 code cleanup 2024-01-29 01:16:10 +01:00
Adolfo Gómez García
266b0c2d1e Renamed "auto_serializable" to "autoserializable"
Done physical machines multi machines migration to common serialization models
2024-01-28 21:29:26 +01:00
Adolfo Gómez García
bd8562a58e small fix 2024-01-28 13:48:48 +01:00
Adolfo Gómez García
cf34718cf4 Added factory tester 2024-01-28 13:47:51 +01:00
Adolfo Gómez García
db082109bd Some minor renames and adding new tests 2024-01-28 13:32:27 +01:00
Adolfo Gómez García
0c3a1d746e Fixed default autoserialization values... 2024-01-28 02:43:48 +01:00
Adolfo Gómez García
ea91006b77 Autoserializable improvements:
- Now only autoserializable with same fields are considered equals, so equals now is simmetric
- Ensured that missing or new fields addition to the Autoserializable does not breaks anything
- Now on read of missing fields, values are assigned to default values (allowing future migrations with field adition and default values)
2024-01-28 02:36:10 +01:00
Adolfo Gómez García
7c79a716a3 Refactor Xen service methods
Delete unused Proxmox test file
Upgraded Xen deployment serialization to auto_serializable
2024-01-28 02:10:08 +01:00
Adolfo Gómez García
45a409f72b Added support for Objects as serialized fields
Added automarking "old serialized format" data for upgrade on UserInterface (in fact, returning that it needs upgrade)
Fixed tests
2024-01-28 01:44:43 +01:00
Adolfo Gómez García
7cfa9ca9f4 Migrated all os managers to "modern" serialization model 2024-01-27 19:29:49 +01:00
Adolfo Gómez García
e88c3f2fff Upgraded linux os managers marshallers 2024-01-27 05:05:34 +01:00
Adolfo Gómez García
01e765a1db Refactor MFA classes and add network restrictions 2024-01-26 23:24:05 +01:00
Adolfo Gómez García
f2c5ca2e92 Several mfa fixes and improvements 2024-01-26 23:15:42 +01:00
Adolfo Gómez García
63d1693fea Joining linux freeipa with linux ad os manager to simplify
Fixing up serialization, to allow "derived" classes auto serialization correctly
2024-01-26 21:37:35 +01:00
Adolfo Gómez García
2ce03b9438 Upgraded SimpleLdap Auth to auto serialization model, keeping backwards compat ofc 2024-01-26 02:40:24 +01:00
Adolfo Gómez García
72b02d2560 refactorized REST for calendar actions 2024-01-26 02:17:05 +01:00
Adolfo Gómez García
d003e48a42 updated admin interface 2024-01-26 02:16:51 +01:00
Adolfo Gómez García
485520f402 Remodeled cache updater, minor fixes and more refactoring 2024-01-26 01:30:40 +01:00
Adolfo Gómez García
42e042d4d4 Migrated old regexldap serialization to automatic serialization model 2024-01-25 19:05:07 +01:00
Adolfo Gómez García
e115554b32 updated gitignore 2024-01-25 17:13:22 +01:00
Adolfo Gómez García
34c19799da Removed pylist.json 2024-01-25 17:12:43 +01:00
Adolfo Gómez García
f034f5eb7f Finised field upgrade mechaninsm 2024-01-25 03:37:57 +01:00
Adolfo Gómez García
d2c466c542 updating max.... names to better ones 2024-01-24 21:25:15 +01:00
Adolfo Gómez García
7cdc11219c Remarshalling mechanics defined and implemented 2024-01-24 20:21:49 +01:00
Adolfo Gómez García
817100cf5b implementing new "Remarshall" mechanicks to allow faster migrations... 2024-01-24 19:22:30 +01:00
Adolfo Gómez García
92042dd55a Fixed Internal DB Auth (Different user for each host) and refactoring some dictionaries to classes 2024-01-24 18:17:41 +01:00
Adolfo Gómez García
8e23f7c818 small userinterface typing improvements 2024-01-24 04:25:43 +01:00
Adolfo Gómez García
81abe1d99f Updated SAML 2024-01-24 04:15:53 +01:00
Adolfo Gómez García
3afeb4869c Updated SAML to autocontain Organization display data 2024-01-24 03:33:52 +01:00
Adolfo Gómez García
5cf75a13f1 Updated admin interface visuals and upgraded configuration (DB model and internal) 2024-01-24 03:30:55 +01:00
Adolfo Gómez García
9a6ac745a0 Small fix for seeng passwords as hashes 2024-01-24 02:02:47 +01:00
Adolfo Gómez García
f4b38af989 Refactor actor registration and authentication
Update actor token parameters and save changes
Validate user groups during internal DB authentication
Export authenticator details in tree command
Fix minor issues in export and tree commands
2024-01-23 17:09:11 +01:00
Adolfo Gómez García
ad8f5e01c1 Fix function names in OpenGnsys and OpenStack services
Added a better type hint for callbacks return values
more code fixes
2024-01-23 03:37:05 +01:00
Adolfo Gómez García
59691d923d fixed proxmos test 2024-01-23 01:33:48 +01:00
Adolfo Gómez García
b60af290a0 Fix serialization and authentication issues 2024-01-23 01:31:28 +01:00
Adolfo Gómez García
cae6a1e8d2 Starting proxmox tests and some more code migration 2024-01-22 23:52:22 +01:00
Adolfo Gómez García
4fe67ae697 adding some new tests 2024-01-22 23:25:40 +01:00
Adolfo Gómez García
de3985c841 Updating more names, code review and fixes. 2024-01-22 03:39:56 +01:00
Adolfo Gómez García
c2024c23b8 Merge branch 'master' of github.com:/VirtualCable/openuds 2024-01-21 17:43:18 +01:00
Adolfo Gómez García
641497826a Some fixes to @cached decorator, to really take into account all function params 2024-01-21 17:43:13 +01:00
Adolfo Gómez
2beb9cfdb7 Update README.md 2024-01-21 13:52:17 +01:00
Adolfo Gómez García
98d0306846 Updating user interface, and more refactor 2024-01-17 20:00:22 +01:00
Adolfo Gómez García
cc89e7f5db Moved some constants around 2024-01-17 01:30:53 +01:00
Adolfo Gómez García
0d3504e11f Fixing up tunnel 2024-01-16 18:52:40 +01:00
Adolfo Gómez García
63a3469c91 Fixing up tunnel 2024-01-16 17:18:58 +01:00
Adolfo Gómez García
009df1f4cb Refactoring, upgraded gui to angular 17 and some test fix 2024-01-16 05:03:10 +01:00
Adolfo Gómez García
0495c4af1b Fixed pytest.ini to ignore xdist deprecation warning until fixed on coverage plugin 2024-01-16 00:57:03 +01:00
Adolfo Gómez García
1e211997b8 Fixed test fixture and improved user interface readability for unmarshaller.
Added flag to config so it does not save nor load anything during migrations
2024-01-16 00:49:51 +01:00
Adolfo Gómez García
3c6044c0ed Remove index_together from UserService model
This commit removes the index_together attribute from the UserService model in the migration file 0001_squashed_0042_auto_20210628_1533.py. This change was made to adjust to django recommendations of not using it
2024-01-16 00:20:46 +01:00
Adolfo Gómez García
9dbb47a4ad more refactoring and fixes and tests... 2024-01-16 00:14:00 +01:00
Adolfo Gómez García
d21f66408f Refactoring and new tests 2024-01-15 23:13:19 +01:00
Adolfo Gómez García
65dc8acdec Added new tests 2024-01-15 21:43:48 +01:00
Adolfo Gómez García
88ee934376 Refactoring and new tests 2024-01-15 21:42:16 +01:00
Adolfo Gómez García
894fecb861 fixed migration and notifications INCORRECT small positive integer to positive integer (the numbers can be greater than 32768..) 2024-01-15 04:22:19 +01:00
Adolfo Gómez García
8f7dca32b0 Removed excesive exception loggin on config value, nonsense... :) 2024-01-15 02:09:10 +01:00
Adolfo Gómez García
a7ee5ecb88 fixed rest auth after refactoring 2024-01-12 06:12:41 +01:00
Adolfo Gómez García
3f434f1347 fixed rest auth after refactoring 2024-01-12 06:06:29 +01:00
Adolfo Gómez García
f2377ebfec fixed rest auth after refactoring 2024-01-12 05:45:04 +01:00
Adolfo Gómez García
4f2719aa29 fixed rest auth after refactoring 2024-01-12 05:16:49 +01:00
Adolfo Gómez García
ce888a6013 Moving gui variables to snake_case 2024-01-12 03:04:12 +01:00
Adolfo Gómez García
cd737c4b5f fixed user interface serialization with stored_field_name (typo fix...) 2024-01-12 02:15:50 +01:00
Adolfo Gómez García
698d9cbcc7 small fix for userinterface 2024-01-12 01:51:47 +01:00
Adolfo Gómez García
f1c1cbae06 Refactoring Transports 2024-01-12 01:34:28 +01:00
Adolfo Gómez García
e4d2d2a843 A lot of refactorization 2024-01-11 23:19:58 +01:00
Adolfo Gómez García
27d91154b6 A lot of refactorization :S 2024-01-11 05:00:49 +01:00
Adolfo Gómez García
1d4896c089 adding support for postgresql 2024-01-10 23:07:46 +01:00
Adolfo Gómez García
84f1fef5d7 advancing on refactoring 2024-01-10 22:41:41 +01:00
Adolfo Gómez García
622acdb1a5 Adding state into types 2024-01-10 19:23:36 +01:00
Adolfo Gómez García
ad1b8cb51d More refactorization 2024-01-10 19:17:15 +01:00
Adolfo Gómez García
0b66300805 Added sumarize to authenticators 2024-01-10 04:45:31 +01:00
Adolfo Gómez García
bf3d36c901 Improved mfa code storage on browser and related security 2024-01-10 04:35:13 +01:00
Adolfo Gómez García
1715e1a7a1 advancing on refactoring 2024-01-10 02:03:22 +01:00
Adolfo Gómez García
f6c6578b00 advancing on refactoring 2024-01-10 02:01:03 +01:00
Adolfo Gómez García
4f2b331bb8 advancing on refactoring 2024-01-09 03:15:43 +01:00
Adolfo Gómez García
6ae18f4a58 advancing on refactoring 2024-01-09 02:45:44 +01:00
Adolfo Gómez García
5c6ed274c8 fixed translations 2024-01-08 19:58:25 +01:00
Adolfo Gómez García
abe9228551 fixed translations 2024-01-08 19:41:59 +01:00
Adolfo Gómez García
b9b3889f35 Added support for skip mfa auth based on groups 2024-01-08 16:02:44 +01:00
Adolfo Gómez García
cf4a7e0ef9 advancing on refactoring and cache improvements 2024-01-08 15:26:08 +01:00
Adolfo Gómez García
bc61814ec4 advancing on refactoring and cache improvements 2024-01-08 00:44:44 +01:00
Adolfo Gómez García
4cf261678f advancing on refactoring 2024-01-07 05:10:32 +01:00
Adolfo Gómez García
927e2ee5a9 Moving Transport types to uds.core.types 2024-01-07 04:31:30 +01:00
Adolfo Gómez García
7db6cba256 Minor fixes on admin and more refactoring 2024-01-07 01:40:48 +01:00
Adolfo Gómez García
b7e828b57c advancing on refactoring 2024-01-07 01:04:22 +01:00
Adolfo Gómez García
b8d2c0277e Advanciong on refactoring 2024-01-07 00:26:30 +01:00
Adolfo Gómez García
5bba681b9d Fixing up counters types 2024-01-06 16:34:20 +01:00
Adolfo Gómez García
f63e6093eb Refactoring Events and Counters 2024-01-06 05:37:09 +01:00
Adolfo Gómez García
bac161b46c updated tests and more refactoring 2024-01-05 01:02:11 +01:00
Adolfo Gómez García
a7dc47dd6e updated tests and more refactoring 2024-01-04 17:39:30 +01:00
Adolfo Gómez García
722aee2543 some minor refactoring 2024-01-04 16:19:47 +01:00
Adolfo Gómez García
bb301d510c updated tests and more refactoring 2024-01-04 05:17:24 +01:00
Adolfo Gómez García
2bd4d4408c updated tests and more refactoring 2024-01-04 03:56:45 +01:00
Adolfo Gómez García
494e24691b refactoring to camel_case, some minor fixes 2024-01-04 00:48:31 +01:00
Adolfo Gómez García
233d66921e refactoring to camel_case, some minor fixes 2024-01-04 00:36:10 +01:00
Adolfo Gómez García
4a1a1c3e43 refactoring to camel_case, some fixes 2024-01-04 00:21:06 +01:00
Adolfo Gómez García
914d541748 refactoring to camel_case, some fixes 2024-01-04 00:08:17 +01:00
Adolfo Gómez García
164403ed49 Lots of minor bug fixes (using mypy to locate them) 2024-01-03 04:40:50 +01:00
Adolfo Gómez García
6814796ba5 Refactoring and fixes found in the process 2024-01-03 04:04:02 +01:00
Adolfo Gómez García
92f83ebe52 Some refactoring (casing...) 2024-01-03 03:38:41 +01:00
Adolfo Gómez García
bfdae32c15 fixed reference to async branch until completed 2024-01-02 03:30:24 +01:00
Adolfo Gómez García
150d8c4197 Some improvements to basic types and minor cosmetic fixes 2024-01-02 03:28:12 +01:00
Adolfo Gómez García
499c5f8ec4 Improvements:
* Moving some named tuples to dataclasses
* Added unique_id to service token alias (to avoid recreation...)
2024-01-01 20:08:50 +01:00
Adolfo Gómez García
48be614e20 updated types auth 2024-01-01 05:36:36 +01:00
Adolfo Gómez García
500d708653 Moving some types to dataclasses 2024-01-01 05:31:52 +01:00
Adolfo Gómez García
dc5cc99afd Fixed managed and unmanaged actor_v3 2024-01-01 05:17:01 +01:00
Adolfo Gómez García
974f652df0 Updated os_detector to use Sec-Ch-Ua-Platform and Sec-Ch-Ua for os detection if available instead of user agent (left user agent as fallback anyway). Better for chrome bases browsers. 2023-12-26 17:22:35 +01:00
Adolfo Gómez García
c5171c014b Small fix for metapools in case it's 100% 2023-12-22 04:37:08 +01:00
Adolfo Gómez García
fcf6e31486 Updated version 2023-12-15 02:55:18 +01:00
Adolfo Gómez García
0b4656e21c Updated client 2023-12-13 17:09:15 +01:00
Adolfo Gómez García
03af400635 Fixed root login and superUser Password setup for UDS 2023-12-13 16:43:40 +01:00
Adolfo Gómez García
0093cd8056 Fixed root login and superUser Password setup for UDS 2023-12-13 16:39:14 +01:00
Adolfo Gómez García
df5496d0e4 fixed actor data comments 2023-12-12 15:33:55 +01:00
Adolfo Gómez García
cad3d08c83 Updating actor 2023-12-11 03:46:56 +01:00
Adolfo Gómez García
3f9f641f6a Some fixes 2023-12-11 03:37:27 +01:00
Adolfo Gómez García
2f272da073 Set 0 as unliminet for masServices field 2023-12-04 18:49:42 +01:00
Adolfo Gómez García
cf245e47be upgraded actor type signatures 2023-12-04 01:44:12 +01:00
Adolfo Gómez García
a6e65b62b0 More updates to type annotations 2023-12-04 01:07:56 +01:00
Adolfo Gómez García
695a91eb38 More updates to type annotations 2023-12-04 00:51:05 +01:00
Adolfo Gómez García
74ff4c17cd Fix type() method calls to getType() in code to avoid clashes with "type" builtin 2023-12-04 00:41:41 +01:00
Adolfo Gómez García
193c3fb544 Updating type annotations 2023-12-04 00:28:19 +01:00
Adolfo Gómez García
a48f5e6241 Replacing deprecating typing classes in favour of builtings or collections.abc ones.
Most changes are simple annotations.
Will continue changes as i found them :)
2023-12-04 00:04:56 +01:00
Adolfo Gómez García
3e0099ed16 Fixed some typos left behind on last refactorization of code 2023-12-03 23:29:22 +01:00
Adolfo Gómez García
58a50c6983 Fixed mistyped import "regex" and requirements.txt 2023-12-01 02:41:38 +01:00
Adolfo Gómez García
029114a95d Fixed mime type of actors for Windows to application/vnd.microsoft.portable-executable 2023-12-01 02:29:38 +01:00
Adolfo Gómez García
73b14c349a updated client 2023-11-30 14:45:54 +01:00
Adolfo Gómez García
d1f6a2473e updated tunnel 2023-11-26 22:34:02 +01:00
Adolfo Gómez García
4feec0a167 updated tunnel 2023-11-26 06:36:34 +01:00
Adolfo Gómez García
197fdcd6e2 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-11-24 16:25:38 +01:00
Adolfo Gómez García
42c2fd0640 small type checking fix 2023-11-24 16:25:32 +01:00
Adolfo Gómez
d492d87118 Merge pull request #97 from thuvh/fix_missing_regex
add missing regex to requirements.txt file
2023-11-24 16:04:40 +01:00
Adolfo Gómez
740f20dc0e Update README.md 2023-11-24 05:23:49 +01:00
Adolfo Gómez García
c43b196961 added @unique to ObjectType 2023-11-24 05:05:10 +01:00
Adolfo Gómez García
31ffcfaf4b Added some comments on __eq__ operator of ObjectType 2023-11-24 05:00:14 +01:00
Adolfo Gómez García
efd78ddffb Added MFA permission 2023-11-23 17:06:03 +01:00
Adolfo Gómez García
5fab570b92 Fixed serialization of Hidden Fields on InitGui 2023-11-23 16:20:51 +01:00
Adolfo Gómez García
4b2d3b3dfa Adding 0 as valid maxServices value 2023-11-22 16:26:35 +01:00
Adolfo Gómez García
59ae21a654 Adding alternatives to maxServices as callable, etc.. 2023-11-22 16:08:59 +01:00
Hoai-Thu Vuong
e3518c56e6 add regex 2023-11-22 17:02:26 +07:00
Adolfo Gómez García
51891d2f31 Added "tree" method to NodeHandler to better debug it :) 2023-11-22 04:18:53 +01:00
Adolfo Gómez García
11a1f626db Replaced old services "dict" by a more convenient NodeHandler Tree 2023-11-22 04:13:55 +01:00
Adolfo Gómez García
89bf7c29ee Some fixes for REST and logger
* Fixed error on userservice logs REST api
* now if cannot log on DB, at least doLog on local file
* Fixed refactoring typo left behind
* Fixed type checking type on dispatch of REST api
2023-11-22 04:06:28 +01:00
Adolfo Gómez García
a18a0de01c Merge branch 'master' of github.com:/VirtualCable/openuds 2023-11-21 19:06:17 +01:00
Adolfo Gómez García
68433cd1b8 Refectorized some constants and added body size limit on rest request (defaults to 10 MB, can be changed using settings file) 2023-11-21 19:06:09 +01:00
Adolfo Gómez
1aa48cd335 Update README.md
Fixing readme.md typos
2023-11-21 15:42:16 +01:00
Adolfo Gómez García
3873fe0515 Optimizing backend queries and fixing up some cache updater data 2023-11-20 16:48:45 +01:00
Adolfo Gómez García
308fb7cbe7 Added better exception handling to dynamic modules loader 2023-11-20 04:54:18 +01:00
Adolfo Gómez García
fb68b15702 Fixed module loading exceptions treating and increased concurrent removal mark fron 8 to 24 by default 2023-11-20 00:16:58 +01:00
Adolfo Gómez García
6cbe329979 Service user mapping seems to work right now :) 2023-11-19 23:50:18 +01:00
Adolfo Gómez García
8def04ccd7 Fixing up new servers model 2023-11-17 03:23:43 +01:00
Adolfo Gómez García
f3ddb68381 Updated usageInfo to be more coherent 2023-11-13 18:31:19 +01:00
Adolfo Gómez García
cc3e5acd52 fixed macro info for empty metapools 2023-11-13 17:57:56 +01:00
Adolfo Gómez García
5649b5d0f1 fixed macro info 2023-11-13 17:55:03 +01:00
Adolfo Gómez García
98757b2339 added NEVER to calendar rule 2023-11-13 17:23:13 +01:00
Adolfo Gómez García
79e8a78351 Fixed date end date on calendar rules 2023-11-10 16:12:29 +01:00
Adolfo Gómez García
a23ca0eb73 Updated model saving to use "setattr" instead of "__dict__.update". Allow use of properties, etc... 2023-11-09 17:10:07 +01:00
Adolfo Gómez García
3451719675 Fixed service pools info 2023-11-06 16:57:50 +01:00
Adolfo Gómez García
8997d2fac0 Final fixes for usage count on metapools 2023-11-04 17:52:00 +01:00
Adolfo Gómez García
1d79f89002 Added meta pool macro info 2023-11-04 16:53:57 +01:00
Adolfo Gómez García
29ff0081a4 Refactorin exceptions, types, constants, ... 2023-11-03 18:47:20 +01:00
Adolfo Gómez García
d4ea0ad8c6 Fixing up LSP on REST classes 2023-11-03 04:18:53 +01:00
Adolfo Gómez García
85e20f1152 Fixing LSP issues on REST handlers 2023-11-03 02:51:41 +01:00
Adolfo Gómez García
f5e5ed932a fixing complains of "mypy" 2023-11-03 02:00:46 +01:00
Adolfo Gómez García
993ae107fd fixes on type checking complains (on gettext_lazy) 2023-10-30 00:24:49 +01:00
Adolfo Gómez García
6f672234e5 Added check for SERVER to match parent server type (serverGroup of a type can only contains servers of same type) 2023-10-27 02:22:56 +02:00
Adolfo Gómez García
e15c85150e upgraded client 2023-10-27 01:49:31 +02:00
Adolfo Gómez García
af73b890cf fixing up servers management and some rdp transport errors 2023-10-27 01:34:43 +02:00
Adolfo Gómez García
844bab487a Updated settings sample file 2023-10-24 21:58:54 +02:00
Adolfo Gómez García
fd760b2af0 Updated small_name to 128 chars to allow "big domain names" 2023-10-24 16:23:55 +02:00
Adolfo Gómez García
b072d1d95b * Increased field size for service pools name, shot name
* Added replacement for "macros" so it does not count as too long text fields
* Added support for random access list on MultiIp Phisical Machines
2023-10-23 16:33:45 +02:00
Adolfo Gómez García
30efde68fe * Multicert field control
* Fixed proxmox publication
* A bit improvement to mdev detection on proxmox
2023-10-20 19:15:57 +02:00
Adolfo Gómez García
65956d5ec5 * Added OpenId Support for Code flow and id_token flow 2023-10-20 05:16:52 +02:00
Adolfo Gómez García
df82362534 Updated readmin to take into account tha v4.0 needs at least python 3.11 2023-10-20 03:32:20 +02:00
Adolfo Gómez García
ad9755177a Basic OAuth2 with code interchange done 2023-10-19 19:38:06 +02:00
Adolfo Gómez García
9419e0f69e Cleaning up repeated code for authenticators with regex fields 2023-10-19 19:21:59 +02:00
Adolfo Gómez García
d0da06c492 Refactoring Federated authentication 2023-10-19 18:50:24 +02:00
Adolfo Gómez García
7f62bb29c0 renamed "multiline" to more convenient "lines" and ugraded dashboard 2023-10-19 13:18:43 +02:00
Adolfo Gómez García
45f4f7e7d4 Added logout to tag if requested and started OAuth2 authenticator 2023-10-18 18:09:36 +02:00
Adolfo Gómez García
499627c147 Added parameters to add_calendar_action.py 2023-10-16 21:22:54 +02:00
Adolfo Gómez García
bb91190a4e small fix for pasword hasher using argon2 2023-10-16 03:57:01 +02:00
Adolfo Gómez García
85d71554f6 * Moved test out of src
* Some type improvements for mypy
2023-10-14 17:42:31 +02:00
Adolfo Gómez García
6a3af87831 Fixed counter var type check 2023-10-14 17:02:00 +02:00
Adolfo Gómez García
e678f9bebb Added mypy.ini file for better type checking (mostly Django related) 2023-10-14 17:01:14 +02:00
Adolfo Gómez García
de33a96c45 Added storing state on session for mfa on radius 2023-10-13 00:18:29 +02:00
Adolfo Gómez García
d21c371bf7 Fixing OTP with MFA on some cases... 2023-10-11 21:58:38 +02:00
Adolfo Gómez García
941d07b4e8 Small fix for reg_tunnel 2023-10-10 01:32:16 +02:00
Adolfo Gómez García
d0fb2302a2 Added sample register tunnel with uds server 2023-10-10 01:25:52 +02:00
Adolfo Gómez García
cd15d681fc Fixed so if server log event is requested and userservice_uuid is empty (but present) is correctly handled 2023-10-08 19:47:14 +02:00
Adolfo Gómez García
02991d0df1 Adding a few more type checking to ldaputil 2023-10-05 19:21:04 +02:00
Adolfo Gómez García
fca5fd1d1d Adapting services to allow different app launchers 2023-10-05 17:01:20 +02:00
Adolfo Gómez García
73eb15fd13 * Added ticket keep on debug mode for servers 2023-10-05 15:45:37 +02:00
Adolfo Gómez García
0df92bc3cd Removed unused and nonsense "validator" from ticketstore 2023-10-04 18:49:26 +02:00
Adolfo Gómez García
23d4d572d7 Some test fixes and rest server event api fixes also 2023-10-04 01:54:17 +02:00
Adolfo Gómez García
ca3598a828 fixed userinterface ValuesTypes type 2023-10-03 15:13:31 +02:00
Adolfo Gómez García
c7219ae34f Fixed server to take hostname and type as "unique identfier" for registered server (so, we can change address without creating a new one...) 2023-10-03 01:39:51 +02:00
Adolfo Gómez García
d230fe7dd9 Fixed Server to honor hostname instead of ip 2023-10-03 01:22:35 +02:00
Adolfo Gómez García
dcbaca1f7d Fixed RDS Stats treating 2023-10-02 03:36:30 +02:00
Adolfo Gómez García
fb36a46a06 Added "update cached stats" method
This way, we can adjust cached stats until next real refresh is done, saving a lot of time on requests
2023-10-02 02:38:58 +02:00
Adolfo Gómez García
0403c28541 Added missing port to server REST register and fixed tests 2023-10-02 00:22:55 +02:00
Adolfo Gómez García
219acc14e5 * Updated object info
* Added certificate to register REST as param
2023-09-29 16:58:20 +02:00
Adolfo Gómez García
72ac4e59ca Fixed Server REST events and tests 2023-09-26 16:41:40 +02:00
Adolfo Gómez García
eff1843304 Fixed notify events to include "user_service_uuid instead of user_service (name change, not uuid inside) 2023-09-25 01:54:57 +02:00
Adolfo Gómez García
842626ec9c Fixed userService preConnect to redirect if does not have one to service preConnect 2023-09-21 12:16:27 +02:00
Adolfo Gómez García
a648f4a210 Small comments on notification processing an worker (not a real worker( 2023-09-20 23:36:44 +02:00
Adolfo Gómez García
9f3ca2dbf7 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-09-20 21:14:58 +02:00
Adolfo Gómez García
49469caa2a fixed circular import 2023-09-20 20:36:14 +02:00
Adolfo Gómez García
639273fd35 moving constants (os constants) to uds.core.consts module 2023-09-20 20:32:08 +02:00
Adolfo Gómez
b8dd4ecc08 Update README.md 2023-09-18 01:03:03 +02:00
Adolfo Gómez García
eab6703f2f Minor fixes on SAML (grouping, and tooltips) 2023-09-15 14:49:44 +02:00
Adolfo Gómez García
851e58fb40 Fixed SAML 2023-09-13 15:37:17 +02:00
Adolfo Gómez García
4d98f21286 Added "future" event "init" for servers
Fixed comment on stats (so it's clear that received stamp will be overwriten)
2023-09-12 18:41:20 +02:00
Adolfo Gómez García
7c09029c40 Added restrain of servers if comms fail for 1 minute 2023-09-10 01:05:22 +02:00
Adolfo Gómez García
812f31c31f Small test fix 2023-09-08 03:53:31 +02:00
Adolfo Gómez García
6e40e56d24 Added ticket methods to Servers Rest Api 2023-09-08 03:52:40 +02:00
Adolfo Gómez García
0eef9c2f09 Now stats cache is from server property if valid 2023-09-07 23:07:42 +02:00
Adolfo Gómez García
d9b7771f21 Done basic server events REST methods 2023-09-07 22:56:54 +02:00
Adolfo Gómez García
e96369bd71 fixed password retrieval from REST connection api 2023-09-07 15:01:44 +02:00
Adolfo Gómez García
dedf271b54 Added UnsavedForeignKey to migations to keep compat 2023-09-07 01:37:08 +02:00
Adolfo Gómez García
fc09abe960 renamed getSqlDatetimeAsUnis to GetSqlStampInSeconds 2023-09-07 01:29:58 +02:00
Adolfo Gómez García
d5dd2993b8 Removed "UnsavefForeignKey" not user anymore (restored ForeignKey) 2023-09-07 01:28:36 +02:00
Adolfo Gómez García
dc901b4473 Adding more server REST api tests and fixes 2023-09-06 18:33:00 +02:00
Adolfo Gómez García
dda77ab2a3 Fixing up servers and adding tests for server rest api 2023-09-05 16:48:31 +02:00
Adolfo Gómez García
0f41b8ac76 * Adding server register tests
* Fixed registering paths (removed subclases os DetailHandler)
2023-09-04 02:45:04 +02:00
Adolfo Gómez García
76c2207b12 done server groups & severs management 2023-09-02 20:43:38 +02:00
Adolfo Gómez García
1b2b1f81b3 Done server groups & servers management 2023-09-02 20:42:03 +02:00
Adolfo Gómez García
c4850e0aed Added unmanaged server add/deletion on server groups 2023-09-02 18:27:00 +02:00
Adolfo Gómez García
8f76bd511c more coherence 2023-09-02 05:36:38 +02:00
Adolfo Gómez García
d009a7abdc Adding a bit coherence in access from instances to dbObjs 2023-09-02 05:30:35 +02:00
Adolfo Gómez García
9deaef7eb5 Renamed dbAuthenticator() to dbObj (to be same name on all models...) 2023-09-02 05:13:33 +02:00
Adolfo Gómez García
0a8836410d * Fixed Transports Network detection
* renamed "validForIp to isValidForIp"
2023-09-02 05:03:15 +02:00
Adolfo Gómez García
a47a886179 correctly named a method (snakeCase) for coherence 2023-09-02 04:54:47 +02:00
Adolfo Gómez García
54720723a4 * Fixed network detection for Authenticator
* Fixed tests for groups and users (REST)
* Removed codecs.encode in favor of base64.encode in some places (more to go)
2023-09-02 04:45:54 +02:00
Adolfo Gómez García
ef59af60db fixes to UserInterface to force "label" parameter when required, and added more tests 2023-09-01 21:09:06 +02:00
Adolfo Gómez García
33c263d6a8 Fixed rest of UserInterface classes and improved multichoice 2023-09-01 03:42:13 +02:00
Adolfo Gómez García
f24b801f04 more UserInterface improvements and fixes :) 2023-08-31 20:04:36 +02:00
Adolfo Gómez García
66090e181d * Moved some more values to consts
* Fixed bugs on references on UserInterface
* Added a new tests for internal data to userService
2023-08-31 17:41:16 +02:00
Adolfo Gómez García
412f1e36b4 Removed dictionary from UserInterface fields _data 2023-08-31 04:11:33 +02:00
Adolfo Gómez García
8370194033 Moved uds.core.util.request to uds.core.types.request 2023-08-31 03:01:04 +02:00
Adolfo Gómez García
0f16e77b82 Before moving userinterface _data dict to dataclass 2023-08-31 02:39:35 +02:00
Adolfo Gómez García
f8bad512a5 Removed blocker and added decorators to utils · 2e2b5b6d 2023-08-30 17:35:36 +02:00
Adolfo Gómez García
c14354e1c7 Removed block (inserted into "decorators" and added profile decorator 2023-08-30 17:35:33 +02:00
Adolfo Gómez García
d68b815f0c Removed profiling stuff :) 2023-08-30 17:26:16 +02:00
Adolfo Gómez García
07ab6526d7 * Improved load time for transport form
* Added "TypedDict" to user service data type, to better catch
  possible errors
2023-08-30 17:25:39 +02:00
Adolfo Gómez García
4983a4a1be Removed Tab from user_interface (added to types.ui) 2023-08-30 04:03:02 +02:00
Adolfo Gómez García
a169c4b8c4 Moving Tab from ui to types 2023-08-30 04:01:08 +02:00
Adolfo Gómez García
f67d4d9a41 Moving some types to types.ui (Basic types) 2023-08-30 03:39:40 +02:00
Adolfo Gómez García
7956764b01 Fixing up names to be more coherent with their use
Related to user_interface
2023-08-29 17:58:25 +02:00
Adolfo Gómez García
4a3c27ba11 Added much better name for "defValue" (now it is "default"), and removed nonsense "value" field from gui description 2023-08-29 15:05:13 +02:00
Adolfo Gómez García
52effddf0c Restored mistake on modfinder 2023-08-29 03:49:53 +02:00
Adolfo Gómez García
8d77d45115 fixing server REST api 2023-08-29 03:47:12 +02:00
Adolfo Gómez García
88a7cdd58b Added call to requests check to server tests
Added parallelization of server stats retrieval
2023-08-28 23:47:40 +02:00
Adolfo Gómez García
f5b248c52e some name updates for better understanding what they are 2023-08-28 19:01:47 +02:00
Adolfo Gómez García
b639be5fcd Done tunnel servers edition 2023-08-28 17:06:34 +02:00
Adolfo Gómez García
f47e0fb039 Added ciphers for TLS1.2 for UDS Actor 3.6 2023-08-26 04:49:15 +02:00
Adolfo Gómez García
2129e2d93d refactorized "deployedType" to "userServiceType"
It's a better name :)
2023-08-26 04:48:26 +02:00
Adolfo Gómez García
3d4ccb1267 small comment fix 2023-08-25 05:25:12 +02:00
Adolfo Gómez García
08d693e019 Renamed maxDeployed to maxUserServices (to be coherent) 2023-08-25 00:50:43 +02:00
Adolfo Gómez García
cdde576aa9 Refactorized "UserDeployment" to UserService
So this is called as the rest of services modules (as it model)
2023-08-25 00:35:51 +02:00
Adolfo Gómez García
4e4d0253ad fixed tests for server managers 2023-08-23 05:04:28 +02:00
Adolfo Gómez García
604b77077f Type fix for servers release 2023-08-23 04:54:08 +02:00
Adolfo Gómez García
3379126959 Fixed logout default "sessionType" parameter 2023-08-22 14:25:27 +02:00
Adolfo Gómez García
d823ebb253 Fixed not saving (due to rollback) information on DBs when raising not found exception. Now, if no asignation is possible, it returns "None" 2023-08-22 03:04:54 +02:00
Adolfo Gómez García
a747777753 Adding some basic statistics to Servers 2023-08-21 22:22:15 +02:00
Adolfo Gómez García
51a9126ba7 Small change, using uuid for property name on servers instead of id 2023-08-21 21:02:10 +02:00
Adolfo Gómez García
be4de2d9ce * Small fixes on servers_api
* Added transaction to cache usage on cached decorator
* renamed "allowCache" to "cached"
2023-08-21 04:23:26 +02:00
Adolfo Gómez García
743a1adabe Fixing up servers and advancing on it's implementation 2023-08-19 21:50:18 +02:00
Adolfo Gómez García
31c67ffddf Removed legacy userService getProperty/setProperty 2023-08-18 23:26:14 +02:00
Adolfo Gómez García
94d5603d29 Creating common Properties for tables.
I needed a properties table for Server and ServerGroups, so i generalized it and used in existing UserServices
2023-08-18 23:05:03 +02:00
Adolfo Gómez García
a2ee3267ae Renamed "RegisteredServer" to more simple "Server" 2023-08-18 02:56:42 +02:00
Adolfo Gómez García
942404f2ed Added tests and fixed Servers.
Small RDP transport fix
2023-08-17 21:09:49 +02:00
Adolfo Gómez García
6512644d9d Adding tests for managed servers 2023-08-16 02:20:47 +02:00
Adolfo Gómez García
c4f316bc88 Improving server load balancing for unmanaged servers 2023-08-15 16:31:07 +02:00
Adolfo Gómez García
92c4168e52 fixed locked field (means locked UNTIL, not locked FROM 2023-08-15 03:00:54 +02:00
Adolfo Gómez García
5cf4733847 Making test for servers manager and fixing up server managers 2023-08-15 02:42:46 +02:00
Adolfo Gómez García
e9b3706efc Fixing server REST 2023-08-14 15:12:13 +02:00
Adolfo Gómez García
b375ee3f80 Make systemd optional, so can be run on other platforms 2023-08-14 01:43:45 +02:00
Adolfo Gómez García
3b7f70709d clean up of client 2023-08-13 23:57:57 +02:00
Adolfo Gómez García
80e71874a8 Updated client 2023-08-13 21:03:07 +02:00
Adolfo Gómez García
bfed3e39ed More advances on Servers 2023-08-13 15:23:14 +02:00
Adolfo Gómez García
ee03d7c3be Some more refactoring and Servers implementations advancement 2023-08-13 01:00:28 +02:00
Adolfo Gómez García
9da669b50c Implementeing basic API for a registered server (managed) 2023-08-12 20:43:01 +02:00
Adolfo Gómez García
9062a84bf4 More on migrations 2023-08-12 17:10:58 +02:00
Adolfo Gómez García
544812e019 Advancing on Mitrations for providers v4 2023-08-12 16:38:35 +02:00
Adolfo Gómez García
c921d667b0 Added first version of RDS migrator (TBChecked) 2023-08-12 15:32:53 +02:00
Adolfo Gómez García
cc85b9248b Removed one cipher 2023-08-11 23:17:59 +02:00
Adolfo Gómez García
3cbf1eb8bb Advancing on servers management 2023-08-11 01:52:31 +02:00
Adolfo Gómez García
5a420e0967 Advancing on servers management 2023-08-10 22:05:30 +02:00
Adolfo Gómez García
9879eaf8d6 Refactorized "kind" to "type" 2023-08-10 14:48:57 +02:00
Adolfo Gómez García
4b54a3795b Adding support for server groups on services 2023-08-10 01:39:57 +02:00
Adolfo Gómez García
11b70385f6 Adding ServerGroup field helpers and some minor refactor 2023-08-09 15:45:31 +02:00
Adolfo Gómez García
1a72b70175 Advancing on server implementation 2023-08-09 02:11:14 +02:00
Adolfo Gómez García
0d6ec1c779 Done transports migration to new model 2023-08-08 16:52:21 +02:00
Adolfo Gómez García
f8fb32342f Addingt transports migrations to new model 2023-08-08 02:44:52 +02:00
Adolfo Gómez García
785069575e Renamed "transports" for mitration fixers to "transport_v4"
Much more convenient
2023-08-07 18:08:14 +02:00
Adolfo Gómez García
51590bdd80 * Added support for callable fields on user interface (value, values, defvalue)
* Added fields utils for commodity fields (such as tunnelServer)
* Added migration_Back for "unmigrate" to 0045 (for development pourposes)
* Updated icons for pools
* Upgraded admin interface
* Added testing "tunnelField" to html5rdp transport
2023-08-07 18:05:58 +02:00
Adolfo Gómez García
e621487b6e Adding transport migrators to new model 2023-08-07 04:00:33 +02:00
Adolfo Gómez García
0102399e9e Imported 3.6 updates to proxmox and fixed decorators "Conected" typo 2023-08-06 22:35:59 +02:00
Adolfo Gómez García
96d0757801 Some minor changes to first transport migrators (TBD)
Fixed config reading old password badly (due to crypt...)
2023-08-05 06:07:46 +02:00
Adolfo Gómez García
8ce84f3c10 * Renamed model file
* Added __str__ and __repr__ to user_interface (with some minor type fixes)
* Added first migrator for HTML5RDP Transport to new model
2023-08-05 05:39:30 +02:00
Adolfo Gómez García
a45baffa51 Some minor type fixes 2023-08-04 11:39:11 +02:00
Adolfo Gómez García
b18e9c3aa8 Removed "nonsense" ip_version from DB (can be obtained from hostname if needed) 2023-08-03 20:52:06 +02:00
Adolfo Gómez García
bcf01492c0 added tunnel servers to admin interface 2023-08-03 20:44:44 +02:00
Adolfo Gómez García
98d7a16813 Added host validator and fixed tunnel server 2023-08-03 20:42:58 +02:00
Adolfo Gómez García
de533acdcd Updated admin interface visuals 2023-08-03 17:29:10 +02:00
Adolfo Gómez García
11494a6cdd Moved allowed_failures to constanst 2023-08-03 15:35:16 +02:00
Adolfo Gómez García
f67de32f92 Fixed typos refactoring constants and types 2023-08-03 02:58:54 +02:00
Adolfo Gómez García
4c21919846 Refactorizing and fixed relation between servers and servers groups to manytomany 2023-08-03 02:26:48 +02:00
Adolfo Gómez García
d942b32a9e New icon set from flattr-icons :) 2023-08-02 22:45:35 +02:00
Adolfo Gómez García
6d492cd0e8 Fixing Server and Registered Server concepts.
Use this with care!! not finished.
Migration 0046 is going to be updated with Transport migrations
2023-08-02 21:01:11 +02:00
Adolfo Gómez García
902c004b47 creating REST api for tunnel servers 2023-08-02 16:54:13 +02:00
Adolfo Gómez García
28696756d0 Adding server groups and started migration from current transports models to new one 2023-08-02 16:32:03 +02:00
Adolfo Gómez García
8e5610bc50 OS Managers, in fact, provides a single type of "service (That is, VDI or VAPP, ...) but not mor than one 2023-08-01 16:01:00 +02:00
Adolfo Gómez García
28b03427f2 Adding service type (VDI or VAPP) to notification on preconnect 2023-08-01 15:52:51 +02:00
Adolfo Gómez García
23a72367ff Refactor. Moving types to a new, better controlled, location (uds.core.types....) 2023-08-01 15:05:33 +02:00
Adolfo Gómez García
5bca545335 Comment on actor register process 2023-07-31 21:18:41 +02:00
Adolfo Gómez García
9caf43c36a Upgraded admin interface to reflect "Server" changes 2023-07-31 21:04:11 +02:00
Adolfo Gómez García
05cc12a32c adding server logic in UDS to acommodate existing Actors and Tunnels and alow new servers 2023-07-31 20:58:56 +02:00
Adolfo Gómez García
fd3154946d small config fix (Added WYSE for legacy support to ConfigS ection Types) 2023-07-31 15:28:57 +02:00
Adolfo Gómez García
5c0bf00344 Moving data to uds.core.types 2023-07-29 00:58:09 +02:00
Adolfo Gómez García
7fa8cb5183 Advancing on registered servers functionality 2023-07-28 02:22:50 +02:00
Adolfo Gómez García
94a0fb337f Added "experimental" decorator to block access on failures 2023-07-28 02:02:40 +02:00
Adolfo Gómez García
c9a8a710d0 Commented as deprecated authSmallName 2023-07-27 21:05:30 +02:00
Adolfo Gómez García
c12091abbd added LabelAuth instead of smallName to remove this last parameter on future 2023-07-27 21:05:00 +02:00
Adolfo Gómez García
17d684f1ce Some refactoring to homogeneize json reponses for actors, clients, etc... 2023-07-27 20:49:23 +02:00
Adolfo Gómez García
48afe3a60c Small fix so login/logout get logged in uds.log if root user 2023-07-27 01:21:21 +02:00
Adolfo Gómez García
da42ea8c42 Fixed loggin with root password on 4.0 2023-07-27 01:15:28 +02:00
Adolfo Gómez García
7e99bfebb3 Added Test method to registered_servers 2023-07-26 23:14:47 +02:00
Adolfo Gómez García
32c88e1543 Advancing a bit more on server registration, fixing up log level mess 2023-07-26 16:47:25 +02:00
Adolfo Gómez García
3dc3f4ad56 Updated "validateToken" to admint server type 2023-07-26 15:35:18 +02:00
Adolfo Gómez García
0ad2c418f5 Refining registered servers 2023-07-25 21:30:44 +02:00
Adolfo Gómez García
089ba1aecb updated submodules 2023-07-25 20:26:21 +02:00
Adolfo Gómez García
3ae9d13b2a Updated client path 2023-07-25 20:20:34 +02:00
Adolfo Gómez García
6ee7023360 Updated client path 2023-07-25 20:09:21 +02:00
Adolfo Gómez García
1dc763d77c Updated client path 2023-07-25 20:06:56 +02:00
Adolfo Gómez García
651de0083f Merge branch 'master' of github.com:/VirtualCable/openuds 2023-07-25 20:05:22 +02:00
Adolfo Gómez García
e911db2857 Updated actor 2023-07-25 20:04:39 +02:00
Adolfo Gómez
7e8f44ebf8 Update settings.py.sample
Added comment on LDAP_CIPHER_SUITE if using OpenSSL libldap version (as in altlinux, for example)
2023-07-25 15:04:42 +02:00
Adolfo Gómez García
33e8bfc286 Added support for password fields on configuration
Migrated root password from encrypted to hashed using argon2
2023-07-23 06:22:11 +02:00
Adolfo Gómez García
7e830e2c9c Fixed admin fake translations to nice encoding 2023-07-23 02:43:56 +02:00
Adolfo Gómez García
0f90492ec7 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-07-23 02:17:07 +02:00
Adolfo Gómez García
8137373c40 Added support for argon2, more secure than sha256 with salt.
Kept backwards compat with existing stored keys.
2023-07-23 02:16:51 +02:00
Adolfo Gómez
b5e24f84a3 Create dependency-review.yml
Checks for known vulnerable dependency versions on pull
2023-07-22 19:31:11 +02:00
Adolfo Gómez
36deb637fb Create auto-assign.yml
To assign issues to me, so i can notice them :)
2023-07-22 19:28:01 +02:00
Adolfo Gómez
833f8a0a3e Create dependabot.yml
Adding dependabot
2023-07-22 18:46:01 +02:00
Adolfo Gómez García
a5b5899c93 Small comment for GNUTLS or OpenSSL libldap use 2023-07-22 02:22:32 +02:00
Adolfo Gómez García
9738f793e6 Added check for OPT_X_TLS_PROTOCOL constants before using them. Note that min protocol can also be set using the ciphers scrictly.
Also, due to the fact that python-ldap can be compliled against a libldap that uses gnutls or libss, the ciphers may be different, so in case of error, we simple warn it and continue...
2023-07-22 02:18:08 +02:00
Adolfo Gómez García
c0484d628d Included "mac" as a informative field for registered servers 2023-07-21 18:27:55 +02:00
Adolfo Gómez García
7ca11fdb53 * Added support for "Teams optimizations". Note that "tunneled version" does not work due to the imbosibility to connect to localhost by Remote Destop App
* added ticket_length variable, and comment about tunnel
* Small type checking fix on saml
2023-07-21 14:46:55 +02:00
Adolfo Gómez García
ae9fc182bc Moved type definition to top of class for machine provider 2023-07-17 17:34:53 +02:00
Adolfo Gómez García
a38716e1b0 Adding support for teams optimizations on virtual machines. To be tested!!! 2023-07-17 16:23:25 +02:00
Adolfo Gómez García
d81b68eaa7 Added Os Type on registered actor (will help us later when using them) 2023-07-16 23:00:26 +02:00
Adolfo Gómez García
0173a06411 Fixed ticket access in restricted mode 2023-07-14 13:48:55 +02:00
Adolfo Gómez García
b614c8fff6 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-07-12 19:36:52 +02:00
Adolfo Gómez García
9aa8d0da86 Replacing several diferent "registration" tables to a single, versatile one. 2023-07-12 19:36:42 +02:00
Adolfo Gómez García
012f8de6c5 Replacing several diferent "registration" tables to a single, versatile one. 2023-07-12 19:36:15 +02:00
Adolfo Gómez García
81db3278bd Renamed Tunnel tokens Table to Server Tokens and adapted code to it. Also recreated admin using Angular 16 2023-07-12 04:30:37 +02:00
Adolfo Gómez García
5da7b06d62 upgrading to angular 16 and replacing tunnel tokens by server tokens 2023-07-12 04:00:28 +02:00
Adolfo Gómez García
4e28bd4c9c Fixed error pages 404 - 500 2023-07-04 00:43:04 +02:00
Adolfo Gómez García
80bf97a8b1 Fixed default error pages 404-500 2023-07-04 00:40:28 +02:00
Adolfo Gómez García
73cd338325 Using again XenAPI pip package 2023-07-04 00:13:13 +02:00
Adolfo Gómez García
bed57c4133 fixed AD machine group add (related to lists and encodings) 2023-06-29 14:48:23 +02:00
Adolfo Gómez García
7d63185fd1 updating settings for ldap ciphers 2023-06-28 18:50:16 +02:00
Adolfo Gómez García
eeae7f7039 Added support for ldaputil getting some configs from django settings 2023-06-27 14:44:56 +02:00
Adolfo Gómez García
e5b2e7351d securing ldap connections a bit more 2023-06-24 19:03:54 +02:00
Adolfo Gómez García
a78c8f3912 modified client 2023-06-24 17:51:55 +02:00
Adolfo Gómez García
13cce40a3d Ldap connection ciphers reduced to 13 only, and some minor formatting 2023-06-24 17:49:55 +02:00
Adolfo Gómez García
bd37201109 Fixed (c) headers and some minor formatting related changes 2023-06-22 16:04:11 +02:00
Adolfo Gómez García
d95cc05669 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-06-22 15:49:43 +02:00
Adolfo Gómez García
841097d4c3 Fixed service pool loggin 2023-06-22 15:49:38 +02:00
Adolfo Gómez
d4d929c28f Update README.md
Added simple description about submodules
2023-06-21 22:26:40 +02:00
Adolfo Gómez García
4374a94bbf fixing up submodules 2023-06-21 22:09:10 +02:00
Adolfo Gómez García
a2dbebae14 fixing up submodules 2023-06-21 21:54:02 +02:00
Adolfo Gómez García
f12b795fce fixing up submodules 2023-06-21 21:46:40 +02:00
Adolfo Gómez García
afacb7d363 fixing up submodules 2023-06-21 21:42:50 +02:00
Adolfo Gómez García
96800740e8 fixing up submodules 2023-06-21 21:40:02 +02:00
Adolfo Gómez García
68f6f00cc2 fixing up submodules 2023-06-21 21:39:16 +02:00
Adolfo Gómez García
77022b81f2 fixing up submodules 2023-06-21 21:35:59 +02:00
Adolfo Gómez García
57e4999f2b updated pom.xml for building uds auth extension 2023-06-21 21:34:26 +02:00
Adolfo Gómez García
77d4f9e2bd Fixed log on auth.log from federated and tikets login 2023-06-21 15:10:05 +02:00
Adolfo Gómez García
e98d40a8cd updated supproyects 2023-06-21 15:03:47 +02:00
Adolfo Gómez García
9bb6f65efa updated supproyects 2023-06-21 15:02:44 +02:00
Adolfo Gómez García
7fd2d1162d upgraded regexldap and saml field processor to admit:
* : as a "prependable" to the attribute value
* +, to join several fields (must be fields with 0 o 1 elements only) into an single value
2023-06-13 17:11:39 +02:00
Adolfo Gómez García
70c8a296ca merged proxmox fix from 3.6 2023-06-09 15:00:11 +02:00
Adolfo Gómez García
1a7e7b9cd3 Sample reformatting 2023-06-09 02:51:30 +02:00
Adolfo Gómez García
4646e221c0 (c) fix 2023-06-08 16:32:31 +02:00
Adolfo Gómez García
64208edd90 Migrating client from openuds to a submodule 2023-06-07 14:44:48 +02:00
Adolfo Gómez García
12ff44d465 Migrating client from openuds to a submodule 2023-06-07 14:44:25 +02:00
Adolfo Gómez García
d22f9dc446 Migrating actor from openuds to a submodule 2023-06-07 14:39:46 +02:00
Adolfo Gómez García
311ff22a3f Migrating actor from openuds to a submodule 2023-06-07 14:39:04 +02:00
Adolfo Gómez García
41b0ba5c3c Removing not used proxy (stays on history if needed anyway :) 2023-06-07 14:31:13 +02:00
Adolfo Gómez García
30131b0da1 Added tunnel-server submodule 2023-06-07 14:29:48 +02:00
Adolfo Gómez García
5647b97b42 Migrating tunnel-server from openuds to a submodule 2023-06-07 14:29:18 +02:00
Adolfo Gómez García
09c33baa02 moved guacamole auth to a submodule 2023-06-06 21:59:00 +02:00
Adolfo Gómez García
0f2c1f50db Organizing a bit the code into more repositories 2023-06-06 21:58:27 +02:00
Adolfo Gómez García
75cef5b1ab added notify preconnect in case of ticket update (username,...) 2023-06-06 15:13:36 +02:00
Adolfo Gómez García
53c964c77e Minor documentation fix 2023-06-05 18:36:23 +02:00
Adolfo Gómez
3a239d5f80 updated .gitignore 2023-05-30 21:47:48 +02:00
Adolfo Gómez García
6a1ad3f44e Merge branch 'master' of github.com:/VirtualCable/openuds 2023-05-30 21:43:58 +02:00
Adolfo Gómez
96d7146daf Added client log in case of exception 2023-05-30 21:43:10 +02:00
Adolfo Gómez García
b5d38e3832 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-05-30 21:40:50 +02:00
Adolfo Gómez García
ba1cc3d372 added gpu availability check on proxmox 2023-05-30 17:53:38 +02:00
Adolfo Gómez García
508e9e92f8 upgrade information 2023-05-29 18:46:46 +02:00
Adolfo Gómez García
99645044f0 Now first tries to load PyQt6, and if it cannot be loaded, tries PyQt5 2023-05-24 02:53:12 +02:00
Adolfo Gómez García
5770d94c33 updating client to use PyQt6 first, and if not found, use pyqt5 2023-05-24 02:35:56 +02:00
Adolfo Gómez García
e6b707868f updating client to use PyQt6 first, and if not found, use pyqt5 2023-05-24 02:23:12 +02:00
Adolfo Gómez García
88c7928408 updating macos builder 2023-05-24 01:55:18 +02:00
Adolfo Gómez García
e4a4e0d958 updating build process for x86 and mac 2023-05-24 01:54:51 +02:00
Adolfo Gómez García
64f4f82540 merged 3.6 changes 2023-05-23 03:17:52 +02:00
Adolfo Gómez García
f099870c60 Merge remote-tracking branch 'origin/v3.6' 2023-05-23 03:16:04 +02:00
Adolfo Gómez García
0363ac3a6a added /rfx /rfx:gfx to macos by default 2023-05-23 03:15:34 +02:00
Adolfo Gómez García
606b3f205d Added PySide6 support as firts option (due to arm64 support) 2023-05-23 02:54:28 +02:00
Adolfo Gómez García
41697a4bab Added PySide6 as first Option, because it has arm64 binaries. If not available, will load PyQt5 as always. 2023-05-23 02:54:16 +02:00
Adolfo Gómez García
45a4dec18f Fix tunnel removal procedure on Mac Launcher 2023-05-23 02:25:35 +02:00
Adolfo Gómez García
1a30806f63 Merge remote-tracking branch 'origin/v3.6' 2023-05-22 14:36:58 +02:00
Adolfo Gómez García
23a9465ae1 removed micro on mac rdp (not working on most cases...) 2023-05-22 13:21:31 +02:00
Adolfo Gómez García
76aec4b4de Merge remote-tracking branch 'origin/v3.6' 2023-05-21 16:49:13 +02:00
Adolfo Gómez García
084e0cc2a0 fixed bad ssl handshake management 2023-05-21 16:49:04 +02:00
Adolfo Gómez García
2da927d82b fixed bad ssl handshake on tests 2023-05-21 16:48:32 +02:00
Adolfo Gómez García
2c77d361d7 backported 4.0 version improvements 2023-05-21 16:23:18 +02:00
Adolfo Gómez García
c33c1501f5 some fixes to make tests work as they are expected to 2023-05-21 16:19:58 +02:00
Adolfo Gómez García
99cd7030e0 Some mre lints 2023-05-21 05:45:51 +02:00
Adolfo Gómez García
379ce8a094 Fixes tests and some linting issues. 2023-05-21 05:35:52 +02:00
Adolfo Gómez García
cb76078758 Fixed test so now they work correctly just with asyncio 2023-05-21 05:35:48 +02:00
Adolfo Gómez García
ea190c481d small actor type fix 2023-05-18 19:48:31 +02:00
Adolfo Gómez García
97156dcca5 Merge branch 'master' of github.com:/VirtualCable/openuds 2023-05-18 19:46:54 +02:00
Adolfo Gómez García
f810fc1cd6 Fixed backward compat issue 2023-05-18 19:46:48 +02:00
Adolfo Gómez
db73bf1c2d Update README.md 2023-05-18 15:38:20 +02:00
Adolfo Gómez García
e47831ebc2 Fixed documentation for os manager base module 2023-05-18 15:10:49 +02:00
Adolfo Gómez García
c264ea9c13 Moved "custom" parameters for osManager inside the "custom" dict
Also, kept "old" parematers for a while (a couple of versions), so old clients are compatible with UDS actor 4.0 at least (so we can upgrade server, keep running and eventually upgrade actors).
Compatibility mast be kept for at lest a couple of minor releases,
Al least, until UDS 4.5 will be kept this way
2023-05-18 15:04:47 +02:00
Adolfo Gómez García
880aa24dbb Refactorized some code from Alexander.
Looking at Alexander's contribution, and wanting to make more usafle for future inclusions, simply have moved all new items to a nested dictionary (custom), and added the capacity to allow to keeep data on some circustances (like the one required by new linux ad os mannagers provided by alexander).
Will also include soon all windows AD parameters inside this block, and any "custom" paramater for any action.
2023-05-18 14:31:02 +02:00
Adolfo Gómez García
3ee77fb034 added sample script to get link from a user service using connection api 2023-05-17 19:26:51 +02:00
Adolfo Gómez García
4f6a7b44ab fixed udslink for django 4.x 2023-05-17 19:26:23 +02:00
Adolfo Gómez García
57d7b442f6 Some minor fixes ond Alexander code (some changes done on core after his contribution that has to be reflected, nothing important) 2023-05-17 18:25:25 +02:00
Adolfo Gómez
98f79f83f1 Merge pull request #81 from Future998/linux-client-DC
Adding new Linux OS Domain Managers
2023-05-17 17:43:43 +02:00
Alexander Burmatov
afb1d2cafe Merge branch 'master' into linux-client-DC 2023-05-17 17:14:48 +03:00
Alexander Burmatov
d8f41a048e Updating information about authors 2023-05-17 16:49:26 +03:00
Alexander Burmatov
f8a9a9d633 Update copyright date 2023-05-17 16:47:47 +03:00
Alexander Burmatov
277d9f9b88 Changing the service file
This is necessary for the correct stop of the service
when the machine is shutdowned or rebooted
(with the leave from the domain of non-persistent machines).
2023-05-17 16:39:37 +03:00
Alexander Burmatov
f3ba042140 Changing the function when the service is stopped
If the machine is non-persistent, it will be leave from the domain
when the service is stopped.
2023-05-17 16:35:09 +03:00
Alexander Burmatov
2d30362301 Saving actor config for non-persistent machines
This is necessary to leave a non-persistent machine from the domain.
2023-05-17 16:30:54 +03:00
Alexander Burmatov
d6e2373de4 Redefining a function to join to the domain
Depending on which machine (Linux or Windows) the actor is for,
a different number of parameters are passed to this function.
2023-05-17 15:59:01 +03:00
Alexander Burmatov
47dc43f601 Extension of the request for initialization
Extension of the request for initialization according to the change in
the configuration type of the actor.
2023-05-17 15:42:55 +03:00
Adolfo Gómez García
9a2a19c694 Merge remote-tracking branch 'origin/v3.6' 2023-05-17 14:36:57 +02:00
Adolfo Gómez García
392cb6e406 updated tranlations 2023-05-17 14:36:45 +02:00
Alexander Burmatov
28ce61c983 Type extension for actor configuration
Parameters have been added that are given by the server
to join the Linux machines to the domain.
2023-05-17 15:36:28 +03:00
Adolfo Gómez García
78c48dc26a Merged 3.6 changes 2023-05-17 14:36:21 +02:00
Adolfo Gómez García
33f90f74d8 Merge remote-tracking branch 'origin/v3.6' 2023-05-17 14:34:23 +02:00
Adolfo Gómez García
4df4892111 removed DEPRECATED from simple ldap 2023-05-17 14:26:29 +02:00
Alexander Burmatov
b6ad6d80d5 Add operation for leave from the domain 2023-05-17 15:26:02 +03:00
Alexander Burmatov
7f274ad5b2 Add operation for join to the domain
Joining the domain takes place using the realm utility.
It was chosen because it works in various Linux distributions,
so it is universal. It is necessary to add a dependency to the
realm utility for the actor.
2023-05-17 15:15:13 +03:00
Alexander Burmatov
6bc6f2d171 Update documentation for actorData method
New parameters needed to join Linux machines to the domain have been
added.
2023-05-17 15:06:16 +03:00
Alexander Burmatov
20fdd56ca2 Add Linux FreeIPA OS manager 2023-05-17 15:03:21 +03:00
Alexander Burmatov
03d705639a Add Linux Active Directory OS manager 2023-05-17 15:00:51 +03:00
Adolfo Gómez García
0fc6db187d Merge remote-tracking branch 'origin/v3.6' 2023-05-17 02:14:44 +02:00
Adolfo Gómez García
8e4615de19 re-fixed mac tls version for newer python 2023-05-17 02:01:09 +02:00
Adolfo Gómez García
d8ad7ddd22 moved tools imports to top level 2023-05-17 01:46:00 +02:00
Adolfo Gómez García
59b73a41b8 Merge remote-tracking branch 'origin/v3.6' 2023-05-16 01:09:48 +02:00
Adolfo Gómez García
4d26df9580 upgrading and linting tunnel 2023-05-16 01:09:32 +02:00
Adolfo Gómez García
24c9a18ea8 upgrading and linting tunnel 2023-05-16 01:06:04 +02:00
Adolfo Gómez García
004ea3e7df linting 2023-05-15 20:11:00 +02:00
Adolfo Gómez García
56ad195878 Merge remote-tracking branch 'origin/v3.6' 2023-05-12 15:39:51 +02:00
Adolfo Gómez García
ddf07eb68b fixed tunnel timeout check BEFORE transport connected 2023-05-12 15:39:25 +02:00
Adolfo Gómez García
6fc4cfb26d Merge remote-tracking branch 'origin/v3.6' 2023-05-12 14:13:22 +02:00
admin
ba28ab78ed added fixes for ssl support on mac os 2023-05-12 14:11:29 +02:00
Adolfo Gómez García
be66921b91 merged 2023-05-11 21:28:29 +02:00
Adolfo Gómez García
197bbe267c Merge remote-tracking branch 'origin/v3.6' 2023-05-11 21:25:03 +02:00
Adolfo Gómez García
e42ab76088 removed unused imports 2023-05-11 21:23:26 +02:00
Adolfo Gómez García
d72723d6f2 Improved connection tunnel timeout 2023-05-11 21:22:56 +02:00
Adolfo Gómez García
66a58a90a3 Fixing up tunnel 2023-05-11 21:18:25 +02:00
Adolfo Gómez García
2360c293bd Removed initial payload on tunnel. Will finally not be used 2023-05-11 20:39:26 +02:00
Adolfo Gómez García
a9522b88ab Merge remote-tracking branch 'origin/v3.6' 2023-05-11 16:41:00 +02:00
Adolfo Gómez García
8feef1d3f9 Fixed installer permissions fod UDSClient 2023-05-11 16:36:26 +02:00
Adolfo Gómez García
0c2ee7906b Fixed installer permissions fod UDSClient 2023-05-11 16:35:34 +02:00
Adolfo Gómez García
c3523bcf8c * Added help field to configuration REST api
* Better Log Level name for UDS Actor
* Refactorized BlockAccess to be a subclass of UDSException
2023-05-11 03:09:03 +02:00
Adolfo Gómez García
ca0df327d9 added communication between a token-actor and a token-service 2023-05-10 23:53:50 +02:00
Adolfo Gómez García
fd85e3a202 added communication between a token-actor and a token-service 2023-05-10 23:53:35 +02:00
Adolfo Gómez García
d25f278230 Merge remote-tracking branch 'origin/v3.6' 2023-05-10 23:27:53 +02:00
Adolfo Gómez García
159414f8e4 Fixed notify action 2023-05-10 23:26:33 +02:00
Adolfo Gómez García
8891da5987 Fixed notify action 2023-05-10 23:22:56 +02:00
Adolfo Gómez García
3898cf7253 Added new fields to udsactor registration and better config values check on udstunnel 2023-05-10 22:38:09 +02:00
Adolfo Gómez García
62540b2773 Added new fields to udsactor registration and better config values check on udstunnel 2023-05-10 22:28:34 +02:00
Adolfo Gómez García
8c9b326c3c added keep_listening parameter for future and initial_payload (fix) 2023-05-10 16:45:39 +02:00
Adolfo Gómez García
1c301d890d Merge remote-tracking branch 'origin/v3.6' 2023-05-09 18:25:11 +02:00
Adolfo Gómez García
db70f02df0 added keep_listening parameter for future and initial_payload (fix) 2023-05-09 18:24:55 +02:00
Adolfo Gómez García
0b6d2f8eb5 Merge remote-tracking branch 'origin/v3.6' 2023-05-09 14:50:08 +02:00
Adolfo Gómez García
a0250788b9 added keep_listening parameter for future and initial_payload (fix) 2023-05-09 14:49:46 +02:00
Adolfo Gómez García
f502f4ceb9 added keep_listening parameter for future and initial_payload (fix) 2023-05-09 14:49:36 +02:00
Adolfo Gómez García
5fdf614cfd Merge remote-tracking branch 'origin/v3.6' 2023-05-09 14:34:12 +02:00
Adolfo Gómez García
a2bfcd3d5a fixed "time" parameter from ticket (missing on check) 2023-05-09 14:21:13 +02:00
Adolfo Gómez García
0f41544830 added keep_listening parameter for future and initial_payload 2023-05-09 14:00:35 +02:00
Adolfo Gómez García
c04d8a1a89 Small actor fixes 2023-05-08 19:30:21 +02:00
Adolfo Gómez García
684ca07750 Minor fixes 2023-05-08 14:36:22 +02:00
Adolfo Gómez García
b71797c97f Merge remote-tracking branch 'origin/v3.6' 2023-05-05 20:06:03 +02:00
Adolfo Gómez García
eaa05ead0b fixed homepage and copyright info 2023-05-05 20:05:51 +02:00
Adolfo Gómez García
9fc3b456c8 Merge remote-tracking branch 'origin/v3.6' 2023-05-05 00:43:34 +02:00
Adolfo Gómez García
2d6a381321 small typo fix 2023-05-05 00:43:24 +02:00
Adolfo Gómez García
976b09785a fixed tunnel server test 2023-05-04 16:40:10 +02:00
Adolfo Gómez García
ea3298359c Merge remote-tracking branch 'origin/v3.6' 2023-05-04 15:33:40 +02:00
Adolfo Gómez García
84b0bd1de2 fixed tunnel info on connect 2023-05-04 15:33:19 +02:00
Adolfo Gómez García
68f7e25d8d Merge remote-tracking branch 'origin/v3.6' 2023-05-04 15:21:11 +02:00
Adolfo Gómez García
3423ea22fa fixed tunnel ouput 2023-05-04 15:21:08 +02:00
Adolfo Gómez García
0aeb9b923f fixed tunnel ouput 2023-05-04 15:20:24 +02:00
Adolfo Gómez García
e57d593c09 Merge remote-tracking branch 'origin/v3.6' 2023-05-04 15:18:41 +02:00
Adolfo Gómez García
55ed118ae9 fixed tunnel ouput 2023-05-04 15:18:31 +02:00
Adolfo Gómez García
5d88f90010 fixed tunnel ouput 2023-05-04 15:17:40 +02:00
Adolfo Gómez García
90213a75e8 Merge remote-tracking branch 'origin/v3.6' 2023-05-04 15:13:29 +02:00
Adolfo Gómez García
66170448ab fixes to telegram notifier and tunnel server test 2023-05-04 15:12:55 +02:00
Adolfo Gómez García
c4690a25bb added TLS version to log 2023-05-04 15:12:25 +02:00
Adolfo Gómez García
df5622c889 Merge remote-tracking branch 'origin/v3.6' 2023-05-04 14:46:13 +02:00
Adolfo Gómez García
902f838178 Fixed timeout on test command and added sample min_tls_version to config 2023-05-04 14:45:58 +02:00
Adolfo Gómez García
36a4f9a68b recovered mic for xfreerdp on mac 2023-05-03 21:59:09 +02:00
Adolfo Gómez García
96468a935d Finished telegram notifier and removed not "interesting" levels from notifiers, ensuring no spam 2023-05-03 21:50:29 +02:00
Adolfo Gómez García
59141a9f03 fixed igel init script (error setting perms to 777) 2023-05-03 15:28:24 +02:00
Adolfo Gómez García
7a6c5966d9 fixed igel init script 2023-05-03 15:07:17 +02:00
Adolfo Gómez García
a7a658e42d Added forgotten "notify" to telegram notifier :) 2023-05-03 01:34:12 +02:00
Adolfo Gómez García
3fa6478f94 Added telegram bot support to notifiers (not tested already) 2023-05-03 01:21:26 +02:00
Adolfo Gómez García
7244e8dec5 Starting telegram notifier 2023-05-02 23:45:50 +02:00
Adolfo Gómez García
1c0bdf189e removed registering method from notification manager (finally, will not be used) 2023-05-02 16:05:34 +02:00
Adolfo Gómez García
1e85965d10 fixing up logging load 2023-04-28 03:28:46 +02:00
Adolfo Gómez García
646ec42dd6 merged from 3.6 2023-04-25 13:10:56 +02:00
Adolfo Gómez García
ac4177f22b Merge remote-tracking branch 'origin/v3.6' 2023-04-25 13:09:13 +02:00
Adolfo Gómez García
21e8b5aa56 some minor formatting 2023-04-25 13:09:10 +02:00
Adolfo Gómez García
48aec57256 recovered "azuread" logging compat 2023-04-25 13:08:19 +02:00
Adolfo Gómez García
122d5c5634 Fixes and refactoring 2023-04-25 12:06:49 +02:00
Adolfo Gómez García
983320e70b More linting and some more refactor 2023-04-25 12:01:48 +02:00
Adolfo Gómez García
916e34a138 Refacotorized models.util to uds.core.util.model 2023-04-25 10:56:29 +02:00
Adolfo Gómez García
44cb9a2df3 Refactoring model utils, model constants and some linting 2023-04-24 22:29:43 +02:00
Adolfo Gómez García
91224a3787 Merge remote-tracking branch 'origin/v3.6' 2023-04-24 14:18:18 +02:00
Adolfo Gómez García
e81982dd41 make clients prior to 3.5 not supported in any case 2023-04-24 14:17:28 +02:00
Adolfo Gómez García
b9788e8f42 Added redirection of error messages to systemd journal 2023-04-24 12:33:31 +02:00
Adolfo Gómez García
c4703a5e91 upgraded settings for black 2023-04-23 02:34:15 +02:00
Adolfo Gómez García
713e793f2d Merge remote-tracking branch 'origin/v3.6' 2023-04-21 01:16:25 +02:00
Adolfo Gómez García
7fe5f3d02d Added warning, error and fatal errors to notifications circuit 2023-04-21 01:15:19 +02:00
Adolfo Gómez García
c8982cf677 Removed ceil creating function on sqlite 2023-04-21 00:46:06 +02:00
Adolfo Gómez García
a75e250aeb Unified "NotificationLevel" with "LogLevel" (in fact, same meaning) 2023-04-21 00:25:54 +02:00
Adolfo Gómez García
5eb058e44a Updated dependencies 2023-04-21 00:01:03 +02:00
Adolfo Gómez García
87b47bb8d1 fixed username for sqlite 2023-04-20 14:17:25 +02:00
Adolfo Gómez García
6b4edc8e7a Merge remote-tracking branch 'origin/v3.6' 2023-04-20 13:39:36 +02:00
Adolfo Gómez García
9b4d1139d1 Converted username to lowercase for internal db 2023-04-20 13:31:55 +02:00
Adolfo Gómez García
41a499a35c small fixes 2023-04-20 04:47:46 +02:00
Adolfo Gómez García
06a598d577 Adding Database logs storage (appart from local files) 2023-04-20 04:19:57 +02:00
Adolfo Gómez García
9030ff3ab3 Refactoring loggging and log manager, and more linting 2023-04-20 03:10:46 +02:00
Adolfo Gómez García
3a0efbb998 Removed handler from Log manager
The route to reach the handler makes load modules too early...
2023-04-20 00:03:11 +02:00
Adolfo Gómez García
b582a26be2 More linting and more managers refactoring 2023-04-19 23:57:36 +02:00
Adolfo Gómez García
60fd7edc7b more linting and refactoring uds.core.managers to remove functions 2023-04-19 16:20:30 +02:00
Adolfo Gómez García
cfab4fd29b Added improvements to logging 2023-04-19 14:47:47 +02:00
Adolfo Gómez García
d487dc2b4c Merge remote-tracking branch 'origin/v3.6' 2023-04-18 10:45:21 +02:00
Adolfo Gómez García
4756437d9f upgraded guacamole auth component 2023-04-18 10:45:11 +02:00
Adolfo Gómez García
ffa8d80ef7 Merge remote-tracking branch 'origin/v3.6' 2023-04-18 10:44:38 +02:00
Adolfo Gómez García
1b3b78dc78 upgraded guacamole components 2023-04-18 10:44:19 +02:00
Adolfo Gómez García
9e61d142e2 upgraded guacamole auth component 2023-04-18 10:43:59 +02:00
Adolfo Gómez García
79a285919b Small lint fix for java 2023-04-18 10:14:28 +02:00
Adolfo Gómez García
103f8443b8 Merge remote-tracking branch 'origin/v3.6' 2023-04-17 17:28:59 +02:00
Adolfo Gómez García
d98be68d96 fixed UDS client removing http references 2023-04-17 17:28:13 +02:00
Adolfo Gómez García
4c759c3367 removed http support from uds client 2023-04-17 13:24:38 +02:00
Adolfo Gómez García
e70146fad6 removed http support 2023-04-17 13:15:43 +02:00
Adolfo Gómez García
b69076ac1a Linted all models 2023-04-17 02:47:31 +02:00
Adolfo Gómez García
a88b0b59a5 fixed author names and more linting 2023-04-17 02:17:26 +02:00
Adolfo Gómez García
4e385f2074 upgraded admin interface 2023-04-17 01:11:25 +02:00
Adolfo Gómez García
030e3785e9 a lot of more linting 2023-04-16 13:51:30 +02:00
Adolfo Gómez García
fa8e77c750 Enough linting for today... :) 2023-04-15 21:42:57 +02:00
Adolfo Gómez García
8adc3ca40d * Fixed test error with modified http client
* linting even more, untill all files has been linted
* Tested still works after changes :)
2023-04-15 21:21:23 +02:00
Adolfo Gómez García
a058b61276 More linting (a lot more :) ) 2023-04-15 16:33:53 +02:00
Adolfo Gómez García
ed90cd3995 Merge remote-tracking branch 'origin/v3.6' 2023-04-15 13:52:38 +02:00
Adolfo Gómez García
c7e1f36cb3 added exception logging on getTransportData and forced TLS to 1.3 on UDS tunnel 2023-04-15 13:52:18 +02:00
Adolfo Gómez García
0de85a8f19 more linting 2023-04-15 05:34:48 +02:00
Adolfo Gómez García
025375e2fe More linting fixes 2023-04-15 05:33:01 +02:00
Adolfo Gómez García
54efa40eef Refactoring using pylint 2023-04-15 03:23:17 +02:00
Adolfo Gómez García
8c0f3b68ed added pylintrc file 2023-04-15 02:12:41 +02:00
Adolfo Gómez García
8eba5127ae one deprecation fixed 2023-04-15 02:03:46 +02:00
Adolfo Gómez García
da7a5e22e3 Started adding support for "local files" logs to be also stored on DB 2023-04-15 00:24:26 +02:00
Adolfo Gómez García
6db9b4d75d added some more log in case of error receiving transport data and bumped minimun version for uds tunnel to TLSv1.3 2023-04-15 00:21:35 +02:00
Adolfo Gómez García
a8b30bcc14 added security file 2023-04-15 00:00:56 +02:00
Adolfo Gómez
a02175c2e3 Update README.md 2023-04-14 23:59:01 +02:00
Adolfo Gómez
92e41c3d6e Update README.md 2023-04-13 16:44:59 +02:00
Adolfo Gómez
e149c367f0 Update README.md 2023-04-13 15:03:12 +02:00
Adolfo Gómez García
6b03d05ef5 removed empty TODO.txt 2023-04-13 14:41:03 +02:00
Adolfo Gómez García
f2cfaa2b40 fixed RDP signatures to be funtional 2023-04-13 13:32:33 +02:00
Adolfo Gómez García
7e03b63816 fixed spice tunnel 2023-04-13 13:31:38 +02:00
Adolfo Gómez García
f78053fc0c Fixed Tuneled Spice transport and resigned everything 2023-04-13 13:27:57 +02:00
Adolfo Gómez García
e15746b4a4 Fixed SPICE tunnel 2023-04-13 13:11:38 +02:00
Adolfo Gómez García
d55c0e9593 Merge remote-tracking branch 'origin/v3.6' 2023-04-10 18:07:32 +02:00
Adolfo Gómez García
14dd5aca64 fixed minor bugs on install and actor comms 2023-04-10 18:06:00 +02:00
Adolfo Gómez García
7bf4859399 Minor security enhacements (moved some vars to settings' 2023-04-10 13:51:48 +02:00
Adolfo Gómez García
db47235354 Merge remote-tracking branch 'origin/v3.6' 2023-04-07 01:51:53 +02:00
Adolfo Gómez García
846f9225f1 Moved all requests calls through secureRequestsSession call 2023-04-07 01:45:53 +02:00
Adolfo Gómez García
71638a13a4 small merge fix for sms mfa 2023-04-07 01:11:30 +02:00
Adolfo Gómez García
b0bd76d5df Merge remote-tracking branch 'origin/v3.6' 2023-04-07 01:09:12 +02:00
Adolfo Gómez García
09c44ac0b6 adding secure context to requests (so we can manipulate ssl context better and centralized) 2023-04-07 01:08:48 +02:00
Adolfo Gómez García
c9133afcbb Merge remote-tracking branch 'origin/v3.6' 2023-04-06 17:29:13 +02:00
Adolfo Gómez García
9db8e8d7ec refix 2023-04-06 17:29:04 +02:00
Adolfo Gómez García
09473d627a Merge remote-tracking branch 'origin/v3.6' 2023-04-06 17:21:07 +02:00
Adolfo Gómez García
15bc3a0b6f Small improvements to security utils module 2023-04-06 17:18:42 +02:00
Adolfo Gómez García
831db0acf3 Refactoring uds.core, removing nonsense imports that creates circular dependencies problems 2023-04-05 14:44:41 +02:00
Adolfo Gómez García
79b350486a merge fix 2023-04-04 18:57:07 +02:00
Adolfo Gómez García
139cb1f02f Merge remote-tracking branch 'origin/v3.6' 2023-04-04 18:55:48 +02:00
Adolfo Gómez García
321255a1b0 Changed redirection from redirect to permanent redirect on HTTP use 2023-04-04 18:55:05 +02:00
Adolfo Gómez García
f31b707fdc Merge remote-tracking branch 'origin/v3.6' 2023-04-04 14:44:21 +02:00
Adolfo Gómez García
59d578f292 Addoed some logs to UDS operations and fixed udsactor ssl verification 2023-04-04 14:43:28 +02:00
Adolfo Gómez García
4bf268764f Merge remote-tracking branch 'origin/v3.6' 2023-04-04 01:55:10 +02:00
Adolfo Gómez García
ea343659ff Small ldaputil fix (moved newctx to last ssl instruction before connect) 2023-04-04 01:51:46 +02:00
Adolfo Gómez García
636b72a471 Small fix to requests sessions context creation 2023-04-03 22:53:32 +02:00
Adolfo Gómez García
31104c3fc2 Fixed actor client minimum version and ciphers 2023-04-03 22:46:59 +02:00
Adolfo Gómez García
9d9a764a81 Fixed Actor Server Ciphers 2023-04-03 22:43:46 +02:00
Adolfo Gómez García
e2f62ed18e adaptions derived from merge 2023-04-03 15:45:32 +02:00
Adolfo Gómez García
a475addade Merge remote-tracking branch 'origin/v3.6' 2023-04-03 15:45:18 +02:00
Adolfo Gómez García
8aa04c6a9c Several security improvements:
* Reduced supported actor lists ciphers to only one (AES256-GCM)
* Removed actor client support for protocols previous to 1.3.
   Only user cipher ECDHE-RSA-AES256-GCM-SHA384
2023-04-03 15:35:38 +02:00
Adolfo Gómez García
1380cbde3e added sequre requests to actors 2023-04-03 15:13:42 +02:00
Adolfo Gómez García
0ac4fe60a8 Refactoring cert to security 2023-04-03 14:38:23 +02:00
Adolfo Gómez García
d6244c814e Merge remote-tracking branch 'origin/v3.6' 2023-04-03 14:04:50 +02:00
Adolfo Gómez García
9d5e983847 removed support for tls1.0&tls1.1 for ldap client on UDS, backported from 4.0 2023-04-03 14:04:35 +02:00
Adolfo Gómez García
f4d0603cdb Merge remote-tracking branch 'origin/v3.6' 2023-04-02 04:34:04 +02:00
Adolfo Gómez García
c11ea77f22 Small type check fix 2023-04-02 04:32:53 +02:00
Adolfo Gómez García
f8e9c99736 Merge remote-tracking branch 'origin/v3.6' 2023-04-02 04:25:56 +02:00
Adolfo Gómez García
6cbb497902 Minor fixes (type related and comments) 2023-04-01 13:29:28 +02:00
Adolfo Gómez García
c3456696ad Merge remote-tracking branch 'origin/v3.6' 2023-03-31 16:31:19 +02:00
Adolfo Gómez García
8fc9495d5e removed support for TLS1.0 and TLS1.1 2023-03-31 16:31:02 +02:00
Adolfo Gómez García
a19629bd0e Merge remote-tracking branch 'origin/v3.6' 2023-03-31 16:22:47 +02:00
Adolfo Gómez García
d43167707c Removed TLS1.0 & TLS1.1 support 2023-03-31 16:22:02 +02:00
Adolfo Gómez García
3fc86482dc Some minor typing fixes 2023-03-31 15:41:59 +02:00
Adolfo Gómez García
6256fc3d54 Several fixes related to possible security issues complains of bandit 2023-03-31 13:12:34 +02:00
Adolfo Gómez García
297d5196b8 Merge remote-tracking branch 'origin/v3.6' 2023-03-30 16:02:12 +02:00
Adolfo Gómez García
7eaf0c8126 updated tranlations 2023-03-30 16:00:16 +02:00
Adolfo Gómez García
3ba4ed5f7d Merge remote-tracking branch 'origin/v3.6' 2023-03-30 15:31:15 +02:00
Adolfo Gómez García
e9e8555f51 Merge remote-tracking branch 'origin/v3.6' 2023-03-30 15:16:53 +02:00
Adolfo Gómez García
1c6d29b361 Merge remote-tracking branch 'origin/v3.6' 2023-03-30 15:15:38 +02:00
Adolfo Gómez García
df0e1bde96 added Email "justUsername" and now redirects to https is by default True, as a previos step forward removing Service 2023-03-30 15:15:06 +02:00
Adolfo Gómez García
14a8f1f5e1 fixed return button of error page 2023-03-29 16:18:40 +02:00
Adolfo Gómez García
8f132e7524 fixing up SMS mfa and related 2023-03-29 16:11:01 +02:00
Adolfo Gómez García
8b12218f09 fixed SAML logout process 2023-03-29 15:44:54 +02:00
Adolfo Gómez García
ab7b4c78ef Fixed SMS auth 2023-03-29 14:22:17 +02:00
Adolfo Gómez García
8eef064bf2 upgraded caching decorator 2023-03-29 05:22:35 +02:00
Adolfo Gómez García
276f634035 Merge remote-tracking branch 'origin/v3.6' 2023-03-29 01:37:24 +02:00
Adolfo Gómez García
f5af2b12d2 Improved counter mechanics 2023-03-29 01:37:12 +02:00
Adolfo Gómez García
1d0a3927a9 Merge remote-tracking branch 'origin/v3.6' 2023-03-29 00:04:57 +02:00
Adolfo Gómez García
f11da32f0d backported fixes for uds tunnel (timeout, stats accounting and stop mechanics) 2023-03-29 00:04:45 +02:00
Adolfo Gómez García
8e39ff5c81 some minor fixes to uds tunnel 2023-03-29 00:04:03 +02:00
Adolfo Gómez García
bb0c4e3fe7 Merge remote-tracking branch 'origin/v3.6' 2023-03-28 23:16:29 +02:00
Adolfo Gómez García
55b8763f72 updated testing sample keys 2023-03-28 23:15:53 +02:00
Adolfo Gómez García
e48237f6d4 upgrading samples 2023-03-28 22:57:55 +02:00
Adolfo Gómez García
5694420f89 small comment fix to tickets 2023-03-28 17:53:43 +02:00
Adolfo Gómez García
01fb43d51b merged SAML changes from 3.6 2023-03-28 01:32:08 +02:00
Adolfo Gómez García
1b7921b5f8 Merge remote-tracking branch 'origin/v3.6' 2023-03-27 16:57:25 +02:00
Adolfo Gómez García
e1a7096d1f small test 2023-03-27 14:25:40 +02:00
Adolfo Gómez García
76f7b36508 Removed duplicated default dipher on uds actor server part 2023-03-27 14:18:35 +02:00
Adolfo Gómez García
254bbc444c Fixed height of options on admin dashboard 2023-03-25 20:54:14 +01:00
Adolfo Gómez García
dcebdfbeda small typo fix on MFAs 2023-03-25 20:46:37 +01:00
Adolfo Gómez García
d654d4f36b fixed mfas typo 2023-03-25 17:50:36 +01:00
Adolfo Gómez García
2269f8c770 mergin 2023-03-25 17:50:10 +01:00
Adolfo Gómez García
6f4d84a08e added csrftoken from cookie 2023-03-25 17:45:10 +01:00
Adolfo Gómez García
2ce2817eac some minor corrections 2023-03-25 13:50:27 +01:00
Adolfo Gómez García
62e27da7da Merge remote-tracking branch 'origin/v3.6' 2023-03-25 13:45:02 +01:00
Adolfo Gómez García
b983d5d409 More typing fixes 2023-03-25 13:43:54 +01:00
Adolfo Gómez García
ec9811dc34 Merge remote-tracking branch 'origin/v3.6' 2023-03-25 13:21:01 +01:00
Adolfo Gómez García
562e9201c8 Added typing correction on 3.6 version 2023-03-25 13:19:28 +01:00
Adolfo Gómez García
f02a8b8720 Added extra security
Sessions, if enhaced_security is active, is cheched against the request IP.
2023-03-25 01:06:40 +01:00
Adolfo Gómez García
7f8e06a090 merged saml changes 2023-03-24 15:37:12 +01:00
Adolfo Gómez García
895ca38595 merged from 3.6 2023-03-24 15:26:11 +01:00
Adolfo Gómez García
a09452fe49 Fixes from merges and recompiled admin and user interfaces 2023-03-24 15:23:18 +01:00
Adolfo Gómez García
e2814f2674 small text fix 2023-03-24 15:05:14 +01:00
Adolfo Gómez García
ef9a0ce0b2 Added time limit for pool removal 2023-03-24 15:01:00 +01:00
Adolfo Gómez García
77bc47671e Added support for checking certificate is from private key 2023-03-23 01:51:51 +01:00
Adolfo Gómez García
0ff33edc6b Small fixes for auth redirects 2023-03-23 01:41:40 +01:00
Adolfo Gómez García
7415dcbdb0 Merge remote-tracking branch 'origin/v3.6' 2023-03-22 03:07:32 +01:00
Adolfo Gómez García
f7886abfbc fixed simpleldap mfa support 2023-03-22 02:47:17 +01:00
Adolfo Gómez García
5c9dd741d3 Added certificate check support for all ldap based auths 2023-03-22 02:33:27 +01:00
Adolfo Gómez García
0ba381dbc4 small addong to certs 2023-03-21 16:39:59 +01:00
Adolfo Gómez García
13d62a6318 Merge remote-tracking branch 'origin/v3.6' 2023-03-21 16:27:08 +01:00
Adolfo Gómez García
8abe2ad31b Fixed ssh help strings 2023-03-21 15:02:21 +01:00
Adolfo Gómez García
f82126153a A bit of config refactoring and some merge fixes 2023-03-20 15:46:20 +01:00
Adolfo Gómez García
6754c02a3d Reversed change. Positive number is fine 2023-03-18 14:07:52 +01:00
Adolfo Gómez García
58446a992c Fixed minValue 2023-03-17 15:32:59 +01:00
Adolfo Gómez García
4386c5567a fixed Client to correctly handle versions upgrades 2023-03-17 14:09:08 +01:00
Adolfo Gómez García
e1c0ee8033 Merge remote-tracking branch 'origin/v3.6' 2023-03-16 16:26:17 +01:00
Adolfo Gómez García
5da71a4f6e added upload/download to ssh 2023-03-16 16:24:09 +01:00
Adolfo Gómez García
6bb4c3bd5e Added Support for SSH through HTML5 2023-03-16 15:18:20 +01:00
Adolfo Gómez García
460b0fe2ba Merge remote-tracking branch 'origin/v3.6' 2023-03-15 04:12:34 +01:00
Adolfo Gómez García
b9a01e686f updated translations 2023-03-15 04:11:43 +01:00
Adolfo Gómez García
011223ec05 upgraded admin interface 2023-03-14 13:15:43 +01:00
Adolfo Gómez García
e4445f0278 Merge remote-tracking branch 'origin/v3.6' 2023-03-13 18:06:13 +01:00
Adolfo Gómez García
e1ff1207b6 fixed auth REST label re 2023-03-13 18:06:03 +01:00
Adolfo Gómez García
a12aa1f3d4 fixed auth label re 2023-03-13 18:05:18 +01:00
Adolfo Gómez García
8ca5f611d2 Merge remote-tracking branch 'origin/v3.6' 2023-03-13 18:01:15 +01:00
Adolfo Gómez García
666b982c50 fixed authenticator label not allowing dot in name 2023-03-13 18:00:47 +01:00
Adolfo Gómez García
52dca21c8c trainling spaces removed 2023-03-12 04:26:41 +01:00
Adolfo Gómez García
cf1048afcb Now Ciphers can be pushed by uds server to UDS Actor, so we can addapt Actor ciphers without reinstalling if needed 2023-03-08 21:48:48 +01:00
Adolfo Gómez García
95527c6682 cosmetic 2023-03-08 21:14:42 +01:00
Adolfo Gómez García
2c928fc210 Merge remote-tracking branch 'origin/v3.6' 2023-03-08 20:15:46 +01:00
Adolfo Gómez García
7985f44389 HTTPS UDS Actor server supports only TLSv1.3, and upgraded certificate key length to 4096 bits 2023-03-08 15:47:38 +01:00
Adolfo Gómez García
4517b781cf now onwards uds client 3.5 will not be compatible with UDS 2023-03-08 14:24:10 +01:00
Adolfo Gómez García
9de5387fd6 Make verify certificate default on dropdown 2023-03-08 11:02:09 +01:00
Adolfo Gómez García
abf328c564 Merge remote-tracking branch 'origin/v3.6' 2023-03-08 10:10:58 +01:00
Adolfo Gómez García
304f5dd686 Removed old UDS client versions support. Nonsense 2023-03-08 10:06:30 +01:00
Adolfo Gómez García
d6821e4385 Merge remote-tracking branch 'origin/v3.6' 2023-03-08 02:10:44 +01:00
Adolfo Gómez García
2699c090f8 added certificate verify to ldaps 2023-03-08 02:10:14 +01:00
Adolfo Gómez García
ac6b813481 Merge remote-tracking branch 'origin/v3.6' 2023-03-08 01:20:17 +01:00
Adolfo Gómez García
43e1353154 added ssl verify support to ldaps 2023-03-08 01:18:34 +01:00
Adolfo Gómez García
58877d8844 Merge remote-tracking branch 'origin/v3.6' 2023-03-03 15:46:34 +01:00
Adolfo Gómez García
ba5be7e2fb Fixed check time for openstack 2023-03-03 15:43:31 +01:00
Adolfo Gómez García
a36290fbcd Adding some minor changes to SAML 2023-03-02 19:40:30 +01:00
Adolfo Gómez García
3f49cdcb2d Merge remote-tracking branch 'origin/v3.6' 2023-03-01 16:10:02 +01:00
Adolfo Gómez García
62a401f9b4 fixed translations 2023-03-01 16:09:13 +01:00
Adolfo Gómez García
6d449ce291 Merge remote-tracking branch 'origin/v3.6' 2023-03-01 14:50:19 +01:00
Adolfo Gómez García
ddc9d5a434 Added Translations and message edition to Email MFA 2023-03-01 14:46:30 +01:00
Adolfo Gómez García
485048abf1 Fixed merge 2023-02-28 14:10:39 +01:00
Adolfo Gómez García
0e9b6e3cf3 erge remote-tracking branch 'origin/v3.6' 2023-02-28 14:07:57 +01:00
Adolfo Gómez García
8f2b9bf136 Fixed MFAs 2023-02-28 14:00:55 +01:00
Adolfo Gómez García
e4a1d0ab29 Merge remote-tracking branch 'origin/v3.6' 2023-02-28 13:28:18 +01:00
Adolfo Gómez García
f4d15e0fca Fixed MFA cache time. 2023-02-28 13:27:56 +01:00
Adolfo Gómez García
4a805f74b0 Merge remote-tracking branch 'origin/v3.6' 2023-02-26 23:19:30 +01:00
Adolfo Gómez García
002321c339 fixed openstack, for working with compute_legacy 2023-02-26 21:44:13 +01:00
Adolfo Gómez García
bcdbfa67d7 small fix for pylance complain 2023-02-26 21:27:07 +01:00
Adolfo Gómez García
e8022389fb Updated translations 2023-02-26 21:21:08 +01:00
Adolfo Gómez García
7c47dd9122 Merge remote-tracking branch 'origin/v3.6' 2023-02-24 14:59:47 +01:00
Adolfo Gómez García
12c59f66e2 Simplified TOTP MFA 2023-02-24 14:57:52 +01:00
Adolfo Gómez García
21a14fc249 Merge remote-tracking branch 'origin/v3.6' 2023-02-24 14:52:45 +01:00
Adolfo Gómez García
2541642160 Small string fixes 2023-02-24 14:51:13 +01:00
Adolfo Gómez García
56d7619e9f TOPT time is got from DBSERVER 2023-02-24 14:40:07 +01:00
Adolfo Gómez García
e018ea5143 Merge remote-tracking branch 'origin/v3.6' 2023-02-24 14:29:51 +01:00
Adolfo Gómez García
a7ae7d3771 Several Minor MFA fixes 2023-02-24 14:25:59 +01:00
Adolfo Gómez García
f541fd6a0f Merge remote-tracking branch 'origin/v3.6' 2023-02-23 22:03:16 +01:00
Adolfo Gómez García
e47e0ee69f Updated translations 2023-02-23 21:59:29 +01:00
Adolfo Gómez García
2ac625a511 updated admin interface 2023-02-23 21:56:55 +01:00
Adolfo Gómez García
d6fd263e9e Merge remote-tracking branch 'origin/v3.6' 2023-02-23 21:56:25 +01:00
Adolfo Gómez García
9d6a74faa3 updated admin interface 2023-02-23 21:54:56 +01:00
Adolfo Gómez García
92cd48e512 Merge remote-tracking branch 'origin/v3.6' 2023-02-23 21:42:42 +01:00
Adolfo Gómez García
56ab199856 Fixed translations 2023-02-23 21:39:35 +01:00
Adolfo Gómez García
9be108dbd5 added reset related data to user, to clean up mfa data for example 2023-02-23 19:37:24 +01:00
Adolfo Gómez García
664231f369 Merged Google Auth TOTP 2023-02-23 17:02:13 +01:00
Adolfo Gómez García
5bf481dc4e Merge remote-tracking branch 'origin/v3.6' 2023-02-23 16:57:08 +01:00
Adolfo Gómez García
165bd89829 Fixed parameters order for coherence 2023-02-23 16:56:42 +01:00
Adolfo Gómez García
6c96da59a7 fixes 2023-02-23 16:52:55 +01:00
Adolfo Gómez García
7e84d183ca Merge remote-tracking branch 'origin/v3.6' 2023-02-23 16:48:54 +01:00
Adolfo Gómez García
f9f665d134 fixes for MFA 2023-02-23 16:48:51 +01:00
Adolfo Gómez García
52096b1eff Added Google Auth MFA 2023-02-23 16:44:47 +01:00
Adolfo Gómez García
ac49786492 Fixed "resetData" whe user is deleted from db, so mfa storage can be freed 2023-02-23 15:10:04 +01:00
Adolfo Gómez García
8820531e9f Merge remote-tracking branch 'origin/v3.6' 2023-02-23 03:27:19 +01:00
Adolfo Gómez García
28bff050c6 updated user_interface validate to errors 2023-02-23 03:27:10 +01:00
Adolfo Gómez García
b14581c522 Added reseting tries to mfa 2023-02-23 03:25:42 +01:00
Adolfo Gómez García
4e00e66611 Merge remote-tracking branch 'origin/v3.6' 2023-02-23 03:17:48 +01:00
Adolfo Gómez García
98954b5e3b Minor format fixes 2023-02-23 03:01:32 +01:00
Adolfo Gómez García
762c0e5392 Some minor MFA fixes 2023-02-23 02:57:37 +01:00
Adolfo Gómez García
0aaa734030 Fixed MFA stuff 2023-02-22 15:15:31 +01:00
Adolfo Gómez García
2edbad3548 Merge remote-tracking branch 'origin/v3.6' 2023-02-21 17:18:08 +01:00
Adolfo Gómez García
2d48320ac8 Small typing fix for openstack_client 2023-02-21 17:17:45 +01:00
Adolfo Gómez García
c58aa9596c Merge remote-tracking branch 'origin/v3.6' 2023-02-20 18:21:49 +01:00
Adolfo Gómez García
9192a0a822 small auth rest fix 2023-02-20 18:21:07 +01:00
Adolfo Gómez García
468cdb5497 Fixed non required fields and readded "_request" to params for classes 2023-02-20 17:56:10 +01:00
Adolfo Gómez García
5907985719 Removed support of tunnel for proxied SPICE connection (not supported) 2023-02-15 16:58:10 +01:00
Adolfo Gómez García
bb507959b9 Some more minor refactoring 2023-02-14 16:04:05 +01:00
Adolfo Gómez García
22116aba27 Refactoring some transports, better code 2023-02-14 15:52:18 +01:00
Adolfo Gómez García
6165d2db15 Reafactorization and fixes
Refactorized some exceptions names
Fixed Spice Protocol
Added "getConsoleConnection" as optional UserDeployment method
2023-02-14 15:09:20 +01:00
Adolfo Gómez García
2961469244 Merge remote-tracking branch 'origin/v3.6' 2023-02-14 14:48:27 +01:00
Adolfo Gómez García
a5192b8dbe Upgrading Proxmox for SPICE & S
PICE TRANSPORT
2023-02-14 14:48:17 +01:00
Adolfo Gómez García
cf0f6a0cce Spice cleans 2023-02-14 14:46:26 +01:00
Adolfo Gómez García
c8df5de095 Fixed spice upgrades 2023-02-14 14:41:56 +01:00
Adolfo Gómez García
bf21aad72f Merge remote-tracking branch 'origin/v3.6' 2023-02-14 14:30:19 +01:00
Adolfo Gómez García
d2d13d1089 Added support for service provided ca and spice proxy overriding 2023-02-14 14:30:04 +01:00
Adolfo Gómez García
e5e204fca0 spice support for proxy overriding 2023-02-14 14:25:54 +01:00
Adolfo Gómez García
a07f76f540 Added new options to coverage.ini to exclude some files from coverage report. 2023-02-13 17:47:49 +01:00
Adolfo Gómez García
881abecfc2 Refactorized REST exceptions 2023-02-13 17:35:29 +01:00
Adolfo Gómez García
fd73722abd Validation check on UserInterface 2023-02-13 17:09:01 +01:00
Adolfo Gómez García
22b624e3b8 Inserting validator to TextField on UserInterface 2023-02-13 17:03:13 +01:00
Adolfo Gómez García
da823d2e6c Refactoring UDS Exceptions 2023-02-13 16:35:35 +01:00
Adolfo Gómez García
4385fdf358 Merge remote-tracking branch 'origin/v3.6' 2023-02-10 14:09:54 +01:00
Adolfo Gómez García
978c39edd1 Fixed spice for ProxMox 2023-02-10 14:06:15 +01:00
Adolfo Gómez García
b4b04f801c Reports fixes (due to UserInterface defvalues "error" on dates) and added fastCrypt tests 2023-02-08 15:23:02 +01:00
Adolfo Gómez García
b8b6ede6f7 Merge remote-tracking branch 'origin/v3.6' 2023-02-07 18:48:21 +01:00
Adolfo Gómez García
fe91fa635b Better solution for default changing values 2023-02-07 18:47:55 +01:00
Adolfo Gómez García
dc57b87d42 Merged 3.6 changes 2023-02-07 18:33:24 +01:00
Adolfo Gómez García
39cba62009 Merge remote-tracking branch 'origin/v3.6' 2023-02-07 18:27:00 +01:00
Adolfo Gómez García
a75bc4a4b5 fixed reports dates 2023-02-07 18:25:55 +01:00
Adolfo Gómez García
44ff00025f Merge remote-tracking branch 'origin/v3.6' 2023-02-07 16:43:22 +01:00
Adolfo Gómez García
8aa94fd0c5 updated translations 2023-02-07 16:42:58 +01:00
Adolfo Gómez García
0db41e1a14 added spicde to proxmox 2023-02-07 16:37:26 +01:00
Adolfo Gómez García
659d6167c8 small cache fix 2023-02-06 16:15:54 +01:00
Adolfo Gómez García
d1645b5bbb Several changes:
* Fixed Tests for middleware, that has been moved to "uds" package
* Refactorized incorrect "unserialize" name to "deserialize" correct one
* Adding secure serializer based on pickle (basically encripting the data
  with a secret key)
* Removed oldSerializeForm from UserInterface, and left it just for tests...
2023-02-06 16:08:04 +01:00
Adolfo Gómez García
7d19b21638 Small fixed fix && refactorized a couple of samples 2023-02-06 02:39:33 +01:00
Adolfo Gómez García
b1cf1c405f Moved middleware to "uds", better place 2023-02-03 14:49:23 +01:00
Adolfo Gómez García
f71659b5a6 Added meta pool recursion save restiction and some more tests 2023-02-02 17:49:49 +01:00
Adolfo Gómez García
5b5beb30d6 Merge remote-tracking branch 'origin/v3.6' 2023-02-02 12:36:36 +01:00
Adolfo Gómez García
8cafc6d797 small guacamole dispatcher fix. Backported to 3.6 2023-02-02 12:35:57 +01:00
Adolfo Gómez García
4f12602db3 small guacamole dispatcher fix. Backported to 3.6 2023-02-02 12:35:37 +01:00
Adolfo Gómez García
02877f9095 Adding more tests 2023-02-01 18:30:20 +01:00
Adolfo Gómez García
e571f2ac58 Fixed PR from Future998 2023-01-31 14:46:06 +01:00
Adolfo Gómez García
1801feec6c Merge remote-tracking branch 'origin/v3.6' 2023-01-31 14:18:40 +01:00
Adolfo Gómez García
1fbc4b9bfd Fixed & updated patch from @Future998 2023-01-31 14:18:27 +01:00
Adolfo Gómez García
ab1609ab49 Merge remote-tracking branch 'origin/v3.6' 2023-01-31 14:06:24 +01:00
Adolfo Gómez García
d8fce3bb73 Backported pr from @Future998 to enable OpenNebula Spice support. Fix from merge. 2023-01-31 14:04:57 +01:00
Adolfo Gómez García
fb7fcd953e Merge remote-tracking branch 'origin/v3.6' 2023-01-31 13:50:59 +01:00
Adolfo Gómez García
e94b558ae9 Backported pr from @Future998 to enable OpenNebula Spice support 2023-01-31 13:47:21 +01:00
Adolfo Gómez García
ad4ead570b Merge remote-tracking branch 'origin/v3.6' 2023-01-31 13:38:05 +01:00
Adolfo Gómez
e218b2432d Merge pull request #73 from Future998/spice-tls
Add checkbox to enable SSL connection for SPICE
2023-01-31 13:37:03 +01:00
Adolfo Gómez García
990a5335d6 Adding more automated tests 2023-01-27 17:02:35 +01:00
Alexander Burmatov
01e776edfb Add checkbox to enable SSL connection for SPICE
If in OpenNebula not enabled TLS for SPICE protocol, when
cannot connect to OpenNebula with generated virt-viewer connection
config file, because "secure-channel" options successfully work
over TLS only.
This changes allow enable or disable TLS on UDS site.
2023-01-27 18:39:44 +03:00
Adolfo Gómez García
58c4c4e68f Fixed date field in the system cleaner log 2023-01-26 12:21:11 +01:00
Adolfo Gómez García
aca3073eea Added basic service data "composer" for user services, normal pools and meta pools 2023-01-25 13:16:50 +01:00
Adolfo Gómez García
597d72a609 adding more tests 2023-01-19 20:09:22 +01:00
Adolfo Gómez García
5b5de7ce90 fixed actor_v3 merge errors 2023-01-19 18:17:53 +01:00
Adolfo Gómez García
44be2f4df5 Merge remote-tracking branch 'origin/v3.6' 2023-01-19 13:59:44 +01:00
Adolfo Gómez García
5f8854335e fixed proxy detection && tests 2023-01-19 13:59:32 +01:00
Adolfo Gómez García
82234ff0dd fixed proxy detection && tests 2023-01-19 13:59:24 +01:00
Adolfo Gómez García
4a31d3a698 Merge remote-tracking branch 'origin/v3.6' 2023-01-18 23:56:15 +01:00
Adolfo Gómez García
f2f7edbd67 Fixed IP detection 2023-01-18 23:53:52 +01:00
Adolfo Gómez García
384fa0b4c0 added request ip detection 2023-01-18 23:53:18 +01:00
Adolfo Gómez García
bf5a0069b8 Fixed permissions visualization related issue 2023-01-17 13:10:27 +01:00
Adolfo Gómez García
db1d0e2640 Merge remote-tracking branch 'origin/v3.6' 2023-01-17 12:56:47 +01:00
Adolfo Gómez García
56cf0049db Merge remote-tracking branch 'origin/v3.5' into v3.6 2023-01-17 12:54:04 +01:00
Adolfo Gómez García
9478a86b02 Ignored "errored" machines on vm list 2023-01-17 12:53:25 +01:00
Adolfo Gómez García
d9d6d7e7c8 Merge remote-tracking branch 'origin/v3.6' 2023-01-17 12:38:43 +01:00
Adolfo Gómez García
e15ba650f9 limited ip size length 2023-01-17 12:37:31 +01:00
Adolfo Gómez García
86e8c759ec limited src ip and hostname size 2023-01-17 12:35:41 +01:00
Adolfo Gómez García
019523131d Upgraded interfaces 2023-01-16 19:25:45 +01:00
Adolfo Gómez García
dc4ecc5940 manually merged 2023-01-16 12:30:55 +01:00
Adolfo Gómez García
688c0e7630 Merge remote-tracking branch 'origin/v3.6' 2023-01-16 12:28:07 +01:00
Adolfo Gómez García
ed692c3d27 imported new fronted fixes && comments 2023-01-16 12:27:27 +01:00
Adolfo Gómez García
48cd8240e9 fixed field name error on auth beforeSave 2023-01-16 12:26:47 +01:00
Adolfo Gómez García
de03b67085 upgraded admin and user interfaces 2023-01-15 21:53:22 +01:00
Adolfo Gómez García
ec0a7d78c0 Merge branch 'master' of github.com:dkmstr/openuds 2023-01-15 21:24:56 +01:00
Adolfo Gómez García
5fb8130baa fixed put incorrectly reporting 500 on bad requests 2023-01-15 21:24:48 +01:00
Adolfo Gómez
426ac7048c small license fix 2023-01-13 12:36:01 +01:00
Adolfo Gómez García
01144fe9ba Merge remote-tracking branch 'origin/v3.6' 2023-01-11 14:52:11 +01:00
Adolfo Gómez García
75005399aa extended actor_v3 log in case of blocking uds actor accesses 2023-01-11 14:51:56 +01:00
Adolfo Gómez García
b06c804bfc imcorpored angular 15 gui 2023-01-11 13:33:17 +01:00
Adolfo Gómez García
7c1b4ab61e Fixed comands type checking and added a few samples to sample provider 2023-01-11 13:28:15 +01:00
Adolfo Gómez García
018ba4a3f8 fixed image saving 2023-01-11 12:39:31 +01:00
Adolfo Gómez García
e532780a6e upgraded frontend to angular 15 with material 15 2023-01-11 03:02:06 +01:00
Adolfo Gómez García
6bd6944c62 Merge remote-tracking branch 'origin/v3.6' 2023-01-09 14:27:35 +01:00
Adolfo Gómez García
cfc81004bc Fixed time reporting on syslog 2023-01-09 14:27:28 +01:00
Adolfo Gómez García
da02ad0c7c Backport fix time reporting of connection fix 2023-01-09 14:27:15 +01:00
Adolfo Gómez García
0eb86db282 Merge remote-tracking branch 'origin/v3.6' 2023-01-05 23:48:51 +01:00
Adolfo Gómez García
0a15f7bdce backported 4.0 version 2023-01-05 23:48:36 +01:00
Adolfo Gómez García
ba5f9120dc Split tunnel into "receiver" and "client" part 2023-01-05 23:47:32 +01:00
Adolfo Gómez García
7a41cc3d4d Merge remote-tracking branch 'origin/v3.6' 2023-01-05 18:17:13 +01:00
Adolfo Gómez García
2189267358 backported tunnel improvements 2023-01-05 18:17:04 +01:00
Adolfo Gómez García
beac5caa09 some minor improvements 2023-01-05 18:16:30 +01:00
Adolfo Gómez García
99f52844ac small tunnel fix 2023-01-05 17:20:12 +01:00
Adolfo Gómez García
efd132bd39 Merge remote-tracking branch 'origin/v3.6' 2023-01-04 23:48:18 +01:00
Adolfo Gómez García
1a9517675d some fixes backported from 4.0 2023-01-04 23:48:08 +01:00
Adolfo Gómez García
9767873cbc Fixed redirect testing method, and some minor changes to cache and storage 2023-01-04 23:46:50 +01:00
Adolfo Gómez García
852ae43b96 Fixed tunnel log on tunnel termination 2023-01-04 23:33:26 +01:00
Adolfo Gómez García
4a8a13fe73 fixed requirements.txt 2022-12-27 14:30:45 +01:00
Adolfo Gómez García
50bed7268a fixed SAML not reading friendlyName 2022-12-23 16:44:49 +01:00
Adolfo Gómez García
d76759bb2c Merge remote-tracking branch 'origin/v3.6' 2022-12-22 15:25:54 +01:00
Adolfo Gómez García
f91aeb3ffd final fixes for uds tunnel 2022-12-22 15:25:45 +01:00
Adolfo Gómez García
aa97309db9 backported final fixes 2022-12-22 15:24:28 +01:00
Adolfo Gómez García
3e947e1d82 backported final fixes 2022-12-22 15:16:01 +01:00
Adolfo Gómez García
796d000f8e fixed tunnel test 2022-12-21 21:13:54 +01:00
Adolfo Gómez García
19709bfe3b some fix for concurrent tests 2022-12-21 21:06:42 +01:00
Adolfo Gómez García
dcedb268dd backport udstunnel fix 2022-12-21 21:05:46 +01:00
Adolfo Gómez García
645f61c8e6 backport from 4.0 tunnel server 2022-12-21 20:40:38 +01:00
Adolfo Gómez García
97c72ee7ac Merge remote-tracking branch 'origin/v3.6' 2022-12-21 14:29:35 +01:00
Adolfo Gómez García
c800e18f5b added tests using "fake http" broker, that will allow us to make some full-server concurrency tests 2022-12-21 14:29:25 +01:00
Adolfo Gómez García
d462ecbb32 backport small fixes from dev version 2022-12-21 14:28:54 +01:00
Adolfo Gómez García
5f60058858 Merge remote-tracking branch 'origin/v3.6' 2022-12-20 23:40:01 +01:00
Adolfo Gómez García
c1e4c5b81a fixed udstunnel connection stop event bein the same for all connections 2022-12-20 23:39:51 +01:00
Adolfo Gómez García
a387ec9757 Fixed wait event being same for all connections 2022-12-20 23:39:15 +01:00
Adolfo Gómez García
e1ffbcc54b Merge remote-tracking branch 'origin/v3.6' 2022-12-20 18:31:41 +01:00
Adolfo Gómez García
d707771fe5 small tunnel fixes 2022-12-20 18:31:25 +01:00
Adolfo Gómez García
472299f878 Small fixes and more tests. Refactoring. 2022-12-20 18:31:04 +01:00
Adolfo Gómez García
fdd8ac00c9 Small fixes and more tests. Refactoring. 2022-12-20 18:30:55 +01:00
Adolfo Gómez García
ab0626977b Merge remote-tracking branch 'origin/v3.6' 2022-12-20 15:04:44 +01:00
Adolfo Gómez García
544fb21a01 small tunnel fixes 2022-12-20 15:04:26 +01:00
Adolfo Gómez García
4da813e65f more Small tunnel fixes 2022-12-20 15:04:06 +01:00
Adolfo Gómez García
159aa3c6ec fixed uds tunnel args 2022-12-19 18:02:38 +01:00
Adolfo Gómez García
46c3ef337a fixed tunnel server args 2022-12-19 18:02:21 +01:00
Adolfo Gómez García
8cc17464c3 removed -r parameter 2022-12-19 14:26:29 +01:00
Adolfo Gómez García
ab5a4e36bc Merge remote-tracking branch 'origin/v3.6' 2022-12-19 14:25:32 +01:00
Adolfo Gómez García
52773afd2f removed -r from udstunnel 2022-12-19 14:25:22 +01:00
Adolfo Gómez García
adeb6b2a46 updates from 4.0 backported 2022-12-19 01:25:29 +01:00
Adolfo Gómez García
6fb89f2b47 fixed tunnel 2022-12-19 01:15:47 +01:00
Adolfo Gómez García
49dddbfce7 Added full tunnel test 2022-12-18 22:16:40 +01:00
Adolfo Gómez García
0f5f3df3f0 improved tunnel server and tunnel server tests 2022-12-18 03:42:19 +01:00
Adolfo Gómez García
370799912f Added test to udstunnel man async proc 2022-12-17 21:03:00 +01:00
Adolfo Gómez García
9f4159f18d adding full server tests 2022-12-17 14:32:18 +01:00
Adolfo Gómez García
63d51c530b Updating tests for tunnel 2022-12-17 00:45:21 +01:00
Adolfo Gómez García
081dfc9995 added basic structure for testing tunnel server and some tests 2022-12-16 17:57:57 +01:00
Adolfo Gómez García
406f32c2fa Merge remote-tracking branch 'origin/v3.6' 2022-12-16 12:52:34 +01:00
Adolfo Gómez García
b7962a24f1 updated translations 2022-12-16 12:52:21 +01:00
Adolfo Gómez García
0f79d45b23 Merge remote-tracking branch 'origin/v3.6' 2022-12-16 12:47:41 +01:00
Adolfo Gómez García
94cab0c204 fixed Enforced misspeling :) 2022-12-16 12:47:21 +01:00
Adolfo Gómez García
33ed68b2d0 minor refactor and fixed mock test 2022-12-14 23:34:56 +01:00
Adolfo Gómez García
651cb5802e Merge remote-tracking branch 'origin/v3.6' 2022-12-14 16:45:52 +01:00
Adolfo Gómez García
fa3e6cb5a2 backport of 4.0 improvements 2022-12-14 16:25:57 +01:00
Adolfo Gómez García
a1782aa626 improving tunnel server 2022-12-14 16:24:31 +01:00
Adolfo Gómez García
36fca66c9a Adding tests and improving tunnel server 2022-12-14 16:09:33 +01:00
Adolfo Gómez García
f12ce12155 Adding "getParam" helper to handler, and small ticket fixes 2022-12-14 14:13:07 +01:00
Adolfo Gómez García
5ffc0bda06 More refactoring using match (simplifies reading code) 2022-12-14 01:38:22 +01:00
Adolfo Gómez García
d7f2571c0c refactoring using "match" 2022-12-14 01:24:22 +01:00
Adolfo Gómez García
e0cce7f48c Fixed IP on case of ipv6 request to match ipv4
refactorized REST clienmt API
2022-12-13 18:45:39 +01:00
Adolfo Gómez García
5c8afb4d0d Adder utility "matcher" to understand better arguments on rest calls 2022-12-13 16:52:33 +01:00
Adolfo Gómez García
57d2c40947 More on permissions refactor 2022-12-13 15:44:09 +01:00
Adolfo Gómez García
c0c3e7af13 Merge remote-tracking branch 'origin/v3.6' 2022-12-13 15:04:08 +01:00
Adolfo Gómez García
2a9900d2eb Fixed empty label not being saved on re match enforcement :) 2022-12-13 15:03:29 +01:00
Adolfo Gómez García
483b3c6ce7 More refactorization of object type and permissions 2022-12-13 14:37:57 +01:00
Adolfo Gómez García
42d22bd6b7 Merge remote-tracking branch 'origin/v3.6' 2022-12-13 14:09:51 +01:00
Adolfo Gómez García
ccf75e7104 enforced label to be same as url pattern chars 2022-12-13 14:09:17 +01:00
Adolfo Gómez García
735aacaade Merge remote-tracking branch 'origin/v3.6' 2022-12-13 13:43:48 +01:00
Adolfo Gómez García
c208814dd0 fixed label and autenticator labels to replace spaces by underscores 2022-12-13 13:43:08 +01:00
Adolfo Gómez García
5122d7eafb Merge remote-tracking branch 'origin/v3.6' 2022-12-13 13:16:22 +01:00
Adolfo Gómez García
6081122311 Fixed meta pool transport priority 2022-12-13 13:15:57 +01:00
Adolfo Gómez García
3d421ac38c Fixed transport priority on meta pools 2022-12-13 13:13:45 +01:00
Adolfo Gómez García
84c7836e8c Refactirizing permissions and objtype 2022-12-13 12:48:40 +01:00
Adolfo Gómez García
e37a3cef2e Merge remote-tracking branch 'origin/v3.6' 2022-12-12 14:24:17 +01:00
Adolfo Gómez García
d22f606f49 Added calendars new colums with rules, pools with access and pools with rules 2022-12-12 14:23:55 +01:00
Adolfo Gómez García
97d34ed827 Refactorized "modern" view module to main
Removed saving "os" to session (not needed)
2022-12-11 19:57:01 +01:00
Adolfo Gómez García
2fed4a5df4 Refactorized os detection & related 2022-12-11 16:29:40 +01:00
Adolfo Gómez García
1335b1c1c7 Merge remote-tracking branch 'origin/v3.6' 2022-12-11 13:02:12 +01:00
Adolfo Gómez García
859f09aa0b Backport of 4.0 crypto manager
For enhacements on user password hashing
2022-12-11 13:01:53 +01:00
Adolfo Gómez García
a2dce46e38 Improved internal db user password storage with salt 2022-12-11 03:33:55 +01:00
Adolfo Gómez García
a1c46a884b Security enhacements for login failures delays 2022-12-11 02:53:07 +01:00
Adolfo Gómez García
ca2227490e Added new serization method to user interface
Now it's more flexible and secure. It's compatible reading old data
2022-12-11 00:30:10 +01:00
Adolfo Gómez García
0e94fae1bf Replaced user interface
User interface serialization methods has been improved to:
* Allow versioning
* Posibility of change default serializer
* Now serializes to "safe yaml" instead of pickle
2022-12-11 00:20:57 +01:00
Adolfo Gómez García
0fb6b2a02d Advancing on new form serialization 2022-12-10 22:34:09 +01:00
Adolfo Gómez García
b4504a2b46 Some minor bandit complains fixed 2022-12-10 22:07:31 +01:00
Adolfo Gómez García
4e863fd282 Merge remote-tracking branch 'origin/v3.6' 2022-12-10 21:52:51 +01:00
Adolfo Gómez García
dba2526ffb Backported 4.0 tunnel server 2022-12-10 21:45:07 +01:00
Adolfo Gómez García
f6e90d54fe Adding tunnel server tests and some minor fixes 2022-12-10 02:00:02 +01:00
Adolfo Gómez García
4d38b61abc Added tests for UDS middlewares 2022-12-09 02:58:17 +01:00
Adolfo Gómez García
e292e726d3 Async fixes
Async client for UDS tests included
refactorized UDS middelwares to be sync and async
2022-12-08 14:44:47 +01:00
Adolfo Gómez García
e325653019 refactoring middleware as sync_and_async 2022-12-08 06:03:36 +01:00
Adolfo Gómez García
2cc7cacb92 adding utility method to conver to lists 2022-12-08 05:38:49 +01:00
Adolfo Gómez García
6d9e683b20 Small fix 2022-12-07 21:41:02 +01:00
Adolfo Gómez García
b19bf1a6e0 Refectoring Tunnel server 2022-12-07 21:40:17 +01:00
Adolfo Gómez García
8ace6e946b Updated to use uvloop if possible, and some fixes 2022-12-07 21:14:30 +01:00
Adolfo Gómez García
ffe2e33fa0 added uvloop support 2022-12-07 20:08:27 +01:00
Adolfo Gómez García
a7f853925a Merge remote-tracking branch 'origin/v3.6' 2022-12-06 20:05:36 +01:00
Adolfo Gómez García
d17dae8bdd Changed to thread_time to better calc 2022-12-06 20:05:20 +01:00
Adolfo Gómez García
9af6b91ed0 Merge remote-tracking branch 'origin/v3.6' 2022-12-06 20:02:03 +01:00
Adolfo Gómez García
c6b9817749 changed timeit.default_counter for time.perf_counter_ns 2022-12-06 20:00:08 +01:00
Adolfo Gómez García
b036c4627e merged decorators 2022-12-06 19:19:25 +01:00
Adolfo Gómez García
b34f09e58e updated cache decorator & added stats 2022-12-06 16:30:45 +01:00
Adolfo Gómez García
a1fb0bead7 Fixed decorator merge 2022-12-06 09:59:16 +01:00
Adolfo Gómez García
053fcfd3e3 updated cache decorators 2022-12-06 09:43:33 +01:00
Adolfo Gómez García
6f9976b159 Merge remote-tracking branch 'origin/v3.6' 2022-12-01 02:09:35 +01:00
Adolfo Gómez García
36e3c7eea9 added sample to SMS MFA on comments 2022-12-01 02:09:22 +01:00
Adolfo Gómez García
9bdfe639ac Several fixes:
* Adding full support for IPv6
* Expanding fields to adapt to new possible ips
* Fixing migrations & audit list to adapt to new kind of ips
2022-11-30 19:58:26 +01:00
Adolfo Gómez García
e80bad1f0c Fixing up things for ipv6 support 2022-11-30 19:06:23 +01:00
Adolfo Gómez García
0a41db6b53 Added tests for ipv6 networks 2022-11-30 18:30:45 +01:00
Adolfo Gómez García
d1e4f4d222 Adding net model tests 2022-11-30 02:58:05 +01:00
Adolfo Gómez García
43a1aee28c reverted bookworm change, too early to use it already :) 2022-11-29 19:37:27 +01:00
Adolfo Gómez García
0045e648bb Upgraded appimage building against bookworm debian 2022-11-29 18:58:39 +01:00
Adolfo Gómez García
03451b7a4f Merge remote-tracking branch 'origin/v3.6' 2022-11-29 13:44:54 +01:00
Adolfo Gómez García
61383fd385 Merge remote-tracking branch 'origin/v3.5' 2022-11-29 13:44:39 +01:00
Adolfo Gómez García
6772455111 fixed recipe to remove update info (non existing) and adding a signature to it 2022-11-29 13:44:10 +01:00
Adolfo Gómez García
5437e4ac7a Merge remote-tracking branch 'origin/v3.6' 2022-11-29 13:29:19 +01:00
Adolfo Gómez García
b69efb5426 fixed build process for clients with new app image builder (1.1.0) 2022-11-29 13:28:02 +01:00
Adolfo Gómez García
89e1c2eac5 fixing up network & more to support ipv6 2022-11-29 04:45:27 +01:00
Adolfo Gómez García
5c4141f9a2 more usefull info for debugging 2022-11-23 18:26:14 +01:00
Adolfo Gómez García
659013db56 Merge remote-tracking branch 'origin/v3.6' 2022-11-23 17:05:11 +01:00
Adolfo Gómez García
d8e8ddd1bb added logging environment variables if debug level is DEBUG 2022-11-23 17:05:02 +01:00
Adolfo Gómez García
2c34df7c71 fixed stats counters accum 2022-11-23 17:03:15 +01:00
Adolfo Gómez García
3ec78bc55c Merge remote-tracking branch 'origin/v3.6' 2022-11-23 16:38:08 +01:00
Adolfo Gómez García
c8770e5f4f updated translations 2022-11-23 16:37:43 +01:00
Adolfo Gómez García
aa07fd4482 done stats accumulator test 2022-11-15 20:10:38 +01:00
Adolfo Gómez García
4be989dd17 Merge remote-tracking branch 'origin/v3.6' 2022-11-15 19:44:10 +01:00
Adolfo Gómez García
bb0cb0012d fixed stats counters accum for days 2022-11-15 19:44:02 +01:00
Adolfo Gómez García
f2e3a2468a Fixed stats counters weekly 2022-11-15 19:43:47 +01:00
Adolfo Gómez García
2311422c2d Merge remote-tracking branch 'origin/v3.6' 2022-11-15 15:00:54 +01:00
Adolfo Gómez García
106c28cb34 removed table conversion to avoid problems with galera cluster 2022-11-15 15:00:36 +01:00
Adolfo Gómez García
ccb7b3603f Merge remote-tracking branch 'origin/v3.6' 2022-11-15 14:35:46 +01:00
Adolfo Gómez García
2165798408 updated translations 2022-11-15 14:35:30 +01:00
Adolfo Gómez García
9192f5e1ab Merge remote-tracking branch 'origin/v3.6' 2022-11-15 14:21:47 +01:00
Adolfo Gómez García
271351b3d6 updated translations 2022-11-15 14:21:36 +01:00
Adolfo Gómez García
45c1b70698 finished merging 2022-11-15 14:15:51 +01:00
Adolfo Gómez García
d0d6892858 removed a couple invalid imports 2022-11-15 14:08:51 +01:00
Adolfo Gómez García
8b4a5e540a Merge remote-tracking branch 'origin/v3.6' 2022-11-15 14:05:25 +01:00
Adolfo Gómez García
80e53615c5 added custom parameters for rdp client 2022-11-15 14:01:04 +01:00
Adolfo Gómez García
c7924e29f3 Merge remote-tracking branch 'origin/v3.6' 2022-11-15 13:36:58 +01:00
Adolfo Gómez García
899156843e removing convert InnoDB stats table to MyIsam (will broke Galera compat) 2022-11-15 13:35:52 +01:00
Adolfo Gómez García
81ef875f72 Merge remote-tracking branch 'origin/v3.6' 2022-11-14 14:12:04 +01:00
Adolfo Gómez García
139ca448ff Adding support for acummulated stats counters 2022-11-14 14:11:57 +01:00
Adolfo Gómez García
2b917839c7 fixed stats_counters query 2022-11-14 14:11:00 +01:00
Adolfo Gómez García
adec02dc3f fixed stats_counters on system 2022-11-13 03:46:30 +01:00
Adolfo Gómez García
31e8e5f0af adding REST system tests 2022-11-13 01:15:27 +01:00
Adolfo Gómez García
8d6f319489 Fixed more the tests, and reverted a refactoring error 2022-11-12 22:02:43 +01:00
Adolfo Gómez García
9ca30b5c30 Adding autoserializable and fixing up some tests 2022-11-12 21:47:48 +01:00
Adolfo Gómez García
57013ed1e1 Merge remote-tracking branch 'origin/v3.6' 2022-11-10 14:05:41 +01:00
Adolfo Gómez García
d96a639a3d added dependency "xset" for rpm and fixed exceptions when some programs were not found 2022-11-10 14:02:40 +01:00
Adolfo Gómez García
2f0fd0f083 Merge remote-tracking branch 'origin/v3.6' 2022-11-09 23:03:13 +01:00
Adolfo Gómez García
721d32c972 Fixing up stats counters accumulators 2022-11-09 23:02:41 +01:00
Adolfo Gómez García
4bf76143f2 Fixing up stats. Removed "zeros" from DB 2022-11-09 23:01:17 +01:00
Adolfo Gómez García
1cf2e2cd76 Adding stats counter acummulators 2022-11-09 21:48:38 +01:00
Adolfo Gómez García
e98483aa90 adding stats acummulator 2022-11-09 21:44:27 +01:00
Adolfo Gómez García
7799dcd58e Adding stats accumulator 2022-11-09 21:43:19 +01:00
Adolfo Gómez García
8d0a3a7405 Merge remote-tracking branch 'origin/v3.6' 2022-11-02 21:58:04 +01:00
Adolfo Gómez García
40364cdcce Renamed Interval type 2022-11-02 21:57:54 +01:00
Adolfo Gómez García
35640260f5 Merge remote-tracking branch 'origin/v3.6' 2022-11-02 21:45:43 +01:00
Adolfo Gómez García
54663e756d Merge remote-tracking branch 'origin/v3.6' 2022-11-02 21:45:32 +01:00
Adolfo Gómez García
39fd5dbf3f set stats_counters get_grouped to interval None by default 2022-11-02 21:45:15 +01:00
Adolfo Gómez García
396e0f0c38 updated stats_counters db to include interval_type for values 2022-11-02 21:38:01 +01:00
Adolfo Gómez García
fc6224dada Enhacements to stats counters 2022-11-02 19:47:31 +01:00
Adolfo Gómez García
ab564b77de Merge remote-tracking branch 'origin/v3.6' 2022-11-02 19:21:09 +01:00
Adolfo Gómez García
1d8d1fe2c9 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-11-02 19:20:50 +01:00
Adolfo Gómez García
d43edf2fba Fixed manage.py 2022-11-02 18:54:51 +01:00
Adolfo Gómez García
d2cae41ece Merge remote-tracking branch 'origin/v3.6' 2022-11-02 18:54:39 +01:00
Adolfo Gómez García
0923a3fbca removed nonsense indexes from stats 2022-11-02 18:53:41 +01:00
Adolfo Gómez García
43458cbf99 Reduced stats 2022-11-02 15:02:05 +01:00
Adolfo Gómez García
a068838e0e removec cProfile from manage.py 2022-11-02 02:58:54 +01:00
Adolfo Gómez García
7853f6b9b1 Merge remote-tracking branch 'origin/v3.6' 2022-11-02 02:57:38 +01:00
Adolfo Gómez García
65614d68a7 fixing up reports 2022-11-02 02:57:22 +01:00
Adolfo Gómez García
114247e407 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-11-02 02:57:00 +01:00
Adolfo Gómez García
ec2645b0a2 fixed stats_counters 2022-11-02 02:56:47 +01:00
Adolfo Gómez García
c07c21b6a9 updating user interface manager 2022-10-31 20:53:30 +01:00
Adolfo Gómez García
937240a9fc Refactoring Authenticators related and minor type checking fixes 2022-10-31 19:24:14 +01:00
Adolfo Gómez García
0cf33501b6 some minor test fixes 2022-10-31 14:10:10 +01:00
Adolfo Gómez García
15576fdc22 Updating user interface and making tests 2022-10-31 01:47:55 +01:00
Adolfo Gómez García
adb4b5326a Adding user interface tests and refactoring user interface 2022-10-30 23:14:13 +01:00
Adolfo Gómez García
284508632c Merge remote-tracking branch 'origin/v3.6' 2022-10-28 14:44:34 +02:00
Adolfo Gómez García
dd08257fb9 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-10-28 14:42:35 +02:00
Adolfo Gómez García
9d0df6cfae small fix for client detecti 2022-10-28 14:42:09 +02:00
Adolfo Gómez García
71a0a228fb merged backport of uds password encription 2022-10-27 14:55:43 +02:00
Adolfo Gómez García
910094065e Merge remote-tracking branch 'origin/v3.6' 2022-10-27 14:47:03 +02:00
Adolfo Gómez García
7bd0d571e6 increased security by encrypting with own key, different on each instalation 2022-10-27 14:46:34 +02:00
Adolfo Gómez García
ab6c55ec58 Merge remote-tracking branch 'origin/v3.6' 2022-10-26 18:33:26 +02:00
Adolfo Gómez García
ad269b3c28 added initial export command for relevant UDS entities 2022-10-26 18:32:52 +02:00
Adolfo Gómez García
00ae824baf Merge remote-tracking branch 'origin/v3.6' 2022-10-26 16:40:46 +02:00
Adolfo Gómez García
f3dd5753a3 fixed mfa_data name on db 2022-10-26 16:40:04 +02:00
Adolfo Gómez García
c4fcf7c57e Merge remote-tracking branch 'origin/v3.6' 2022-10-21 00:56:54 +02:00
Adolfo Gómez García
13336b966e updating delayed task 2022-10-21 00:56:12 +02:00
Adolfo Gómez García
7a64235440 Merge remote-tracking branch 'origin/v3.6' 2022-10-19 15:15:46 +02:00
Adolfo Gómez García
a76989d885 fixed not opening html5 2022-10-19 15:14:52 +02:00
Adolfo Gómez García
6b712d59a3 Merge remote-tracking branch 'origin/v3.6' 2022-10-19 14:20:18 +02:00
Adolfo Gómez García
5f0e5a5dfe Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-10-19 14:19:46 +02:00
Adolfo Gómez García
cfbce5aef5 fixed caching calendars 2022-10-19 14:19:30 +02:00
Adolfo Gómez García
92960d47ed fixing merge issues 2022-10-18 20:47:26 +02:00
Adolfo Gómez García
8648fc605d small rdp fix for bandit 2022-10-17 18:21:32 +02:00
Adolfo Gómez García
6a71a505b3 Merge remote-tracking branch 'origin/v3.6' 2022-10-17 16:05:05 +02:00
Adolfo Gómez García
d2cb4356f0 Added user interface default value 2022-10-17 13:51:35 +02:00
Adolfo Gómez García
4153fa0fd9 fixes after merge 3.6 2022-10-16 18:54:24 +02:00
Adolfo Gómez García
daf4bbcc37 Merge remote-tracking branch 'origin/v3.6' 2022-10-16 18:47:51 +02:00
Adolfo Gómez García
4f4f1f24fd fixes for transports 2022-10-16 18:46:56 +02:00
Adolfo Gómez García
ffde47af94 Merge remote-tracking branch 'origin/v3.6' 2022-10-14 19:52:11 +02:00
Adolfo Gómez García
65d38d8722 updated translations 2022-10-14 19:51:58 +02:00
Adolfo Gómez García
db5a08b0c7 Merge remote-tracking branch 'origin/v3.6' 2022-10-14 19:51:53 +02:00
Adolfo Gómez García
2b767e6bf9 small transport fix¡ 2022-10-14 19:51:43 +02:00
Adolfo Gómez García
b16cea984c Updated mfa string 2022-10-14 19:07:41 +02:00
Adolfo Gómez García
7769351d42 adding spice support for proxmox 2022-10-14 02:07:12 +02:00
Adolfo Gómez García
c2c5bc8aa1 Merged and fixed 2022-10-14 00:47:37 +02:00
Adolfo Gómez García
bf635a5e9a small html fixes 2022-10-14 00:28:18 +02:00
Adolfo Gómez García
ae2ffccbc3 Added ask credentials dialog 2022-10-13 20:02:02 +02:00
Adolfo Gómez García
a005bf1ca0 fixed incorrect import 2022-10-13 15:05:32 +02:00
Adolfo Gómez García
013558eb77 Merge remote-tracking branch 'origin/v3.6' 2022-10-13 14:50:04 +02:00
Adolfo Gómez García
4de443395d Updated translations 2022-10-13 14:49:38 +02:00
Adolfo Gómez García
9f2bc5417f Fixed choiceField bug & MFA table 2022-10-13 14:47:37 +02:00
Adolfo Gómez García
9deb2dcd74 fixing up actor things 2022-10-13 00:04:26 +02:00
Adolfo Gómez García
2908b99435 Merge remote-tracking branch 'origin/v3.6' 2022-10-05 23:56:54 +02:00
Adolfo Gómez García
c6d1bf450c Fixed choicefield generator for strings (was generating "name" instead of "text") 2022-10-05 23:52:28 +02:00
Adolfo Gómez García
26d26315ac Merge remote-tracking branch 'origin/v3.6' 2022-10-05 23:06:23 +02:00
Adolfo Gómez García
cf21936f41 Added report for audit log for administration 2022-10-05 23:05:36 +02:00
Adolfo Gómez García
bcf185d54a Merge remote-tracking branch 'origin/v3.6' 2022-10-05 19:36:09 +02:00
Adolfo Gómez García
5d9c8ee53f better audit log 2022-10-05 19:35:45 +02:00
Adolfo Gómez García
e1acdf1c85 Merge remote-tracking branch 'origin/v3.6' 2022-10-05 19:16:53 +02:00
Adolfo Gómez García
7d3bfb5d3b replaced "-" with ":" for checking if a save field is optional so we can provide the default value" 2022-10-05 19:16:30 +02:00
Adolfo Gómez García
186bbb11e3 Merge remote-tracking branch 'origin/v3.6' 2022-10-05 18:08:05 +02:00
Adolfo Gómez García
b474e63924 updated translations 2022-10-05 18:06:48 +02:00
Adolfo Gómez García
09bbc7f22b Merge remote-tracking branch 'origin/v3.6' 2022-10-05 17:58:15 +02:00
Adolfo Gómez García
d48747abff Added administration audit and fixed some translations 2022-10-05 17:54:07 +02:00
Adolfo Gómez García
57f2c35af0 Several Fixes:
* Upgraded typing information on models
* Removed unused DBFile
* renamed osmanager.png wrong name
2022-10-01 06:45:41 +02:00
Adolfo Gómez García
8c40320b64 Merge remote-tracking branch 'origin/v3.6' 2022-09-29 16:32:56 +02:00
Adolfo Gómez García
8b3ad295cc Added MAC controled by uds for proxmox 2022-09-28 15:33:54 +02:00
Adolfo Gómez García
c03c479a14 Merge remote-tracking branch 'origin/v3.6' 2022-09-19 14:24:54 +02:00
Adolfo Gómez García
aa677353ad fixed tree command 2022-09-19 14:23:44 +02:00
Adolfo Gómez García
9c6c4078b1 Fixed showConfig 2022-09-19 14:04:53 +02:00
Adolfo Gómez García
22cee394ee Merge remote-tracking branch 'origin/v3.6' 2022-09-18 15:09:47 +02:00
Adolfo Gómez García
9fba2b45ad Added "ERROR" user services on report with log 2022-09-18 15:09:17 +02:00
Adolfo Gómez García
8f4f6bc5cb Merge remote-tracking branch 'origin/v3.6' 2022-09-17 00:14:59 +02:00
Adolfo Gómez García
71582fc415 fixed tree yaml generation 2022-09-16 23:27:12 +02:00
Adolfo Gómez García
0d1d38c18a added showconfig in yaml 2022-09-16 22:34:40 +02:00
Adolfo Gómez García
4ec8841a57 added tree command to allow an full overview of uds data 2022-09-16 18:45:37 +02:00
Adolfo Gómez García
2ecab27b16 Merge remote-tracking branch 'origin/v3.6' 2022-09-16 02:05:23 +02:00
Adolfo Gómez García
8c6390733c added showconfig command 2022-09-16 00:53:56 +02:00
Adolfo Gómez García
ade53fc893 Merge remote-tracking branch 'origin/v3.6' 2022-09-15 14:06:44 +02:00
Adolfo Gómez García
98f56ee58b restored deleted line by mistake on auth 2022-09-15 13:06:13 +02:00
Adolfo Gómez García
1c01c35a87 Renamed config value 2022-09-14 12:09:06 +02:00
Adolfo Gómez García
673d1b6813 Added "Ultimate Security". When enabled, UDS will not cache encrypted credentials on server, so no credential can be redirected 2022-09-13 16:14:54 +02:00
Adolfo Gómez García
1ba12bb82d Updated translations 2022-09-12 15:04:33 +02:00
Adolfo Gómez García
c6dfd3f362 Refactorizing gui variables - types 2022-09-12 14:41:15 +02:00
Adolfo Gómez García
f7888468c0 Refactorizing gui variables 2022-09-12 14:21:55 +02:00
Adolfo Gómez García
ce8bb30cf1 Merge remote-tracking branch 'origin/v3.6' 2022-09-12 12:40:16 +02:00
Adolfo Gómez García
f90f108869 Fixed UserInterface new guiField acceptance of values 2022-09-12 12:37:21 +02:00
Adolfo Gómez García
115d8562e1 Refactorized groups manager and fixed ipInNetwork
Signed-off-by: Adolfo Gómez García <dkmaster@dkmon.com>
2022-09-09 02:13:20 +02:00
Adolfo Gómez García
f6607d0416 Merged allow users remove from 3.6 2022-09-08 12:21:00 +02:00
Adolfo Gómez García
411bddd79d Merge remote-tracking branch 'origin/v3.6' 2022-09-08 12:20:35 +02:00
Adolfo Gómez García
88c3f9077b small cosmetic fix 2022-09-08 12:20:21 +02:00
Adolfo Gómez García
bd13a39845 erge remote-tracking branch 'origin/v3.6' 2022-09-08 12:16:03 +02:00
Adolfo Gómez García
2a01df542d Added "allow reset" and "allow release" to metapool. Automatically enabled is ALL member pools allows. 2022-09-08 12:15:18 +02:00
Adolfo Gómez García
c976536b5f added a new test and small fixes 2022-09-06 15:25:05 +02:00
Adolfo Gómez García
0721c833fb Fixed settings and security (changed order for security middleware to be after globalrequest to fill ips 2022-09-05 15:00:37 +02:00
Adolfo Gómez García
7b877e3aea Merge remote-tracking branch 'origin/v3.6' 2022-09-05 12:53:50 +02:00
Adolfo Gómez García
2733444355 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-09-05 12:53:31 +02:00
Adolfo Gómez García
cf6820aa2b Fixed security 2022-09-05 12:48:54 +02:00
Adolfo Gómez García
62f9f8f676 Merge remote-tracking branch 'origin/v3.6' 2022-09-02 16:47:40 +02:00
Adolfo Gómez García
6692e5ce6d Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-09-02 16:45:25 +02:00
Adolfo Gómez García
1a85f60f4f Fixed "Database error" from OpenGnsys to include some more helpfull information 2022-09-02 16:45:11 +02:00
Adolfo Gómez García
2d6f55ef0b more tests and added a few exludes to coverage 2022-09-01 16:14:20 +02:00
Adolfo Gómez García
42b3826115 Added context to coverage and added first model test 2022-09-01 14:39:30 +02:00
Adolfo Gómez García
cb722c5e89 adding "build" to actor 2022-09-01 10:28:02 +02:00
Adolfo Gómez García
32b35c9651 fixed tests 2022-08-31 15:24:08 +02:00
Adolfo Gómez García
e33ea33797 Merge remote-tracking branch 'origin/v3.6' 2022-08-31 15:22:36 +02:00
Adolfo Gómez García
38b3318704 updated translations 2022-08-31 15:22:15 +02:00
Adolfo Gómez García
ccec281e0d Fixed text of maxServices 2022-08-31 15:09:55 +02:00
Adolfo Gómez García
4611c35b0d Merge remote-tracking branch 'origin/v3.6' 2022-08-31 13:54:55 +02:00
Adolfo Gómez García
8473b80978 fixed maxDeployed beinf overwriten 2022-08-31 13:52:45 +02:00
Adolfo Gómez García
230187d9ee small fix on service unmarshall 2022-08-31 13:52:11 +02:00
Adolfo Gómez García
c06c3df327 Merge remote-tracking branch 'origin/v3.6' 2022-08-31 12:52:37 +02:00
Adolfo Gómez García
092bb83001 Added "maxServices" to OpenGnsys to limit number of possible services provided by a single UDS Service 2022-08-31 12:45:33 +02:00
Adolfo Gómez García
5c6303fec0 Added more tests
* Fixed pytest to not look for classes
* Added 'destroy_after' property to user service for convenience
* Small cosmetic fixes
2022-08-31 00:10:57 +02:00
Adolfo Gómez García
b05c5b1396 Merge remote-tracking branch 'origin/v3.6' 2022-08-30 21:53:42 +02:00
Adolfo Gómez García
ac62aed420 upgrading cache updater to take into account maxDeployed to stop creating cache services 2022-08-30 21:53:03 +02:00
Adolfo Gómez García
8b540c350a Added more tests and a couple of cosmetic fixes 2022-08-30 17:40:29 +02:00
Adolfo Gómez García
db12077304 Adding more tests and fixes 2022-08-29 15:21:12 +02:00
Adolfo Gómez García
70488199b9 Merge remote-tracking branch 'origin/v3.6' 2022-08-29 15:20:50 +02:00
Adolfo Gómez García
3bdf4c18ad Fixed detecting canceling hanged 2022-08-29 15:20:43 +02:00
Adolfo Gómez García
e16be78ad5 Fixed remove or cancel detecting "hanged" canceling operations 2022-08-29 15:20:09 +02:00
Adolfo Gómez García
09c5cc2f43 Merge remote-tracking branch 'origin/v3.6' 2022-08-28 19:59:20 +02:00
Adolfo Gómez García
28319b216f updated compat level to 10 2022-08-28 19:23:04 +02:00
Adolfo Gómez García
07e6c3d0a8 unique ids testing 2022-08-28 13:41:57 +02:00
Adolfo Gómez García
96abb71d9c more tests 2022-08-28 13:23:04 +02:00
Adolfo Gómez García
7de259af87 adding more tests 2022-08-28 01:31:09 +02:00
Adolfo Gómez
1567996ebc Delete LICENSE.txt 2022-08-27 20:59:25 +02:00
Adolfo Gómez
4edb3b3f0c Create LICENSE 2022-08-27 20:59:08 +02:00
Adolfo Gómez García
07987504c3 added LICENSE.txt 2022-08-27 20:57:12 +02:00
Adolfo Gómez García
5f93b68c25 Modified transport to adapt for accept future client scripts in more langs 2022-08-27 19:09:12 +02:00
Adolfo Gómez García
d0e9c96573 Added new test and make pytests use parallel execution of tests using pytest-xdist 2022-08-25 22:28:57 +02:00
Adolfo Gómez García
a52ad44ef1 added basic web test and download testing 2022-08-25 17:55:51 +02:00
Adolfo Gómez García
69b778c922 Adding more tests and fixes 2022-08-24 22:16:47 +02:00
Adolfo Gómez García
5f12c2e7b3 Merge remote-tracking branch 'origin/v3.6' 2022-08-24 11:09:54 +02:00
Adolfo Gómez García
1a4a41a6b9 fixed logout building absolute url 2022-08-24 11:09:20 +02:00
Adolfo Gómez García
739b0c7f81 fixed logout absolute url building on logout 2022-08-24 11:08:56 +02:00
Adolfo Gómez García
78c7039c54 Merge remote-tracking branch 'origin/v3.6' 2022-08-23 15:23:25 +02:00
Adolfo Gómez García
e5e8ad5fbd Adding radius challenge MFA provided by Daniel Torregrosa (Thanks!) 2022-08-23 15:22:48 +02:00
Adolfo Gómez García
21d2a6fb27 Done actor initialize tests and fixed actor v3 initialization 2022-08-22 15:46:15 +02:00
Adolfo Gómez García
fa3e30c518 fixing tests 2022-08-21 19:37:32 +02:00
Adolfo Gómez García
c6be2562ee added test for initialize for managed machines 2022-08-21 14:23:03 +02:00
Adolfo Gómez García
4c19247a2c Adding more actor tests 2022-08-20 18:40:05 +02:00
Adolfo Gómez García
a6b502e0ba more fixes 2022-08-19 21:09:45 +02:00
Adolfo Gómez García
b12730d160 more test prepartion and fixes 2022-08-19 20:20:29 +02:00
Adolfo Gómez García
07031850e5 Advancing on tests 2022-08-19 00:46:38 +02:00
Adolfo Gómez García
a42857038c Fixes on migrations & finishing supporting test methods 2022-08-19 00:13:45 +02:00
Adolfo Gómez García
d19969fce3 Fixed migration field names on squashed migration. ManyToManyFields where not renamed on empty tables, so i had to move "manually" the creation of the fields on squashed one. Not a big issue, but strange. 2022-08-19 00:13:01 +02:00
Adolfo Gómez García
195e13682c Adding xxhash as fast alternative for some hash calcs (as cache i.e.) 2022-08-18 20:05:43 +02:00
Adolfo Gómez García
95b9b79b02 Adding testing elements 2022-08-18 19:46:22 +02:00
Adolfo Gómez García
225fed3012 Merge remote-tracking branch 'origin/v3.6' 2022-08-18 13:56:46 +02:00
Adolfo Gómez García
86ebd7766e Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-18 13:56:32 +02:00
Adolfo Gómez García
83394f0d34 Fixed XEN/XCP-NG network moving on service 2022-08-18 13:56:07 +02:00
Adolfo Gómez García
d5eafb1179 Refactorized transport to adapt parameter typing 2022-08-17 23:42:33 +02:00
Adolfo Gómez García
11b56571d2 Removing old v2 actor rests. Not supported anymore 2022-08-17 20:26:51 +02:00
Adolfo Gómez García
18de1193b4 Updating tests and fied sample settings
- Fixed taskManager runner (added new parameters)
- refactoring and generating base rest testing
2022-08-17 20:15:32 +02:00
Adolfo Gómez García
d8164a9b4d Merge remote-tracking branch 'origin/v3.6' 2022-08-17 19:03:45 +02:00
Adolfo Gómez García
4f0ea76666 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-17 15:06:49 +02:00
Adolfo Gómez García
c34fc41f56 unmanaged fix 2022-08-17 14:55:33 +02:00
Adolfo Gómez García
18e9cab9ef fixed local log 2022-08-17 14:33:44 +02:00
Adolfo Gómez García
4d3aa1d17c Merge remote-tracking branch 'origin/v3.6' 2022-08-17 14:13:17 +02:00
Adolfo Gómez García
6053e34d1d Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-17 14:12:52 +02:00
Adolfo Gómez García
90aa455586 fixed unmanaged 2022-08-17 14:12:13 +02:00
Adolfo Gómez García
f274ae2fe3 fixed a bit the tests and tests tools 2022-08-16 21:40:46 +02:00
Adolfo Gómez García
195d2a1336 More request definition cleanups 2022-08-16 14:30:20 +02:00
Adolfo Gómez García
12846f9b1f Small XenApi Fixes, requests cleanup 2022-08-16 14:29:38 +02:00
Adolfo Gómez García
748d8d7464 Replaced session PickleSerializer with Json-bases serializer (custom one). More secure 2022-08-16 13:08:47 +02:00
Adolfo Gómez García
0ed1f3ccee Added coverage support on testing 2022-08-16 00:18:32 +02:00
Adolfo Gómez García
fe712d27b7 adding services fixtures 2022-08-16 00:10:48 +02:00
Adolfo Gómez García
c56666ed4b small test fixes 2022-08-15 23:34:52 +02:00
Adolfo Gómez García
01184582b3 Fixing up testing and make them usable from vscode sidebar 2022-08-15 23:31:23 +02:00
Adolfo Gómez García
76745e8624 Fixing up bandit recomendations & minor typo errors 2022-08-15 14:10:17 +02:00
Adolfo Gómez García
17b040d9b3 adding tests 2022-08-15 00:29:39 +02:00
Adolfo Gómez García
07e1c6214e Added Test Service 2022-08-14 23:36:22 +02:00
Adolfo Gómez García
de9bbfc896 removeing deprecated pyqt methods 2022-08-14 21:57:28 +02:00
Adolfo Gómez García
d84977dee0 Merge remote-tracking branch 'origin/v3.6' 2022-08-14 21:53:33 +02:00
Adolfo Gómez García
11041ff44f Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-14 21:52:40 +02:00
Adolfo Gómez García
bc2328a239 fixing up sqlite 2022-08-14 21:52:24 +02:00
Adolfo Gómez García
98826504d6 fixing up sqlite 2022-08-14 21:52:06 +02:00
Adolfo Gómez García
54ea57f330 added cache to checkIdle on macos 2022-08-12 22:49:19 +02:00
Adolfo Gómez García
cb4b2184a4 finishin operations for macos 2022-08-12 20:50:58 +02:00
Adolfo Gómez García
99fbb35512 Merge branch 'master' of github.com:dkmstr/openuds 2022-08-08 15:27:40 +02:00
Adolfo Gómez García
1374375ab9 Creating a couple of "test services" so we can make some automated tests 2022-08-08 15:27:30 +02:00
Adolfo Gómez García
909ef91181 Creating a couple of "test services" so we can make some automated tests 2022-08-08 15:27:11 +02:00
Adolfo Gómez García
01f9a1f9cd fixed for usersession 2022-08-07 13:32:07 +02:00
Adolfo Gómez García
78a3216b51 adding initial tracking of individial sessions on user services 2022-08-07 13:24:33 +02:00
Adolfo Gómez García
3a990e19a6 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-06 20:19:36 +02:00
Adolfo Gómez García
d9d3bc452c fixed login/logout 2022-08-06 20:19:23 +02:00
Adolfo Gómez García
e5c8b9c763 Merge remote-tracking branch 'origin/v3.6' 2022-08-06 19:30:31 +02:00
Adolfo Gómez García
e51e13b821 Merge remote-tracking branch 'origin/v3.6' 2022-08-06 19:30:01 +02:00
Adolfo Gómez García
8a150439ae Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-06 19:29:43 +02:00
Adolfo Gómez García
ec89a2cfa8 adding session id to uds actor 2022-08-06 19:23:51 +02:00
Adolfo Gómez García
08f14bff57 Fixing up unmanaged actor 2022-08-05 13:33:57 +02:00
Adolfo Gómez García
653bff420f Fixed logout notification 2022-08-05 13:19:47 +02:00
Adolfo Gómez García
73a3c89e04 Fixed logout notification 2022-08-05 13:05:52 +02:00
Adolfo Gómez García
e79753748e Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-08-04 21:56:39 +02:00
Adolfo Gómez García
adaabf9d83 Fixing up unmanaged actor 2022-08-04 21:37:33 +02:00
Adolfo Gómez García
0ed8bd6027 Merge branch 'master' of github.com:dkmstr/openuds 2022-08-04 15:55:52 +02:00
Adolfo Gómez García
ff25b4945a Started MacOS Unmanaged Support 2022-08-04 15:55:47 +02:00
Adolfo Gómez García
3a2a2a4669 Merge remote-tracking branch 'origin/v3.6' 2022-08-04 15:08:10 +02:00
Adolfo Gómez García
a8a9b24596 exit_url is now relative by default 2022-08-04 15:07:52 +02:00
Adolfo Gómez García
552ba3796b adding __slots__ to optimize a bit code 2022-08-02 15:26:30 +02:00
Adolfo Gómez García
a6c6bca2fd Merge remote-tracking branch 'origin/v3.6' 2022-08-01 14:39:34 +02:00
Adolfo Gómez García
f24c77f20a removed mic redirect on mac py default for xfreerdp (2.8 is "crashing"?) 2022-08-01 14:37:39 +02:00
Adolfo Gómez García
a3c27dbd72 minor fixes 2022-08-01 14:10:55 +02:00
Adolfo Gómez García
ec7cf91579 small fix to remove "remember_device" if not set 2022-07-29 17:06:49 +02:00
Adolfo Gómez García
d2fa5e38d0 small fix to remove "remember_device" if not set 2022-07-29 16:59:33 +02:00
Adolfo Gómez García
c98f8e31d5 Merge remote-tracking branch 'origin/v3.6' 2022-07-29 16:42:50 +02:00
Adolfo Gómez García
ada5374db5 fixed showing MFA on list 2022-07-29 16:42:24 +02:00
Adolfo Gómez García
301d68b1a2 fixed authenticators rest 2022-07-29 16:38:03 +02:00
Adolfo Gómez García
46b6bb2305 Fixes 2022-07-29 16:23:53 +02:00
Adolfo Gómez García
93ba05f6cb Fixes to MFAs 2022-07-29 16:20:14 +02:00
Adolfo Gómez García
e3976794d9 some minor refactors & used sys.intern as key for rest api 2022-07-28 13:22:02 +02:00
Adolfo Gómez García
94cf5582e2 Added RH-based unmanaged actor 2022-07-26 13:33:09 +02:00
Adolfo Gómez García
f10b370eff Added Calendar Actions to remove ALL cache items 2022-07-18 18:03:51 +02:00
Adolfo Gómez García
692c8601bf Merge remote-tracking branch 'origin/v3.6' 2022-07-15 10:27:02 +02:00
Adolfo Gómez García
afcfffbd29 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-07-15 10:26:47 +02:00
Adolfo Gómez García
3cfbdc86e0 Small cryptomanager typing fix 2022-07-15 10:26:02 +02:00
Adolfo Gómez García
063fa46899 Merge remote-tracking branch 'origin/v3.6' 2022-07-14 12:49:41 +02:00
Adolfo Gómez García
d1329849f3 Merge remote-tracking branch 'origin/v3.5' into v3.6 2022-07-14 12:49:29 +02:00
Adolfo Gómez García
ba759b3652 Fixed Proxmox MAC generation for internal DB (Case sensitive...) 2022-07-14 12:49:14 +02:00
Adolfo Gómez García
1e3478314b Reformating 2022-07-14 12:48:54 +02:00
Adolfo Gómez García
02aec9ebea Moved required client versio ton core __init__,py 2022-07-13 13:14:20 +02:00
Adolfo Gómez García
e33d63158a updated antular 2022-07-10 13:03:47 +02:00
Adolfo Gómez García
33258b0dcc Merge remote-tracking branch 'origin/v3.6' 2022-07-10 12:58:44 +02:00
Adolfo Gómez García
f5d2776478 Adde "custom html" support for MFA input code page 2022-07-06 17:41:09 +02:00
Adolfo Gómez García
0496117fc1 Fixing up mfa to include request on more methods 2022-07-06 14:34:42 +02:00
Adolfo Gómez García
b8e0dbf0c5 Merge remote-tracking branch 'origin/v3.6' 2022-07-06 13:24:41 +02:00
Adolfo Gómez García
89864b11c2 Fixed window upen 2022-07-06 13:20:10 +02:00
Adolfo Gómez García
fcdf599e18 Fixed HTML5 window opening & MFA 2022-07-06 13:17:35 +02:00
Adolfo Gómez García
05b6bebf36 bumping version to 3.6 2022-07-05 15:25:58 +02:00
Adolfo Gómez García
cdbc8d7ba1 bumping to v3.6 2022-07-05 15:20:44 +02:00
Adolfo Gómez García
072a722b09 Added udsactor-unamanged for rpm and bumped version to 3.6 2022-07-05 15:03:41 +02:00
Adolfo Gómez García
2d2e2d7b1f Upgrading version to next intermediary release 2022-07-05 14:52:17 +02:00
Adolfo Gómez García
1008bf988a upgraded migrations to adapt to MFA 2022-07-05 14:33:34 +02:00
Adolfo Gómez García
8ec815a75b Merge remote-tracking branch 'origin/v3.5-mfa' 2022-07-04 22:11:06 +02:00
Adolfo Gómez García
f4da75cea9 Adding MFA support to existing auths 2022-07-04 22:10:06 +02:00
Adolfo Gómez García
1c65722d24 added mfaData to admin 2022-07-04 21:29:41 +02:00
Adolfo Gómez García
2736390f95 Merge remote-tracking branch 'origin/v3.5-mfa' 2022-07-02 00:18:09 +02:00
Adolfo Gómez García
8783db925f fixed rest of MFA 2022-07-02 00:17:23 +02:00
Adolfo Gómez García
8b8bf7a321 Merge remote-tracking branch 'origin/v3.5-mfa' 2022-07-01 20:23:27 +02:00
Adolfo Gómez García
5e61871091 Added network to MFA and added initGui suppor for "providers" 2022-07-01 20:23:13 +02:00
Adolfo Gómez García
9a65d13890 test 2022-06-30 17:14:20 +02:00
Adolfo Gómez García
af2c01af66 fixing up merges from 3.5-mfa 2022-06-30 16:50:10 +02:00
Adolfo Gómez García
80b26446f6 translations 2022-06-30 16:45:13 +02:00
Adolfo Gómez García
a0ac50d9c2 small label fixes 2022-06-30 16:24:46 +02:00
Adolfo Gómez García
091a834074 Merge remote-tracking branch 'origin/v3.5-mfa' 2022-06-29 23:22:27 +02:00
Adolfo Gómez García
6094f55182 small MFA fixes for generic SMS 2022-06-29 23:17:52 +02:00
Adolfo Gómez García
11d9c77a79 Tested correct working of generic SMS sending using HTTP 2022-06-29 23:14:26 +02:00
Adolfo Gómez García
76e67b1f63 Fixing up MFA 2022-06-29 22:05:45 +02:00
Adolfo Gómez García
64fc61a2d6 Added generic SMS using HTTP server 2022-06-28 20:47:47 +02:00
Adolfo Gómez García
7b921ac161 Merge remote-tracking branch 'origin/v3.5-mfa' 2022-06-28 16:40:51 +02:00
Adolfo Gómez García
57b19757b9 fixed MFA 2022-06-28 16:40:35 +02:00
Adolfo Gómez García
0d281af982 merged 3.5-mfa till now 2022-06-28 16:38:25 +02:00
Adolfo Gómez García
365e2c56d3 Fixed mitration from MFA 2022-06-28 16:30:14 +02:00
Adolfo Gómez García
29fd2c068a Merge remote-tracking branch 'origin/v3.5-mfa' 2022-06-28 16:22:28 +02:00
Adolfo Gómez García
aec2f5b57f Added "not tested" generic SMS sending using an HTTP server 2022-06-28 14:50:39 +02:00
Adolfo Gómez García
4ba8bc9c5a Integrating mfa branch on 4.0. Initial changes. Work to do 2022-06-27 21:58:21 +02:00
Adolfo Gómez García
77e021a371 Fixed auth mfaIdentifier to provide userName 2022-06-27 21:30:59 +02:00
Adolfo Gómez García
2a25a8f70a removed nonsense comment copied from "sample" code used to create notifier 2022-06-24 16:53:59 +02:00
Adolfo Gómez García
b99a8de8c6 Added metadata config fields for SAML 2022-06-24 16:53:33 +02:00
Adolfo Gómez García
f922bbcd2e Removed legacy actors 2022-06-24 16:52:58 +02:00
Adolfo Gómez García
4db98684d3 refactorized 2022-06-24 13:27:45 +02:00
Adolfo Gómez García
a948d5eeb1 Added email MFA 2022-06-24 13:26:39 +02:00
Adolfo Gómez García
c7e6857492 If user has already been authorized, no mfa is allowed 2022-06-24 11:28:46 +02:00
Adolfo Gómez García
aaa4216862 Fixed MFA & Added remember me 2022-06-23 20:24:56 +02:00
Adolfo Gómez García
098396be87 Updared admin interface 2022-06-23 16:46:19 +02:00
Adolfo Gómez García
d02c693202 Fixed mfas rest path 2022-06-23 16:42:46 +02:00
Adolfo Gómez García
cb11a26fbe updated mfa icon 2022-06-23 16:23:27 +02:00
Adolfo Gómez García
43934d425f added timeout value 2022-06-23 15:56:14 +02:00
Adolfo Gómez García
5b499de983 Initial MFA done 2022-06-23 15:14:39 +02:00
Adolfo Gómez García
00d9f5759d Merge remote-tracking branch 'origin/v3.5' into v3.5-mfa 2022-06-23 14:05:25 +02:00
Adolfo Gómez García
a3bcedc38f Merge remote-tracking branch 'origin/v3.5' 2022-06-23 13:25:21 +02:00
Adolfo Gómez García
c6a40ac182 fixed global logout on federated auth 2022-06-23 12:51:41 +02:00
Adolfo Gómez García
7d9ffca559 Fixex internal db with sqlite 2022-06-23 12:23:22 +02:00
Adolfo Gómez García
ec02f63cac advancing on MFA implementation 2022-06-23 12:16:08 +02:00
Adolfo Gómez García
0de655d14f Adding MFA authorization page 2022-06-22 23:39:11 +02:00
Adolfo Gómez García
7ab6d439cb Fixed migration tree 2022-06-22 21:53:00 +02:00
Adolfo Gómez García
68e327847b Created migrations 2022-06-22 21:40:43 +02:00
Adolfo Gómez García
81ea07f0a0 Created migrations 2022-06-22 21:40:23 +02:00
Adolfo Gómez García
d7540c3305 Adding MFA 2022-06-22 17:04:18 +02:00
Adolfo Gómez García
2eff59908a Merge remote-tracking branch 'origin/v3.5' 2022-06-21 14:28:30 +02:00
Adolfo Gómez García
f43b9c7bfd Fixed small actor network card check and removed required of network for interface select 2022-06-20 19:42:36 +02:00
Adolfo Gómez García
a135e3ae9b Removed cache of SP metadata 2022-06-20 15:10:27 +02:00
Adolfo Gómez García
28db2f4e93 Added security options to SAML 2022-06-20 15:09:33 +02:00
Adolfo Gómez García
972c48ddee Merge branch 'v3.5' of github.com:dkmstr/openuds into v3.5 2022-06-17 22:27:37 +02:00
Adolfo Gómez García
118e642700 Fixed frame over buttons ons unmanaged setup 2022-06-17 22:27:23 +02:00
Adolfo Gómez
dfa441871b Fixed logger on Windows (import mistake) 2022-06-17 22:07:25 +02:00
Adolfo Gómez
18c5e3a242 Fixed logger on Windows (import mistake) 2022-06-17 21:59:24 +02:00
Adolfo Gómez García
3a4d571a6c Fixed actor tools changes for typeinfo 2022-06-17 13:54:52 +02:00
Adolfo Gómez García
3cc42e1e73 Adding udsuser to preconnect 2022-06-16 12:52:27 +02:00
Adolfo Gómez García
ffe9baa9a5 Adding udsuser to preconnect 2022-06-16 12:49:28 +02:00
Adolfo Gómez García
0b05009d3f Adding support for several network cards ond unmanaged 2022-06-14 16:51:37 +02:00
Adolfo Gómez García
fefd53c84f Merge remote-tracking branch 'origin/v3.5' 2022-06-13 11:25:25 +02:00
Adolfo Gómez García
b34b12ec9f Fixed RDP Transport with RDS Sessions 2022-06-13 11:24:44 +02:00
Adolfo Gómez García
1fb8956679 Merge remote-tracking branch 'origin/v3.5' 2022-06-07 22:05:20 +02:00
Adolfo Gómez García
fb70524cb3 fixed sampling points 2022-06-07 21:03:49 +02:00
Adolfo Gómez García
4c66401e4f Fixes to reports 2022-06-07 15:38:57 +02:00
Adolfo Gómez García
364ebd6f3a Fixed several reports 2022-06-06 22:29:42 +02:00
Adolfo Gómez García
d96a5e69b0 Merge remote-tracking branch 'origin/v3.5' 2022-06-06 21:42:55 +02:00
Adolfo Gómez García
493cbbb4e7 fixed samplingPoints 2022-06-06 21:42:04 +02:00
Adolfo Gómez García
b9330fd28a Merge remote-tracking branch 'origin/v3.5' 2022-06-06 21:26:42 +02:00
Adolfo Gómez García
5277a74c1c Backport of 4.0 report fixes 2022-06-06 21:26:29 +02:00
Adolfo Gómez García
b7d0fef8bb Stats reports fixes 2022-06-06 21:26:07 +02:00
Adolfo Gómez García
6cf8eb3e77 Fixed admin lang change 2022-06-06 19:06:11 +02:00
Adolfo Gómez García
214c04d636 Remaking counters stats 2022-06-06 19:04:11 +02:00
Adolfo Gómez García
1e01339b93 Fixed language change on admin 2022-06-06 19:03:47 +02:00
Adolfo Gómez García
8f260f5efb Merge remote-tracking branch 'origin/v3.5' 2022-06-03 13:49:23 +02:00
Adolfo Gómez García
2695a5ccdc small cosmetic fix 2022-06-03 13:44:37 +02:00
Adolfo Gómez García
9343f7c263 Added CERTIFICATE_BUNDLE_PATH possible variable on environment to check certificates 2022-06-03 13:44:00 +02:00
Adolfo Gómez García
7775964d62 Added never cache to indes 2022-05-26 15:57:14 +02:00
Adolfo Gómez García
3b0e100021 Merge remote-tracking branch 'origin/v3.5' 2022-05-26 15:37:37 +02:00
Adolfo Gómez García
a207e8f65f Fixed csrf_field name 2022-05-26 15:36:56 +02:00
Adolfo Gómez García
123b2243db updated main 2022-05-26 15:22:30 +02:00
Adolfo Gómez García
c9ef435d78 Merge remote-tracking branch 'origin/v3.5' 2022-05-26 15:20:25 +02:00
Adolfo Gómez García
0a0f2771ae Updated error page logic 2022-05-26 15:00:50 +02:00
Adolfo Gómez García
2f403d3336 Added configurable logout url 2022-05-23 21:36:52 +02:00
Adolfo Gómez García
9c0f2a1859 small README fix 2022-05-23 21:23:10 +02:00
Adolfo Gómez García
ab35451121 Creating tests 2022-05-22 21:51:43 +02:00
Adolfo Gómez García
b0327c4fa0 Creating tests 2022-05-22 21:51:11 +02:00
Adolfo Gómez García
928a7aa58f Creating tests 2022-05-22 21:50:51 +02:00
Adolfo Gómez García
f9e2ccb7d3 Merge remote-tracking branch 'origin/v3.5' 2022-05-20 09:08:13 +02:00
Adolfo Gómez García
8db0e515a5 merged 3.5 user frontend 2022-05-20 09:04:25 +02:00
Adolfo Gómez García
ceb5fd9bde updated csrf info 2022-05-20 09:03:45 +02:00
Adolfo Gómez García
fd0fbf63f0 Added help to configuration 2022-05-19 20:32:28 +02:00
Adolfo Gómez García
8d3653825a Removed Proxy, cleaned some more config variables, and added help to config variables. Refactorized a few config 2022-05-19 18:05:11 +02:00
Adolfo Gómez García
8836815186 improved safeHTML method 2022-05-19 09:17:42 +02:00
Adolfo Gómez García
2eb840e1c7 Merge remote-tracking branch 'origin/v3.5' 2022-05-19 09:15:42 +02:00
Adolfo Gómez García
7bfa6a6c4f Updated admin interface 2022-05-19 09:13:28 +02:00
Adolfo Gómez García
858b79614b Added improved safeHTML method to frontend 2022-05-19 09:11:10 +02:00
Adolfo Gómez García
859f18883f Updated user frontend 2022-05-17 16:48:40 +02:00
Adolfo Gómez García
66f62bcda0 Merge remote-tracking branch 'origin/v3.5' 2022-05-17 16:45:06 +02:00
Adolfo Gómez García
6b8e828835 adding messaging config 2022-05-17 16:45:04 +02:00
Adolfo Gómez García
45b47ce702 Updated user interface 2022-05-17 16:42:06 +02:00
Adolfo Gómez García
d56ce0c653 advancing on notifications 2022-05-15 22:48:17 +02:00
Adolfo Gómez García
801a4ef1a7 Adding level to notifiers and fixed up admin angular 2022-05-15 22:25:17 +02:00
Adolfo Gómez García
12c32bde14 fixed SAML auth 2022-05-10 15:35:52 +02:00
Adolfo Gómez García
002b51a656 Merge remote-tracking branch 'origin/v3.5' 2022-05-10 15:32:28 +02:00
Adolfo Gómez García
dd98ba5653 Remove clear of session on login (nonsense)0 2022-05-10 15:31:29 +02:00
Adolfo Gómez García
3405797bb8 Adding messaging 2022-05-09 21:04:36 +02:00
Adolfo Gómez García
5ce7d008e6 Merge remote-tracking branch 'origin/v3.5' 2022-04-29 16:06:12 +02:00
Adolfo Gómez García
0fe5b32224 Fixed RDP usb redir 2022-04-29 14:59:16 +02:00
Adolfo Gómez García
3ff7d1ea88 Changed script name to be authCallback URL 2022-04-28 18:16:22 +02:00
Adolfo Gómez García
91921537ce Adding tests 2022-04-27 00:37:23 +02:00
Adolfo Gómez García
0f587a4ec1 Merge remote-tracking branch 'origin/v3.5' 2022-04-25 14:31:45 +02:00
Adolfo Gómez García
a0adc1ded3 redirect to logout 2022-04-25 14:29:40 +02:00
Adolfo Gómez García
4f5cc505d3 redirect to logout 2022-04-25 14:28:18 +02:00
Adolfo Gómez García
8bac68b55b Fixed locked on machines_multi 2022-04-25 14:23:46 +02:00
Adolfo Gómez García
b5412e70fd Fixed Lock of service multi 2022-04-25 14:18:46 +02:00
Adolfo Gómez García
6a178478b4 Updated signatures for type checking on all models 2022-04-24 19:07:44 +02:00
Adolfo Gómez García
f3af6a13ff Merge remote-tracking branch 'origin/v3.5' 2022-04-24 17:14:33 +02:00
Adolfo Gómez García
75cd3c4845 Chanced a couple of declarations 2022-04-24 17:13:38 +02:00
Adolfo Gómez García
4067a5c423 Updating typy hints, etc... 2022-04-24 17:04:47 +02:00
Adolfo Gómez García
fbd7edf709 updating rest 2022-04-24 16:54:07 +02:00
Adolfo Gómez García
e8400b8702 updating models 2022-04-24 16:53:10 +02:00
Adolfo Gómez García
e8c45b568d Fixing up some typos 2022-04-24 16:52:45 +02:00
Adolfo Gómez García
3a16b75e82 fixed requests typo 2022-04-23 20:29:12 +02:00
Adolfo Gómez García
586e1c3789 moving REST dispatcher to its own file 2022-04-23 20:23:28 +02:00
Adolfo Gómez García
67f115e50f Merge remote-tracking branch 'origin/v3.5' 2022-04-12 22:54:01 +02:00
Adolfo Gómez García
540a2b83be Added brand to configjs so we can use it on a future 2022-04-12 22:30:32 +02:00
Adolfo Gómez García
b0255a980c Merge remote-tracking branch 'origin/v3.5' 2022-04-12 21:37:06 +02:00
Adolfo Gómez García
aa4d157c30 Fixed request session timeout 2022-04-12 21:36:17 +02:00
Adolfo Gómez García
aaa0f004ee Merge remote-tracking branch 'origin/v3.5' 2022-04-12 14:34:19 +02:00
Adolfo Gómez García
69ca93586a Fixed transport & groups deletion 2022-04-12 14:34:06 +02:00
Adolfo Gómez García
5a47d09c1a Merge remote-tracking branch 'origin/v3.5' 2022-04-08 15:29:49 +02:00
Adolfo Gómez García
cf283bba0f Fixed calendar action delete all groups 2022-04-08 15:29:13 +02:00
Adolfo Gómez García
0525bd4317 Merge remote-tracking branch 'origin/v3.5' 2022-04-06 21:32:31 +02:00
Adolfo Gómez García
9abaada7cb Fixed perms 2022-04-06 21:32:16 +02:00
Adolfo Gómez García
b359892454 images 2022-04-06 20:19:11 +02:00
Adolfo Gómez García
7d5ff93946 Merge remote-tracking branch 'origin/v3.5' 2022-04-06 14:22:53 +02:00
Adolfo Gómez García
927a86c835 Added USB redirection policy for windows 2022-04-06 14:21:52 +02:00
Adolfo Gómez García
4e78c2837c Fixed address passing 2022-04-04 21:20:22 +02:00
Adolfo Gómez García
502cebfc3a Merge remote-tracking branch 'origin/v3.5' 2022-04-04 21:16:37 +02:00
Adolfo Gómez García
2b5aa9c9a4 Fixed address passing to tunnel 2022-04-04 21:12:54 +02:00
Adolfo Gómez García
0f3f50f63c Added ThreadPoolExecutor to check handshakes... 2022-03-30 15:54:09 +02:00
Adolfo Gómez García
69192a2a1b Merge remote-tracking branch 'origin/v3.5' 2022-03-30 15:43:38 +02:00
Adolfo Gómez García
0ca85c5749 Changed check handshake method 2022-03-30 15:43:30 +02:00
Adolfo Gómez García
b3047e366d Fixed 3.5 tunnel DOS attacks tolerance 2022-03-30 15:11:00 +02:00
Adolfo Gómez García
4577552773 Fixed log 2022-03-29 22:36:27 +02:00
Adolfo Gómez García
bec985e360 Restored timeout 2022-03-29 22:14:18 +02:00
Adolfo Gómez García
ccb2dfbdbe Merge remote-tracking branch 'origin/v3.5' 2022-03-29 22:13:50 +02:00
Adolfo Gómez García
d2ef6e3704 Restored timeout 2022-03-29 22:12:43 +02:00
Adolfo Gómez García
b50b27d96e Remove external timeout 2022-03-29 22:06:17 +02:00
Adolfo Gómez García
bf4bb3f704 Merge remote-tracking branch 'origin/v3.5' 2022-03-29 22:01:32 +02:00
Adolfo Gómez García
5fb4461934 Remove external timeout 2022-03-29 22:01:10 +02:00
Adolfo Gómez García
5b4d017c53 Merge branch 'master' of github.com:dkmstr/openuds 2022-03-29 13:10:46 +02:00
Adolfo Gómez García
70b3544f2a added timeout to oppened tunnel to avoid possible DOS 2022-03-29 13:10:37 +02:00
Adolfo Gómez García
564b9db013 Merge remote-tracking branch 'origin/v3.5' 2022-03-29 13:08:54 +02:00
Adolfo Gómez García
1ff0a623db added timeout to oppened tunnel to avoid possible DOS 2022-03-29 13:08:49 +02:00
Adolfo Gómez García
2f5f87e122 added timeout to oppened tunnel to avoid possible DOS 2022-03-29 13:08:34 +02:00
Adolfo Gómez García
a9c32debd2 Merge remote-tracking branch 'origin/v3.5' 2022-03-28 14:00:20 +02:00
Adolfo Gómez García
d9be83863c increaded backlog 2022-03-28 13:59:37 +02:00
Adolfo Gómez García
c675acc2e7 increaded backlog 2022-03-28 13:58:56 +02:00
Adolfo Gómez García
5fed04d64d Included request on parameters, needed on 3.5 2022-03-24 14:21:20 +01:00
Adolfo Gómez García
0662100c30 Merge remote-tracking branch 'origin/v3.5' 2022-03-23 21:34:29 +01:00
Adolfo Gómez García
8a2e2deaf1 small phisical machine fix 2022-03-23 21:32:29 +01:00
Adolfo Gómez García
86990638dc Added new count method for LIMITED services 2022-03-23 21:28:49 +01:00
Adolfo Gómez García
74ad88d1bc Merge remote-tracking branch 'origin/v3.5' 2022-03-21 15:09:29 +01:00
Adolfo Gómez García
40b9572233 fixed tunnel to log bad handshake as hex 2022-03-21 15:08:39 +01:00
Adolfo Gómez García
de71785c76 Merge remote-tracking branch 'origin/v3.5' 2022-03-20 23:10:43 +01:00
Adolfo Gómez García
27cbf920d5 Fixed a couple of things 2022-03-20 23:10:35 +01:00
Adolfo Gómez García
5836b33299 Added new way of counting "active" machines (taking into account the removable and removing services also) 2022-03-17 14:53:32 +01:00
Adolfo Gómez García
9ca143c2db Merge remote-tracking branch 'origin/v3.5' 2022-03-15 20:26:02 +01:00
Adolfo Gómez García
282495ce0f Fixed OSS 2022-03-15 20:22:13 +01:00
Adolfo Gómez García
2b33ffc656 Fixed OSS 2022-03-15 20:07:19 +01:00
Adolfo Gómez García
72700075ef Small tunnel fix 2022-03-15 16:33:15 +01:00
Adolfo Gómez García
ccdd15ed50 Merge remote-tracking branch 'origin/v3.5' 2022-03-15 16:30:23 +01:00
Adolfo Gómez García
e0149900a7 Added protection on broken pipe to tunnel 2022-03-15 16:28:13 +01:00
Adolfo Gómez García
7bed6ac171 Small tunnel fix and installer info 2022-03-15 13:38:50 +01:00
Adolfo Gómez García
1d62dbbacd Added new admin interface supporting notifiers 2022-03-14 20:59:04 +01:00
Adolfo Gómez García
d04068e19f Creating notifiers 2022-03-14 17:03:00 +01:00
Adolfo Gómez García
66aa7ccef3 small type checking fix 2022-03-14 14:44:16 +01:00
Adolfo Gómez García
c0c54f9ccd Merge remote-tracking branch 'origin/v3.5' 2022-03-14 14:43:57 +01:00
Adolfo Gómez García
0d77e86af2 small type checking fix 2022-03-14 14:42:40 +01:00
Adolfo Gómez García
b41a8e38cf Fixed GetRootUser 2022-03-13 15:41:45 +01:00
Adolfo Gómez García
410b0952e9 fixed "autoimported" module 2022-03-13 15:02:07 +01:00
Adolfo Gómez García
b9f57c47b0 Adde generic factory and added module loader to jobs 2022-03-11 16:39:39 +01:00
Adolfo Gómez García
07b0b00b90 Done refactoring module loader 2022-03-10 21:05:59 +01:00
Adolfo Gómez García
6e69246ca8 Added moduleLoaders to almost everything now 2022-03-10 20:32:40 +01:00
Adolfo Gómez García
a5554ed85a Adding generic importers to simplify module loading 2022-03-10 18:58:16 +01:00
Adolfo Gómez García
6c17b77841 Addded generic Factory for UDS Modules 2022-03-09 23:17:19 +01:00
Adolfo Gómez García
05a04997d6 Improved passwords security on DB 2022-03-07 23:10:10 +01:00
Adolfo Gómez García
b477b78d61 Merge remote-tracking branch 'origin/v3.5' 2022-03-06 15:41:26 +01:00
Adolfo Gómez García
a179522f4c Fixed crypto key loading 2022-03-06 15:40:49 +01:00
Adolfo Gómez García
2b6193a1ec Fixed SAMLResponse conversion under some circunstances 2022-03-02 15:51:59 +01:00
Adolfo Gómez García
0e257c779b Converted HTTP-POSt to HTTP-Request on SAML logout 2022-03-01 12:58:09 +01:00
Adolfo Gómez García
43eb09e9e2 Fixed logout binding to redirect 2022-02-28 16:48:01 +01:00
Adolfo Gómez García
6eab070bd1 Merge remote-tracking branch 'origin/v3.5' 2022-02-27 23:42:42 +01:00
Adolfo Gómez García
21c2976d82 Fixed copyright for debian 2022-02-27 23:41:50 +01:00
Adolfo Gómez García
3f148f3bf0 notifications table 2022-02-25 03:05:27 +01:00
Adolfo Gómez García
f3c2015210 Fixed migrations from 3.5 2022-02-25 03:02:54 +01:00
Adolfo Gómez García
afd653422e Merge remote-tracking branch 'origin/v3.5' 2022-02-23 21:57:08 +01:00
Adolfo Gómez García
ee30ab4604 Fixed authcallbacks 2022-02-23 21:54:23 +01:00
Adolfo Gómez García
aad3336717 Migrated SAML auth to OneLogin library 2022-02-23 21:10:45 +01:00
Adolfo Gómez García
29e1694fce Removed lasso and added OneLogin saml library 2022-02-23 16:56:54 +01:00
Adolfo Gómez García
1fba4d3f9f Fixed check of ip 2022-02-23 14:17:29 +01:00
Adolfo Gómez García
5084fec43f Fixed SQLITE DB problems 2022-02-22 13:26:24 +01:00
Adolfo Gómez García
0ce1a565ab merged 3.5 temporal fix for login redirection 2022-02-21 14:34:58 +01:00
Adolfo Gómez García
6cc1a8823d Merge remote-tracking branch 'origin/v3.5' 2022-02-21 14:29:08 +01:00
Adolfo Gómez García
04e24d406f Added small fix to allow tempora user redirect 2022-02-21 14:28:49 +01:00
Adolfo Gómez García
3667c82529 added a new ldap constant to ldaputil 2022-02-20 00:24:38 +01:00
Adolfo Gómez García
8cd050f71d Fixed changes to allow redirects 2022-02-19 16:08:11 +01:00
Adolfo Gómez García
88905b4e63 Refactor of assigned an unused 2022-02-18 15:51:49 +01:00
Adolfo Gómez García
67db932b0f Updating authentication response methods to include a possible url on login failure 2022-02-17 21:44:10 +01:00
Adolfo Gómez García
1be8edec92 Added getRootDSE method to ldaputils 2022-02-17 15:50:27 +01:00
Adolfo Gómez García
65087f5d47 Added SAML auth as open 2022-02-16 21:12:48 +01:00
Adolfo Gómez García
5388d03213 gitignore al ldaputil small comment fix 2022-02-15 22:44:09 +01:00
Adolfo Gómez García
6da7a4134e Merge remote-tracking branch 'origin/v3.5' 2022-02-15 22:43:33 +01:00
Adolfo Gómez García
f58ef9b6d3 Removed sympy inclusion err 2022-02-15 15:16:04 +01:00
Adolfo Gómez García
18d4147d59 Changed OS Detection system 2022-02-15 15:05:55 +01:00
Adolfo Gómez García
b77330ac8f Added base notification mechanics 2022-02-13 19:38:40 +01:00
Adolfo Gómez García
7fca229537 Merge remote-tracking branch 'origin/v3.5' 2022-02-10 14:47:06 +01:00
Adolfo Gómez García
ccd429454e Updated translations due to recent fixes 2022-02-10 14:46:27 +01:00
Adolfo Gómez García
a2e5e00aa6 Merge remote-tracking branch 'origin/v3.5' 2022-02-10 13:33:50 +01:00
Adolfo Gómez García
5ce7ddc3a7 Fixed HTML5 transports and advanced tab translation for label 2022-02-10 13:32:05 +01:00
Adolfo Gómez García
02fcff2c94 refactorized alerts to messaging 2022-02-08 21:30:00 +01:00
Adolfo Gómez García
9e5b06e835 Adding notifier to allow sending some kind of event to outside recipients (as emails, telegram, ...) 2022-02-08 20:24:34 +01:00
Adolfo Gómez García
c7f96251ac Added level to notifier 2022-02-08 19:08:46 +01:00
Adolfo Gómez García
1b9fd22ba1 Merge remote-tracking branch 'origin/v3.5' 2022-02-07 16:12:51 +01:00
Adolfo Gómez García
3dd73f4723 Vertical label now appears "badly" with waseyprint. Disabled by now 2022-02-07 16:02:16 +01:00
Adolfo Gómez García
c3531f3e7e Fixed saving stats events (field conversion ignored original field name) 2022-02-07 15:54:38 +01:00
Adolfo Gómez García
fdd1b7235a Adding notifier base model. This will allow us to send remote notifications 2022-02-07 13:23:58 +01:00
Adolfo Gómez García
0d50e5ef93 Merged 3.5 fix on migrations 2022-02-06 04:02:38 +01:00
Adolfo Gómez García
ba7b1c0198 Fixed 0038 migration to include config moving 2022-02-06 04:01:29 +01:00
Adolfo Gómez García
c4a886c28d Fixed squashed migrations 2022-02-06 03:58:54 +01:00
Adolfo Gómez García
0355ef9591 squashed all previous to 3.5 migrations 2022-02-06 03:44:59 +01:00
Adolfo Gómez García
e0fa75cb00 squashed all previous to 3.5 migrations 2022-02-06 03:44:49 +01:00
Adolfo Gómez García
3b991e0749 Fixed ip lengths to allow future ipv6 support 2022-02-06 03:24:38 +01:00
Adolfo Gómez García
dd4dc738b4 Merge remote-tracking branch 'origin/v3.5' 2022-02-05 17:51:06 +01:00
Adolfo Gómez García
d5c9ee341d Fixed tunnel version 2022-02-05 17:50:55 +01:00
Adolfo Gómez García
ba90dae5d6 Fixed Tunnel version 2022-02-05 17:50:34 +01:00
Adolfo Gómez García
f58cc159a7 Removed comments of old code 2022-02-05 17:31:31 +01:00
Adolfo Gómez García
fee413aa23 Added basic HA check on metapools, after adding "isAvailable" to all existing services 2022-02-01 16:16:57 +01:00
Adolfo Gómez García
189db28dc5 Added migration to add HA to metapool 2022-02-01 16:05:44 +01:00
Adolfo Gómez García
86a237ccac Homogenized services response dict 2022-02-01 15:47:29 +01:00
Adolfo Gómez García
9041e48080 Added end notification to UDS 2022-02-01 13:49:34 +01:00
Adolfo Gómez García
4893fa4fbe Fixed counters 2022-02-01 13:10:13 +01:00
Adolfo Gómez García
082ef6830d Merge remote-tracking branch 'origin/v3.5' 2022-01-30 19:34:19 +01:00
Adolfo Gómez García
f7cd474264 Fixed double open on meta poools 2022-01-30 18:21:32 +01:00
Adolfo Gómez García
2a7b112437 Merge remote-tracking branch 'origin/v3.5' 2022-01-29 21:45:46 +01:00
Adolfo Gómez García
a4390f7918 upgrading service 2022-01-29 21:44:14 +01:00
Adolfo Gómez García
a255b52628 added info (apart of prefix to uuid) if pool is meta or not 2022-01-29 21:43:14 +01:00
Adolfo Gómez García
8d93144e24 Fixed meta pools non being correctly checked 2022-01-28 11:54:18 +01:00
Adolfo Gómez García
27d158f514 Fixed metapool admin 2022-01-28 11:14:32 +01:00
Adolfo Gómez García
e043a79721 Ported to asyncio uds tunnel. 2022-01-27 13:10:07 +01:00
Adolfo Gómez García
2f37caaf22 Merge remote-tracking branch 'origin/v3.5' 2022-01-27 12:17:16 +01:00
Adolfo Gómez García
2b4e771709 Fixed autorun check from api 2022-01-27 12:17:00 +01:00
Adolfo Gómez García
77b6eff8e4 Removing curio from tunneler, so we do not have an unneeded dependency 2022-01-26 14:32:41 +01:00
Adolfo Gómez García
7d8ae689b5 Moving from curio to asyncio. 2022-01-26 12:18:41 +01:00
Adolfo Gómez García
143b9b675b Merge remote-tracking branch 'origin/v3.5' 2022-01-21 12:07:24 +01:00
Adolfo Gómez García
3ebc0dd26f Fixed certs locations for some platforms 2022-01-21 12:04:54 +01:00
Adolfo Gómez García
ecb876157a small fix 2022-01-20 11:16:23 +01:00
Adolfo Gómez García
f40c2ed618 Added isAvailable for all services 2022-01-19 14:11:37 +01:00
Adolfo Gómez García
61a32e13a2 Merge remote-tracking branch 'origin/v3.5' 2022-01-18 14:12:47 +01:00
Adolfo Gómez García
79739bf9b8 Removed unused .desktop file for thinpro 2022-01-18 14:12:31 +01:00
Adolfo Gómez García
c14ae284b6 Merge remote-tracking branch 'origin/v3.5' 2022-01-18 13:34:46 +01:00
Adolfo Gómez García
f702c144fc small thinpro fix 2022-01-18 13:34:33 +01:00
Adolfo Gómez García
7fc51ce513 Added isAvailable for more services 2022-01-18 13:21:44 +01:00
Adolfo Gómez García
0208c9b3f9 Merge remote-tracking branch 'origin/v3.5' 2022-01-18 13:18:43 +01:00
Adolfo Gómez García
ce2d2b1c2e added installer for thinpro 7.2 2022-01-18 13:18:24 +01:00
Adolfo Gómez García
18a49cece3 Merge remote-tracking branch 'origin/v3.5' 2022-01-18 11:44:16 +01:00
Adolfo Gómez García
790c204b6a fixed uds client actor launching 2022-01-17 13:46:14 +01:00
Adolfo Gómez García
d80cf4052e removed -s 2022-01-17 13:43:51 +01:00
Adolfo Gómez García
03cdec8c31 Merge remote-tracking branch 'origin/v3.5' 2022-01-14 14:26:08 +01:00
Adolfo Gómez García
6a86b0ff04 Updated translations 2022-01-14 12:37:14 +01:00
Adolfo Gómez García
1667c8b4a8 adding "isAvaliable" method for services 2022-01-13 13:32:36 +01:00
Adolfo Gómez García
8018c7bed7 Merge remote-tracking branch 'origin/v3.5' 2022-01-12 13:35:02 +01:00
Adolfo Gómez García
0d412c4a9a Modified thinpro image tar from bz2 to gz 2022-01-12 13:25:26 +01:00
Adolfo Gómez García
ac9e6dafdf added thinpro installer generator 2022-01-12 13:20:33 +01:00
Adolfo Gómez García
58f4cd8356 Merge remote-tracking branch 'origin/v1.5' 2022-01-12 12:08:50 +01:00
Adolfo Gómez García
efd0ca3f88 Fixed tunnel stop comms 2022-01-11 15:36:18 +01:00
Adolfo Gómez García
edb4a32496 Updated translations 2022-01-10 14:34:09 +01:00
Adolfo Gómez García
e41c0f32bb Merge remote-tracking branch 'origin/v3.5' 2022-01-04 10:39:12 +01:00
Adolfo Gómez García
b239ff6cab Removed "harcoded" msrdc path for mac 2022-01-04 10:38:30 +01:00
Adolfo Gómez García
5de90bf421 Merge remote-tracking branch 'origin/v3.5' 2022-01-03 14:36:06 +01:00
Adolfo Gómez García
d55d1bc619 Added localized MSRDP as possible path 2022-01-03 14:35:48 +01:00
Adolfo Gómez García
493abb6228 Merge remote-tracking branch 'origin/v3.5' 2022-01-03 14:24:07 +01:00
Adolfo Gómez García
917a201483 Added localized MSRDP as possible path 2022-01-03 14:23:52 +01:00
Adolfo Gómez García
a071e2e8f5 Merge remote-tracking branch 'origin/v3.5' 2022-01-03 14:10:26 +01:00
Adolfo Gómez García
4809252434 Changed concurrent removal to take into account real removals, not removal checks 2022-01-03 14:07:46 +01:00
Adolfo Gómez García
12e74c16b5 * Explained why stop shuld be ignored if no user service is found
* Small type checking addons
* Added method to allow "check" the availability of a service, currently used before removal
* Fixed removal so concurrent removal refers to real removals, not to marked for removal
2022-01-03 14:02:41 +01:00
Adolfo Gómez García
6d873ceccd Merge remote-tracking branch 'origin/v3.5' 2021-12-22 14:05:47 +01:00
Adolfo Gómez García
8be0d9702a Fixed sessions providers for html5rdp 2021-12-22 14:04:49 +01:00
Adolfo Gómez García
26f45b429f Merge remote-tracking branch 'origin/v3.5' 2021-12-22 13:37:06 +01:00
Adolfo Gómez García
36acb0b0c0 Fixed transports sorting on metapools 2021-12-22 13:10:07 +01:00
Adolfo Gómez García
420b78d45d Fixed STOP "eating" on application stop 2021-12-21 15:58:46 +01:00
Adolfo Gómez García
e1ccc62dab Fixed minvalue for max services 2021-12-21 15:53:35 +01:00
Adolfo Gómez García
49b2bd8772 Merge remote-tracking branch 'origin/v3.5' 2021-12-21 11:19:47 +01:00
Adolfo Gómez García
6b0d98d4eb Fixed radius auth not using "appliaction Prefix" for extracting groups from Class Attribute (now accepts group=... and {appPrefix}group=.... as group markers 2021-12-21 11:14:57 +01:00
Adolfo Gómez García
354061f55c Merge remote-tracking branch 'origin/v3.5' 2021-12-20 12:12:28 +01:00
Adolfo Gómez García
7bec7bd7cc Fixed HTMLRDP for access to RDP session with automanaged users 2021-12-20 12:04:16 +01:00
Adolfo Gómez García
49975ab5d2 Upgrading for new django 4.0 2021-12-10 15:12:32 +01:00
Adolfo Gómez García
44f219402e removed orjson, uds uses numbers as key on dict and orjson does not supports it 2021-12-10 13:45:49 +01:00
Adolfo Gómez García
b3a8ae8abe Migrating to Django 4.0 (fixes) 2021-12-10 13:41:10 +01:00
Adolfo Gómez García
9ac2aaef81 Improved AutoAttributes & small typo fix on proxmox publication 2021-12-10 13:06:33 +01:00
Adolfo Gómez García
de0a2e2a34 Merge remote-tracking branch 'origin/v3.5' 2021-12-10 13:05:45 +01:00
Adolfo Gómez García
270957fab5 Updated settings sample 2021-12-10 13:04:54 +01:00
Adolfo Gómez García
1702cd910a Merge remote-tracking branch 'origin/v3.5' 2021-11-30 13:54:33 +01:00
Adolfo Gómez García
47c6ca42f1 added Content-Security-Policy to security 2021-11-30 13:54:15 +01:00
Adolfo Gómez García
78639af1a5 Merge remote-tracking branch 'origin/v3.5' 2021-11-30 13:32:56 +01:00
Adolfo Gómez García
c1f6ed376b added Content-Security-Policy to security 2021-11-30 13:32:37 +01:00
Adolfo Gómez García
8bebce4c6e added Content-Security-Policy to security 2021-11-30 13:31:12 +01:00
Adolfo Gómez García
e18f3746b4 Merge remote-tracking branch 'origin/v3.5' 2021-11-30 12:30:31 +01:00
Adolfo Gómez García
250ade6aee Fixed assignement of new services if pool is at 100% usage 2021-11-30 12:18:04 +01:00
Adolfo Gómez García
10bde45004 Merge remote-tracking branch 'origin/v3.5' 2021-11-26 11:59:07 +01:00
Adolfo Gómez García
bde63f7b4f Added check for database connection problem on config 2021-11-26 11:52:49 +01:00
Adolfo Gómez García
057a26ea7b Completed network filtering for authentication, and improbed network filtering on transports (better undestanding now) 2021-11-23 11:55:55 +01:00
Adolfo Gómez García
e8dae69f6f Several actiosn:
* Added Disabled as an option state for an authenticator
* Added networks to check source to authenticators
* Generalized network access, now is usable from transports and from authenticators
* Fixed configjs to adapt to new model
2021-11-22 13:39:08 +01:00
Adolfo Gómez García
91923654f0 Added orjson as json "first option" for REST API (python json else) 2021-11-21 18:10:49 +01:00
Adolfo Gómez García
a0365e1277 Merge remote-tracking branch 'origin/v3.5' 2021-11-19 14:14:12 +01:00
Adolfo Gómez García
eb4be53508 Fixed cache time and points on system chart info 2021-11-19 14:10:36 +01:00
Adolfo Gómez García
3003066a91 Removed "erroring" machine is it has any exception on connection 2021-11-18 15:35:04 +01:00
Adolfo Gómez García
10805ded7e Removed "erroring" machine is it has any exception on connection 2021-11-18 15:26:23 +01:00
Adolfo Gómez García
4b6ad6a2ed Merge remote-tracking branch 'origin/v3.5' 2021-11-16 14:20:07 +01:00
Adolfo Gómez García
21c221a6db Added check for circular connections on Xen when using backup server 2021-11-16 14:19:46 +01:00
Adolfo Gómez García
1857134f42 Fixed admin 2021-11-15 12:15:06 +01:00
Adolfo Gómez García
e06f13fc84 Updating validators 2021-11-12 12:14:16 +01:00
Adolfo Gómez García
6a14917ec5 Updating validators 2021-11-12 11:35:09 +01:00
Adolfo Gómez García
85aab86b02 Fixed token length and remade migration 2021-11-12 10:48:11 +01:00
Adolfo Gómez García
eeae98ca79 Added token alias to secure unmanaged machine token 2021-11-11 13:50:58 +01:00
Adolfo Gómez García
11f6eec913 Merge remote-tracking branch 'origin/v3.5' 2021-11-11 12:07:49 +01:00
Adolfo Gómez García
835dc05e63 Added scheduled action to pool so we can remove "old assigned machines" with a programmed action 2021-11-11 12:07:19 +01:00
Adolfo Gómez García
e4d40b651e Merge remote-tracking branch 'origin/v3.5' 2021-11-10 10:57:09 +01:00
Adolfo Gómez García
4cc4af5bd1 Fixed special case for admin form field of numeric fields without limits 2021-11-10 10:56:05 +01:00
Adolfo Gómez García
986a82f225 Fixed special case for admin form field of numeric fields without limits 2021-11-10 10:32:15 +01:00
Adolfo Gómez García
a05390ed6c Merge remote-tracking branch 'origin/v3.5' 2021-11-08 13:48:17 +01:00
Adolfo Gómez García
90b64c1721 Changed parameter _USERNAME_ for _USER_ on URL Transport (as in tooltip) 2021-11-08 13:28:09 +01:00
Adolfo Gómez García
c89c8d0523 Merge remote-tracking branch 'origin/v3.5' 2021-11-08 13:20:11 +01:00
Adolfo Gómez García
f403d4ff3e Fixed Min-Max admin values checking && set proxmox vmid as readonly 2021-11-08 13:18:58 +01:00
Adolfo Gómez García
c5071cf348 Fixed Min-Max admin values checking && set proxmox vmid as readonly 2021-11-08 13:16:44 +01:00
Adolfo Gómez García
7f4453bd37 Added stats to udsfs 2021-11-08 11:55:59 +01:00
Adolfo Gómez García
e3568bc580 Updating UDSFS 2021-11-05 12:51:04 +01:00
Adolfo Gómez García
f273d262ac A few more advancements 2021-11-04 14:03:17 +01:00
Adolfo Gómez García
b55df32db0 Advancing on UDSFS 2021-11-04 12:46:40 +01:00
Adolfo Gómez García
6792283e44 Merge remote-tracking branch 'origin/v3.5' 2021-11-03 15:21:43 +01:00
Adolfo Gómez García
679956702b Fixed legacy textx 2021-11-03 14:54:58 +01:00
Adolfo Gómez García
98d7a24656 Fixed check certificate on python 3.6 2021-11-03 14:39:58 +01:00
Adolfo Gómez García
33764e5c1c Merge remote-tracking branch 'origin/v3.5' 2021-11-02 11:59:09 +01:00
Adolfo Gómez García
b67771d5f3 Fixed HTMLRDP parameters 2021-11-02 11:56:21 +01:00
Adolfo Gómez García
2d1897f720 Merge remote-tracking branch 'origin/v3.5' 2021-11-02 11:06:06 +01:00
Adolfo Gómez García
672c35c903 Fixed admin date && updated translations 2021-11-02 11:05:38 +01:00
Adolfo Gómez García
be013ac6dc Adding type checking on fuse before proceding to use it 2021-11-01 22:28:45 +01:00
Adolfo Gómez García
398837c20f Adding type checking on fuse before proceding to use it 2021-11-01 22:26:18 +01:00
Adolfo Gómez García
a6f1e95cc0 Adding type checking on fuse before proceding to use it 2021-11-01 18:44:11 +01:00
Adolfo Gómez García
a957e368e7 Experimenting with use for adding an "UDS FS" so we can explore several UDS contained data easily 2021-11-01 00:40:54 +01:00
Adolfo Gómez García
6df1bc0a50 Removed Legacy client messages from frontend 2021-10-29 11:38:39 +02:00
Adolfo Gómez García
937465b2f2 Adding stats events for os manager relevant events (init, ready and release right now) 2021-10-28 16:17:26 +02:00
Adolfo Gómez García
e9df8c5cb1 Merge remote-tracking branch 'origin/v3.5' 2021-10-28 12:39:59 +02:00
Adolfo Gómez García
01119d1914 Fixed armhf appimage generation 2021-10-28 11:19:49 +02:00
Adolfo Gómez García
4f107ad464 Cleaning up things 2021-10-27 16:27:03 +02:00
Adolfo Gómez García
5b5a4e31e7 Merge remote-tracking branch 'origin/v3.5' 2021-10-27 13:06:45 +02:00
Adolfo Gómez García
98685c6e6a added back notifiedReady 2021-10-27 13:06:39 +02:00
Adolfo Gómez García
a4d1ecb95f Added call to "notifyReady" on osmanager ready notification 2021-10-27 13:05:41 +02:00
Adolfo Gómez García
cb064f9af5 Removing all actor 2.2 support 2021-10-27 12:54:45 +02:00
Adolfo Gómez García
604f1c4a89 Removing old UDS Actor 2.2 support 2021-10-27 12:20:41 +02:00
Adolfo Gómez García
590f3191ac Removing "globalRequest" cache and passing through received request object to authenticators 2021-10-26 21:15:07 +02:00
Adolfo Gómez García
e999e5acf8 Removed outdated documentation 2021-10-26 16:31:54 +02:00
Adolfo Gómez García
101f846f0d Merge remote-tracking branch 'origin/v3.5' 2021-10-25 14:45:18 +02:00
Adolfo Gómez García
237f7e5b77 Added igel port 2021-10-25 14:42:42 +02:00
Adolfo Gómez García
edb74ab9c6 Removed "legacy" 2.7 UDS Client (not working anymore on 3.5)
Fixed igel templates
2021-10-25 14:36:14 +02:00
Adolfo Gómez García
3ec0c15039 Merge remote-tracking branch 'origin/v3.5' 2021-10-25 14:07:39 +02:00
Adolfo Gómez García
86eb1a9421 Added "cloud marked" icons for tunneled transports 2021-10-25 12:56:18 +02:00
Adolfo Gómez García
ce433c0661 Merge remote-tracking branch 'origin/v3.5' 2021-10-23 22:37:07 +02:00
Adolfo Gómez García
c09ea0eb63 Moved security part from request to security middleware 2021-10-23 22:36:12 +02:00
Adolfo Gómez García
b185024aeb Merge remote-tracking branch 'origin/v3.5' 2021-10-22 14:41:24 +02:00
Adolfo Gómez García
ea79ccbee1 Added igel package creation scripts 2021-10-22 14:37:53 +02:00
Adolfo Gómez García
3a9312efe0 Fixed requests "getIdent" to retorn an unique id even in case of running as a asyncio task 2021-10-20 21:52:30 +02:00
Adolfo Gómez García
27535d4b43 Merge remote-tracking branch 'origin/v3.5' 2021-10-19 18:23:31 +02:00
Adolfo Gómez García
da82a26dd8 Now when we save a service pool, ensures that max_srvs is at leat 1 for services with cache 2021-10-19 18:21:32 +02:00
Adolfo Gómez García
1eeab5f75f Merge remote-tracking branch 'origin/v3.5' 2021-10-18 18:01:27 +02:00
Adolfo Gómez García
c129c83ca0 Added -s also to udsactor user space 2021-10-18 18:00:05 +02:00
Adolfo Gómez García
b2adafdec7 Merge remote-tracking branch 'origin/v3.5' 2021-10-18 17:17:16 +02:00
Adolfo Gómez García
d8e6de8c1e Removed unused variable 2021-10-18 17:16:17 +02:00
Adolfo Gómez García
9c6a72d3ac Merge remote-tracking branch 'origin/v3.5' 2021-10-18 17:09:00 +02:00
Adolfo Gómez García
e0d79cb590 Added -s to UDSClient python3 parameter, so local libs does not interfere with package 2021-10-18 17:04:44 +02:00
Adolfo Gómez García
59bd6c1649 Reversed the order for change password on 3.5 UDS 2021-10-18 16:59:59 +02:00
Adolfo Gómez García
564f0e17de added check for "emtpy" usernames or groups on creation 2021-10-18 13:05:53 +02:00
Adolfo Gómez García
842212f186 Removed ssh-tunnel not used on 3.5 release 2021-10-17 01:43:01 +02:00
Adolfo Gómez García
11342914cc Merge remote-tracking branch 'origin/v3.5' 2021-10-15 10:58:11 +02:00
Adolfo Gómez García
e4b609c4ce Fixed key for debian packages on client appimage recipe 2021-10-15 10:57:43 +02:00
Adolfo Gómez García
741855030f Removed "prints" :) 2021-10-15 10:44:22 +02:00
Adolfo Gómez García
293b7f02ad added small comment for future to actor v3 2021-10-13 11:19:44 +02:00
Adolfo Gómez García
fddd54fa99 Added correcto management of "logout" in case of an unmanaged machine "reboot" 2021-10-08 12:30:00 +02:00
Adolfo Gómez García
cd640af37f Added correcto management of "logout" in case of an unmanaged machine "reboot" 2021-10-08 12:28:37 +02:00
Adolfo Gómez García
b2f2deebce Merge remote-tracking branch 'origin/v3.5' 2021-10-08 00:57:22 +02:00
Adolfo Gómez García
6f99b63731 Locales 2021-10-08 00:57:08 +02:00
Adolfo Gómez García
6b3355f819 Added locking multi_ip machines if accessed from outside UDS flag & logic 2021-10-07 13:47:03 +02:00
Adolfo Gómez García
660cfdcd0e Adding console login/logout logic on static machines 2021-10-07 12:49:40 +02:00
Adolfo Gómez García
47df6c58fc Cosmetic chage to actorv3 2021-10-06 15:21:50 +02:00
Adolfo Gómez García
91c90766a3 Updated translations 2021-10-06 15:10:35 +02:00
Adolfo Gómez García
840a7a02bd Merge remote-tracking branch 'origin/v3.5' 2021-10-06 12:39:06 +02:00
Adolfo Gómez García
2a834460d1 Fixing up html5rdp 2021-10-06 12:38:45 +02:00
Adolfo Gómez García
f80b00667e Upgrading versions 2021-10-05 13:26:55 +02:00
Adolfo Gómez García
ef9325aab9 Start of v4.0. 3.5 is closed now 2021-10-05 12:29:29 +02:00
Adolfo Gómez García
5bd77676ca Fixed log of user correctly authenticated, but not belongs to any group 2021-10-05 12:23:13 +02:00
Adolfo Gómez García
8ef97a7773 Fix for client with python 3.6 2021-10-01 12:35:20 +02:00
Adolfo Gómez García
abafa7bfac Added group state "Inactive" 2021-09-29 14:50:40 +02:00
Adolfo Gómez García
dcb7b3e28e Make 3.5 client compatible with python 3.6 2021-09-29 13:42:26 +02:00
Adolfo Gómez García
41aa22fadd Removed optional parameter "transport" from ticket REST api creation. This is due to the fact than the transport needs to be checked on Client browser (user ip, SO, etc...) 2021-09-29 11:04:51 +02:00
Adolfo Gómez García
d02974ad87 Error page was not displayed correctly 2021-09-29 10:46:58 +02:00
Adolfo Gómez García
b2a067300c Added sample ticket auth test 2021-09-29 00:14:02 +02:00
Adolfo Gómez García
afbc75bff0 Added boolean True as valid force value 2021-09-29 00:13:33 +02:00
Adolfo Gómez García
4c453d2b1f Added more info to ticket timedout error on tunnel 2021-09-24 14:42:01 +02:00
Adolfo Gómez García
26f33626c2 Updated translations 2021-09-24 13:52:17 +02:00
Adolfo Gómez García
cb8284d076 Updated RDP scripts (simple cosmetic changes) 2021-09-23 16:53:17 +02:00
Adolfo Gómez García
ef3dd893d9 Added nicedcv protocol && a couple of aliases parameters for user_interface future migration 2021-09-21 16:43:27 +02:00
Adolfo Gómez García
d531a1612a Added "visibleFrom" to authenticators, so we can add custom filters for showing them on login screen 2021-09-16 13:30:38 +02:00
Adolfo Gómez García
de9c06bc2c Fixed "realname overwrite" on internaldb auth 2021-09-15 13:15:55 +02:00
Adolfo Gómez García
2400cc99cd Updated translations 2021-09-15 12:47:08 +02:00
Adolfo Gómez García
7f5c3c3bbd Fixed new remove all groups description & fixed not removing pinbar on tunnel rdp 2021-09-14 11:02:37 +02:00
Adolfo Gómez García
710f2fb0e4 Fixed task manager stop 2021-09-09 13:59:42 +02:00
Adolfo Gómez García
ede23ad793 Improved check of tunneled requests 2021-09-09 12:56:25 +02:00
Adolfo Gómez García
9a3913cc42 Added scheduled action "Remove all transports" and "remove all groups" 2021-09-07 13:55:16 +02:00
Adolfo Gómez García
5bf98782ea Added autocomplete to field types 2021-09-07 13:31:30 +02:00
Adolfo Gómez García
3a69c9205e Removed nonsense security check right now... 2021-09-07 12:15:44 +02:00
Adolfo Gómez García
3615db877e Fix small error on new singleton for taskManager 2021-09-06 13:39:40 +02:00
Adolfo Gómez García
2286ccaca1 Fixed about 2021-09-06 12:36:58 +02:00
Adolfo Gómez García
f90bf3a421 Added sedcurity middleware also 2021-09-04 22:17:41 +02:00
Adolfo Gómez García
df815776da Added asgi from newer model 2021-09-04 21:29:16 +02:00
Adolfo Gómez García
54f7fd21dc Better singleton pattern (more reusable) 2021-09-04 17:16:57 +02:00
Adolfo Gómez García
8e3d90e7f3 Removed "experimental" from AD group on OS Manager and fix on actor runner 2021-09-03 13:38:39 +02:00
Adolfo Gómez García
afa9e0aab6 Upgraded angular version of js 2021-09-03 02:25:01 +02:00
Adolfo Gómez García
77b0c7c8e1 added comment to user interface 2021-09-03 01:31:02 +02:00
Adolfo Gómez García
23afd01004 Fixed log removal 2021-09-02 13:27:27 +02:00
Adolfo Gómez García
c30a67d363 Fixed admin 2021-08-31 14:13:17 +02:00
Adolfo Gómez García
aa2d268453 Fixed admin interface small bug 2021-08-31 13:44:13 +02:00
Adolfo Gómez García
de40c72d9e Fixed "disabled" tag to allow login with only federated auths 2021-08-24 17:02:36 +02:00
Adolfo Gómez García
d0b30b561c Updated cache decorator and updated signatures of modified plugins 2021-08-24 14:07:35 +02:00
Adolfo Gómez García
e485374836 Formating and type fixing 2021-08-24 12:15:10 +02:00
Adolfo Gómez García
3934f2b88d Formating and type fixing all transports 2021-08-24 11:51:56 +02:00
Adolfo Gómez García
c72bcf4200 More formating 2021-08-23 14:59:07 +02:00
Adolfo Gómez García
1b7076e645 Changed "app.exec_" by "app.exec" for future pyqt6 2021-08-21 23:06:19 +02:00
Adolfo Gómez García
e637f208bd Changed app.exec_ by app.exec (future PyQt6) 2021-08-21 23:05:20 +02:00
Adolfo Gómez García
75e54618bb Removed duplicated download 2021-08-19 12:21:39 +02:00
Adolfo Gómez García
04864e3846 Fixed to ensure cache is uptated after template creation 2021-08-19 01:21:09 +02:00
Adolfo Gómez García
a52be141ea Added proxmox connection error check and try to handle y gracefully 2021-08-17 13:04:20 +02:00
Adolfo Gómez García
afcbd058d1 Formating & fixing type checkings 2021-08-14 15:47:21 +02:00
Adolfo Gómez García
8285e2daad More formating & minor typing fixes 2021-08-13 15:11:22 +02:00
Adolfo Gómez García
03bfb3efbb Formating & minor typing fixes 2021-08-13 14:53:23 +02:00
Adolfo Gómez García
8c4b84e7db removed statsManager and used directly "StatsManager.manager()" 2021-08-13 14:09:46 +02:00
Adolfo Gómez García
4f8fe793cc Updated translations 2021-08-13 13:34:38 +02:00
Adolfo Gómez García
286b320257 Updated openstack to look for correct volume api
Updated admin to make optional the "vnc" for user services
2021-08-13 13:33:39 +02:00
Adolfo Gómez García
68411f0726 UDS 3.4 now uses volumev3 for non legacy openstack connections (legacy maintains v2) 2021-08-11 18:59:18 +02:00
Adolfo Gómez García
1be49a6e0e Separated processes manager from main uds_tunnel 2021-08-05 12:53:44 +02:00
Adolfo Gómez García
c21c0b44ce Added guacamole rdp parameter for future suppport 2021-08-04 18:59:51 +02:00
Adolfo Gómez García
46aa9139a0 Fixed Guacamole dict 2021-08-02 13:14:57 +02:00
Adolfo Gómez García
574b19a905 Fixed bug on user services page load and updated translations 2021-07-29 13:13:43 +02:00
Adolfo Gómez García
612646bd1c Fixed userService name on ServiceNotReady exception && small fix to comment 2021-07-29 12:24:24 +02:00
Adolfo Gómez García
10d9279b89 Added default value as TRUE to font smoothing for RDP 2021-07-28 14:08:16 +02:00
Adolfo Gómez García
a8a5063083 Updated Guacamole to only accept authenticated tunnel connections
* Added handshake check BEFORE opening SSL tunnel
2021-07-28 12:57:58 +02:00
Adolfo Gómez García
29b6613c95 Updated space 2021-07-27 12:51:10 +02:00
Adolfo Gómez García
8aa7dc3c6f Added PORT to RDP connections 2021-07-27 12:40:12 +02:00
Adolfo Gómez García
e75d373d03 Service multi is fixed
(Also small tunnel beautify)
2021-07-23 14:00:21 +02:00
Adolfo Gómez García
91d2398ade Fixed multy phisical machines service to add a "custom" maximum duration for assignation 2021-07-21 13:59:12 +02:00
Adolfo Gómez García
f4e953c9c9 Fixed type checkings and detection of client launched when machine not ready 2021-07-20 13:32:28 +02:00
Adolfo Gómez García
f14f36b0d0 Merge remote-tracking branch 'origin/v3.0' 2021-07-19 13:27:00 +02:00
Adolfo Gómez García
d1e51c0103 Upgrading actor for unmanaged && fixed linux operation 2021-07-19 13:26:36 +02:00
Adolfo Gómez García
d38347c534 Fixed ticket for metapools & fixed get interfaces list for python > 3.2 (as is the case) 2021-07-19 13:25:43 +02:00
Adolfo Gómez García
6fd307e86e small fixes (typing) 2021-07-19 12:42:26 +02:00
Adolfo Gómez García
51407b54ee Small spelling fixes 2021-07-19 01:16:18 +02:00
Adolfo Gómez García
91f90c8630 Small sample fix 2021-07-18 15:45:03 +02:00
Adolfo Gómez García
ca5b54c8e2 Added hidden dark theme to administration 2021-07-14 13:49:58 +02:00
Adolfo Gómez García
8d74055357 Added "copy" feature to admin tables 2021-07-13 22:50:55 +02:00
Adolfo Gómez García
8e81d51a43 Fixed Admin tunnel tokens 2021-07-13 15:11:38 +02:00
Adolfo Gómez García
5ff6cdaf69 Fixed tunnel token headers && tunnel proxy typo 2021-07-13 15:00:00 +02:00
Adolfo Gómez García
13cbfe26c7 Fixes (Basically formating & type checking fixes 2021-07-13 13:36:42 +02:00
Adolfo Gómez García
d497235eeb * Added config parameter for "check removal processes hanged" and removed six from RDP client scripts (and regenerated signatures) 2021-07-13 11:53:22 +02:00
Adolfo Gómez García
7d8bcf2168 Fix small admin issue 2021-07-12 16:39:45 +02:00
Adolfo Gómez García
5706f9d681 Fixed drop down menus on mouse over 2021-07-12 15:12:11 +02:00
Adolfo Gómez García
cd06597918 Formatting fixes 2021-07-12 12:58:45 +02:00
Adolfo Gómez García
49ce5622d6 Correctly added Tokens table permissions type 2021-07-12 12:58:26 +02:00
Adolfo Gómez García
de5031febf Fixed memory cache cleanup 2021-07-12 12:57:48 +02:00
Adolfo Gómez García
b29baf2a29 Small fis on service pool 2021-07-10 21:16:33 +02:00
Adolfo Gómez García
aaa909fff0 Added tunnel info to normalize return values & log values 2021-07-10 13:19:45 +02:00
Adolfo Gómez García
99ee0b00fc Added actor token to admin 2021-07-09 13:13:31 +02:00
Adolfo Gómez García
f2643df05f added typos to cryptography 2021-07-08 22:31:25 +02:00
Adolfo Gómez García
2520cce429 Fixed error on status check for "respawneable" services 2021-07-08 17:47:12 +02:00
Adolfo Gómez García
962015c355 Added types to crypto 2021-07-08 17:46:46 +02:00
Adolfo Gómez García
582ba01014 Added minimun number to show "filter" on service list 2021-07-08 14:42:58 +02:00
Adolfo Gómez García
eec8588628 Updated translations 2021-07-08 14:31:44 +02:00
Adolfo Gómez García
37f59e952d Added translated filter string 2021-07-08 14:18:15 +02:00
Adolfo Gómez García
46bab75a92 Added crpytomanager typing 2021-07-08 14:17:59 +02:00
Adolfo Gómez García
8f7421ef9d Updated translations 2021-07-08 13:00:22 +02:00
Adolfo Gómez García
a7584f9e8e Fixed admin 2021-07-08 12:57:36 +02:00
Adolfo Gómez García
fad735bb87 Added ticket compat with 3.0 2021-07-08 12:22:36 +02:00
Adolfo Gómez García
5ba704ac8a Fixed Version number for actor 2021-07-08 10:40:56 +02:00
Adolfo Gómez García
3c5ef5817f Added tooo long machines on removing state as hanged 2021-07-06 14:46:21 +02:00
Adolfo Gómez García
de0db84a5d Added tooo long machines on removing state as hanged 2021-07-06 14:45:01 +02:00
Adolfo Gómez García
548b6e813d Fixed Proxmox concurrencly on vmid assignation problem 2021-07-06 12:39:22 +02:00
Adolfo Gómez García
31b513a7ef Type checking updates 2021-07-06 11:33:04 +02:00
Adolfo Gómez García
fa7ce3de0b Added more info to terminated connection on UDS tunnel 2021-07-05 18:12:46 +02:00
Adolfo Gómez García
3a7e7b8dfc Fixed Client on non standard ports 2021-07-05 18:03:22 +02:00
Adolfo Gómez García
c9488329b9 Fixed Client on non standard ports 2021-07-05 17:54:02 +02:00
Adolfo Gómez García
55c4574021 Added redirect to login on session timeout 2021-07-05 13:48:56 +02:00
Adolfo Gómez García
59179584f2 Fixed tunnel redirect 2021-07-05 10:46:43 +02:00
Adolfo Gómez García
92de3b01dd Removed "plugin download" event, not used 2021-07-04 16:50:42 +02:00
Adolfo Gómez García
c62d62dd65 commented the events generated and logged by UDS 2021-07-04 15:17:51 +02:00
Adolfo Gómez García
e02318e665 Enhacing tunnel data logging info 2021-07-04 13:25:42 +02:00
Adolfo Gómez García
612ae63cf2 Added events to HTML5 connection also (only conneciton event right now) 2021-07-04 13:04:11 +02:00
Adolfo Gómez García
cb44662134 commenting changes on tunnel 2021-07-03 22:01:42 +02:00
Adolfo Gómez García
a359ff2263 Fixing tunnel & client for mac 2021-07-03 21:48:38 +02:00
Adolfo Gómez García
9ca3a7cdeb Fixed proxy sent stats to UDS 2021-07-03 21:16:17 +02:00
Adolfo Gómez García
1736cae1c1 Fixed image upload 2021-07-03 20:59:23 +02:00
Adolfo Gómez García
727ffe0365 Added a basic bot check to request middleware to forbid bots access 2021-07-03 16:25:07 +02:00
Adolfo Gómez García
b031e0aa3c adding fixes on closing tunnel 2021-07-03 13:02:34 +02:00
Adolfo Gómez García
d7886a1281 adding fixes on closing tunnel 2021-07-03 12:58:26 +02:00
Adolfo Gómez García
09e88b60f5 Updated launcher so, if launcher is closed, all tunnels are also closed 2021-07-03 12:30:46 +02:00
Adolfo Gómez García
6af0617c2a Upgrading client for MAC multi open compatibility 2021-07-02 15:18:35 +02:00
1432 changed files with 181505 additions and 142386 deletions

11
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/server" # Location of package manifests
schedule:
interval: "weekly"

19
.github/workflows/auto-assign.yml vendored Normal file
View File

@@ -0,0 +1,19 @@
name: Auto Assign
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
run:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: 'Auto-assign issue'
uses: pozil/auto-assign-issue@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assignees: dkmstr
numOfAssignee: 1

20
.github/workflows/dependency-review.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request, surfacing known-vulnerable versions of the packages declared or updated in the PR. Once installed, if the workflow run is marked as required, PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
# Public documentation: https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review#dependency-review-enforcement
name: 'Dependency Review'
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- name: 'Dependency Review'
uses: actions/dependency-review-action@v3

92
.gitignore vendored
View File

@@ -13,59 +13,10 @@
*.debhelper*
*-stamp
*.substvars
# /client/administration/
/client/administration/*.suo
# /client/administration/UdsAdmin/
/client/administration/UdsAdmin/*.user
# /client/administration/UdsAdmin/bin/
/client/administration/UdsAdmin/bin/Debug
/client/administration/UdsAdmin/bin/Release
# /client/administration/UdsAdmin/obj/x86/
/client/administration/UdsAdmin/obj/x86/Debug
/client/administration/UdsAdmin/obj/x86/Release
# /client/administration/installer/UDSAdminInstaller/
/client/administration/installer/UDSAdminInstaller/MSChart.exe
/client/administration/installer/UDSAdminInstaller/UDSAdminSetup.exe
# /linuxActor/
/linuxActor/udsactor_*
# /linuxActor/src/debian/
/linuxActor/src/debian/udsactor
# /linuxActorNX/
/linuxActorNX/udsactor-nx_*
# /linuxActorNX/src/debian/
/linuxActorNX/src/debian/udsactor-nx
# /linuxActorXRDP/
/linuxActorXRDP/udsactor-xrdp_*
# /linuxActorXRDP/src/debian/
/linuxActorXRDP/src/debian/udsactor-xrdp
# /nxtransport/jar/
/nxtransport/jar/*.sh
/nxtransport/jar/*.jar
# /nxtuntransport/jar/
/nxtuntransport/jar/*.sh
/nxtuntransport/jar/*.jar
# /rdptransport/java/jar/
/rdptransport/java/jar/*.sh
/rdptransport/java/jar/*.jar
.coverage*
# /server/
*_enterprise
/server/openuds.sublime-project
/server/openuds.sublime-workspace
# /server/src/
/server/src/taskmanager.pid
@@ -88,7 +39,6 @@
# /server/src/uds/
/server/src/uds/*_enterprise.py
/server/src/uds/fixtures
/server/src/uds/tests
# /server/src/uds/auths/
/server/src/uds/auths/*-enterprise
@@ -128,40 +78,10 @@
# /server/src/uds/transports/
/server/src/uds/transports/*-enterprise
# /udsService/
/udsService/*.suo
# /udsService/installer/
/udsService/installer/UDSActorSetup.exe
# /udsService/rpc/bin/
/udsService/rpc/bin/Debug
/udsService/rpc/bin/Release
/udsService/rpc/bin/x86
# /udsService/rpc/obj/
/udsService/rpc/obj/Debug
/udsService/rpc/obj/Release
/udsService/rpc/obj/x86
# /udsService/udsService/bin/
/udsService/udsService/bin/Debug
/udsService/udsService/bin/Release
/udsService/udsService/bin/x64
# /udsService/udsService/obj/
/udsService/udsService/obj/x64
/udsService/udsService/obj/x86
# /udsService/udsgui/bin/
/udsService/udsgui/bin/Debug
/udsService/udsgui/bin/Release
/udsService/udsgui/bin/x86
# /udsService/udsgui/obj/
/udsService/udsgui/obj/Debug
/udsService/udsgui/obj/Release
/udsService/udsgui/obj/x86
.vscode
.mypy_cache
.pytest_cache
.python-version
target/
server/test-vars.ini

16
.gitmodules vendored Normal file
View File

@@ -0,0 +1,16 @@
[submodule "guacamole-auth-uds"]
path = guacamole-auth-uds
url = git@github.com:VirtualCable/guacamole-auth-uds.git
branch = master
[submodule "tunnel-server"]
path = tunnel-server
url = git@github.com:VirtualCable/uds-tunnel-server.git
branch = master
[submodule "actor"]
path = actor
url = git@github.com:VirtualCable/uds-actor.git
branch = master
[submodule "client-py3"]
path = client
url = git@github.com:VirtualCable/uds-client.git
branch = master

29
LICENSE Normal file
View File

@@ -0,0 +1,29 @@
BSD 3-Clause License
Copyright (c) 2022-2024, Virtual Cable S.L.U.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -1,15 +1,17 @@
![UDS Logo](https://www.udsenterprise.com/static//img/logoUDSNav.png)
openuds
OpenUDS
=======
OpenUDS (Universal Desktop Services) is a multiplatform connection broker for:
- VDI: Windows and Linux virtual desktops administration and deployment
- App virtualization
- Desktop services consolidation
- ...
This is an Open Source Source project, initiated by Spanish Company Virtualcable and released Open Source with the help of several Spanish Universities.
This is an Open Source project, initiated by Spanish Company Virtual Cable and released Open Source with the help of several Spanish Universities.
Any help provided will be welcome.
Please feel free to contribute to this project.
**Note: Master version is always under heavy development and it is not recommended for use, it will probably have unfixed bugs. Please use the latest stable branch.**
Notes
=====
* From 4.0 onwards (current master), OpenUDS has been splitted in several repositories and contains submodules. Remember to use "git clone --resursive ..." to fetch it ;-).
* 4.0 version is tested on Python 3.11. It will probably work on 3.12 and 3.13 too (maybe 3.10, but not tested also)

11
SECURITY.md Normal file
View File

@@ -0,0 +1,11 @@
# Security
Virtual Cable takes the security of our software products and services seriously.
If you find any vulnerability, please, report it to "agomez@virtualcable.net".
Please, do not use the issue tracker for security vulnerabilities.
[]: # Path: README.md
Thank you very much for your interest in OpenUDS.

View File

@@ -1 +0,0 @@

View File

@@ -1 +1 @@
3.5.0
4.0.0

1
actor Submodule

Submodule actor added at 04ce3fc2d1

View File

@@ -1,2 +0,0 @@
PYTHONPATH=./src:${PYTHONPATH}

8
actor/.gitignore vendored
View File

@@ -1,8 +0,0 @@
# Debian source builds
udsactor_*.dsc
udsactor_*.tar.xz
udsactor_*.buildinfo
udsactor_*.changes
# And binaries
udsactor*.deb
udsactor*.rpm

View File

@@ -1,4 +0,0 @@
Linux:
python3-prctl (recommended, but not required in fact)
python3-pyqt5

View File

@@ -1 +0,0 @@
/udsactor-*[1-9].*.spec

View File

@@ -1,91 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
.PHONY: install-udsactor install-udsactor-unmanaged
# Directories
SOURCEDIR := ../src
LIBDIR := $(DESTDIR)/usr/share/UDSActor
BINDIR := $(DESTDIR)/usr/bin
SBINDIR = $(DESTDIR)/usr/sbin
APPSDIR := $(DESTDIR)/usr/share/applications
CFGDIR := $(DESTDIR)/etc/udsactor
SYSTEMDIR := $(DESTDIR)/etc/systemd/system
POLKITDIR := $(DESTDIR)/usr/share/polkit-1/actions/
XDGAUTOSTARTDIR := $(DESTDIR)/etc/xdg/autostart
KDEAUTOSTARTDIR := $(DESTDIR)/usr/share/autostart
PYC := $(shell find $(SOURCEDIR) -name '*.py[co]')
CACHES := $(shell find $(SOURCEDIR) -name '__pycache__' -o -name '.mypy_cache')
clean:
rm -rf $(PYC) $(CACHES) $(DESTDIR)
install-udsactor: udsactor
install-udsactor-unmanaged: udsactor udsactor-unmanaged
udsactor-unmanaged:
# Overwrite udsactor config is what to be done
cp scripts/UDSActorConfig-unmanaged $(SBINDIR)/UDSActorConfig
udsactor:
rm -rf $(DESTDIR)
mkdir -p $(LIBDIR)
mkdir -p $(BINDIR)
mkdir -p $(SBINDIR)
mkdir -p $(APPSDIR)
mkdir -p $(CFGDIR)
mkdir -p $(POLKITDIR)
mkdir -p $(XDGAUTOSTARTDIR)
mkdir -p $(KDEAUTOSTARTDIR)
mkdir $(LIBDIR)/img
# Cleans up .pyc and cache folders
rm -f $(PYC) $(CACHES)
cp -r $(SOURCEDIR)/udsactor $(LIBDIR)/udsactor
cp $(SOURCEDIR)/img/uds-icon.png $(LIBDIR)/img
cp $(SOURCEDIR)/actor_*.py $(LIBDIR)
# QT Dialogs & resources
cp -r $(SOURCEDIR)/ui $(LIBDIR)/ui
# Menu GUI app
cp desktop/UDS_Actor_Configuration.desktop $(APPSDIR)
# Autostart elements for gnome/kde
cp desktop/UDSActorTool.desktop $(XDGAUTOSTARTDIR)
cp desktop/UDSActorTool.desktop $(KDEAUTOSTARTDIR)
# scripts
cp scripts/udsactor $(BINDIR)
cp scripts/UDSActorConfig $(SBINDIR)
cp scripts/UDSActorConfig-pkexec $(SBINDIR)
cp scripts/UDSActorTool $(BINDIR)
cp scripts/UDSActorTool-startup $(BINDIR)
cp scripts/udsvapp ${BINDIR}
# Policy to run as administrator
cp policy/org.openuds.pkexec.UDSActorConfig.policy $(POLKITDIR)
# Fix permissions
chmod 755 $(BINDIR)/udsactor
chmod 755 $(BINDIR)/udsvapp
chmod 755 $(BINDIR)/UDSActorTool-startup
chmod 755 $(SBINDIR)/UDSActor*
chmod 755 $(LIBDIR)/actor_*.py
chmod 644 $(POLKITDIR)/org.openuds.pkexec.UDSActorConfig.policy
# If for red hat based, copy init.d
ifeq ($(DISTRO),rh)
mkdir -p $(SYSTEMDIR)
cp debian/udsactor.service $(SYSTEMDIR)/
endif
# chmod 0755 $(BINDIR)/udsactor
uninstall:
rm -rf $(LIBDIR)
# rm -f $(BINDIR)/udsactor
rm -rf $(CFGDIR)

View File

@@ -1,36 +0,0 @@
#!/bin/bash
VERSION=`cat ../../VERSION`
RELEASE=1
top=`pwd`
# Debian based
dpkg-buildpackage -b
cat udsactor-template.spec |
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
sed -e s/"release 1"/"release ${RELEASE}"/g > udsactor-$VERSION.spec
# Now fix dependencies for opensuse
# Note that, although on opensuse the library is "libXss1" on newer,
# the LibXscrnSaver is a "capability" and gets libXss1 installed
# So right now, we only need 1 uds actor for both platforms.
# cat udsactor-template.spec |
# sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
# sed -e s/"name udsactor"/"name udsactor-opensuse"/g |
# sed -e s/"libXScrnSaver"/"libXss1"/g > udsactor-opensuse-$VERSION.spec
#for pkg in udsactor-$VERSION.spec udsactor-opensuse-$VERSION.spec; do
for pkg in udsactor-$VERSION.spec; do
rm -rf rpm
for folder in SOURCES BUILD RPMS SPECS SRPMS; do
mkdir -p rpm/$folder
done
rpmbuild -v -bb --clean --buildroot=$top/rpm/BUILD/$pkg-root --target noarch $pkg 2>&1
done
rpm --addsign ../*rpm
#rm udsactor-$VERSION

View File

@@ -1,2 +0,0 @@
/udsactor/
/udsactor-unmanaged/

View File

@@ -1,59 +0,0 @@
udsactor (3.5.0) stable; urgency=medium
* Upgraded to 3.5.0 release
-- Adolfo Gómez García <agomez@virtualcable.es> Fri, 23 Oct 2020 8:00:00 +0200
udsactor (3.0.0) stable; urgency=medium
* Upgraded to 3.0.0 release
-- Adolfo Gómez García <agomez@virtualcable.es> Wed, 10 Jul 2019 9:24:10 +0200
udsactor (2.2.1) stable; urgency=medium
* Upgraded to 2.2.1 release
-- Adolfo Gómez García <agomez@virtualcable.es> Thu, 2 Oct 2018 12:44:12 +0200
udsactor (2.2.0) stable; urgency=medium
* Upgraded to 2.2.0 release
-- Adolfo Gómez García <agomez@virtualcable.es> Thu, 19 Oct 2017 16:44:12 +0200
udsactor (2.1.0) stable; urgency=medium
* Fixes for 2.1.0 release
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 19 Jan 2017 08:00:22 +0200
udsactor (2.0.0) stable; urgency=medium
* Upgrade for 2.0.0
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 01 Mar 2016 03:39:21 +0100
udsactor (1.9.1) stable; urgency=medium
* Upgrade for 1.9.1
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 01 Mar 2016 03:19:21 +0100
udsactor (1.9.0) stable; urgency=medium
* Upgrade for 1.9.0 (fixed package version)
-- Adolfo Gómez García <agomez@virtualcable.es> Tue, 05 May 2015 07:10:27 +0200
udsactor (1.7.5) stable; urgency=medium
* Upgrade for 1.7.5
-- Adolfo Gómez García <agomez@virtualcable.es> Thu, 23 Apr 2015 06:08:53 +0200
udsactor (1.7.0) stable; urgency=medium
* Initial release.
-- Adolfo Gómez García <agomez@virtualcable.es> Mon, 17 Nov 2014 05:32:41 +0100

View File

@@ -1 +0,0 @@
10

View File

@@ -1,26 +0,0 @@
Source: udsactor
Section: admin
Priority: optional
Maintainer: Adolfo Gómez García <agomez@virtualcable.net>
Build-Depends: debhelper (>= 7), po-debconf, dh-systemd (>= 1.5)
Standards-Version: 4.1.4
Homepage: http://www.udsenterprise.com
Package: udsactor
Section: admin
Priority: optional
Architecture: all
Depends: policykit-1(>=0.100), python3-requests (>=0.8.2), python3-pyqt5 (>=4.9), python3-six(>=1.1), python3 (>=3.6), libxss1, xscreensaver, ${misc:Depends}
Recommends: python3-prctl(>=1.1.1)
Description: Actor for Universal Desktop Services (UDS) Broker
This package provides the required components to allow managed machines to work on an environment managed by UDS Broker.
Package: udsactor-unmanaged
Section: admin
Priority: optional
Architecture: all
Depends: policykit-1(>=0.100), python3-requests (>=0.8.2), python3-pyqt5 (>=4.9), python3-six(>=1.1), python3 (>=3.6), libxss1, xscreensaver, ${misc:Depends}
Recommends: python3-prctl(>=1.1.1)
Description: Actor for Universal Desktop Services (UDS) Broker Static Unmanaged machines
This package provides the required components to allow unmanaged machines (static, independent machines) to work on an environment managed by UDS Broker.

View File

@@ -1,26 +0,0 @@
Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=135
Name: udsactor
Maintainer: Adolfo Gómez García
Source: http://www.udsenterprise.com/
Copyright: 2014-2019 Virtual Cable S.L.U.
License: BSD-3-clause
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
.
On Debian systems, the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2'.

View File

@@ -1 +0,0 @@
readme.txt

View File

@@ -1,3 +0,0 @@
udsactor-unmanaged_3.5.0_all.deb admin optional
udsactor_3.5.0_all.deb admin optional
udsactor_3.5.0_amd64.buildinfo admin optional

View File

@@ -1,47 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch $@
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
dh_clean
install: build
dh_testdir
dh_testroot
dh_prep
dh_installdirs
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor install-udsactor
$(MAKE) DESTDIR=$(CURDIR)/debian/udsactor-unmanaged install-udsactor-unmanaged
binary-arch: build install
# emptyness
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installdebconf
dh_systemd_enable
dh_installinit --no-restart-on-upgrade --no-start --name=udsactor
dh_systemd_start
dh_python2=python
dh_compress
dh_link
dh_fixperms
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep
.PHONY: build clean binary-indep binary install configure

View File

@@ -1 +0,0 @@
3.0 (native)

View File

@@ -1 +0,0 @@
udsactor.postinst

View File

@@ -1 +0,0 @@
udsactor.service

View File

@@ -1,3 +0,0 @@
#!/bin/sh -e
exit 0

View File

@@ -1,28 +0,0 @@
#!/bin/sh
. /usr/share/debconf/confmodule
set -e
case "$1" in
configure)
/usr/bin/python3 -m compileall /usr/share/UDSActor > /dev/nul 2>&1
# Fix perms so only root can access "masterKey"
chmod 0700 /etc/udsactor
# chmod 0600 /etc/udsactor/udsactor.cfg
chown root:root /etc/udsactor
# chown root:root /etc/udsactor/udsactor.cfg
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0

View File

@@ -1,14 +0,0 @@
#!/bin/sh -e
. /usr/share/debconf/confmodule
set -e
if [ "$1" = "purge" ] ; then
if [ -f /etc/udsactor/udsactor.cfg ]; then
mv /etc/udsactor/udsactor.cfg /etc/udsactor/udsactor.cfg.dpkg-backup
# Remove .pyc leaved behind
rm -rf /usr/share/UDSActor || true > /dev/null 2>&1
fi
fi

View File

@@ -1 +0,0 @@
#! /bin/bash -e

View File

@@ -1,14 +0,0 @@
[Unit]
Description=UDS Broker actor
After=network.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/usr/share/UDSActor
ExecStart=/usr/bin/python3 actor_service.py start-foreground
PrivateTmp=true
[Install]
WantedBy=multi-user.target

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Name=UDS Actor Tool
Comment=UDS Actor Userspace tools
Exec=/usr/bin/UDSActorTool-startup
Icon=/usr/share/UDSActor/img/uds-icon.png
Terminal=false
Type=Application
NoDisplay=true
X-KDE-autostart-after=panel
X-KDE-StartupNotify=false
X-DBUS-StartupType=None
X-KDE-UniqueApplet=false

View File

@@ -1,11 +0,0 @@
[Desktop Entry]
Name=UDS Actor Configuration
Version=1.0
Exec=/usr/sbin/UDSActorConfig-pkexec
Comment=UDS Actor Configuration Application. (Must be executed as root)
Icon=/usr/share/UDSActor/img/uds-icon.png
Type=Application
Terminal=false
StartupNotify=true
Encoding=UTF-8
Categories=Settings;System;

View File

@@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<action id="org.freedesktop.policykit.pkexec.run-UDSActorConfig">
<description>Run UDS Actor Configuration Program</description>
<message>Authentication is required to run UDS Actor Configuration</message>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/UDSActorConfig</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">TRUE</annotate>
</action>
</policyconfig>

View File

@@ -1,3 +0,0 @@
UDSActor is the client actor needed to get machines managed by UDS Broker.
Please, visit http://www.udsenterprise.com for more information

View File

@@ -1,6 +0,0 @@
#!/bin/sh
FOLDER=/usr/share/UDSActor
cd $FOLDER
exec python3 actor_config.py -platform xcb $@

View File

@@ -1,3 +0,0 @@
#!/bin/sh
# pkexec env DISPLAY=$DISPLAY QT_X11_NO_MITSHM=1 "/usr/sbin/UDSActorConfig" "$@"
pkexec "/usr/sbin/UDSActorConfig" "$@"

View File

@@ -1,6 +0,0 @@
#!/bin/sh
FOLDER=/usr/share/UDSActor
cd $FOLDER
exec python3 actor_config_unmanaged.py -platform xcb $@

View File

@@ -1,6 +0,0 @@
#!/bin/sh
FOLDER=/usr/share/UDSActor
cd $FOLDER
exec python3 actor_client.py -platform xcb $@

View File

@@ -1,3 +0,0 @@
#!/bin/sh
exec /usr/bin/UDSActorTool

View File

@@ -1,13 +0,0 @@
#!/bin/sh
env > /tmp/env.txt
if [ "$PAM_TYPE" = "open_session" ]; then
nohup /usr/bin/udsactor login $PAM_USER &
# Wait in backgroud to TTY to close (close_session is not being invoked right now)
nohup /usr/bin/uds-wait-session &
elif [ "$PAM_TYPE" = "close_session" ]; then
nohup /usr/bin/udsactor logout $PAM_USER &
fi
return 0

View File

@@ -1,12 +0,0 @@
#!/bin/sh
while :
do
sleep 5 # Wait 5 seconds between checks
found=`ps -f -u$PAM_USER | grep -v grep | grep -v uds-wait-session | grep "$PAM_TTY" | wc -l`
if [ "$found" = "0" ]; then
/usr/bin/udsactor logout $PAM_USER
exit 0
fi
done

View File

@@ -1,6 +0,0 @@
#!/bin/sh
FOLDER=/usr/share/UDSActor
cd $FOLDER
exec python3 actor_service.py $@

View File

@@ -1,3 +0,0 @@
#!/bin/sh
exec /usr/bin/udsactor login $2 &

View File

@@ -1,3 +0,0 @@
#!/bin/sh
exec /usr/bin/udsactor logout $2 &

View File

@@ -1,5 +0,0 @@
#!/bin/sh
/usr/bin/udsactor login "$USER"
$@
/usr/bin/udsactor logout "$USER"

View File

@@ -1,70 +0,0 @@
%define _topdir %(echo $PWD)/rpm
%define name udsactor
%define version 0.0.0
%define release 1
%define buildroot %{_topdir}/%{name}-%{version}-%{release}-root
BuildRoot: %{buildroot}
Name: %{name}
Version: %{version}
Release: %{release}
Summary: Actor for Universal Desktop Services (UDS) Broker
License: BSD3
Group: Admin
Requires: python3-six python3-requests python3-qt5 libXScrnSaver
Vendor: Virtual Cable S.L.U.
URL: http://www.udsenterprise.com
Provides: udsactor
%define _rpmdir ../
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%install
curdir=`pwd`
cd ../..
make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh install-udsactor
cd $curdir
%clean
rm -rf $RPM_BUILD_ROOT
curdir=`pwd`
cd ../..
make DESTDIR=$RPM_BUILD_ROOT DISTRO=rh clean
cd $curdir
%post
systemctl enable udsactor.service > /dev/null 2>&1
%preun
systemctl disable udsactor.service > /dev/null 2>&1
systemctl stop udsactor.service > /dev/null 2>&1
%postun
# $1 == 0 on uninstall, == 1 on upgrade for preun and postun (just a reminder for me... :) )
if [ $1 -eq 0 ]; then
rm -rf /etc/udsactor
rm /var/log/udsactor.log
fi
# And, posibly, the .pyc leaved behind on /usr/share/UDSActor
rm -rf /usr/share/UDSActor > /dev/null 2>&1
%description
This package provides the required components to allow this machine to work on an environment managed by UDS Broker.
%files
%defattr(-,root,root)
/etc/udsactor
/etc/xdg/autostart/UDSActorTool.desktop
/etc/systemd/system/udsactor.service
/usr/bin/UDSActorTool-startup
/usr/bin/udsactor
/usr/bin/udsvapp
/usr/bin/UDSActorTool
/usr/sbin/UDSActorConfig
/usr/sbin/UDSActorConfig-pkexec
/usr/share/UDSActor/*
/usr/share/applications/UDS_Actor_Configuration.desktop
/usr/share/autostart/UDSActorTool.desktop
/usr/share/polkit-1/actions/org.openuds.pkexec.UDSActorConfig.policy

View File

@@ -1,3 +0,0 @@
dist
build
*.spec

View File

@@ -1,77 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import sys
import os
import PyQt5 # pylint: disable=unused-import
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QMainWindow
from udsactor.log import logger, INFO
from udsactor.client import UDSClientQApp
from udsactor.platform import operations
if __name__ == "__main__":
logger.setLevel(INFO)
# Ensure idle operations is initialized on start
operations.initIdleDuration(0)
if 'linux' in sys.platform:
os.environ['QT_X11_NO_MITSHM'] = '1'
UDSClientQApp.setQuitOnLastWindowClosed(False)
qApp = UDSClientQApp(sys.argv)
if 'linux' not in sys.platform:
# The "hidden window" is only needed to process events on Windows
# Not needed on Linux
mw = QMainWindow()
mw.showMinimized() # Start minimized, will be hidden (not destroyed) as soon as qApp.init is invoked
qApp.setMainWindow(mw)
qApp.init()
# Crate a timer to a "dummy" function, so python can check signals from time to time by executing the python interpreter
# Note: Signals are only checked on python code execution, so we create a timer to force call back to python
timer = QTimer(qApp)
timer.start(1000)
timer.timeout.connect(lambda *a: None) # type: ignore # timeout can be connected to a callable
qApp.exec_()
# On windows, if no window is created, this point will never be reached.
qApp.end()
logger.debug('Exiting...')

View File

@@ -1,195 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import sys
import os
import logging
import typing
import PyQt5 # pylint: disable=unused-import
from PyQt5.QtWidgets import QApplication, QDialog, QFileDialog, QMessageBox
import udsactor
from ui.setup_dialog_ui import Ui_UdsActorSetupDialog
# Not imported at runtime, just for type checking
if typing.TYPE_CHECKING:
from PyQt5.QtWidgets import QLineEdit # pylint: disable=ungrouped-imports
logger = logging.getLogger('actor')
class UDSConfigDialog(QDialog):
_host: str = ''
def __init__(self) -> None:
QDialog.__init__(self, None)
# Get local config config
config: udsactor.types.ActorConfigurationType = udsactor.platform.store.readConfig()
self.ui = Ui_UdsActorSetupDialog()
self.ui.setupUi(self)
self.ui.host.setText(config.host)
self.ui.validateCertificate.setCurrentIndex(1 if config.validateCertificate else 0)
self.ui.postConfigCommand.setText(config.post_command or '')
self.ui.preCommand.setText(config.pre_command or '')
self.ui.runonceCommand.setText(config.runonce_command or '')
self.ui.logLevelComboBox.setCurrentIndex(config.log_level)
if config.host:
self.updateAuthenticators()
self.ui.username.setText('')
self.ui.password.setText('')
self.ui.testButton.setEnabled(bool(config.master_token and config.host))
@property
def api(self) -> udsactor.rest.UDSServerApi:
return udsactor.rest.UDSServerApi(self.ui.host.text(), self.ui.validateCertificate.currentIndex() == 1)
def browse(self, lineEdit: 'QLineEdit', caption: str) -> None:
name = QFileDialog.getOpenFileName(parent=self, caption=caption, directory=os.path.dirname(lineEdit.text()))[0]
if name:
if ' ' in name:
name = '"' + name + '"'
lineEdit.setText(os.path.normpath(name))
def browsePreconnect(self) -> None:
self.browse(self.ui.preCommand, 'Select Preconnect command')
def browseRunOnce(self) -> None:
self.browse(self.ui.runonceCommand, 'Select Runonce command')
def browsePostConfig(self) -> None:
self.browse(self.ui.postConfigCommand, 'Select Postconfig command')
def updateAuthenticators(self) -> None:
if self.ui.host.text() != self._host:
self._host = self.ui.host.text()
self.ui.authenticators.clear()
auth: udsactor.types.AuthenticatorType
auths = list(self.api.enumerateAuthenticators())
if auths:
for auth in auths:
self.ui.authenticators.addItem(auth.auth, userData=auth)
# Last, add "admin" authenticator (for uds root user)
self.ui.authenticators.addItem('Administration', userData=udsactor.types.AuthenticatorType('admin', 'admin', 'admin', 'admin', 1, False))
def textChanged(self) -> None:
enableButtons = bool(self.ui.host.text() and self.ui.username.text() and self.ui.password.text() and self.ui.authenticators.currentText())
self.ui.registerButton.setEnabled(enableButtons)
self.ui.testButton.setEnabled(False) # Only registered information can be checked
def finish(self) -> None:
self.close()
def testUDSServer(self) -> None:
config: udsactor.types.ActorConfigurationType = udsactor.platform.store.readConfig()
if not config.master_token or not config.host:
self.ui.testButton.setEnabled(False)
return
try:
api = udsactor.rest.UDSServerApi(config.host, config.validateCertificate)
if not api.test(config.master_token, udsactor.types.MANAGED):
QMessageBox.information(
self,
'UDS Test',
'Current configured token seems to be invalid for {}. Please, request a new one.'.format(config.host),
QMessageBox.Ok
)
else:
QMessageBox.information(
self,
'UDS Test',
'Configuration for {} seems to be correct.'.format(config.host),
QMessageBox.Ok
)
except Exception:
QMessageBox.information(
self,
'UDS Test',
'Configured host {} seems to be inaccesible.'.format(config.host),
QMessageBox.Ok
)
def registerWithUDS(self) -> None:
# Get network card. Will fail if no network card is available, but don't mind (not contempled)
data: udsactor.types.InterfaceInfoType = next(udsactor.platform.operations.getNetworkInfo())
try:
token = self.api.register(
self.ui.authenticators.currentData().auth,
self.ui.username.text(),
self.ui.password.text(),
udsactor.platform.operations.getComputerName(),
data.ip or '', # IP
data.mac or '', # MAC
self.ui.preCommand.text(),
self.ui.runonceCommand.text(),
self.ui.postConfigCommand.text(),
self.ui.logLevelComboBox.currentIndex() # Loglevel
)
# Store parameters on register for later use, notify user of registration
udsactor.platform.store.writeConfig(
udsactor.types.ActorConfigurationType(
actorType=udsactor.types.MANAGED,
host=self.ui.host.text(),
validateCertificate=self.ui.validateCertificate.currentIndex() == 1,
master_token=token,
pre_command=self.ui.preCommand.text(),
post_command=self.ui.postConfigCommand.text(),
runonce_command=self.ui.runonceCommand.text(),
log_level=self.ui.logLevelComboBox.currentIndex()
)
)
# Enables test button
self.ui.testButton.setEnabled(True)
# Informs the user
QMessageBox.information(self, 'UDS Registration', 'Registration with UDS completed.', QMessageBox.Ok)
except udsactor.rest.RESTError as e:
self.ui.testButton.setEnabled(False)
QMessageBox.critical(self, 'UDS Registration', 'UDS Registration error: {}'.format(e), QMessageBox.Ok)
if __name__ == "__main__":
# If to be run as "sudo" on linux, we will need this to avoid problems
if 'linux' in sys.platform:
os.environ['QT_X11_NO_MITSHM'] = '1'
app = QApplication(sys.argv)
if udsactor.platform.operations.checkPermissions() is False:
QMessageBox.critical(None, 'UDS Actor', 'This Program must be executed as administrator', QMessageBox.Ok)
sys.exit(1)
myapp = UDSConfigDialog()
myapp.show()
sys.exit(app.exec_())

View File

@@ -1,156 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import sys
import os
import pickle
import logging
import typing
import PyQt5 # pylint: disable=unused-import
from PyQt5.QtWidgets import QApplication, QDialog, QMessageBox
import udsactor
from ui.setup_dialog_unmanaged_ui import Ui_UdsActorSetupDialog
# Not imported at runtime, just for type checking
if typing.TYPE_CHECKING:
from PyQt5.QtWidgets import QLineEdit # pylint: disable=ungrouped-imports
logger = logging.getLogger('actor')
class UDSConfigDialog(QDialog):
_host: str = ''
_config: udsactor.types.ActorConfigurationType
def __init__(self) -> None:
QDialog.__init__(self, None)
# Get local config config
self._config = udsactor.platform.store.readConfig()
self.ui = Ui_UdsActorSetupDialog()
self.ui.setupUi(self)
self.ui.host.setText(self._config.host)
self.ui.validateCertificate.setCurrentIndex(1 if self._config.validateCertificate else 0)
self.ui.logLevelComboBox.setCurrentIndex(self._config.log_level)
self.ui.serviceToken.setText(self._config.master_token)
self.ui.testButton.setEnabled(bool(self._config.master_token and self._config.host))
@property
def api(self) -> udsactor.rest.UDSServerApi:
return udsactor.rest.UDSServerApi(self.ui.host.text(), self.ui.validateCertificate.currentIndex() == 1)
def finish(self) -> None:
self.close()
def configChanged(self, text: str) -> None:
self.ui.testButton.setEnabled(self.ui.host.text() == self._config.host and self.ui.serviceToken.text() == self._config.master_token)
def testUDSServer(self) -> None:
if not self._config.master_token or not self._config.host:
self.ui.testButton.setEnabled(False)
return
try:
api = udsactor.rest.UDSServerApi(self._config.host, self._config.validateCertificate)
if not api.test(self._config.master_token, udsactor.types.UNMANAGED):
QMessageBox.information(
self,
'UDS Test',
'Service token seems to be invalid . Please, check token validity.',
QMessageBox.Ok
)
else:
QMessageBox.information(
self,
'UDS Test',
'Configuration for {} seems to be correct.'.format(self._config.host),
QMessageBox.Ok
)
except Exception:
QMessageBox.information(
self,
'UDS Test',
'Configured host {} seems to be inaccesible.'.format(self._config.host),
QMessageBox.Ok
)
def saveConfig(self) -> None:
# Store parameters on register for later use, notify user of registration
self._config = udsactor.types.ActorConfigurationType(
actorType=udsactor.types.UNMANAGED,
host=self.ui.host.text(),
validateCertificate=self.ui.validateCertificate.currentIndex() == 1,
master_token=self.ui.serviceToken.text(),
log_level=self.ui.logLevelComboBox.currentIndex()
)
udsactor.platform.store.writeConfig(self._config)
# Enables test button
self.ui.testButton.setEnabled(True)
# Informs the user
QMessageBox.information(self, 'UDS Configuration', 'Configuration saved.', QMessageBox.Ok)
if __name__ == "__main__":
# If to be run as "sudo" on linux, we will need this to avoid problems
if 'linux' in sys.platform:
os.environ['QT_X11_NO_MITSHM'] = '1'
app = QApplication(sys.argv)
if udsactor.platform.operations.checkPermissions() is False:
QMessageBox.critical(None, 'UDS Actor', 'This Program must be executed as administrator', QMessageBox.Ok)
sys.exit(1)
if len(sys.argv) > 2:
if sys.argv[1] == 'export':
try:
with open(sys.argv[2], 'wb') as f:
pickle.dump(udsactor.platform.store.readConfig(), f, protocol=3)
except Exception as e:
print('Error exporting configuration file: {}'.format(e))
sys.exit(1)
sys.exit(0)
if sys.argv[1] == 'import':
try:
with open(sys.argv[2], 'rb') as f:
config = pickle.load(f)
udsactor.platform.store.writeConfig(config)
except Exception as e:
print('Error importing configuration file: {}'.format(e))
sys.exit(1)
sys.exit(0)
myapp = UDSConfigDialog()
myapp.show()
sys.exit(app.exec_())

View File

@@ -1,40 +0,0 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import sys
if sys.platform == 'win32':
from udsactor.windows import runner
else:
from udsactor.linux import runner
if __name__ == "__main__":
runner.run()

View File

@@ -1,363 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>Adolfo Gómez</author>
<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>595</width>
<height>220</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Verdana</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="windowTitle">
<string>UDS Actor Configuration Tool</string>
</property>
<property name="windowIcon">
<iconset resource="uds.qrc">
<normaloff>:/img/img/uds-icon.png</normaloff>:/img/img/uds-icon.png</iconset>
</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="saveButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>180</y>
<width>181</width>
<height>23</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>181</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="toolTip">
<string>Click to register Actor with UDS Broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on this button to register Actor with UDS Broker.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Save Configuration</string>
</property>
</widget>
<widget class="QPushButton" name="closeButton">
<property name="geometry">
<rect>
<x>410</x>
<y>180</y>
<width>171</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>171</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Closes UDS Actor Configuration (discard pending changes if any)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Exits the UDS Actor Configuration Tool&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Close</string>
</property>
</widget>
<widget class="QPushButton" name="testButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>210</x>
<y>180</y>
<width>181</width>
<height>23</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>181</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Click to test existing configuration (disabled if no config found)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on this button to test the server host and assigned toen.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Test configuration</string>
</property>
</widget>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>571</width>
<height>161</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<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_security">
<property name="text">
<string>SSL Validation</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="validateCertificate">
<property name="toolTip">
<string>Select communication security with broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the security for communications with UDS Broker.&lt;/p&gt;&lt;p&gt;The recommended method of communication is &lt;span style=&quot; font-weight:600;&quot;&gt;Use SSL&lt;/span&gt;, but selection needs to be acording to your broker configuration.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Ignore certificate</string>
</property>
</item>
<item>
<property name="text">
<string>Verify certificate</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_host">
<property name="text">
<string>UDS Server</string>
</property>
</widget>
</item>
<item row="1" 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="2" column="0">
<widget class="QLabel" name="label_serviceToken">
<property name="text">
<string>Service Token</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="serviceToken">
<property name="toolTip">
<string>UDS user with administration rights (Will not be stored on template)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Administrator user on UDS Server.&lt;/p&gt;&lt;p&gt;Note: This credential will not be stored on client. Will be used to obtain an unique token for this image.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_loglevel">
<property name="text">
<string>Log Level</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="logLevelComboBox">
<property name="currentIndex">
<number>1</number>
</property>
<property name="frame">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">DEBUG</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">INFO</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ERROR</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">FATAL</string>
</property>
</item>
</widget>
</item>
</layout>
<zorder>label_host</zorder>
<zorder>host</zorder>
<zorder>label_serviceToken</zorder>
<zorder>serviceToken</zorder>
<zorder>validateCertificate</zorder>
<zorder>label_security</zorder>
<zorder>label_loglevel</zorder>
<zorder>logLevelComboBox</zorder>
</widget>
</widget>
<resources>
<include location="uds.qrc"/>
</resources>
<connections>
<connection>
<sender>closeButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>finish()</slot>
<hints>
<hint type="sourcelabel">
<x>315</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>231</x>
<y>161</y>
</hint>
</hints>
</connection>
<connection>
<sender>testButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>testUDSServer()</slot>
<hints>
<hint type="sourcelabel">
<x>300</x>
<y>281</y>
</hint>
<hint type="destinationlabel">
<x>294</x>
<y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>saveButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>saveConfig()</slot>
<hints>
<hint type="sourcelabel">
<x>100</x>
<y>191</y>
</hint>
<hint type="destinationlabel">
<x>297</x>
<y>109</y>
</hint>
</hints>
</connection>
<connection>
<sender>host</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>configChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>341</x>
<y>61</y>
</hint>
<hint type="destinationlabel">
<x>297</x>
<y>109</y>
</hint>
</hints>
</connection>
<connection>
<sender>serviceToken</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>configChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>341</x>
<y>100</y>
</hint>
<hint type="destinationlabel">
<x>297</x>
<y>109</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>finish()</slot>
<slot>saveConfig()</slot>
<slot>testUDSServer()</slot>
<slot>configChanged()</slot>
</slots>
</ui>

View File

@@ -1,660 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<author>Adolfo Gómez</author>
<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>590</width>
<height>307</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Verdana</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="windowTitle">
<string>UDS Actor Configuration Tool</string>
</property>
<property name="windowIcon">
<iconset resource="uds.qrc">
<normaloff>:/img/img/uds-icon.png</normaloff>:/img/img/uds-icon.png</iconset>
</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="registerButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>270</y>
<width>181</width>
<height>23</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>181</width>
<height>0</height>
</size>
</property>
<property name="contextMenuPolicy">
<enum>Qt::DefaultContextMenu</enum>
</property>
<property name="toolTip">
<string>Click to register Actor with UDS Broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on this button to register Actor with UDS Broker.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Register with UDS</string>
</property>
</widget>
<widget class="QPushButton" name="closeButton">
<property name="geometry">
<rect>
<x>410</x>
<y>270</y>
<width>171</width>
<height>23</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>171</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Closes UDS Actor Configuration (discard pending changes if any)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Exits the UDS Actor Configuration Tool&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Close</string>
</property>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>571</width>
<height>241</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_uds">
<attribute name="title">
<string>UDS Server</string>
</attribute>
<widget class="QWidget" name="layoutWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>551</width>
<height>191</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="verticalSpacing">
<number>16</number>
</property>
<item row="1" column="0">
<widget class="QLabel" name="label_host">
<property name="text">
<string>UDS Server</string>
</property>
</widget>
</item>
<item row="1" 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="2" column="0">
<widget class="QLabel" name="label_auth">
<property name="text">
<string>Authenticator</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="authenticators">
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the UDS Broker authenticator for credentials validation&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_username">
<property name="text">
<string>Username</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="username">
<property name="toolTip">
<string>UDS user with administration rights (Will not be stored on template)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Administrator user on UDS Server.&lt;/p&gt;&lt;p&gt;Note: This credential will not be stored on client. Will be used to obtain an unique token for this image.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_password">
<property name="text">
<string>Password</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QLineEdit" name="password">
<property name="toolTip">
<string>Password for user (Will not be stored on template)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Administrator password for the user on UDS Server.&lt;/p&gt;&lt;p&gt;Note: This credential will not be stored on client. Will be used to obtain an unique key for this image.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="validateCertificate">
<property name="toolTip">
<string>Select communication security with broker</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the security for communications with UDS Broker.&lt;/p&gt;&lt;p&gt;The recommended method of communication is &lt;span style=&quot; font-weight:600;&quot;&gt;Use SSL&lt;/span&gt;, but selection needs to be acording to your broker configuration.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<item>
<property name="text">
<string>Ignore certificate</string>
</property>
</item>
<item>
<property name="text">
<string>Verify certificate</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_security">
<property name="text">
<string>SSL Validation</string>
</property>
</widget>
</item>
</layout>
<zorder>label_host</zorder>
<zorder>host</zorder>
<zorder>label_auth</zorder>
<zorder>label_username</zorder>
<zorder>username</zorder>
<zorder>label_password</zorder>
<zorder>password</zorder>
<zorder>validateCertificate</zorder>
<zorder>label_security</zorder>
<zorder>authenticators</zorder>
</widget>
</widget>
<widget class="QWidget" name="tab_advanced">
<attribute name="title">
<string>Advanced</string>
</attribute>
<widget class="QWidget" name="layoutWidget_2">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>551</width>
<height>161</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout_2">
<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_host_2">
<property name="text">
<string>Preconnect</string>
</property>
</widget>
</item>
<item row="0" column="1">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>4</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="preCommand">
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Pre connection command. Executed just before the user is connected to machine.</string>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="browsePreconnectButton">
<property name="text">
<string>Browse</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_username_2">
<property name="text">
<string>Runonce</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>4</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="runonceCommand">
<property name="toolTip">
<string>Run once command. Executed on first boot, just before UDS does anything.</string>
</property>
<property name="whatsThis">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="browseRunOnceButton">
<property name="text">
<string>Browse</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_password_2">
<property name="text">
<string>Postconfig</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>4</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="postConfigCommand">
<property name="toolTip">
<string>Command to execute after UDS finalizes the VM configuration.</string>
</property>
<property name="whatsThis">
<string/>
</property>
<property name="echoMode">
<enum>QLineEdit::Normal</enum>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="browsePostConfigButton">
<property name="text">
<string>Browse</string>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_loglevel">
<property name="text">
<string>Log Level</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QComboBox" name="logLevelComboBox">
<property name="currentIndex">
<number>1</number>
</property>
<property name="frame">
<bool>true</bool>
</property>
<item>
<property name="text">
<string notr="true">DEBUG</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">INFO</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">ERROR</string>
</property>
</item>
<item>
<property name="text">
<string notr="true">FATAL</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
</widget>
</widget>
<widget class="QPushButton" name="testButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>210</x>
<y>270</y>
<width>181</width>
<height>23</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>181</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Click to test existing configuration (disabled if no config found)</string>
</property>
<property name="whatsThis">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Click on this button to test the server host and assigned toen.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Test configuration</string>
</property>
</widget>
</widget>
<resources>
<include location="uds.qrc"/>
</resources>
<connections>
<connection>
<sender>closeButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>finish()</slot>
<hints>
<hint type="sourcelabel">
<x>315</x>
<y>165</y>
</hint>
<hint type="destinationlabel">
<x>231</x>
<y>161</y>
</hint>
</hints>
</connection>
<connection>
<sender>registerButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>registerWithUDS()</slot>
<hints>
<hint type="sourcelabel">
<x>239</x>
<y>132</y>
</hint>
<hint type="destinationlabel">
<x>285</x>
<y>185</y>
</hint>
</hints>
</connection>
<connection>
<sender>host</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>239</x>
<y>59</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>username</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>239</x>
<y>98</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>password</sender>
<signal>textChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>239</x>
<y>137</y>
</hint>
<hint type="destinationlabel">
<x>199</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>browsePreconnectButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>browsePreconnect()</slot>
<hints>
<hint type="sourcelabel">
<x>430</x>
<y>60</y>
</hint>
<hint type="destinationlabel">
<x>243</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>browsePostConfigButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>browsePostConfig()</slot>
<hints>
<hint type="sourcelabel">
<x>430</x>
<y>142</y>
</hint>
<hint type="destinationlabel">
<x>243</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>browseRunOnceButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>browseRunOnce()</slot>
<hints>
<hint type="sourcelabel">
<x>430</x>
<y>101</y>
</hint>
<hint type="destinationlabel">
<x>243</x>
<y>150</y>
</hint>
</hints>
</connection>
<connection>
<sender>host</sender>
<signal>editingFinished()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>updateAuthenticators()</slot>
<hints>
<hint type="sourcelabel">
<x>343</x>
<y>98</y>
</hint>
<hint type="destinationlabel">
<x>294</x>
<y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>authenticators</sender>
<signal>currentTextChanged(QString)</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>textChanged()</slot>
<hints>
<hint type="sourcelabel">
<x>343</x>
<y>137</y>
</hint>
<hint type="destinationlabel">
<x>294</x>
<y>153</y>
</hint>
</hints>
</connection>
<connection>
<sender>testButton</sender>
<signal>clicked()</signal>
<receiver>UdsActorSetupDialog</receiver>
<slot>testUDSServer()</slot>
<hints>
<hint type="sourcelabel">
<x>300</x>
<y>281</y>
</hint>
<hint type="destinationlabel">
<x>294</x>
<y>153</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>textChanged()</slot>
<slot>finish()</slot>
<slot>registerWithUDS()</slot>
<slot>browsePreconnect()</slot>
<slot>browseRunOnce()</slot>
<slot>browsePostConfig()</slot>
<slot>updateAuthenticators()</slot>
<slot>testUDSServer()</slot>
</slots>
</ui>

View File

@@ -1,5 +0,0 @@
<RCC>
<qresource prefix="img">
<file>../img/uds-icon.png</file>
</qresource>
</RCC>

View File

@@ -1,16 +0,0 @@
#!/bin/bash
function process {
# pyuic4 about-dialog.ui -o about_dialog_ui.py -x
# pyuic4 message-dialog.ui -o message_dialog_ui.py
pyuic5 setup-dialog.ui -o ../ui/setup_dialog_ui.py --import-from=ui
pyuic5 setup-dialog-unmanaged.ui -o ../ui/setup_dialog_unmanaged_ui.py --import-from=ui
}
pyrcc5 uds.qrc -o ../ui/uds_rc.py
# process current directory ui's
process

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -1,247 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import threading
import time
import datetime
import signal
import typing
from PyQt5.QtWidgets import QApplication, QMessageBox
from PyQt5.QtCore import QByteArray, QBuffer, QIODevice, pyqtSignal
from . import rest
from . import tools
from . import platform
from .log import logger
from .http import client
# Not imported at runtime, just for type checking
if typing.TYPE_CHECKING:
from . import types
from PyQt5.QtGui import QPixmap
from PyQt5.QtWidgets import QMainWindow
class UDSClientQApp(QApplication):
_app: 'UDSActorClient'
_initialized: bool
_mainWindow: typing.Optional['QMainWindow']
message = pyqtSignal(str, name='message')
def __init__(self, args) -> None:
super().__init__(args)
self._mainWindow = None
self._initialized = False
# This will be invoked on session close
self.commitDataRequest.connect(self.end) # type: ignore # Will be invoked on session close, to gracely close app
# self.aboutToQuit.connect(self.end)
self.message.connect(self.showMessage) # type: ignore # there are problems with Pylance and connects on PyQt5... :)
# Execute backgroup thread for actions
self._app = UDSActorClient(self)
def init(self) -> None:
# Notify loging and mark it
logger.debug('Starting APP')
if self._mainWindow:
self._mainWindow.hide()
self._app.start()
self._initialized = True
def end(self, sessionManager=None) -> None: # pylint: disable=unused-argument
if not self._initialized:
return
self._initialized = False
logger.debug('Stopping app thread')
self._app.stop()
self._app.join()
def showMessage(self, message: str) -> None:
QMessageBox.information(None, 'Message', message) # type: ignore
def setMainWindow(self, mw: 'QMainWindow'):
self._mainWindow = mw
class UDSActorClient(threading.Thread): # pylint: disable=too-many-instance-attributes
_running: bool
_forceLogoff: bool
_extraLogoff: str
_qApp: UDSClientQApp
_listener: client.HTTPServerThread
_loginInfo: typing.Optional['types.LoginResultInfoType']
_notified: bool
_notifiedDeadline: bool
_sessionStartTime: datetime.datetime
api: rest.UDSClientApi
def __init__(self, qApp: QApplication):
super().__init__()
self.api = rest.UDSClientApi() # Self initialized
self._qApp = typing.cast(UDSClientQApp, qApp)
self._running = False
self._forceLogoff = False
self._extraLogoff = ''
self._listener = client.HTTPServerThread(self)
self._loginInfo = None
self._notified = False
self._notifiedDeadline = False
# Capture stop signals..
logger.debug('Setting signals...')
signal.signal(signal.SIGINT, self.stopSignal)
signal.signal(signal.SIGTERM, self.stopSignal)
def stopSignal(self, signum, frame) -> None: # pylint: disable=unused-argument
logger.info('Stop signal received')
self.stop()
def checkDeadLine(self):
if self._loginInfo is None or not self._loginInfo.dead_line: # No deadline check
return
remainingTime = self._loginInfo.dead_line - (datetime.datetime.now() - self._sessionStartTime).total_seconds()
logger.debug('Remaining time: {}'.format(remainingTime))
if not self._notifiedDeadline and remainingTime < 300: # With five minutes, show a warning message
self._notifiedDeadline = True
self._showMessage('Your session will expire in less that 5 minutes. Please, save your work and disconnect.')
return
if remainingTime <= 0:
logger.debug('Session dead line reached. Logging out')
self._running = False
self._forceLogoff = True
def checkIdle(self) -> None:
if self._loginInfo is None or not self._loginInfo.max_idle: # No idle check
return
idleTime = platform.operations.getIdleDuration()
remainingTime = self._loginInfo.max_idle - idleTime
logger.debug('Idle: %s Remaining: %s', idleTime, remainingTime)
if remainingTime > 120: # Reset show Warning dialog if we have more than 5 minutes left
self._notified = False
return
if not self._notified and remainingTime < 120: # With two minutes, show a warning message
self._notified = True
self._showMessage('You have been idle for too long. The session will end if you don\'t resume operations.')
if remainingTime <= 0:
logger.info('User has been idle for too long, exiting from session')
self._extraLogoff = ' (idle: {} vs {})'.format(int(idleTime), self._loginInfo.max_idle)
self._running = False
self._forceLogoff = True
def run(self) -> None:
logger.debug('UDS Actor thread')
self._listener.start() # async listener for service
self._running = True
self._sessionStartTime = datetime.datetime.now()
time.sleep(0.4) # Wait a bit before sending login
try:
# Notify loging and mark it
self._loginInfo = self.api.login(platform.operations.getCurrentUser(), platform.operations.getSessionType())
if self._loginInfo.max_idle:
platform.operations.initIdleDuration(self._loginInfo.max_idle)
while self._running:
# Check Idle & dead line
self.checkIdle()
self.checkDeadLine()
time.sleep(1.3) # Sleeps between loop iterations
self._loginInfo = None
self.api.logout(platform.operations.getCurrentUser() + self._extraLogoff)
except Exception as e:
logger.error('Error on client loop: %s', e)
self._listener.stop() # async listener for service
# Notify exit to qt
QApplication.quit()
if self._forceLogoff:
time.sleep(1.3) # Wait a bit before forcing logoff
platform.operations.loggoff()
def _showMessage(self, message: str) -> None:
self._qApp.message.emit(message) # type: ignore # there are problems with Pylance and connects on PyQt5... :)
def stop(self) -> None:
logger.debug('Stopping client Service')
self._running = False
def logout(self) -> typing.Any:
self._forceLogoff = True
self._running = False
return 'ok'
def message(self, msg: str) -> typing.Any:
threading.Thread(target=self._showMessage, args=(msg,)).start()
return 'ok'
def screenshot(self) -> typing.Any:
'''
On windows, an RDP session with minimized screen will render "black screen"
So only when user is using RDP connection will return an "actual" screenshot
'''
pixmap: 'QPixmap' = self._qApp.primaryScreen().grabWindow(0) # type: ignore
ba = QByteArray()
buffer = QBuffer(ba)
buffer.open(QIODevice.WriteOnly)
pixmap.save(buffer, 'PNG')
buffer.close()
scrBase64 = bytes(ba.toBase64()).decode() # type: ignore # there are problems with Pylance and connects on PyQt5... :)
logger.debug('Screenshot length: %s', len(scrBase64))
return scrBase64 # 'result' of JSON will contain base64 of screen
def script(self, script: str) -> typing.Any:
tools.ScriptExecutorThread(script).start()
return 'ok'

View File

@@ -1,7 +0,0 @@
from .. import types
defaultCertificate = types.CertificateInfoType(
private_key='-----BEGIN ENCRYPTED PRIVATE KEY-----\nMIIFHTBPBgkqhkiG9w0BBQ0wQjApBgkqhkiG9w0BBQwwHAQIfG2+iMYJBswCAggA\nMAwGCCqGSIb3DQIJBQAwFQYJKwYBBAGXVQECBAhCusU5R8ulZQSCBMgheyZ81Qkq\n+TcbPeBlUGCFllSUOo7xQ/OuwYSmzLx8LpN0hQNv4azF6MYH+I8eMSPd3A547yW3\nJE4GjIBfRvcq2X1UZ2FQfECU9UP0ShPuPrVhIh6ZZklmlRjbIF8hGfSzXAuafQb+\n4wXXsofahi/SPgqK1Gw65nRiMcoeRZchJkx8pBgKVWED6Cbh6aAkeqkVKPnsebiV\n6kE+0C7+hgNUbyRd46R+/5NXzPjg4ItfSak+PLzQ1KeRv4Cu6DdzRKJ4V9/MlNdU\nNNEkSVSEaRn4sv+eByU4uxBMaSmD1tLc/A7OmaAeRpIQvls3Zcf2+V0+anAtjbjd\n6eIb2nceey+dKFm4ewlR4mXuzj1QowRTHceOIkvKIrOODxdy9M5hNBZ7VLum29tY\nRhqtmEH2BZZJ8SpM2SsEZzPxqJFiVZbvpeOKjxlMyn1dFWn1rP8uMnfuMKqBaj5D\nd5clOPlwebYw5UpM6Vvawu4nGqxECTSWcfNlDYO5U/0Fsm9+JIrJ7Buukgv2+rhs\nD/6oUK9NB8AW9qnDr7UxbC/ujhkKQG3woaZlPbiMs5WQaS+DrTg4N49wPzS0h+ME\nF8ZzuPnd6+sMGQioCIrQAZ08rk54oCijBhFh8/EQhQKGsMFw2swi9t6+FVU5Bvil\nlhmBd3LA5EuQ5y1X0jRL/+GDiUiZw1gOJP8d/XzhUJL9AmamdqJ6/rAU7lUTNWkM\ndzmFonUO2Mh2zgEEudHsTOH8udZ2l64LIHc6fCkDmM8QzghjrEFyci6R8333DSSM\nwbM0MvyTLM7TTqZUD60EgD+Ihyr/wJcBZY7GVn7hTq7ee14zeI+dZFmTMYOnt0mA\ngof19t0naPPZU+zyl/ambNF5mmSkGOAl4IBHNvPt5ztEVbNpwW3DHbmdYW71Ax+z\nCDlr4iKZahv21o1PCesPV2IlaHZFD6aBRt0DxzMqtq9cpWsI1g7aEaAjRbSvqhMY\npUeqFXz/GfR9rjRkufr48//ll0/Q/Ogx7m1TjQ6mAEQrklI7pa2W0u3H0BpSZSis\nR6ST3ulE+wfsp8cau6q2er+BSsDhBjSn9FeCUjHzY56u9ud/kb6/jLEdgxNpj0na\n3WVqCCCL/dAFSWznBmdracZsRMXapXInHCiiOEkXXbXIXvRKiTPJXdN+w2/U2j2B\nwXZuazVSpmM+xAZTAS9dtBUQJo+5px9b6P09uagvTA32ezbpPXf+hSfmTdUwbmAY\nrmE9SW85tzX+cD17loygBBRrjOr4uQy/s/9FqLx8bM73jly05rdOmX28ECKwEA05\n8aCFkfqrl9J9doVapaUlywpJVPFtE6W6tCF+ULMfb16vEjT1du1+epEnbGGLRQxg\n3aFLyKlvFaNvR38fiQFUGtBgGOaBN3rhGpbMwjch3oReXv9X/4UCL6sVIiOH2H3c\nVSZdC3O5g6CMVe4zckUe1k9mLDb5524IHDFfptZ6Bw+uzrqIy3GHW8dJF2AK471b\nMUnCojTpdbFHaUs2u/rNKVUyY+vLf8hkyP+znBUoPxSJtty53EWNukxjjsxx0lx3\niZGqN72lXlXuSFZAIxi307+xxE21cbzDsMidyJkbKKGm/F4BOKvX9jWmAyYmBG6A\n1L3yNRouFWsYDwYAX2nZ1is=\n-----END ENCRYPTED PRIVATE KEY-----\n',
server_certificate='-----BEGIN CERTIFICATE-----\nMIIDcTCCAlkCBDfnXU8wDQYJKoZIhvcNAQELBQAwfTELMAkGA1UEBhMCRVMxDzAN\nBgNVBAgMBk1hZHJpZDEPMA0GA1UEBwwGTWFkcmlkMREwDwYDVQQKDAhVRFMgQ2Vy\ndDERMA8GA1UECwwIVURTIENlcnQxEjAQBgNVBAMMCTEyNy4wLjAuMTESMBAGA1Ud\nEQwJMTI3LjAuMC4xMB4XDTIwMDIxNzExNTkzMloXDTMwMDIxNDExNTkzMlowfTEL\nMAkGA1UEBhMCRVMxDzANBgNVBAgMBk1hZHJpZDEPMA0GA1UEBwwGTWFkcmlkMREw\nDwYDVQQKDAhVRFMgQ2VydDERMA8GA1UECwwIVURTIENlcnQxEjAQBgNVBAMMCTEy\nNy4wLjAuMTESMBAGA1UdEQwJMTI3LjAuMC4xMIIBIjANBgkqhkiG9w0BAQEFAAOC\nAQ8AMIIBCgKCAQEA2e1cW7YtRpNLazR3f/LqLv8OB0rKh8cUPH4wuQhbBTkee8Wu\n5eMSadRCIyRbKj4b8dtVfI9QW0SrmhGuMx1KCh3CsYd9XsWiKbGkiRBHIDOn5pkF\n6PUayDJ8KjnGbfnZjp0AmxXP4r1OO8jUPqzKS9Ubf5PgwcwdFiUKVfVPwGwctwt5\nt9YpSRONw0rTsCjVHvO2dd9h6EopskLCWxpN8l9kNLwLM/6t0IqVKmn5/IYPKKN2\nCX8a7IXpxwoiUs4sBZYhUMBWikB1hKQRSYafp1Xvc5PeTFXTFqGANnqz0NoZ8tqL\n8qjQUN/PCdtzhfcP5RgT2g1qyS2RBCMYH7Zs0wIDAQABMA0GCSqGSIb3DQEBCwUA\nA4IBAQCUt+qlLA1N9VXMwDQAYG4Kt6/UlMHCXAajHQQGtjdyGJ4++m7EIjI96hMU\n3Cx2gp2ggR3JGnuSR+DdBvPl5iGku7J8KV0JiJg30gTY8JuUIy/PMLZWloYKrBHV\nlin2GujQ4OsIt3dbr4XtcKW1Wd7L6fBzHlq7Xyxh+gcTzTvTmq67Q9XKlBWsegMf\nv4FKy0lfcSFK3vTzswQtuTontG4TqLiT/4AnMt3D0cTQ6b6KoZwUUX/TDNhau06d\nQ4Ilz8X61ka+4HBkFSR5ahP9noCVhwO329h+6epO141E5Tep3OLc/GCF4oaKOlMR\nfqxf5f2bghU0fxmtEoNJTZkBsN1S\n-----END CERTIFICATE-----\n',
password='Pw7qbatz5u-y-Z5ora2D2ZuBCm95AHnKRcpze53k8tw'
)

View File

@@ -1,166 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import threading
import http.server
import secrets
import json
import typing
from ..log import logger
# Not imported at runtime, just for type checking
if typing.TYPE_CHECKING:
from ..client import UDSActorClient
class HTTPServerHandler(http.server.BaseHTTPRequestHandler):
protocol_version = 'HTTP/1.0'
server_version = 'UDS Actor Server'
sys_version = ''
_id: typing.ClassVar[str] # Random id for server
_app: typing.ClassVar['UDSActorClient']
def sendJsonResponse(self, result: typing.Optional[typing.Any] = None, error: typing.Optional[str] = None, code: int = 200) -> None:
data = json.dumps({'result': result, 'error': error})
self.send_response(code)
self.send_header('Content-type', 'application/json')
self.send_header('Content-Length', str(len(data)))
self.send_header('Server: ', self.server_version)
self.end_headers()
try:
self.wfile.write(data.encode())
except Exception:
pass # Evict "broken pipe" when sending errors
def do_POST(self) -> None:
# Only allows requests from localhost
if self.client_address[0][:3] != '127':
self.sendJsonResponse(error='Forbidden', code=403)
# Very simple path & params splitter
path = self.path.split('?')[0][1:].split('/')
if len(path) != 2 or path[0] != HTTPServerHandler._id:
self.sendJsonResponse(error='Forbidden', code=403)
try:
length = int(str(self.headers.get('content-length', '0')))
content = self.rfile.read(length)
params: typing.MutableMapping[str, str] = json.loads(content or '{}')
except Exception as e:
logger.error('Got exception executing POST {}: {}'.format(self.path, str(e)))
self.sendJsonResponse(error='Invalid request', code=400)
return
try:
result = getattr(self, 'method_' + path[1])(params) # last part of path is method
except AttributeError as e:
logger.error('Invoked invalid method: %s: %s', path[1], e)
self.sendJsonResponse(error='Invalid request', code=400)
return
except Exception as e:
logger.error('Got exception executing {}: {}'.format('/'.join(path), str(e)))
self.sendJsonResponse(error='Internal error', code=500)
return
self.sendJsonResponse(result)
# Internal methods
def method_ping(self, params: typing.MutableMapping[str, str]) -> typing.Any:
return 'pong'
def method_logout(self, params: typing.MutableMapping[str, str]) -> typing.Any:
return self._app.logout()
def method_message(self, params: typing.MutableMapping[str, str]) -> typing.Any:
return self._app.message(params['message'])
def method_screenshot(self, params: typing.MutableMapping[str, str]) -> typing.Any:
return self._app.screenshot()
def method_script(self, params: typing.MutableMapping[str, str]) -> typing.Any:
return self._app.script(params['script'])
def do_GET(self) -> None:
self.sendJsonResponse(error='Forbidden', code=403)
def log_error(self, format: str, *args): # pylint: disable=redefined-builtin
logger.error(format, *args)
def log_message(self, format: str, *args): # pylint: disable=redefined-builtin
logger.debug(format, *args)
class HTTPServerThread(threading.Thread):
_server: typing.Optional[http.server.HTTPServer]
_app: 'UDSActorClient'
port: int
id: str
def __init__(self, app: 'UDSActorClient'):
super().__init__()
self._server = None
self._app = app
self.port = -1
self.id = secrets.token_urlsafe(16)
@property
def url(self) -> str:
return 'http://127.0.0.1:{}/{}'.format(self.port, self.id)
def stop(self) -> None:
if self._server:
logger.debug('Stopping Http-client Service')
try:
self._app.api.unregister(self.url)
except Exception as e:
logger.error('Error unregistering on actor service: %s', e)
self._server.shutdown()
self._server = None
def run(self):
HTTPServerHandler._app = self._app # pylint: disable=protected-access
HTTPServerHandler._id = self.id # pylint: disable=protected-access
self._server = http.server.HTTPServer(('127.0.0.1', 0), HTTPServerHandler)
self.port = self._server.socket.getsockname()[1]
# Register using app api
logger.debug('Registered %s', self.url)
try:
self._app.api.register(self.url)
except Exception as e:
logger.error('Error registering on actor service: %s', e)
self._server.serve_forever()

View File

@@ -1,98 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import json
import typing
import requests
from ..log import logger
# For avoid proxy on localhost connections
NO_PROXY = {
'http': None,
'https': None,
}
class UDSActorClientPool:
_clientUrl: typing.List[str]
def __init__(self) -> None:
self._clientUrl = []
def _post(self, method: str, data: typing.MutableMapping[str, str], timeout=2) -> typing.List[requests.Response]:
removables: typing.List[str] = []
result: typing.List[typing.Any] = []
for clientUrl in self._clientUrl:
try:
result.append(requests.post(clientUrl + '/' + method, data=json.dumps(data), verify=False, timeout=timeout, proxies=NO_PROXY))
except Exception as e:
# If cannot request to a clientUrl, remove it from list
logger.info('Could not connect with client %s: %s. Removed from registry.', e, clientUrl)
removables.append(clientUrl)
# Remove failed connections
for clientUrl in removables:
self.unregister(clientUrl)
return result
def register(self, clientUrl: str) -> None:
# Remove first if exists, to avoid duplicates
self.unregister(clientUrl)
# And add it again
self._clientUrl.append(clientUrl)
def unregister(self, clientUrl: str) -> None:
self._clientUrl = list((i for i in self._clientUrl if i != clientUrl))
def executeScript(self, script: str) -> None:
self._post('script', {'script': script}, timeout=30)
def logout(self) -> None:
self._post('logout', {})
def message(self, message: str) -> None:
self._post('message', {'message': message})
def ping(self) -> bool:
if not self._clientUrl:
return True # No clients, ping ok
self._post('ping', {}, timeout=1)
return bool(self._clientUrl) # There was clients, but they are now lost!!!
def screenshot(self) -> typing.Optional[str]: # Screenshot are returned as base64
for r in self._post('screenshot', {}, timeout=3):
try:
return r.json()['result']
except Exception:
pass
return None

View File

@@ -1,87 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import typing
from .. import tools
from . import handler
from ..log import logger
if typing.TYPE_CHECKING:
from ..service import CommonService
class PublicProvider(handler.Handler):
def post_logout(self) -> typing.Any:
logger.debug('Sending LOGOFF to clients')
self._service._clientsPool.logout() # pylint: disable=protected-access
return 'ok'
# Alias
post_logoff = post_logout
def post_message(self) -> typing.Any:
logger.debug('Sending MESSAGE to clients')
if 'message' not in self._params:
raise Exception('Invalid message parameters')
self._service._clientsPool.message(self._params['message']) # pylint: disable=protected-access
return 'ok'
def post_script(self) -> typing.Any:
logger.debug('Received script: {}'.format(self._params))
if 'script' not in self._params:
raise Exception('Invalid script parameters')
if self._params.get('user', False):
logger.debug('Sending SCRIPT to client')
self._service._clientsPool.executeScript(self._params['script']) # pylint: disable=protected-access
else:
# Execute script at server space, that is, here
# as a parallel thread
th = tools.ScriptExecutorThread(self._params['script'])
th.start()
return 'ok'
def post_preConnect(self) -> typing.Any:
logger.debug('Received Pre connection')
if 'user' not in self._params or 'protocol' not in self._params:
raise Exception('Invalid preConnect parameters')
return self._service.preConnect(self._params['user'], self._params['protocol'], self._params.get('ip', 'unknown'), self._params.get('hostname', 'unknown'))
def get_information(self) -> typing.Any:
# Return something useful? :)
return 'UDS Actor Secure Server'
def get_screenshot(self) -> typing.Any:
return self._service._clientsPool.screenshot() # pylint: disable=protected-access
def get_uuid(self) -> typing.Any:
if self._service.isManaged():
return self._service._cfg.own_token # pylint: disable=protected-access
return ''

View File

@@ -1,166 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import os
import threading
import http.server
import json
import ssl
import typing
from ..log import logger
from .. import certs
from .. import rest
from .public import PublicProvider
from .local import LocalProvider
# Not imported at runtime, just for type checking
if typing.TYPE_CHECKING:
from ..service import CommonService
from .handler import Handler
class HTTPServerHandler(http.server.BaseHTTPRequestHandler):
protocol_version = 'HTTP/1.0'
server_version = 'UDS Actor Server'
sys_version = ''
_service: typing.Optional['CommonService'] = None
def sendJsonResponse(self, result: typing.Optional[typing.Any] = None, error: typing.Optional[str] = None, code: int = 200) -> None:
data = json.dumps({'result': result, 'error': error})
self.send_response(code)
self.send_header('Content-type', 'application/json')
self.send_header('Content-Length', str(len(data)))
self.send_header('Server: ', self.server_version)
self.end_headers()
self.wfile.write(data.encode())
def process(self, method: str, params: typing.MutableMapping[str, str]) -> None:
if not self._service:
self.sendJsonResponse(error='Not initialized', code=500)
return
# Very simple path & params splitter
path = self.path.split('?')[0][1:].split('/')
logger.debug('Path: %s, params: %s', path, params)
handlerType: typing.Optional[typing.Type['Handler']] = None
if len(path) == 3 and path[0] == 'actor' and path[1] == self._service._secret: # pylint: disable=protected-access
# public method
handlerType = PublicProvider
elif len(path) == 2 and path[0] == 'ui':
# private method, only from localhost
if self.client_address[0][:3] == '127':
handlerType = LocalProvider
if not handlerType:
self.sendJsonResponse(error='Forbidden', code=403)
return
try:
result = getattr(handlerType(self._service, method, params), method + '_' + path[-1])() # last part of path is method
except AttributeError:
self.sendJsonResponse(error='Method not found', code=404)
return
except Exception as e:
logger.error('Got exception executing {} {}: {}'.format(method, '/'.join(path), str(e)))
self.sendJsonResponse(error=str(e), code=500)
return
self.sendJsonResponse(result)
def do_GET(self) -> None:
try:
params = {v.split('=')[0]: v.split('=')[1] for v in self.path.split('?')[1].split('&')}
except Exception:
params = {}
self.process('get', params)
def do_POST(self) -> None:
try:
length = int(str(self.headers.get('content-length', '0')))
content = self.rfile.read(length)
params: typing.MutableMapping[str, str] = json.loads(content)
except Exception as e:
logger.error('Got exception executing POST {}: {}'.format(self.path, str(e)))
self.sendJsonResponse(error='Invalid parameters', code=400)
return
self.process('post', params)
def log_error(self, format, *args): # pylint: disable=redefined-builtin
logger.error(format, *args)
def log_message(self, format, *args): # pylint: disable=redefined-builtin
logger.debug(format, *args)
class HTTPServerThread(threading.Thread):
_server: typing.Optional[http.server.HTTPServer]
_service: 'CommonService'
_certFile: typing.Optional[str]
def __init__(self, service: 'CommonService'):
super().__init__()
self._server = None
self._service = service
self._certFile = None
def stop(self) -> None:
logger.debug('Stopping Http-server Service')
if self._server:
self._server.shutdown()
self._server = None
if self._certFile:
try:
os.unlink(self._certFile)
except Exception as e:
logger.error('Error removing certificate file: %s', e)
logger.debug('Http-server stopped')
def run(self):
HTTPServerHandler._service = self._service # pylint: disable=protected-access
self._certFile, password = certs.saveCertificate(self._service._certificate) # pylint: disable=protected-access
self._server = http.server.HTTPServer(('0.0.0.0', rest.LISTEN_PORT), HTTPServerHandler)
# self._server.socket = ssl.wrap_socket(self._server.socket, certfile=self.certFile, server_side=True)
context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
context.options = ssl.CERT_NONE
context.load_cert_chain(certfile=self._certFile, password=password)
self._server.socket = context.wrap_socket(self._server.socket, server_side=True)
self._server.serve_forever()

View File

@@ -1 +0,0 @@
VERSION = '3.0.0'

View File

@@ -1,173 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import sys
import os
import time
import atexit
from signal import SIGTERM, SIGKILL
from udsactor.log import logger
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
"""
def __init__(self, pidfile: str, stdin: str = '/dev/null', stdout: str = '/dev/null', stderr: str = '/dev/null'):
self.stdin = stdin
self.stdout = stdout
self.stderr = stderr
self.pidfile = pidfile
def daemonize(self) -> None:
"""
do the UNIX double-fork magic, see Stevens' "Advanced
Programming in the UNIX Environment" for details (ISBN 0201563177)
http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
"""
try:
pid = os.fork()
if pid > 0:
# exit first parent
sys.exit(0)
except OSError as e:
logger.error("fork #1 error: {}".format(e))
sys.stderr.write("fork #1 failed: {}\n".format(e))
sys.exit(1)
# decouple from parent environment
os.chdir("/")
os.setsid()
os.umask(0)
# do second fork
try:
pid = os.fork()
if pid > 0:
# exit from second parent
sys.exit(0)
except OSError as e:
logger.error("fork #2 error: {}".format(e))
sys.stderr.write("fork #2 failed: {}\n".format(e))
sys.exit(1)
# redirect standard file descriptors
sys.stdout.flush()
sys.stderr.flush()
si = open(self.stdin, 'r')
so = open(self.stdout, 'ab+')
se = open(self.stderr, 'ab+', 0)
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
# write pidfile
atexit.register(self.removePidFile)
pidStr = str(os.getpid())
with open(self.pidfile, 'w+') as f:
f.write("{}\n".format(pidStr))
def removePidFile(self) -> None:
try:
os.remove(self.pidfile)
except Exception:
# Not found/not permissions or whatever, ignore it
pass
def start(self) -> None:
"""
Start the daemon
"""
logger.debug('Starting daemon')
# Check for a pidfile to see if the daemon already runs
if os.path.exists(self.pidfile):
message = "pidfile {} already exist. Daemon already running?\n".format(self.pidfile)
logger.error(message)
sys.stderr.write(message)
sys.exit(1)
# Start the daemon
self.daemonize()
try:
self.run()
except Exception as e:
logger.error('Exception running process: {}'.format(e))
self.removePidFile()
def stop(self) -> None:
"""
Stop the daemon
"""
# Get the pid from the pidfile
try:
pf = open(self.pidfile, 'r')
pid = int(pf.read().strip())
pf.close()
except IOError:
message = "pidfile {} does not exist. Daemon not running?\n".format(self.pidfile)
logger.error(message)
# sys.stderr.write(message)
return # not an error in a restart
# Try killing the daemon process
try:
cnt = 10
while cnt:
cnt -= 1
os.kill(pid, SIGTERM)
time.sleep(1)
if not cnt:
os.kill(pid, SIGKILL)
except OSError as err:
if err.errno == 3: # No such process
if os.path.exists(self.pidfile):
os.remove(self.pidfile)
else:
sys.stderr.write('Error: {}'.format(err))
sys.exit(1)
def restart(self) -> None:
"""
Restart the daemon
"""
self.stop()
self.start()
# Overridables
def run(self) -> None:
"""
override this to provide your own daemon
"""

View File

@@ -1,73 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import os
import tempfile
import logging
import typing
class LocalLogger: # pylint: disable=too-few-public-methods
linux = False
windows = True
logger: typing.Optional[logging.Logger]
def __init__(self) -> None:
# tempdir is different for "user application" and "service"
# service wil get c:\windows\temp, while user will get c:\users\XXX\temp
# Try to open logger at /var/log path
# If it fails (access denied normally), will try to open one at user's home folder, and if
# agaim it fails, open it at the tmpPath
for logDir in ('/var/log', os.path.expanduser('~'), tempfile.gettempdir()):
try:
fname = os.path.join(logDir, 'udsactor.log')
logging.basicConfig(
filename=fname,
filemode='a',
format='%(levelname)s %(asctime)s %(message)s',
level=logging.DEBUG
)
self.logger = logging.getLogger('udsactor')
os.chmod(fname, 0o0600)
return
except Exception:
pass
# Logger can't be set
self.logger = None
def log(self, level: int, message: str) -> None:
# Debug messages are logged to a file
# our loglevels are 0 (other), 10000 (debug), ....
# logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET
if self.logger:
self.logger.log(int(level / 1000), message)

View File

@@ -1,196 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import configparser
import platform
import socket
import fcntl # Only available on Linux. Expect complains if edited from windows
import os
import subprocess
import struct
import array
import typing
from .. import types
from .renamer import rename
from . import xss
def _getMacAddr(ifname: str) -> typing.Optional[str]:
'''
Returns the mac address of an interface
Mac is returned as unicode utf-8 encoded
'''
ifnameBytes = ifname.encode('utf-8')
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
info = bytearray(fcntl.ioctl(s.fileno(), 0x8927, struct.pack(str('256s'), ifnameBytes[:15])))
return str(''.join(['%02x:' % char for char in info[18:24]])[:-1]).upper()
except Exception:
return None
def _getIpAddr(ifname: str) -> typing.Optional[str]:
'''
Returns the ip address of an interface
Ip is returned as unicode utf-8 encoded
'''
ifnameBytes = ifname.encode('utf-8')
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
return str(socket.inet_ntoa(fcntl.ioctl(
s.fileno(),
0x8915, # SIOCGIFADDR
struct.pack(str('256s'), ifnameBytes[:15])
)[20:24]))
except Exception:
return None
def _getInterfaces() -> typing.List[str]:
'''
Returns a list of interfaces names coded in utf-8
'''
max_possible = 128 # arbitrary. raise if needed.
space = max_possible * 16
if platform.architecture()[0] == '32bit':
offset, length = 32, 32
elif platform.architecture()[0] == '64bit':
offset, length = 16, 40
else:
raise OSError('Unknown arquitecture {0}'.format(platform.architecture()[0]))
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
names = array.array(str('B'), b'\0' * space)
outbytes = struct.unpack(str('iL'), fcntl.ioctl(
s.fileno(),
0x8912, # SIOCGIFCONF
struct.pack(str('iL'), space, names.buffer_info()[0])
))[0]
namestr = names.tostring()
# return namestr, outbytes
return [namestr[i:i + offset].split(b'\0', 1)[0].decode('utf-8') for i in range(0, outbytes, length)]
def _getIpAndMac(ifname: str) -> typing.Tuple[typing.Optional[str], typing.Optional[str]]:
ip, mac = _getIpAddr(ifname), _getMacAddr(ifname)
return (ip, mac)
def checkPermissions() -> bool:
return os.getuid() == 0 # getuid only available on linux. Expect "complaioins" if edited from Windows
def getComputerName() -> str:
'''
Returns computer name, with no domain
'''
return socket.gethostname().split('.')[0]
def getNetworkInfo() -> typing.Iterator[types.InterfaceInfoType]:
for ifname in _getInterfaces():
ip, mac = _getIpAndMac(ifname)
if mac != '00:00:00:00:00:00' and mac and ip and ip.startswith('169.254') is False: # Skips local interfaces & interfaces with no dhcp IPs
yield types.InterfaceInfoType(name=ifname, mac=mac, ip=ip)
def getDomainName() -> str:
return ''
def getLinuxOs() -> str:
try:
with open('/etc/os-release', 'r') as f:
data = f.read()
cfg = configparser.ConfigParser()
cfg.read_string('[os]\n' + data)
return cfg['os'].get('id', 'unknown').replace('"', '')
except Exception:
return 'unknown'
def reboot(flags: int = 0):
'''
Simple reboot using os command
'''
subprocess.call(['/sbin/shutdown', 'now', '-r'])
def loggoff() -> None:
'''
Right now restarts the machine...
'''
subprocess.call(['/usr/bin/pkill', '-u', os.environ['USER']])
# subprocess.call(['/sbin/shutdown', 'now', '-r'])
# subprocess.call(['/usr/bin/systemctl', 'reboot', '-i'])
def renameComputer(newName: str) -> bool:
'''
Changes the computer name
Returns True if reboot needed
'''
rename(newName)
return True # Always reboot right now. Not much slower but much more better
def joinDomain(domain: str, ou: str, account: str, password: str, executeInOneStep: bool = False):
pass
def changeUserPassword(user: str, oldPassword: str, newPassword: str) -> None:
'''
Simple password change for user using command line
'''
os.system('echo "{1}\n{1}" | /usr/bin/passwd {0} 2> /dev/null'.format(user, newPassword))
def initIdleDuration(atLeastSeconds: int) -> None:
xss.initIdleDuration(atLeastSeconds)
def getIdleDuration() -> float:
return xss.getIdleDuration()
def getCurrentUser() -> str:
'''
Returns current logged in user
'''
return os.environ['USER']
def getSessionType() -> str:
'''
Known values:
* Unknown -> No XDG_SESSION_TYPE environment variable
* xrdp --> xrdp session
* other types
'''
return 'xrdp' if 'XRDP_SESSION' in os.environ else os.environ.get('XDG_SESSION_TYPE', 'unknown')
def forceTimeSync() -> None:
return

View File

@@ -1,65 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import os
from .common import renamers
from ...log import logger
def rename(newName: str) -> bool:
'''
Debian renamer
Expects new host name on newName
Host does not needs to be rebooted after renaming
'''
with open('/etc/hostname', 'w') as hostname:
hostname.write(newName)
# Force system new name
os.system('/bin/hostname {}'.format(newName))
os.system('/usr/bin/hostnamectl set-hostname {}'.format(newName))
# add name to "hosts"
with open('/etc/hosts', 'r') as hosts:
lines = hosts.readlines()
with open('/etc/hosts', 'w') as hosts:
hosts.write("127.0.1.1\t%s\n" % newName)
for l in lines:
if l[:9] == '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
continue
hosts.write(l)
return True
# All names in lower case
renamers['debian'] = rename
renamers['ubuntu'] = rename

View File

@@ -1,66 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import os
from .common import renamers
from ...log import logger
def rename(newName: str) -> bool:
'''
RH, Centos, Fedora Renamer
Expects new host name on newName
Host does not needs to be rebooted after renaming
'''
logger.debug('using SUSE renamer')
with open('/etc/hostname', 'w') as hostname:
hostname.write(newName)
# Force system new name
os.system('/bin/hostname {}'.format(newName))
os.system('/usr/bin/hostnamectl set-hostname {}'.format(newName))
# add name to "hosts"
with open('/etc/hosts', 'r') as hosts:
lines = hosts.readlines()
with open('/etc/hosts', 'w') as hosts:
hosts.write("127.0.1.1\t{}\n".format(newName))
for l in lines:
if l[:9] != '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
hosts.write(l)
return True
# All names in lower case
renamers['opensuse'] = rename
renamers['suse'] = rename
renamers['opensuse-leap'] = rename

View File

@@ -1,74 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import os
from .common import renamers
from ...log import logger
def rename(newName: str) -> bool:
'''
RH, Centos, Fedora Renamer
Expects new host name on newName
Host does not needs to be rebooted after renaming
'''
logger.debug('using RH renamer')
with open('/etc/hostname', 'w') as hostname:
hostname.write(newName)
# Force system new name
os.system('/bin/hostname {}'.format(newName))
os.system('/usr/bin/hostnamectl set-hostname {}'.format(newName))
# add name to "hosts"
with open('/etc/hosts', 'r') as hosts:
lines = hosts.readlines()
with open('/etc/hosts', 'w') as hosts:
hosts.write("127.0.1.1\t{}\n".format(newName))
for l in lines:
if l[:9] != '127.0.1.1': # Skips existing 127.0.1.1. if it already exists
hosts.write(l)
with open('/etc/sysconfig/network', 'r') as net:
lines = net.readlines()
with open('/etc/sysconfig/network', 'w') as net:
net.write('HOSTNAME={}\n'.format(newName))
for l in lines:
if l[:8] != 'HOSTNAME':
net.write(l)
return True
# All names in lower case
renamers['centos linux'] = rename
renamers['centos'] = rename
renamers['fedora'] = rename

View File

@@ -1,76 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2020 Virtual Cable S.L.U.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import sys
from .. import rest
from .. import platform
from ..log import logger
from .service import UDSActorSvc
def usage():
sys.stderr.write('usage: udsactor start|stop|restart|login "username"|logout "username"\n')
sys.exit(2)
def run() -> None:
logger.setLevel(20000)
if len(sys.argv) == 3 and sys.argv[1] in ('login', 'logout'):
logger.debug('Running client udsactor')
try:
client: rest.UDSClientApi = rest.UDSClientApi()
if sys.argv[1] == 'login':
r = client.login(sys.argv[2], platform.operations.getSessionType())
print('{},{},{},{}\n'.format(r.ip, r.hostname, r.max_idle, r.dead_line or ''))
elif sys.argv[1] == 'logout':
client.logout(sys.argv[2])
except Exception as e:
logger.exception()
logger.error('Got exception while processing command: %s', e)
sys.exit(0)
elif len(sys.argv) != 2:
usage()
daemonSvr = UDSActorSvc()
if len(sys.argv) == 2:
# Daemon mode...
if sys.argv[1] == 'start':
daemonSvr.start()
elif sys.argv[1] == 'stop':
daemonSvr.stop()
elif sys.argv[1] == 'restart':
daemonSvr.restart()
elif sys.argv[1] == 'start-foreground':
daemonSvr.run() # Execute in foreground
else:
usage()
sys.exit(0)
else:
usage()

View File

@@ -1,106 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import signal
from . import daemon
from ..log import logger
from ..service import CommonService
try:
from prctl import set_proctitle # @UnresolvedImport
except ImportError: # Platform may not include prctl, so in case it's not available, we let the "name" as is
def set_proctitle(_):
pass
class UDSActorSvc(daemon.Daemon, CommonService):
def __init__(self) -> None:
daemon.Daemon.__init__(self, '/run/udsactor.pid')
CommonService.__init__(self)
# Captures signals so we can stop gracefully
signal.signal(signal.SIGINT, self.markForExit)
signal.signal(signal.SIGTERM, self.markForExit)
def markForExit(self, signum, frame) -> None: # pylint: disable=unused-argument
self._isAlive = False
def joinDomain( # pylint: disable=unused-argument, too-many-arguments
self,
name: str,
domain: str,
ou: str,
account: str,
password: str
) -> None:
logger.info('Join domain is not supported on linux platforms right now. Just renaming.')
self.rename(name)
def run(self) -> None:
logger.debug('Running Daemon: {}'.format(self._isAlive))
set_proctitle('UDSActorDaemon')
# Linux daemon will continue running unless something is requested to
# Unmanaged services does not initializes "on start", but rather when user logs in (because userservice does not exists "as such" before that)
if self.isManaged():
if not self.initialize():
self.finish()
return # Stop daemon if initializes told to do so
# logger.debug('Initialized, setting ready')
# Initialization is done, set machine to ready for UDS, communicate urls, etc...
self.setReady()
else:
if not self.initializeUnmanaged():
self.finish()
return
# Start listening for petitions
self.startHttpServer()
# *********************
# * Main Service loop *
# *********************
# Counter used to check ip changes only once every 10 seconds, for
# example
counter = 0
while self._isAlive:
counter += 1
try:
if counter % 5 == 0:
self.loop()
except Exception as e:
logger.error('Got exception on main loop: %s', e)
# In milliseconds, will break
self.doWait(1000)
self.finish()

View File

@@ -1,105 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import os
import configparser
import base64
import pickle
from .. import types
CONFIGFILE = '/etc/udsactor/udsactor.cfg'
def readConfig() -> types.ActorConfigurationType:
try:
cfg = configparser.ConfigParser()
cfg.read(CONFIGFILE)
uds: configparser.SectionProxy = cfg['uds']
# Extract data:
base64Config = uds.get('config', None)
config = pickle.loads(base64.b64decode(base64Config.encode())) if base64Config else None
base64Data = uds.get('data', None)
data = pickle.loads(base64.b64decode(base64Data.encode())) if base64Data else None
return types.ActorConfigurationType(
actorType=uds.get('type', types.MANAGED),
host=uds.get('host', ''),
validateCertificate=uds.getboolean('validate', fallback=False),
master_token=uds.get('master_token', None),
own_token=uds.get('own_token', None),
pre_command=uds.get('pre_command', None),
runonce_command=uds.get('runonce_command', None),
post_command=uds.get('post_command', None),
log_level=int(uds.get('log_level', '2')),
config=config,
data=data
)
except Exception:
return types.ActorConfigurationType('', False)
def writeConfig(config: types.ActorConfigurationType) -> None:
cfg = configparser.ConfigParser()
cfg.add_section('uds')
uds: configparser.SectionProxy = cfg['uds']
uds['host'] = config.host
uds['validate'] = 'yes' if config.validateCertificate else 'no'
def writeIfValue(val, name):
if val:
uds[name] = val
writeIfValue(config.actorType, 'type')
writeIfValue(config.master_token, 'master_token')
writeIfValue(config.own_token, 'own_token')
writeIfValue(config.pre_command, 'pre_command')
writeIfValue(config.post_command, 'post_command')
writeIfValue(config.runonce_command, 'runonce_command')
uds['log_level'] = str(config.log_level)
if config.config: # Special case, encoded & dumped
uds['config'] = base64.b64encode(pickle.dumps(config.config)).decode()
if config.data: # Special case, encoded & dumped
uds['data'] = base64.b64encode(pickle.dumps(config.data)).decode()
# Ensures exists destination folder
dirname = os.path.dirname(CONFIGFILE)
if not os.path.exists(dirname):
os.mkdir(dirname, mode=0o700) # Will create only if route to path already exists, for example, /etc (that must... :-))
with open(CONFIGFILE, 'w') as f:
cfg.write(f)
os.chmod(CONFIGFILE, 0o0600) # Ensure only readable by root
def useOldJoinSystem() -> bool:
return False
def invokeScriptOnLogin() -> str:
return ''

View File

@@ -1,128 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import ctypes
import ctypes.util
import subprocess
xlib = None
xss = None
display = None
xssInfo = None
initialized = False
class XScreenSaverInfo(ctypes.Structure): # pylint: disable=too-few-public-methods
_fields_ = [('window', ctypes.c_long),
('state', ctypes.c_int),
('kind', ctypes.c_int),
('til_or_since', ctypes.c_ulong),
('idle', ctypes.c_ulong),
('eventMask', ctypes.c_ulong)]
class c_ptr(ctypes.c_void_p):
pass
def _ensureInitialized():
global xlib, xss, xssInfo, display, initialized # pylint: disable=global-statement
if initialized:
return
initialized = True
try:
xlibPath = ctypes.util.find_library('X11')
xssPath = ctypes.util.find_library('Xss')
xlib = xss = None
if not xlibPath or not xssPath:
raise Exception('Library Not found!!')
xlib = ctypes.cdll.LoadLibrary(xlibPath)
xss = ctypes.cdll.LoadLibrary(xssPath)
# Fix result type to XScreenSaverInfo Structure
xss.XScreenSaverQueryExtension.restype = ctypes.c_int
xss.XScreenSaverQueryExtension.argtypes = [
ctypes.c_void_p,
ctypes.POINTER(ctypes.c_int),
ctypes.POINTER(ctypes.c_int)
]
xss.XScreenSaverAllocInfo.restype = ctypes.POINTER(XScreenSaverInfo) # Result in a XScreenSaverInfo structure
xss.XScreenSaverQueryInfo.argtypes = [
ctypes.c_void_p,
ctypes.c_void_p,
ctypes.POINTER(XScreenSaverInfo)
]
xlib.XOpenDisplay.argtypes = [ctypes.c_char_p]
xlib.XOpenDisplay.restype = c_ptr
display = xlib.XOpenDisplay(None)
if not display.value:
raise Exception('Display not found!') # Invalid display, not accesible
xssInfo = xss.XScreenSaverAllocInfo()
# Ensures screen saver extension is available
event_base = ctypes.c_int()
error_base = ctypes.c_int()
available = xss.XScreenSaverQueryExtension(display, ctypes.byref(event_base), ctypes.byref(error_base))
if available != 1:
raise Exception('ScreenSaver not available')
except Exception: # Libraries not accesible, not found or whatever..
xlib = xss = display = xssInfo = None
def initIdleDuration(atLeastSeconds: int) -> None:
_ensureInitialized()
if atLeastSeconds:
subprocess.call(['/usr/bin/xset', 's', '{}'.format(atLeastSeconds + 30)])
# And now reset it
subprocess.call(['/usr/bin/xset', 's', 'reset'])
def getIdleDuration() -> float:
'''
Returns idle duration, in seconds
'''
if not initialized or not xlib or not xss or not xssInfo:
return 0 # Libraries not available
xss.XScreenSaverQueryInfo(display, xlib.XDefaultRootWindow(display), xssInfo)
# States: 0 = off, 1 = On, 2 = Cycle, 3 = Disabled, ...?
if xssInfo.contents.state == 1: # state = 1 means "active", so idle is not a valid state
return 3600 * 100 * 1000 # If screen saver is active, return a high enough value
return xssInfo.contents.idle / 1000.0

View File

@@ -1,117 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import traceback
import sys
import typing
if sys.platform == 'win32':
from .windows.log import LocalLogger
else:
from .linux.log import LocalLogger
# Not imported at runtime, just for type checking
if typing.TYPE_CHECKING:
from . import rest
# Valid logging levels, from UDS Broker (uds.core.utils.log)
from .loglevel import OTHER, DEBUG, INFO, WARN, ERROR, FATAL
class Logger:
remoteLogger: typing.Optional['rest.UDSServerApi']
own_token: str
logLevel: int
localLogger: LocalLogger
def __init__(self) -> None:
self.logLevel = INFO
self.localLogger = LocalLogger()
self.remoteLogger = None
self.own_token = ''
def setLevel(self, level: typing.Union[str, int]) -> None:
'''
Sets log level filter (minimum level required for a log message to be processed)
:param level: Any message with a level below this will be filtered out
'''
self.logLevel = int(level) # Ensures level is an integer or fails
def setRemoteLogger(self, remoteLogger: 'rest.UDSServerApi', own_token: str) -> None:
self.remoteLogger = remoteLogger
self.own_token = own_token
def enableServiceLogger(self):
if self.localLogger.windows:
self.localLogger.serviceLogger = True
def log(self, level: typing.Union[str, int], message: str, *args) -> None:
level = int(level)
if level < self.logLevel: # Skip not wanted messages
return
msg = message % args
# If remote logger is available, notify message to it (except DEBUG messages OFC)
try:
if self.remoteLogger and level >= DEBUG:
self.remoteLogger.log(self.own_token, level, msg)
except Exception as e:
self.localLogger.log(DEBUG, 'Log to broker: {}'.format(e))
self.localLogger.log(level, msg)
def debug(self, message: str, *args) -> None:
self.log(DEBUG, message, *args)
def warn(self, message: str, *args) -> None:
self.log(WARN, message, *args)
def info(self, message: str, *args) -> None:
self.log(INFO, message, *args)
def error(self, message: str, *args) -> None:
self.log(ERROR, message, *args)
def fatal(self, message: str, *args) -> None:
self.log(FATAL, message, *args)
def exception(self) -> None:
try:
tb = traceback.format_exc()
except Exception:
tb = '(could not get traceback!)'
self.log(DEBUG, tb)
def flush(self) -> None:
pass
logger = Logger()

View File

@@ -1,32 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020 Virtual Cable S.L.U.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
OTHER, DEBUG, INFO, WARN, ERROR, FATAL = (10000 * x for x in range(6))

View File

@@ -1,37 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
import sys
name = sys.platform
if sys.platform == 'win32':
from .windows import operations, store # pylint: disable=unused-import
else:
from .linux import operations, store # pylint: disable=unused-import

View File

@@ -1,401 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019-2021 Virtual Cable S.L.U.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L.U. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import warnings
import json
import logging
import typing
import requests
from . import types
from .info import VERSION
# Default public listen port
LISTEN_PORT = 43910
# Default timeout
TIMEOUT = 5 # 5 seconds is more than enought
# Constants
UNKNOWN = 'unknown'
class RESTError(Exception):
ERRCODE = 0
class RESTConnectionError(RESTError):
ERRCODE = -1
# Errors ""raised"" from broker
class RESTInvalidKeyError(RESTError):
ERRCODE = 1
class RESTUnmanagedHostError(RESTError):
ERRCODE = 2
class RESTUserServiceNotFoundError(RESTError):
ERRCODE = 3
class RESTOsManagerError(RESTError):
ERRCODE = 4
# For avoid proxy on localhost connections
NO_PROXY = {
'http': None,
'https': None,
}
#
# Basic UDS Api
#
class UDSApi: # pylint: disable=too-few-public-methods
"""
Base for remote api accesses
"""
_host: str
_validateCert: bool
_url: str
def __init__(self, host: str, validateCert: bool) -> None:
self._host = host
self._validateCert = validateCert
self._url = "https://{}/uds/rest/".format(self._host)
# Disable logging requests messages except for errors, ...
logging.getLogger("requests").setLevel(logging.CRITICAL)
logging.getLogger("urllib3").setLevel(logging.ERROR)
try:
warnings.simplefilter("ignore") # Disables all warnings
except Exception:
pass
@property
def _headers(self) -> typing.MutableMapping[str, str]:
return {
'Content-Type': 'application/json',
'User-Agent': 'UDS Actor v{}'.format(VERSION)
}
def _apiURL(self, method: str) -> str:
raise NotImplementedError
def _doPost(
self,
method: str, # i.e. 'initialize', 'ready', ....
payLoad: typing.MutableMapping[str, typing.Any],
headers: typing.Optional[typing.MutableMapping[str, str]] = None,
disableProxy: bool = False
) -> typing.Any:
headers = headers or self._headers
try:
result = requests.post(
self._apiURL(method),
data=json.dumps(payLoad),
headers=headers,
verify=self._validateCert,
timeout=TIMEOUT,
proxies=NO_PROXY if disableProxy else None # if not proxies wanted, enforce it
)
if result.ok:
j = result.json()
if not j.get('error', None):
return j['result']
except requests.ConnectionError as e:
raise RESTConnectionError(str(e))
except Exception as e:
raise RESTError(str(e))
try:
data = result.json()
except Exception:
data = result.content.decode()
raise RESTError(data)
#
# UDS Broker API access
#
class UDSServerApi(UDSApi):
def _apiURL(self, method: str) -> str:
return self._url + 'actor/v3/' + method
def enumerateAuthenticators(self) -> typing.Iterable[types.AuthenticatorType]:
try:
result = requests.get(self._url + 'auth/auths', headers=self._headers, verify=self._validateCert, timeout=4)
if result.ok:
for v in sorted(result.json(), key=lambda x: x['priority']):
yield types.AuthenticatorType(
authId=v['authId'],
authSmallName=v['authSmallName'],
auth=v['auth'],
type=v['type'],
priority=v['priority'],
isCustom=v['isCustom']
)
except Exception:
pass
def register( # pylint: disable=too-many-arguments, too-many-locals
self,
auth: str,
username: str,
password: str,
hostname: str,
ip: str,
mac: str,
preCommand: str,
runOnceCommand: str,
postCommand: str,
logLevel: int
) -> str:
"""
Raises an exception if could not register, or registers and returns the "authorization token"
"""
data = {
'username': username + '@' + auth,
'hostname': hostname,
'ip': ip,
'mac': mac,
'pre_command': preCommand,
'run_once_command': runOnceCommand,
'post_command': postCommand,
'log_level': logLevel
}
# First, try to login to REST api
try:
# First, try to login
authInfo = {'auth': auth, 'username': username, 'password': password}
headers = self._headers
result = requests.post(self._url + 'auth/login', data=json.dumps(authInfo), headers=headers, verify=self._validateCert)
if not result.ok or result.json()['result'] == 'error':
raise Exception() # Invalid credentials
headers['X-Auth-Token'] = result.json()['token']
result = requests.post(self._apiURL('register'), data=json.dumps(data), headers=headers, verify=self._validateCert)
if result.ok:
return result.json()['result']
except requests.ConnectionError as e:
raise RESTConnectionError(e)
except RESTError:
raise
except Exception as e:
raise RESTError('Invalid credentials')
raise RESTError(result.content.decode())
def initialize(self, token: str, interfaces: typing.Iterable[types.InterfaceInfoType], actor_type: typing.Optional[str]) -> types.InitializationResultType:
# Generate id list from netork cards
payload = {
'type': actor_type or types.MANAGED,
'token': token,
'version': VERSION,
'id': [{'mac': i.mac, 'ip': i.ip} for i in interfaces]
}
r = self._doPost('initialize', payload)
os = r['os']
return types.InitializationResultType(
own_token=r['own_token'],
unique_id=r['unique_id'].lower() if r['unique_id'] else None,
os=types.ActorOsConfigurationType(
action=os['action'],
name=os['name'],
username=os.get('username'),
password=os.get('password'),
new_password=os.get('new_password'),
ad=os.get('ad'),
ou=os.get('ou')
) if r['os'] else None
)
def ready(self, own_token: str, secret: str, ip: str, port: int) -> types.CertificateInfoType:
payload = {
'token': own_token,
'secret': secret,
'ip': ip,
'port': port
}
result = self._doPost('ready', payload)
return types.CertificateInfoType(
private_key=result['private_key'],
server_certificate=result['server_certificate'],
password=result['password']
)
def notifyIpChange(self, own_token: str, secret: str, ip: str, port: int) -> types.CertificateInfoType:
payload = {
'token': own_token,
'secret': secret,
'ip': ip,
'port': port
}
result = self._doPost('ipchange', payload)
return types.CertificateInfoType(
private_key=result['private_key'],
server_certificate=result['server_certificate'],
password=result['password']
)
def notifyUnmanagedCallback(self, master_token: str, secret: str, interfaces: typing.Iterable[types.InterfaceInfoType], port: int) -> types.CertificateInfoType:
payload = {
'id': [{'mac': i.mac, 'ip': i.ip} for i in interfaces],
'token': master_token,
'secret': secret,
'port': port
}
result = self._doPost('unmanaged', payload)
return types.CertificateInfoType(
private_key=result['private_key'],
server_certificate=result['server_certificate'],
password=result['password']
)
def login(
self,
actor_type: typing.Optional[str],
token: str,
username: str,
sessionType: str,
interfaces: typing.Iterable[types.InterfaceInfoType],
secret: typing.Optional[str]
) -> types.LoginResultInfoType:
if not token:
return types.LoginResultInfoType(
ip='0.0.0.0',
hostname=UNKNOWN,
dead_line=None,
max_idle=None
)
payload = {
'type': actor_type or types.MANAGED,
'id': [{'mac': i.mac, 'ip': i.ip} for i in interfaces],
'token': token,
'username': username,
'session_type': sessionType,
'secret': secret or '',
}
result = self._doPost('login', payload)
return types.LoginResultInfoType(
ip=result['ip'],
hostname=result['hostname'],
dead_line=result['dead_line'],
max_idle=result['max_idle']
)
def logout(
self,
actor_type: typing.Optional[str],
token: str,
username: str,
interfaces: typing.Iterable[types.InterfaceInfoType],
secret: typing.Optional[str]
) -> None:
if not token:
return
payload = {
'type': actor_type or types.MANAGED,
'id': [{'mac': i.mac, 'ip': i.ip} for i in interfaces],
'token': token,
'username': username,
'secret': secret or ''
}
self._doPost('logout', payload)
def log(self, own_token: str, level: int, message: str) -> None:
if not own_token:
return
payLoad = {
'token': own_token,
'level': level,
'message': message
}
self._doPost('log', payLoad) # Ignores result...
def test(self, master_token: str, actorType: typing.Optional[str]) -> bool:
payLoad = {
'type': actorType or types.MANAGED,
'token': master_token,
}
return self._doPost('test', payLoad) == 'ok'
class UDSClientApi(UDSApi):
def __init__(self) -> None:
super().__init__('127.0.0.1:{}'.format(LISTEN_PORT), False)
# Override base url
self._url = "https://{}/ui/".format(self._host)
def _apiURL(self, method: str) -> str:
return self._url + method
def post(
self,
method: str, # i.e. 'initialize', 'ready', ....
payLoad: typing.MutableMapping[str, typing.Any]
) -> typing.Any:
return self._doPost(method=method, payLoad=payLoad, disableProxy=True)
def register(self, callbackUrl: str) -> None:
payLoad = {
'callback_url': callbackUrl
}
self.post('register', payLoad)
def unregister(self, callbackUrl: str) -> None:
payLoad = {
'callback_url': callbackUrl
}
self.post('unregister', payLoad)
def login(self, username: str, sessionType: typing.Optional[str] = None) -> types.LoginResultInfoType:
payLoad = {
'username': username,
'session_type': sessionType or UNKNOWN,
}
result = self.post('login', payLoad)
return types.LoginResultInfoType(
ip=result['ip'],
hostname=result['hostname'],
dead_line=result['dead_line'],
max_idle=result['max_idle']
)
def logout(self, username: str) -> None:
payLoad = {
'username': username
}
self.post('logout', payLoad)
def ping(self) -> bool:
return self.post('ping', {}) == 'pong'

View File

@@ -1,501 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import socket
import time
import secrets
import subprocess
import typing
from . import platform
from . import rest
from . import types
from .log import logger, DEBUG, INFO, ERROR, FATAL
from .http import clients_pool, server, cert
# def setup() -> None:
# cfg = platform.store.readConfig()
# if logger.logger.windows:
# # Logs will also go to windows event log for services
# logger.logger.serviceLogger = True
# if cfg.x:
# logger.setLevel(cfg.get('logLevel', 20000))
# else:
# logger.setLevel(20000)
class CommonService: # pylint: disable=too-many-instance-attributes
_isAlive: bool = True
_rebootRequested: bool = False
_loggedIn: bool = False
_initialized: bool = False
_cfg: types.ActorConfigurationType
_api: rest.UDSServerApi
_interfaces: typing.List[types.InterfaceInfoType]
_secret: str
_certificate: types.CertificateInfoType
_clientsPool: clients_pool.UDSActorClientPool
_http: typing.Optional[server.HTTPServerThread]
@staticmethod
def execute(cmdLine: str, section: str) -> bool:
try:
logger.debug('Executing command on {}: {}'.format(section, cmdLine))
res = subprocess.check_call(cmdLine, shell=True)
except Exception as e:
logger.error('Got exception executing: {} - {} - {}'.format(section, cmdLine, e))
return False
logger.debug('Result of executing cmd for {} was {}'.format(section, res))
return True
def __init__(self) -> None:
self._cfg = platform.store.readConfig()
self._interfaces = []
self._api = rest.UDSServerApi(self._cfg.host, self._cfg.validateCertificate)
self._secret = secrets.token_urlsafe(33)
self._clientsPool = clients_pool.UDSActorClientPool()
self._certificate = cert.defaultCertificate # For being used on "unmanaged" hosts only
self._http = None
# Initialzies loglevel and serviceLogger
# 0 = DEBUG, 1 = INFO, 2 = ERROR, 3 = FATAL in combobox
# BUT!!!:
# 0 = OTHER, 10000 = DEBUG, 20000 = WARN, 30000 = INFO, 40000 = ERROR, 50000 = FATAL
# So this comes:
logger.setLevel([DEBUG, INFO, ERROR, FATAL][self._cfg.log_level])
# If windows, enable service logger
logger.enableServiceLogger()
socket.setdefaulttimeout(20)
def startHttpServer(self):
# Starts the http thread
if self._http:
try:
self._http.stop()
except Exception:
pass
self._http = server.HTTPServerThread(self)
self._http.start()
def isManaged(self) -> bool:
return self._cfg.actorType != types.UNMANAGED # Only "unmanaged" hosts are unmanaged, the rest are "managed"
def serviceInterfaceInfo(self, interfaces: typing.Optional[typing.List[types.InterfaceInfoType]] = None) -> typing.Optional[types.InterfaceInfoType]:
"""
returns the inteface with unique_id mac or first interface or None if no interfaces...
"""
interfaces = interfaces or self._interfaces # Emty interfaces is like "no ip change" because cannot be notified
if self._cfg.config and interfaces:
try:
return next(x for x in interfaces if x.mac.lower() == self._cfg.config.unique_id)
except StopIteration:
return interfaces[0]
return None
def reboot(self) -> None:
# Reboot just after renaming
logger.info('Rebooting...')
self._rebootRequested = True
def setReady(self) -> None:
if not self._isAlive or not self.isManaged():
return
# Unamanged actor types does not set ready never (has no osmanagers, no needing for this)
# First, if postconfig is available, execute it and disable it
if self._cfg.post_command:
self.execute(self._cfg.post_command, 'postConfig')
self._cfg = self._cfg._replace(post_command=None)
platform.store.writeConfig(self._cfg)
if self._cfg.own_token and self._interfaces:
srvInterface = self.serviceInterfaceInfo()
if srvInterface:
# Rery while RESTConnectionError (that is, cannot connect)
counter = 60
logged = False
while self._isAlive:
counter -= 1
try:
self._certificate = self._api.ready(self._cfg.own_token, self._secret, srvInterface.ip, rest.LISTEN_PORT)
except rest.RESTConnectionError as e:
if not logged: # Only log connection problems ONCE
logged = True
logger.error('Error connecting with UDS Broker')
self.doWait(5000)
continue
except Exception as e:
logger.error('Unhandled exception while setting ready: %s', e)
if counter > 0:
self.doWait(10000) # A long wait on other error...
continue
platform.operations.reboot() # On too many errors, simply reboot
# Success or any error that is not recoverable (retunerd by UDS). if Error, service will be cleaned in a while.
break
else:
logger.error('Could not locate IP address!!!. (Not registered with UDS)')
# Do not continue if not alive...
if not self._isAlive:
return
# Cleans sensible data
if self._cfg.config:
self._cfg = self._cfg._replace(config=self._cfg.config._replace(os=None), data=None)
platform.store.writeConfig(self._cfg)
logger.info('Service ready')
def configureMachine(self) -> bool:
if not self._isAlive:
return False
if not self.isManaged():
return True
# First, if runonce is present, honor it and remove it from config
# Return values is "True" for keep service (or daemon) running, False if Stop it.
if self._cfg.runonce_command:
runOnce = self._cfg.runonce_command
self._cfg = self._cfg._replace(runonce_command=None)
platform.store.writeConfig(self._cfg)
if self.execute(runOnce, "runOnce"):
# If runonce is present, will not do anythin more
# So we have to ensure that, when runonce command is finished, reboots the machine.
# That is, the COMMAND itself has to restart the machine!
return False # If the command fails, continue with the rest of the operations...
# Retry configuration while not stop service, config in case of error 10 times, reboot vm
counter = 10
while self._isAlive:
counter -= 1
try:
if self._cfg.config and self._cfg.config.os:
osData = self._cfg.config.os
if osData.action == 'rename':
self.rename(osData.name, osData.username, osData.password, osData.new_password)
elif osData.action == 'rename_ad':
self.joinDomain(osData.name, osData.ad or '', osData.ou or '', osData.username or '', osData.password or '')
if self._rebootRequested:
try:
platform.operations.reboot()
except Exception as e:
logger.error('Exception on reboot: {}'.format(e))
return False # Stops service if reboot was requested ofc
break
except Exception as e:
logger.error('Got exception operating machine: {}'.format(e))
if counter > 0:
self.doWait(5000)
else:
platform.operations.reboot()
return False
return True
def initializeUnmanaged(self) -> bool:
# Notify UDS about my callback
self.getInterfaces() # Ensure we have interfaces
if self._cfg.master_token:
try:
self._certificate = self._api.notifyUnmanagedCallback(self._cfg.master_token, self._secret, self._interfaces, rest.LISTEN_PORT)
except Exception as e:
logger.error('Couuld not notify unmanaged callback: %s', e)
return True
def getInterfaces(self) -> None:
if self._interfaces:
return
while self._isAlive:
self._interfaces = list(platform.operations.getNetworkInfo())
if self._interfaces:
break
self.doWait(5000)
def initialize(self) -> bool:
if self._initialized or not self._cfg.host or not self._isAlive: # Not configured or not running
return False
self._initialized = True
# Force time sync, just in case...
if self.isManaged():
platform.operations.forceTimeSync()
# Wait for Broker to be ready
# Ensure we have intefaces...
self.getInterfaces()
while self._isAlive:
try:
# If master token is present, initialize and get configuration data
if self._cfg.master_token:
initResult: types.InitializationResultType = self._api.initialize(self._cfg.master_token, self._interfaces, self._cfg.actorType)
if not initResult.own_token: # Not managed
logger.debug('This host is not managed by UDS Broker (ids: {})'.format(self._interfaces))
return False
# Only removes master token for managed machines (will need it on next client execution)
master_token = None if self.isManaged() else self._cfg.master_token
self._cfg = self._cfg._replace(
master_token=master_token,
own_token=initResult.own_token,
config=types.ActorDataConfigurationType(
unique_id=initResult.unique_id,
os=initResult.os
)
)
# On first successfull initialization request, master token will dissapear for managed hosts so it will be no more available (not needed anyway)
if self.isManaged():
platform.store.writeConfig(self._cfg)
# Setup logger now
if self._cfg.own_token:
logger.setRemoteLogger(self._api, self._cfg.own_token)
break # Initial configuration done..
except rest.RESTConnectionError as e:
logger.info('Trying to inititialize connection with broker (last error: {})'.format(e))
self.doWait(5000) # Wait a bit and retry
except rest.RESTError as e: # Invalid key?
logger.error('Error validating with broker. (Invalid token?): {}'.format(e))
return False
except Exception:
logger.exception()
self.doWait(5000) # Wait a bit and retry...
return self.configureMachine()
def uninitialize(self):
self._initialized = False
self._cfg = self._cfg._replace(own_token=None) # Ensures assigned token is cleared
def finish(self) -> None:
if self._http:
self._http.stop()
# If logged in, notify UDS of logout (daemon stoped = no control = logout)
if self._loggedIn and self._cfg.own_token:
self._loggedIn = False
try:
self._api.logout(
self._cfg.actorType,
self._cfg.own_token,
'',
self._interfaces,
self._secret
)
except Exception as e:
logger.error('Error notifying final logout to UDS: %s', e)
self.notifyStop()
def checkIpsChanged(self) -> None:
if not self.isManaged():
return # Unamanaged hosts does not changes ips. (The full initialize-login-logout process is done in a row, so at login the IP is correct)
try:
if not self._cfg.own_token or not self._cfg.config or not self._cfg.config.unique_id:
# Not enouth data do check
return
currentInterfaces = list(platform.operations.getNetworkInfo())
old = self.serviceInterfaceInfo()
new = self.serviceInterfaceInfo(currentInterfaces)
if not new or not old:
raise Exception('No ip currently available for {}'.format(self._cfg.config.unique_id))
if old.ip != new.ip:
self._certificate = self._api.notifyIpChange(self._cfg.own_token, self._secret, new.ip, rest.LISTEN_PORT)
# Now store new addresses & interfaces...
self._interfaces = currentInterfaces
logger.info('Ip changed from {} to {}. Notified to UDS'.format(old.ip, new.ip))
# Stop the running HTTP Thread and start a new one, with new generated cert
self.startHttpServer()
except Exception as e:
# No ip changed, log exception for info
logger.warn('Checking ips failed: {}'.format(e))
def rename(
self,
name: str,
userName: typing.Optional[str] = None,
oldPassword: typing.Optional[str] = None,
newPassword: typing.Optional[str] = None
) -> None:
'''
Invoked when broker requests a rename action
default does nothing
'''
hostName = platform.operations.getComputerName()
if hostName.lower() == name.lower():
logger.info('Computer name is already {}'.format(hostName))
return
# Check for password change request for an user
if userName and newPassword:
logger.info('Setting password for configured user')
try:
platform.operations.changeUserPassword(userName, oldPassword or '', newPassword)
except Exception as e:
raise Exception('Could not change password for user {} (maybe invalid current password is configured at broker): {} '.format(userName, str(e)))
if platform.operations.renameComputer(name):
self.reboot()
def loop(self):
# Main common loop
try:
# Checks if ips has changed
self.checkIpsChanged()
# Now check if every registered client is already there (if logged in OFC)
if self._loggedIn and not self._clientsPool.ping():
self.logout('client_unavailable')
except Exception as e:
logger.error('Exception on main service loop: %s', e)
# ******************************************************
# Methods that can be overriden by linux & windows Actor
# ******************************************************
def joinDomain( # pylint: disable=unused-argument, too-many-arguments
self,
name: str,
domain: str,
ou: str,
account: str,
password: str
) -> None:
'''
Invoked when broker requests a "domain" action
default does nothing
'''
logger.debug('Base join invoked: {} on {}, {}'.format(name, domain, ou))
# Client notifications
def login(self, username: str, sessionType: typing.Optional[str] = None) -> types.LoginResultInfoType:
result = types.LoginResultInfoType(ip='', hostname='', dead_line=None, max_idle=None)
self._loggedIn = True
master_token = None
secret = None
# If unmanaged, do initialization now, because we don't know before this
# Also, even if not initialized, get a "login" notification token
if not self.isManaged():
self.initialize()
master_token = self._cfg.master_token
secret = self._secret
# Own token will not be set if UDS did not assigned the initialized VM to an user
# In that case, take master token (if machine is Unamanaged version)
token = self._cfg.own_token or master_token
if token:
result = self._api.login(
self._cfg.actorType,
token,
username,
sessionType or '',
self._interfaces,
secret
)
script = platform.store.invokeScriptOnLogin()
if script:
script += f'{username} {sessionType or "unknown"} {self._cfg.actorType}'
self.execute(script, 'Logon')
return result
def logout(self, username: str) -> None:
self._loggedIn = False
master_token = self._cfg.master_token if self.isManaged() else None
# Own token will not be set if UDS did not assigned the initialized VM to an user
# In that case, take master token (if machine is Unamanaged version)
token = self._cfg.own_token or master_token
if token:
self._api.logout(
self._cfg.actorType,
token,
username,
self._interfaces,
self._secret
)
self.onLogout(username)
if not self.isManaged():
self.uninitialize()
# ****************************************
# Methods that CAN BE overriden by actors
# ****************************************
def doWait(self, miliseconds: int) -> None:
'''
Invoked to wait a bit
CAN be OVERRIDEN
'''
seconds = miliseconds / 1000.0
# So it can be broken by "stop"
while self._isAlive and seconds > 1:
time.sleep(1)
seconds -= 1
time.sleep(seconds)
def notifyStop(self) -> None:
'''
Overriden to log stop (on windows, notify to service manager)
'''
logger.info('Service stopped')
def preConnect(self, userName: str, protocol: str, ip: str, hostname: str) -> str: # pylint: disable=unused-argument
'''
Invoked when received a PRE Connection request via REST
Base preconnect executes the preconnect command
'''
if self._cfg.pre_command:
self.execute(self._cfg.pre_command + ' {} {} {} {}'.format(userName.replace('"', '%22'), protocol, ip, hostname), 'preConnect')
return 'ok'
def onLogout(self, userName: str) -> None:
logger.debug('On logout invoked for {}'.format(userName))

View File

@@ -1,47 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import threading
from udsactor.log import logger
class ScriptExecutorThread(threading.Thread):
def __init__(self, script: str) -> None:
super(ScriptExecutorThread, self).__init__()
self.script = script
def run(self) -> None:
try:
logger.debug('Executing script: {}'.format(self.script))
exec(self.script, globals(), None) # pylint: disable=exec-used
except Exception as e:
logger.error('Error executing script: {}'.format(e))
logger.exception()

View File

@@ -1,63 +0,0 @@
import typing
MANAGED = 'managed'
UNMANAGED = 'unmanaged'
class InterfaceInfoType(typing.NamedTuple):
name: str
mac: str
ip: str
class AuthenticatorType(typing.NamedTuple):
authId: str
authSmallName: str
auth: str
type: str
priority: int
isCustom: bool
class ActorOsConfigurationType(typing.NamedTuple):
action: str
name: str
username: typing.Optional[str] = None
password: typing.Optional[str] = None
new_password: typing.Optional[str] = None
ad: typing.Optional[str] = None
ou: typing.Optional[str] = None
class ActorDataConfigurationType(typing.NamedTuple):
unique_id: typing.Optional[str] = None
os: typing.Optional[ActorOsConfigurationType] = None
class ActorConfigurationType(typing.NamedTuple):
host: str
validateCertificate: bool
actorType: typing.Optional[str] = None
master_token: typing.Optional[str] = None
own_token: typing.Optional[str] = None
pre_command: typing.Optional[str] = None
runonce_command: typing.Optional[str] = None
post_command: typing.Optional[str] = None
log_level: int = 2
config: typing.Optional[ActorDataConfigurationType] = None
data: typing.Optional[typing.Dict[str, typing.Any]] = None
class InitializationResultType(typing.NamedTuple):
own_token: typing.Optional[str] = None
unique_id: typing.Optional[str] = None
os: typing.Optional[ActorOsConfigurationType] = None
class LoginResultInfoType(typing.NamedTuple):
ip: str
hostname: str
dead_line: typing.Optional[int]
max_idle: typing.Optional[int] # Not provided by broker
class CertificateInfoType(typing.NamedTuple):
private_key: str
server_certificate: str
password: str

View File

@@ -1,82 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import logging
import os
import tempfile
import typing
import servicemanager # pylint: disable=import-error
# Valid logging levels, from UDS Broker (uds.core.utils.log).
from .. import loglevel
class LocalLogger: # pylint: disable=too-few-public-methods
linux = False
windows = True
logger: typing.Optional[logging.Logger]
def __init__(self):
# tempdir is different for "user application" and "service"
# service wil get c:\windows\temp, while user will get c:\users\XXX\temp
try:
logging.basicConfig(
filename=os.path.join(tempfile.gettempdir(), 'udsactor.log'),
filemode='a',
format='%(levelname)s %(asctime)s %(message)s',
level=logging.DEBUG
)
except Exception:
logging.basicConfig() # basic init
self.logger = logging.getLogger('udsactor')
self.serviceLogger = False
def log(self, level: int, message: str) -> None:
# Debug messages are logged to a file
# our loglevels are 0 (other), 10000 (debug), ....
# logging levels are 10 (debug), 20 (info)
# OTHER = logging.NOTSET
if self.logger:
self.logger.log(int(level / 1000), message)
if level < loglevel.ERROR or self.serviceLogger is False: # Only information and above will be on event log
return
# In fact, we have restricted level in windows event log to ERROR or FATAL
# but left the code for just a case in the future...
if level < loglevel.WARN: # Info
servicemanager.LogInfoMsg(message)
elif level < loglevel.ERROR: # WARN
servicemanager.LogWarningMsg(message)
else: # Error & Fatal
servicemanager.LogErrorMsg(message)

View File

@@ -1,251 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014-2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import os
import subprocess
import ctypes
from ctypes.wintypes import DWORD, LPCWSTR
import typing
import win32com.client
from win32com.shell import shell # pylint: disable=no-name-in-module,import-error
import win32net
import win32security
import win32api
import win32con
from .. import types
from ..log import logger
def checkPermissions() -> bool:
return shell.IsUserAnAdmin()
def getErrorMessage(resultCode: int = 0) -> str:
# sys_fs_enc = sys.getfilesystemencoding() or 'mbcs'
msg = win32api.FormatMessage(resultCode)
return msg
def getComputerName() -> str:
return win32api.GetComputerNameEx(win32con.ComputerNamePhysicalDnsHostname)
def getNetworkInfo() -> typing.Iterator[types.InterfaceInfoType]:
obj = win32com.client.Dispatch("WbemScripting.SWbemLocator")
wmobj = obj.ConnectServer("localhost", "root\\cimv2")
adapters = wmobj.ExecQuery("Select * from Win32_NetworkAdapterConfiguration where IpEnabled=True")
try:
for obj in adapters:
for ip in obj.IPAddress:
if ':' in ip: # Is IPV6, skip this
continue
if ip is None or ip == '' or ip.startswith('169.254') or ip.startswith('0.'): # If single link ip, or no ip
continue
yield types.InterfaceInfoType(name=obj.Caption, mac=obj.MACAddress, ip=ip)
except Exception:
return
def getDomainName() -> str:
'''
Will return the domain name if we belong a domain, else None
(if part of a network group, will also return None)
'''
# Status:
# 0 = Unknown
# 1 = Unjoined
# 2 = Workgroup
# 3 = Domain
domain, status = win32net.NetGetJoinInformation()
if status != 3:
domain = None
return domain
def getWindowsVersion() -> typing.Tuple[int, int, int, int, str]:
return win32api.GetVersionEx()
EWX_LOGOFF = 0x00000000
EWX_SHUTDOWN = 0x00000001
EWX_REBOOT = 0x00000002
EWX_FORCE = 0x00000004
EWX_POWEROFF = 0x00000008
EWX_FORCEIFHUNG = 0x00000010
def reboot(flags: int = EWX_FORCEIFHUNG | EWX_REBOOT) -> None:
hproc = win32api.GetCurrentProcess()
htok = win32security.OpenProcessToken(hproc, win32security.TOKEN_ADJUST_PRIVILEGES | win32security.TOKEN_QUERY)
privs = ((win32security.LookupPrivilegeValue(None, win32security.SE_SHUTDOWN_NAME), win32security.SE_PRIVILEGE_ENABLED),)
win32security.AdjustTokenPrivileges(htok, 0, privs)
win32api.ExitWindowsEx(flags, 0)
def loggoff() -> None:
win32api.ExitWindowsEx(EWX_LOGOFF)
def renameComputer(newName: str) -> bool:
'''
Changes the computer name
Returns True if reboot needed
'''
# Needs admin privileges to work
if ctypes.windll.kernel32.SetComputerNameExW(DWORD(win32con.ComputerNamePhysicalDnsHostname), LPCWSTR(newName)) == 0: # @UndefinedVariable
# win32api.FormatMessage -> returns error string
# win32api.GetLastError -> returns error code
# (just put this comment here to remember to log this when logger is available)
error = getErrorMessage()
computerName = win32api.GetComputerNameEx(win32con.ComputerNamePhysicalDnsHostname)
raise Exception('Error renaming computer from {} to {}: {}'.format(computerName, newName, error))
return True
NETSETUP_JOIN_DOMAIN = 0x00000001
NETSETUP_ACCT_CREATE = 0x00000002
NETSETUP_ACCT_DELETE = 0x00000004
NETSETUP_WIN9X_UPGRADE = 0x00000010
NETSETUP_DOMAIN_JOIN_IF_JOINED = 0x00000020
NETSETUP_JOIN_UNSECURE = 0x00000040
NETSETUP_MACHINE_PWD_PASSED = 0x00000080
NETSETUP_JOIN_WITH_NEW_NAME = 0x00000400
NETSETUP_DEFER_SPN_SET = 0x1000000
def joinDomain(domain: str, ou: str, account: str, password: str, executeInOneStep: bool = False) -> None:
'''
Joins machine to a windows domain
:param domain: Domain to join to
:param ou: Ou that will hold machine
:param account: Account used to join domain
:param password: Password of account used to join domain
:param executeInOneStep: If true, means that this machine has been renamed and wants to add NETSETUP_JOIN_WITH_NEW_NAME to request so we can do rename/join in one step.
'''
# If account do not have domain, include it
if '@' not in account and '\\' not in account:
if '.' in domain:
account = account + '@' + domain
else:
account = domain + '\\' + account
# Do log
flags: typing.Any = NETSETUP_ACCT_CREATE | NETSETUP_DOMAIN_JOIN_IF_JOINED | NETSETUP_JOIN_DOMAIN
if executeInOneStep:
flags |= NETSETUP_JOIN_WITH_NEW_NAME
flags = DWORD(flags)
lpDomain = LPCWSTR(domain)
# Must be in format "ou=.., ..., dc=...,"
lpOu = LPCWSTR(ou) if ou is not None and ou != '' else None
lpAccount = LPCWSTR(account)
lpPassword = LPCWSTR(password)
res = ctypes.windll.netapi32.NetJoinDomain(None, lpDomain, lpOu, lpAccount, lpPassword, flags)
# Machine found in another ou, use it and warn this on log
if res == 2224:
flags = DWORD(NETSETUP_DOMAIN_JOIN_IF_JOINED | NETSETUP_JOIN_DOMAIN)
res = ctypes.windll.netapi32.NetJoinDomain(None, lpDomain, None, lpAccount, lpPassword, flags)
if res:
# Log the error
error = getErrorMessage(res)
if res == 1355:
error = "DC Is not reachable"
logger.error('Error joining domain: {}, {}'.format(error, res))
raise Exception('Error joining domain {}, with credentials {}/*****{}: {}, {}'.format(domain, account, ', under OU {}'.format(ou) if ou is not None else '', res, error))
def changeUserPassword(user: str, oldPassword: str, newPassword: str) -> None:
# lpUser = LPCWSTR(user)
# lpOldPassword = LPCWSTR(oldPassword)
# lpNewPassword = LPCWSTR(newPassword)
# res = ctypes.windll.netapi32.NetUserChangePassword(None, lpUser, lpOldPassword, lpNewPassword)
# Try to set new password "a las bravas", ignoring old one. This will not work with domain users
res = win32net.NetUserSetInfo(None, user, 1003, {'password': newPassword})
if res:
# Log the error, and raise exception to parent
error = getErrorMessage(res)
raise Exception('Error changing password for user {}: {} {}'.format(user, res, error))
class LASTINPUTINFO(ctypes.Structure): # pylint: disable=too-few-public-methods
_fields_ = [
('cbSize', ctypes.c_uint),
('dwTime', ctypes.c_uint),
]
def initIdleDuration(atLeastSeconds: int): # pylint: disable=unused-argument
'''
In windows, there is no need to set screensaver
'''
return
def getIdleDuration() -> float:
try:
lastInputInfo = LASTINPUTINFO()
lastInputInfo.cbSize = ctypes.sizeof(lastInputInfo) # pylint: disable=attribute-defined-outside-init
if ctypes.windll.user32.GetLastInputInfo(ctypes.byref(lastInputInfo)) == 0:
return 0
current = ctypes.c_uint(ctypes.windll.kernel32.GetTickCount()).value
if current < lastInputInfo.dwTime:
current += 4294967296 # If current has "rolled" to zero, adjust it so it is greater than lastInputInfo
millis = current - lastInputInfo.dwTime # @UndefinedVariable
return millis / 1000.0
except Exception as e:
logger.error('Getting idle duration: {}'.format(e))
return 0
def getCurrentUser() -> str:
'''
Returns current logged in username
'''
return os.environ['USERNAME']
def getSessionType() -> str:
'''
Known values:
* Unknown -> No SESSIONNAME environment variable
* Console -> Local session
* RDP-Tcp#[0-9]+ -> RDP Session
'''
return os.environ.get('SESSIONNAME', 'unknown')
def writeToPipe(pipeName: str, bytesPayload: bytes, waitForResponse: bool) -> typing.Optional[bytes]:
# (str, bytes, bool) -> Optional[bytes]
try:
with open(pipeName, 'r+b', 0) as f:
f.write(bytesPayload)
# f.seek(0) # As recommended on intenet, but seems to work fin without thos
if waitForResponse:
return f.read()
return b'ok'
except Exception:
return None
def forceTimeSync() -> None:
try:
subprocess.call([r'c:\WINDOWS\System32\w32tm.exe', ' /resync']) # , '/rediscover'])
except Exception as e:
logger.error('Error invoking time sync command: %s', e)

View File

@@ -1,73 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2019 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import sys
import win32service
import win32serviceutil
import servicemanager
import win32timezone # pylint: disable=unused-import
from .service import UDSActorSvc
def setupRecoverService():
svc_name = UDSActorSvc._svc_name_ # pylint: disable=protected-access
try:
hscm = win32service.OpenSCManager(None, None, win32service.SC_MANAGER_ALL_ACCESS)
try:
hs = win32serviceutil.SmartOpenService(hscm, svc_name, win32service.SERVICE_ALL_ACCESS)
service_failure_actions = {
'ResetPeriod': 864000, # Time in ms after which to reset the failure count to zero.
'RebootMsg': u'', # Not using reboot option
'Command': u'', # Not using run-command option
'Actions': [
(win32service.SC_ACTION_RESTART, 5000), # action, delay in ms
(win32service.SC_ACTION_RESTART, 5000)
]
}
win32service.ChangeServiceConfig2(hs, win32service.SERVICE_CONFIG_FAILURE_ACTIONS, service_failure_actions)
finally:
win32service.CloseServiceHandle(hs)
finally:
win32service.CloseServiceHandle(hscm)
def run() -> None:
if len(sys.argv) == 1:
servicemanager.Initialize()
servicemanager.PrepareToHostSingle(UDSActorSvc)
servicemanager.StartServiceCtrlDispatcher()
elif sys.argv[1] == '--setup-recovery':
setupRecoverService()
else:
win32serviceutil.HandleCommandLine(UDSActorSvc)

View File

@@ -1,276 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import struct
import typing
import win32serviceutil
import win32service
import win32security
import win32net
import win32event
import pythoncom
import servicemanager
import winreg as wreg
from . import operations
from . import store
from ..service import CommonService
from ..log import logger
REMOTE_USERS_SID = 'S-1-5-32-555' # Well nown sid for remote desktop users
class UDSActorSvc(win32serviceutil.ServiceFramework, CommonService):
'''
This class represents a Windows Service for managing actor interactions
with UDS Broker and Machine
'''
# ServiceeFramework related
_svc_name_ = "UDSActorNG"
_svc_display_name_ = "UDS Actor Service"
_svc_description_ = "UDS Actor Management Service"
_svc_deps_ = ['EventLog']
_user: typing.Optional[str]
_hWaitStop: typing.Any
def __init__(self, args):
win32serviceutil.ServiceFramework.__init__(self, args)
CommonService.__init__(self)
self._hWaitStop = win32event.CreateEvent(None, 1, 0, None)
self._user = None
def SvcStop(self) -> None:
self.ReportServiceStatus(win32service.SERVICE_STOP_PENDING)
self._isAlive = False
win32event.SetEvent(self._hWaitStop)
SvcShutdown = SvcStop
def notifyStop(self) -> None:
servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE, servicemanager.PYS_SERVICE_STOPPED, (self._svc_name_, ''))
super().notifyStop()
def doWait(self, miliseconds: int) -> None:
win32event.WaitForSingleObject(self._hWaitStop, miliseconds)
# On windows, and while on tasks, ensure that our app processes waiting messages on "wait times"
pythoncom.PumpWaitingMessages() # pylint: disable=no-member
def oneStepJoin(self, name: str, domain: str, ou: str, account: str, password: str) -> None: # pylint: disable=too-many-arguments
'''
Ejecutes the join domain in exactly one step
'''
currName = operations.getComputerName()
# If name is desired, simply execute multiStepJoin, because computer
# name will not change
if currName.lower() == name.lower():
self.multiStepJoin(name, domain, ou, account, password)
return
operations.renameComputer(name)
logger.debug('Computer renamed to {} without reboot'.format(name))
operations.joinDomain(domain, ou, account, password, executeInOneStep=True)
logger.debug('Requested join domain {} without errors'.format(domain))
self.reboot()
def multiStepJoin(self, name: str, domain: str, ou: str, account: str, password: str) -> None: # pylint: disable=too-many-arguments
currName = operations.getComputerName()
if currName.lower() == name.lower():
currDomain = operations.getDomainName()
if currDomain:
# logger.debug('Name: "{}" vs "{}", Domain: "{}" vs "{}"'.format(currName.lower(), name.lower(), currDomain.lower(), domain.lower()))
logger.debug('Machine {} is part of domain {}'.format(name, domain))
self.setReady()
else:
operations.joinDomain(domain, ou, account, password, executeInOneStep=False)
self.reboot()
else:
operations.renameComputer(name)
logger.info('Rebooting computer for activating new name {}'.format(name))
self.reboot()
def joinDomain( # pylint: disable=unused-argument, too-many-arguments
self,
name: str,
domain: str,
ou: str,
account: str,
password: str
) -> None:
versionData = operations.getWindowsVersion()
versionInt = versionData[0] * 10 + versionData[1]
logger.debug('Starting joining domain {} with name {} (detected operating version: {})'.format(domain, name, versionData))
# Accepts one step joinDomain, also remember XP is no more supported by
# microsoft, but this also must works with it because will do a "multi
# step" join
if versionInt >= 60 and not store.useOldJoinSystem():
self.oneStepJoin(name, domain, ou, account, password)
else:
logger.info('Using multiple step join because configuration requests to do so')
self.multiStepJoin(name, domain, ou, account, password)
def preConnect(self, userName: str, protocol: str, ip: str, hostname: str) -> str:
logger.debug('Pre connect invoked')
if protocol == 'rdp': # If connection is not using rdp, skip adding user
# Well known SSID for Remote Desktop Users
groupName = win32security.LookupAccountSid(None, win32security.GetBinarySid(REMOTE_USERS_SID))[0]
useraAlreadyInGroup = False
resumeHandle = 0
while True:
users, _, resumeHandle = win32net.NetLocalGroupGetMembers(None, groupName, 1, resumeHandle, 32768)
if userName.lower() in [u['name'].lower() for u in users]:
useraAlreadyInGroup = True
break
if resumeHandle == 0:
break
if not useraAlreadyInGroup:
logger.debug('User not in group, adding it')
self._user = userName
try:
userSSID = win32security.LookupAccountName(None, userName)[0]
win32net.NetLocalGroupAddMembers(None, groupName, 0, [{'sid': userSSID}])
except Exception as e:
logger.error('Exception adding user to Remote Desktop Users: {}'.format(e))
else:
self._user = None
logger.debug('User {} already in group'.format(userName))
return super().preConnect(userName, protocol, ip, hostname)
def ovLogon(self, username: str, password: str) -> str:
"""
Logon on oVirt agent
currently not used.
"""
# Compose packet for ov
usernameBytes = username.encode()
passwordBytes = password.encode()
packet = struct.pack('!I', len(usernameBytes)) + usernameBytes + struct.pack('!I', len(passwordBytes)) + passwordBytes
# Send packet with username/password to ov pipe
operations.writeToPipe("\\\\.\\pipe\\VDSMDPipe", packet, True)
return 'done'
def onLogout(self, userName) -> None:
logger.debug('Windows onLogout invoked: {}, {}'.format(userName, self._user))
try:
p = win32security.GetBinarySid(REMOTE_USERS_SID)
groupName = win32security.LookupAccountSid(None, p)[0]
except Exception:
logger.error('Exception getting Windows Group')
return
if self._user:
try:
win32net.NetLocalGroupDelMembers(None, groupName, [self._user])
except Exception as e:
logger.error('Exception removing user from Remote Desktop Users: {}'.format(e))
def isInstallationRunning(self):
'''
Detect if windows is installing anything, so we can delay the execution of Service
'''
try:
key = wreg.OpenKey(wreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\State')
data, _ = wreg.QueryValueEx(key, 'ImageState')
logger.debug('State: %s', data)
return data != 'IMAGE_STATE_COMPLETE' # If ImageState is different of ImageStateComplete, there is something running on installation
except Exception: # If not found, means that no installation is running
return False
def SvcDoRun(self) -> None: # pylint: disable=too-many-statements, too-many-branches
'''
Main service loop
'''
servicemanager.LogMsg(servicemanager.EVENTLOG_INFORMATION_TYPE, servicemanager.PYS_SERVICE_STARTED, (self._svc_name_, ''))
# call the CoInitialize to allow the registration to run in an other
# thread
logger.debug('Initializing coms')
pythoncom.CoInitialize() # pylint: disable=no-member
# Check if some install is running on windows before proceeding
while self._isAlive:
if self.isInstallationRunning():
win32event.WaitForSingleObject(self._hWaitStop, 1000) # Wait a bit, and check again
continue
break
if not self._isAlive: # Has been stopped while waiting windows installations
self.finish()
return
# Unmanaged services does not initializes "on start", but rather when user logs in (because userservice does not exists "as such" before that)
if self.isManaged():
if not self.initialize():
logger.info('Service stopped due to init')
self.finish()
win32event.WaitForSingleObject(self._hWaitStop, 5000)
return # Stop daemon if initializes told to do so
# Initialization is done, set machine to ready for UDS, communicate urls, etc...
self.setReady()
else:
if not self.initializeUnmanaged():
self.finish()
return
# Start listening for petitions
self.startHttpServer()
# *********************
# * Main Service loop *
# *********************
# Counter used to check ip changes only once every 10 seconds
counter = 0
while self._isAlive:
counter += 1
try:
pythoncom.PumpWaitingMessages() # pylint: disable=no-member
if counter % 5 == 0: # Once every 5 seconds
self.loop()
except Exception as e:
logger.error('Got exception on main loop: %s', e)
# Continue after a while...
# In milliseconds, will break if event hWaitStop is set
win32event.WaitForSingleObject(self._hWaitStop, 1000)
logger.debug('Exited main loop')
self.finish()

View File

@@ -1,109 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2014 Virtual Cable S.L.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Virtual Cable S.L. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''
@author: Adolfo Gómez, dkmaster at dkmon dot com
'''
# pylint: disable=invalid-name
import pickle
import winreg as wreg
import win32security
from .. import types
PATH = 'Software\\UDSActor'
BASEKEY = wreg.HKEY_LOCAL_MACHINE
def fixRegistryPermissions(handle) -> None:
# Fix permissions so users can't read this key
v = win32security.GetSecurityInfo(handle, win32security.SE_REGISTRY_KEY, win32security.DACL_SECURITY_INFORMATION)
dacl = v.GetSecurityDescriptorDacl()
n = 0
# Remove all normal users access permissions to the registry key
while n < dacl.GetAceCount():
if str(dacl.GetAce(n)[2]) == 'PySID:S-1-5-32-545': # Whell known Users SID
dacl.DeleteAce(n)
else:
n += 1
win32security.SetSecurityInfo(
handle,
win32security.SE_REGISTRY_KEY,
win32security.DACL_SECURITY_INFORMATION | win32security.PROTECTED_DACL_SECURITY_INFORMATION,
None,
None,
dacl,
None
)
def readConfig() -> types.ActorConfigurationType:
try:
key = wreg.OpenKey(BASEKEY, PATH, 0, wreg.KEY_QUERY_VALUE)
data, _ = wreg.QueryValueEx(key, '')
wreg.CloseKey(key)
return pickle.loads(data)
except Exception:
return types.ActorConfigurationType('', False)
def writeConfig(config: types.ActorConfigurationType) -> None:
try:
key = wreg.OpenKey(BASEKEY, PATH, 0, wreg.KEY_ALL_ACCESS)
except Exception:
key = wreg.CreateKeyEx(BASEKEY, PATH, 0, wreg.KEY_ALL_ACCESS)
fixRegistryPermissions(key.handle) # type: ignore
wreg.SetValueEx(key, "", 0, wreg.REG_BINARY, pickle.dumps(config)) # type: ignore
wreg.CloseKey(key)
def useOldJoinSystem() -> bool:
try:
key = wreg.OpenKey(BASEKEY, PATH, 0, wreg.KEY_QUERY_VALUE)
try:
data, _ = wreg.QueryValueEx(key, 'join')
except Exception:
data = ''
wreg.CloseKey(key)
except Exception:
data = ''
return data == 'old'
def invokeScriptOnLogin() -> str:
try:
key = wreg.OpenKey(BASEKEY, PATH, 0, wreg.KEY_QUERY_VALUE)
try:
data, _ = wreg.QueryValueEx(key, 'logonScript')
except Exception:
data = ''
wreg.CloseKey(key)
except Exception:
data = ''
return data

View File

@@ -1,248 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'setup-dialog.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_UdsActorSetupDialog(object):
def setupUi(self, UdsActorSetupDialog):
UdsActorSetupDialog.setObjectName("UdsActorSetupDialog")
UdsActorSetupDialog.setWindowModality(QtCore.Qt.WindowModal)
UdsActorSetupDialog.resize(590, 307)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(UdsActorSetupDialog.sizePolicy().hasHeightForWidth())
UdsActorSetupDialog.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Verdana")
font.setPointSize(9)
UdsActorSetupDialog.setFont(font)
UdsActorSetupDialog.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/img/img/uds-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
UdsActorSetupDialog.setWindowIcon(icon)
UdsActorSetupDialog.setAutoFillBackground(False)
UdsActorSetupDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
UdsActorSetupDialog.setSizeGripEnabled(False)
UdsActorSetupDialog.setModal(True)
self.registerButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.registerButton.setEnabled(False)
self.registerButton.setGeometry(QtCore.QRect(10, 270, 181, 23))
self.registerButton.setMinimumSize(QtCore.QSize(181, 0))
self.registerButton.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
self.registerButton.setObjectName("registerButton")
self.closeButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.closeButton.setGeometry(QtCore.QRect(410, 270, 171, 23))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth())
self.closeButton.setSizePolicy(sizePolicy)
self.closeButton.setMinimumSize(QtCore.QSize(171, 0))
self.closeButton.setObjectName("closeButton")
self.tabWidget = QtWidgets.QTabWidget(UdsActorSetupDialog)
self.tabWidget.setGeometry(QtCore.QRect(10, 10, 571, 241))
self.tabWidget.setObjectName("tabWidget")
self.tab_uds = QtWidgets.QWidget()
self.tab_uds.setObjectName("tab_uds")
self.layoutWidget = QtWidgets.QWidget(self.tab_uds)
self.layoutWidget.setGeometry(QtCore.QRect(10, 10, 551, 191))
self.layoutWidget.setObjectName("layoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.layoutWidget)
self.formLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setVerticalSpacing(16)
self.formLayout.setObjectName("formLayout")
self.label_host = QtWidgets.QLabel(self.layoutWidget)
self.label_host.setObjectName("label_host")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_host)
self.host = QtWidgets.QLineEdit(self.layoutWidget)
self.host.setAcceptDrops(False)
self.host.setObjectName("host")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.host)
self.label_auth = QtWidgets.QLabel(self.layoutWidget)
self.label_auth.setObjectName("label_auth")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_auth)
self.authenticators = QtWidgets.QComboBox(self.layoutWidget)
self.authenticators.setObjectName("authenticators")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.authenticators)
self.label_username = QtWidgets.QLabel(self.layoutWidget)
self.label_username.setObjectName("label_username")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_username)
self.username = QtWidgets.QLineEdit(self.layoutWidget)
self.username.setObjectName("username")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.username)
self.label_password = QtWidgets.QLabel(self.layoutWidget)
self.label_password.setObjectName("label_password")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_password)
self.password = QtWidgets.QLineEdit(self.layoutWidget)
self.password.setEchoMode(QtWidgets.QLineEdit.Password)
self.password.setObjectName("password")
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.password)
self.validateCertificate = QtWidgets.QComboBox(self.layoutWidget)
self.validateCertificate.setObjectName("validateCertificate")
self.validateCertificate.addItem("")
self.validateCertificate.addItem("")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.validateCertificate)
self.label_security = QtWidgets.QLabel(self.layoutWidget)
self.label_security.setObjectName("label_security")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_security)
self.label_host.raise_()
self.host.raise_()
self.label_auth.raise_()
self.label_username.raise_()
self.username.raise_()
self.label_password.raise_()
self.password.raise_()
self.validateCertificate.raise_()
self.label_security.raise_()
self.authenticators.raise_()
self.tabWidget.addTab(self.tab_uds, "")
self.tab_advanced = QtWidgets.QWidget()
self.tab_advanced.setObjectName("tab_advanced")
self.layoutWidget_2 = QtWidgets.QWidget(self.tab_advanced)
self.layoutWidget_2.setGeometry(QtCore.QRect(10, 10, 551, 161))
self.layoutWidget_2.setObjectName("layoutWidget_2")
self.formLayout_2 = QtWidgets.QFormLayout(self.layoutWidget_2)
self.formLayout_2.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout_2.setContentsMargins(0, 0, 0, 0)
self.formLayout_2.setVerticalSpacing(16)
self.formLayout_2.setObjectName("formLayout_2")
self.label_host_2 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_host_2.setObjectName("label_host_2")
self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_host_2)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout.setSpacing(4)
self.horizontalLayout.setObjectName("horizontalLayout")
self.preCommand = QtWidgets.QLineEdit(self.layoutWidget_2)
self.preCommand.setAcceptDrops(False)
self.preCommand.setWhatsThis("")
self.preCommand.setObjectName("preCommand")
self.horizontalLayout.addWidget(self.preCommand)
self.browsePreconnectButton = QtWidgets.QPushButton(self.layoutWidget_2)
self.browsePreconnectButton.setAutoDefault(False)
self.browsePreconnectButton.setFlat(False)
self.browsePreconnectButton.setObjectName("browsePreconnectButton")
self.horizontalLayout.addWidget(self.browsePreconnectButton)
self.formLayout_2.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout)
self.label_username_2 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_username_2.setObjectName("label_username_2")
self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_username_2)
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_2.setSpacing(4)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.runonceCommand = QtWidgets.QLineEdit(self.layoutWidget_2)
self.runonceCommand.setWhatsThis("")
self.runonceCommand.setObjectName("runonceCommand")
self.horizontalLayout_2.addWidget(self.runonceCommand)
self.browseRunOnceButton = QtWidgets.QPushButton(self.layoutWidget_2)
self.browseRunOnceButton.setAutoDefault(False)
self.browseRunOnceButton.setObjectName("browseRunOnceButton")
self.horizontalLayout_2.addWidget(self.browseRunOnceButton)
self.formLayout_2.setLayout(1, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout_2)
self.label_password_2 = QtWidgets.QLabel(self.layoutWidget_2)
self.label_password_2.setObjectName("label_password_2")
self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_password_2)
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
self.horizontalLayout_3.setContentsMargins(-1, 0, -1, -1)
self.horizontalLayout_3.setSpacing(4)
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
self.postConfigCommand = QtWidgets.QLineEdit(self.layoutWidget_2)
self.postConfigCommand.setWhatsThis("")
self.postConfigCommand.setEchoMode(QtWidgets.QLineEdit.Normal)
self.postConfigCommand.setObjectName("postConfigCommand")
self.horizontalLayout_3.addWidget(self.postConfigCommand)
self.browsePostConfigButton = QtWidgets.QPushButton(self.layoutWidget_2)
self.browsePostConfigButton.setAutoDefault(False)
self.browsePostConfigButton.setObjectName("browsePostConfigButton")
self.horizontalLayout_3.addWidget(self.browsePostConfigButton)
self.formLayout_2.setLayout(2, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout_3)
self.label_loglevel = QtWidgets.QLabel(self.layoutWidget_2)
self.label_loglevel.setObjectName("label_loglevel")
self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_loglevel)
self.logLevelComboBox = QtWidgets.QComboBox(self.layoutWidget_2)
self.logLevelComboBox.setFrame(True)
self.logLevelComboBox.setObjectName("logLevelComboBox")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(0, "DEBUG")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(1, "INFO")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(2, "ERROR")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(3, "FATAL")
self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.logLevelComboBox)
self.tabWidget.addTab(self.tab_advanced, "")
self.testButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.testButton.setEnabled(False)
self.testButton.setGeometry(QtCore.QRect(210, 270, 181, 23))
self.testButton.setMinimumSize(QtCore.QSize(181, 0))
self.testButton.setObjectName("testButton")
self.retranslateUi(UdsActorSetupDialog)
self.tabWidget.setCurrentIndex(0)
self.logLevelComboBox.setCurrentIndex(1)
self.closeButton.clicked.connect(UdsActorSetupDialog.finish)
self.registerButton.clicked.connect(UdsActorSetupDialog.registerWithUDS)
self.host.textChanged['QString'].connect(UdsActorSetupDialog.textChanged)
self.username.textChanged['QString'].connect(UdsActorSetupDialog.textChanged)
self.password.textChanged['QString'].connect(UdsActorSetupDialog.textChanged)
self.browsePreconnectButton.clicked.connect(UdsActorSetupDialog.browsePreconnect)
self.browsePostConfigButton.clicked.connect(UdsActorSetupDialog.browsePostConfig)
self.browseRunOnceButton.clicked.connect(UdsActorSetupDialog.browseRunOnce)
self.host.editingFinished.connect(UdsActorSetupDialog.updateAuthenticators)
self.authenticators.currentTextChanged['QString'].connect(UdsActorSetupDialog.textChanged)
self.testButton.clicked.connect(UdsActorSetupDialog.testUDSServer)
QtCore.QMetaObject.connectSlotsByName(UdsActorSetupDialog)
def retranslateUi(self, UdsActorSetupDialog):
_translate = QtCore.QCoreApplication.translate
UdsActorSetupDialog.setWindowTitle(_translate("UdsActorSetupDialog", "UDS Actor Configuration Tool"))
self.registerButton.setToolTip(_translate("UdsActorSetupDialog", "Click to register Actor with UDS Broker"))
self.registerButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Click on this button to register Actor with UDS Broker.</p></body></html>"))
self.registerButton.setText(_translate("UdsActorSetupDialog", "Register with UDS"))
self.closeButton.setToolTip(_translate("UdsActorSetupDialog", "Closes UDS Actor Configuration (discard pending changes if any)"))
self.closeButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Exits the UDS Actor Configuration Tool</p></body></html>"))
self.closeButton.setText(_translate("UdsActorSetupDialog", "Close"))
self.label_host.setText(_translate("UdsActorSetupDialog", "UDS Server"))
self.host.setToolTip(_translate("UdsActorSetupDialog", "Uds Broker Server Addres. Use IP or FQDN"))
self.host.setWhatsThis(_translate("UdsActorSetupDialog", "Enter here the UDS Broker Addres using either its IP address or its FQDN address"))
self.label_auth.setText(_translate("UdsActorSetupDialog", "Authenticator"))
self.authenticators.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Select the UDS Broker authenticator for credentials validation</p></body></html>"))
self.label_username.setText(_translate("UdsActorSetupDialog", "Username"))
self.username.setToolTip(_translate("UdsActorSetupDialog", "UDS user with administration rights (Will not be stored on template)"))
self.username.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Administrator user on UDS Server.</p><p>Note: This credential will not be stored on client. Will be used to obtain an unique token for this image.</p></body></html>"))
self.label_password.setText(_translate("UdsActorSetupDialog", "Password"))
self.password.setToolTip(_translate("UdsActorSetupDialog", "Password for user (Will not be stored on template)"))
self.password.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Administrator password for the user on UDS Server.</p><p>Note: This credential will not be stored on client. Will be used to obtain an unique key for this image.</p></body></html>"))
self.validateCertificate.setToolTip(_translate("UdsActorSetupDialog", "Select communication security with broker"))
self.validateCertificate.setWhatsThis(_translate("UdsActorSetupDialog", "<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>"))
self.validateCertificate.setItemText(0, _translate("UdsActorSetupDialog", "Ignore certificate"))
self.validateCertificate.setItemText(1, _translate("UdsActorSetupDialog", "Verify certificate"))
self.label_security.setText(_translate("UdsActorSetupDialog", "SSL Validation"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_uds), _translate("UdsActorSetupDialog", "UDS Server"))
self.label_host_2.setText(_translate("UdsActorSetupDialog", "Preconnect"))
self.preCommand.setToolTip(_translate("UdsActorSetupDialog", "Pre connection command. Executed just before the user is connected to machine."))
self.browsePreconnectButton.setText(_translate("UdsActorSetupDialog", "Browse"))
self.label_username_2.setText(_translate("UdsActorSetupDialog", "Runonce"))
self.runonceCommand.setToolTip(_translate("UdsActorSetupDialog", "Run once command. Executed on first boot, just before UDS does anything."))
self.browseRunOnceButton.setText(_translate("UdsActorSetupDialog", "Browse"))
self.label_password_2.setText(_translate("UdsActorSetupDialog", "Postconfig"))
self.postConfigCommand.setToolTip(_translate("UdsActorSetupDialog", "Command to execute after UDS finalizes the VM configuration."))
self.browsePostConfigButton.setText(_translate("UdsActorSetupDialog", "Browse"))
self.label_loglevel.setText(_translate("UdsActorSetupDialog", "Log Level"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_advanced), _translate("UdsActorSetupDialog", "Advanced"))
self.testButton.setToolTip(_translate("UdsActorSetupDialog", "Click to test existing configuration (disabled if no config found)"))
self.testButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Click on this button to test the server host and assigned toen.</p></body></html>"))
self.testButton.setText(_translate("UdsActorSetupDialog", "Test configuration"))
from ui import uds_rc

View File

@@ -1,142 +0,0 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'setup-dialog-unmanaged.ui'
#
# Created by: PyQt5 UI code generator 5.13.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_UdsActorSetupDialog(object):
def setupUi(self, UdsActorSetupDialog):
UdsActorSetupDialog.setObjectName("UdsActorSetupDialog")
UdsActorSetupDialog.setWindowModality(QtCore.Qt.WindowModal)
UdsActorSetupDialog.resize(595, 220)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(UdsActorSetupDialog.sizePolicy().hasHeightForWidth())
UdsActorSetupDialog.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Verdana")
font.setPointSize(9)
UdsActorSetupDialog.setFont(font)
UdsActorSetupDialog.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/img/img/uds-icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
UdsActorSetupDialog.setWindowIcon(icon)
UdsActorSetupDialog.setAutoFillBackground(False)
UdsActorSetupDialog.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
UdsActorSetupDialog.setSizeGripEnabled(False)
UdsActorSetupDialog.setModal(True)
self.saveButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.saveButton.setEnabled(True)
self.saveButton.setGeometry(QtCore.QRect(10, 180, 181, 23))
self.saveButton.setMinimumSize(QtCore.QSize(181, 0))
self.saveButton.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
self.saveButton.setObjectName("saveButton")
self.closeButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.closeButton.setGeometry(QtCore.QRect(410, 180, 171, 23))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth())
self.closeButton.setSizePolicy(sizePolicy)
self.closeButton.setMinimumSize(QtCore.QSize(171, 0))
self.closeButton.setObjectName("closeButton")
self.testButton = QtWidgets.QPushButton(UdsActorSetupDialog)
self.testButton.setEnabled(False)
self.testButton.setGeometry(QtCore.QRect(210, 180, 181, 23))
self.testButton.setMinimumSize(QtCore.QSize(181, 0))
self.testButton.setObjectName("testButton")
self.layoutWidget = QtWidgets.QWidget(UdsActorSetupDialog)
self.layoutWidget.setGeometry(QtCore.QRect(10, 10, 571, 161))
self.layoutWidget.setObjectName("layoutWidget")
self.formLayout = QtWidgets.QFormLayout(self.layoutWidget)
self.formLayout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint)
self.formLayout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setContentsMargins(0, 0, 0, 0)
self.formLayout.setVerticalSpacing(16)
self.formLayout.setObjectName("formLayout")
self.label_security = QtWidgets.QLabel(self.layoutWidget)
self.label_security.setObjectName("label_security")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_security)
self.validateCertificate = QtWidgets.QComboBox(self.layoutWidget)
self.validateCertificate.setObjectName("validateCertificate")
self.validateCertificate.addItem("")
self.validateCertificate.addItem("")
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.validateCertificate)
self.label_host = QtWidgets.QLabel(self.layoutWidget)
self.label_host.setObjectName("label_host")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_host)
self.host = QtWidgets.QLineEdit(self.layoutWidget)
self.host.setAcceptDrops(False)
self.host.setObjectName("host")
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.host)
self.label_serviceToken = QtWidgets.QLabel(self.layoutWidget)
self.label_serviceToken.setObjectName("label_serviceToken")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_serviceToken)
self.serviceToken = QtWidgets.QLineEdit(self.layoutWidget)
self.serviceToken.setObjectName("serviceToken")
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.serviceToken)
self.label_loglevel = QtWidgets.QLabel(self.layoutWidget)
self.label_loglevel.setObjectName("label_loglevel")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_loglevel)
self.logLevelComboBox = QtWidgets.QComboBox(self.layoutWidget)
self.logLevelComboBox.setFrame(True)
self.logLevelComboBox.setObjectName("logLevelComboBox")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(0, "DEBUG")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(1, "INFO")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(2, "ERROR")
self.logLevelComboBox.addItem("")
self.logLevelComboBox.setItemText(3, "FATAL")
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.logLevelComboBox)
self.label_host.raise_()
self.host.raise_()
self.label_serviceToken.raise_()
self.serviceToken.raise_()
self.validateCertificate.raise_()
self.label_security.raise_()
self.label_loglevel.raise_()
self.logLevelComboBox.raise_()
self.retranslateUi(UdsActorSetupDialog)
self.logLevelComboBox.setCurrentIndex(1)
self.closeButton.clicked.connect(UdsActorSetupDialog.finish)
self.testButton.clicked.connect(UdsActorSetupDialog.testUDSServer)
self.saveButton.clicked.connect(UdsActorSetupDialog.saveConfig)
self.host.textChanged['QString'].connect(UdsActorSetupDialog.configChanged)
self.serviceToken.textChanged['QString'].connect(UdsActorSetupDialog.configChanged)
QtCore.QMetaObject.connectSlotsByName(UdsActorSetupDialog)
def retranslateUi(self, UdsActorSetupDialog):
_translate = QtCore.QCoreApplication.translate
UdsActorSetupDialog.setWindowTitle(_translate("UdsActorSetupDialog", "UDS Actor Configuration Tool"))
self.saveButton.setToolTip(_translate("UdsActorSetupDialog", "Click to register Actor with UDS Broker"))
self.saveButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Click on this button to register Actor with UDS Broker.</p></body></html>"))
self.saveButton.setText(_translate("UdsActorSetupDialog", "Save Configuration"))
self.closeButton.setToolTip(_translate("UdsActorSetupDialog", "Closes UDS Actor Configuration (discard pending changes if any)"))
self.closeButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Exits the UDS Actor Configuration Tool</p></body></html>"))
self.closeButton.setText(_translate("UdsActorSetupDialog", "Close"))
self.testButton.setToolTip(_translate("UdsActorSetupDialog", "Click to test existing configuration (disabled if no config found)"))
self.testButton.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Click on this button to test the server host and assigned toen.</p></body></html>"))
self.testButton.setText(_translate("UdsActorSetupDialog", "Test configuration"))
self.label_security.setText(_translate("UdsActorSetupDialog", "SSL Validation"))
self.validateCertificate.setToolTip(_translate("UdsActorSetupDialog", "Select communication security with broker"))
self.validateCertificate.setWhatsThis(_translate("UdsActorSetupDialog", "<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>"))
self.validateCertificate.setItemText(0, _translate("UdsActorSetupDialog", "Ignore certificate"))
self.validateCertificate.setItemText(1, _translate("UdsActorSetupDialog", "Verify certificate"))
self.label_host.setText(_translate("UdsActorSetupDialog", "UDS Server"))
self.host.setToolTip(_translate("UdsActorSetupDialog", "Uds Broker Server Addres. Use IP or FQDN"))
self.host.setWhatsThis(_translate("UdsActorSetupDialog", "Enter here the UDS Broker Addres using either its IP address or its FQDN address"))
self.label_serviceToken.setText(_translate("UdsActorSetupDialog", "Service Token"))
self.serviceToken.setToolTip(_translate("UdsActorSetupDialog", "UDS user with administration rights (Will not be stored on template)"))
self.serviceToken.setWhatsThis(_translate("UdsActorSetupDialog", "<html><head/><body><p>Administrator user on UDS Server.</p><p>Note: This credential will not be stored on client. Will be used to obtain an unique token for this image.</p></body></html>"))
self.label_loglevel.setText(_translate("UdsActorSetupDialog", "Log Level"))
from ui import uds_rc

View File

@@ -1,195 +0,0 @@
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt5 (Qt v5.13.2)
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore
qt_resource_data = b"\
\x00\x00\x08\x7c\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x30\x00\x00\x00\x30\x08\x06\x00\x00\x00\x57\x02\xf9\x87\
\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x0b\x13\x00\x00\x0b\x13\
\x01\x00\x9a\x9c\x18\x00\x00\x00\x07\x74\x49\x4d\x45\x07\xe2\x0a\
\x04\x07\x27\x0a\x6d\xd5\xd2\x21\x00\x00\x08\x1b\x49\x44\x41\x54\
\x68\xde\xed\x9a\x6d\x8c\x54\xd5\x19\xc7\x7f\xe7\xbe\xee\x2e\xfb\
\xbe\x3a\x60\x2d\x52\xd6\x62\xac\x52\x23\x68\xc7\x97\xb4\x46\x8c\
\xca\x04\x6c\x2d\xad\x56\x4d\x5d\x5a\x9b\x5a\x8d\xfd\x60\xd2\x12\
\x9b\x94\x56\xb4\x76\xc4\xa6\x68\xda\x68\xb5\x04\x62\x90\xd1\xb8\
\xc1\x12\xab\x06\x98\x6a\x33\x60\x41\x83\x53\x17\x50\x16\x10\xa5\
\xb2\x14\xd4\x65\x16\x96\x65\x67\x77\xe6\xce\x7d\x3b\xfd\xb0\xb3\
\xeb\xec\xee\xec\xb0\xb3\x77\xfa\xa1\x49\xff\xc9\x64\x66\xce\xb9\
\xf7\x9e\xe7\xbf\xcf\xcb\x79\xce\x7f\x16\xfe\xc7\x21\x2a\xfd\xc0\
\x78\x32\xa4\x01\x9a\xa2\xa0\x9d\xdf\xaa\x29\x5f\x68\xd2\x94\x23\
\xdd\x8e\x78\x27\xe9\xf0\xc1\x87\x0e\xdd\x3d\x3e\x5d\x47\x1c\x5f\
\x0c\xad\xec\x00\xd9\x44\xbb\x25\xff\xeb\x04\xe2\xc9\x90\x02\xa8\
\x80\x96\x7f\x3f\x07\x58\x04\x2c\x00\xae\x04\xa6\x0f\x5f\xeb\x79\
\xe0\x38\x92\x5d\x7b\x6c\xf6\x76\x3a\x9c\xea\xf3\xc9\x1b\x3c\xf2\
\x5e\x04\x27\x80\x38\x10\x03\x76\x00\x1e\x60\x9f\x89\x9c\x98\x84\
\xe1\x17\x00\xeb\x81\x56\xa0\x2e\x4f\x40\x2b\x76\xad\x94\xb0\x7a\
\x6d\x9a\xf4\x80\x44\x4a\x80\xe1\xb5\x25\x82\xcf\xed\x90\x88\x31\
\x4b\x17\x35\xc3\x06\xfa\x81\x87\x13\xed\xd6\x53\x65\x11\x88\x27\
\x43\x73\x81\x35\xc0\x45\x40\xfd\x64\x3c\x34\x38\x28\xf9\xd3\xea\
\x34\x00\x86\xb4\x38\x6a\xdc\x43\xbf\x3a\x1f\x57\x34\xe2\x63\x22\
\x45\x01\x67\xcf\xc6\x6c\xa8\x47\xaf\x56\x51\xdc\x5e\x0c\xb7\x9b\
\xba\x81\xd7\x69\xe8\x7f\x05\x09\x78\xaa\x39\xd6\xb4\xd3\xc0\xef\
\x12\xed\xd6\xca\x33\x12\x88\x27\x43\x6b\x80\x1f\x97\x1b\x8b\x07\
\x3e\x70\x78\x6d\xd3\x20\xbd\xfa\xcd\x74\x99\x0f\x20\x51\x11\xb8\
\x05\x5e\x18\x0e\x21\x81\x7e\xf6\x2c\x14\x73\x1a\x79\x37\x21\x51\
\x90\x8a\x81\x14\x1a\xd5\xd6\x01\x6a\x32\x6f\x51\x3b\x98\xa0\xb9\
\xef\x45\xdc\xd1\x64\xfe\x96\x68\xb7\x22\x13\x12\x88\x27\x43\xcf\
\x02\x77\x4d\x25\x99\x8e\xa7\x3c\x9e\x59\x57\xc5\xfe\x86\x2d\x28\
\x64\x8b\xbb\x5b\xd3\x30\x67\xcc\x99\x54\x6a\x4a\x61\x20\xa4\xc7\
\x79\x9f\xdc\x49\x5d\xfa\x15\xa4\xd0\x87\x27\xb7\x27\xda\xad\x6b\
\x86\xbf\xa8\xc3\x1f\x36\x6e\x3b\xcb\x30\x74\xf1\x62\xe1\x58\x39\
\x68\x6e\x52\x39\xd1\xdf\xc4\xbe\x53\xdf\x42\x88\xf1\x79\x27\x84\
\x82\x79\xee\x85\xe3\x3c\x32\x31\x05\x0f\xf0\xe9\x6b\xb8\x15\x44\
\x15\xb5\x99\x04\xa0\x00\xcc\x9a\x3d\x57\x7b\xfe\x70\xa7\x7b\x8a\
\xe1\x11\x80\xf5\x2f\x9f\x52\xb3\x96\xaf\x4c\xb5\x9c\xd9\xb6\xe4\
\x96\x85\x29\x66\x36\x1d\x2d\x3a\x6f\x9c\x7b\x01\x48\xbf\xfc\x32\
\x29\x1d\x52\x67\xfd\x9c\xbe\x86\xa5\x85\xc3\xef\x0f\x7f\x18\x31\
\xb8\xbe\x56\x91\x1b\xe3\xa7\xa5\xe7\x4d\xb9\x24\xe3\x49\x85\x55\
\xb7\xdd\x4b\x8d\x6e\x15\xd6\x26\xb4\xda\x66\x44\x80\x2d\x47\xc8\
\x1c\x3d\x2d\xcb\x50\xbd\x91\xe7\xd6\x5c\x77\x7b\x55\xf3\x28\x02\
\x40\x4e\x08\x78\x7d\xc7\x00\x9a\x16\x64\x7f\x93\xac\xfe\xc1\x9d\
\x05\x61\x24\xd0\x1a\xa7\x07\xde\x6f\x2d\xf3\x2b\xf8\x8a\x39\x2a\
\x6a\x47\x11\x88\x45\x1d\x09\x2c\x3c\x79\xca\x65\x57\x67\x06\x3d\
\x00\x09\x5d\xcd\xb1\x72\xc9\x32\x6c\xd7\x44\x28\x0a\x28\x0a\xc1\
\xe1\x63\x9b\x5f\x2e\x1c\x30\xc7\x7a\x80\x58\xd4\xd9\x2a\x04\xbb\
\x3a\x3a\xb3\x7c\x7c\xd4\x0e\xb4\xdc\xec\xd0\x41\xee\xbf\x7e\x15\
\x96\x63\x80\x2f\xa9\x04\x14\x3f\x33\x7e\x6c\xec\x40\x2c\xea\x5c\
\x66\xe8\x22\xb7\x75\x67\x1a\xcf\x0b\x10\x48\x52\x70\xc3\xc5\xaf\
\x71\xfb\xfc\x17\xf0\x5c\xb7\x12\xe6\x53\x65\x1d\x2e\x1c\xc8\x16\
\x25\x90\xc7\x52\x55\x11\xbc\xfc\x7a\x1f\x6a\x00\xef\xdb\xae\x49\
\xdb\xd7\x57\x73\x51\x55\x3c\xb0\xf9\x86\x7b\x6c\x6c\x01\xee\x9f\
\x90\x40\x2c\xea\x6c\x00\x7e\x9f\xb3\x25\x7f\xd9\xd2\x17\x68\x61\
\xdb\x35\xf9\xe5\xc2\xfb\x69\xa9\x3e\x1e\xa8\x30\xe8\xf6\x11\x0a\
\x8a\xbc\x5f\x92\x40\x9e\xc4\x03\xc0\xa7\x19\x4b\xf2\xee\xde\x6c\
\xa0\x3c\x94\xc0\x13\xd7\x5d\x4d\xad\xde\x3f\x75\x0f\xd8\x87\x0a\
\xab\x50\x6f\xa2\xdd\xb2\x4b\x12\xc8\xe3\x72\x80\x03\x87\x2c\x3e\
\x3d\xee\xa0\x88\x20\x24\x04\x4f\x2f\xbc\x94\x46\xf3\x64\xbe\x1b\
\x2d\xe7\x5e\x0d\xd3\x3e\x54\xd8\xf9\xfc\x71\xc2\x24\x1e\xe3\x85\
\xcf\x80\x9b\x14\x05\x36\x6f\x4b\xd3\x3f\xe0\x05\x2b\x84\x52\xe5\
\xa9\x1b\x2f\xa3\xb5\x7e\x3f\xae\xaf\x3b\x93\xdf\x06\x34\x4c\xfb\
\xa3\xc2\x91\xc9\x11\xc8\x93\xd8\x54\x6d\xea\x47\x4c\x43\xb0\xf9\
\xcd\x34\xaa\x4a\xa0\x58\x76\x7d\x8d\xe8\xb5\xd7\xf3\xdc\xa2\xd6\
\x27\xbb\x0f\xd6\x4d\xcb\x9f\x33\x6e\x03\x36\x03\x5d\x45\xef\x12\
\x2a\xc6\xe7\x04\x9c\xfc\xab\xf4\x81\x66\xdf\x91\xc5\x0a\x30\x0f\
\x78\xd1\x30\xb4\x39\xab\xd6\xfe\x9d\x8c\x65\x13\x6a\xd1\x58\x78\
\x4d\x1d\xbe\x4f\x25\xf0\x78\x24\x9c\x5a\x36\x76\x70\xc6\x8a\xfe\
\x5b\x80\x47\x81\x39\x00\xbe\x52\xcb\xdc\x03\xf5\x80\x0b\x30\x00\
\x34\x24\xda\x2d\x7f\x42\x02\xfb\x8e\x2c\x5e\x01\xfc\xaa\xf0\xe4\
\x65\xdb\x69\x1e\x5b\xf3\x36\xba\x26\x68\x9d\x69\x70\xf5\x65\xd3\
\x2a\x75\x8c\xfe\x75\x24\x9c\xfa\x6d\xb1\x89\x19\x2b\xfa\xeb\x80\
\xcf\x84\x94\xd3\xbe\xba\xbf\x01\x57\xab\x02\xd8\x9d\x68\xb7\xe6\
\x4f\x18\x42\x3f\x7c\xd0\x4c\xbe\xd5\xf1\xf1\x43\x9a\xaa\x68\x02\
\x1f\x01\x6c\xda\x7b\x1f\x8f\xbe\x91\x40\x34\xaf\x44\x08\x87\x8f\
\x8f\xda\x9c\xec\xf3\x2a\x45\xe0\x91\x78\x32\x74\x47\xb1\x89\xee\
\x87\xeb\xd3\x9a\x7b\xac\xb9\x36\xb3\xd5\x2d\x28\xa1\xb1\x92\x27\
\xb2\xb6\xe5\xfa\x33\x9e\xe7\xdf\x5b\x53\x05\xad\x97\x6e\xa0\xe3\
\xd8\x77\xf0\x25\x28\x02\xa4\x80\xaa\x93\xb7\xa2\xe6\x5e\x45\x4a\
\xc9\x1d\xdf\x6c\x44\x55\x2b\x26\x6c\xcc\x8f\x84\x53\xbb\x8b\x4d\
\x5c\x75\xd7\x37\xb6\x54\x67\xdf\x89\x80\x42\xa2\xdd\x12\x25\x5b\
\x09\x60\xad\xaa\x2a\xe4\x6c\x8f\xdd\x5d\xf3\x86\x2e\x1a\x56\x14\
\x24\xe4\x9a\xd6\x01\x43\x2a\xc3\xc6\xf8\xe9\x4a\x2a\x32\xbb\xe2\
\xc9\xd0\xf4\x78\x32\x34\xee\x2f\x52\x9d\x4d\xda\x79\x53\x8f\x4d\
\xa6\x17\xea\x18\x99\x74\xde\x2a\x52\xd2\xa6\x91\x0d\x75\x81\x74\
\x70\x5c\xc9\x3b\x7b\x32\x01\x2b\xd3\x28\xec\x8d\x84\x53\xb2\x68\
\x1d\x85\x34\xb0\x7d\x52\xaa\x44\xdb\x72\xfd\x3d\xf0\x2f\xf1\xaa\
\x96\x90\x6b\x7a\xa9\xa8\x96\xa1\xa7\x9f\x40\x4f\xff\x02\x5f\x0a\
\xae\x9a\x57\xc3\x9c\x59\x26\x95\xe9\x39\xd9\x10\x09\xa7\x6e\x9b\
\x7c\x8b\x57\x1c\x3b\x41\x41\x78\x5d\x13\xf6\x06\x4e\xed\xcf\x90\
\xea\x6c\x14\x21\xf9\x47\x72\x90\x8c\xe5\x57\xca\x0b\xdf\x8b\x27\
\x43\x37\x04\x25\xf0\x18\x80\xe2\x1e\x2a\x29\x7d\x65\xa7\x7f\x08\
\xa2\x1e\xd3\x10\x6c\xde\xd6\x1f\xe8\x10\x34\x06\x7f\x0e\x44\x20\
\x16\x75\x0e\x03\x5b\xf1\xfb\xd0\x06\xd7\x95\xec\xd2\xac\x96\x37\
\x11\xd2\x21\x6b\x49\x36\x6f\xeb\xaf\xcc\xe1\x0b\x5a\xe3\xc9\xd0\
\x45\x41\x3c\x00\xf0\x07\x84\x8e\x71\xfa\xbe\xbc\x4c\x39\x41\x7f\
\xa3\xcf\xc5\xae\x7b\x08\x21\x1c\x8e\x9f\x70\xf9\xa8\xcb\xae\x94\
\x17\xa2\x81\x08\xc4\xa2\xce\xab\x40\x0f\x38\xa8\xb9\x1d\xa5\x7b\
\xfe\x86\x15\xf8\xfa\xd7\x10\x02\xde\xee\x18\xc0\xb6\x2b\x92\xce\
\x97\x07\xf5\x00\xc0\xb5\x20\x30\x4f\x5c\x8b\x90\x13\xf7\xf2\xc2\
\x87\x5c\xcb\x1b\x20\x1d\x14\x45\xf0\xd2\x96\xbe\x52\x2a\xf4\x64\
\x51\x5f\x6c\x4f\x28\x8b\x40\x2c\xea\xec\x07\xb6\xa2\xe8\x18\x7d\
\x3f\x2d\x99\xd0\x52\x34\x90\x0d\x75\x0e\x37\x5c\x74\x74\x66\x83\
\xe6\xc3\xbf\x8a\xef\x09\xe5\x79\x00\xe0\x46\xc0\x57\xb3\xcf\xa3\
\x65\x5e\x28\xdd\x2c\x6b\x17\xe3\xd6\x3e\x0a\x48\x3a\x0f\x66\xe9\
\x4e\x05\x3a\xcc\x3f\x3d\x39\xc5\x68\x12\x68\x5b\xae\x5f\x02\xbc\
\x07\x0e\x56\xcb\x4e\x7c\x23\x3c\xe1\xad\x52\x40\xcd\xf1\xf3\x11\
\xde\xbf\x51\x55\x85\x3b\xbf\xdd\x84\xeb\x96\x9d\x13\x27\x23\xe1\
\xd4\x59\x95\xc8\x81\xe1\x50\x7a\x1f\xf8\x0d\x18\x54\xf5\x46\x10\
\xde\x67\x25\x64\x40\xb0\xce\xfe\x10\x30\x70\x5d\x49\xe2\xed\xf4\
\x54\x42\x29\xf0\x46\x56\x8c\xc4\x0a\x90\x1b\x90\x19\xaa\x7b\x2e\
\x44\xc8\x74\x89\x7c\x50\xc9\x35\xc5\x10\x38\x74\x7d\xe2\xd0\x7b\
\xba\xac\xd6\x7b\x29\xb0\x67\xf2\xa2\x63\x99\x68\x5b\xae\xef\x04\
\xae\x40\xba\x64\xcf\xe9\x47\x8a\xda\x09\xaf\x35\x7b\xbf\x8b\x9a\
\x7b\x0d\x5d\x17\xdc\x71\x53\x23\xde\x99\xbb\x8d\x45\x91\x70\x6a\
\x4b\x79\x72\x57\x99\x88\x45\x9d\x2b\x81\x83\x08\x8d\xea\xee\x46\
\x84\xdf\x3d\xe1\xb5\x4e\xc3\xe3\x20\x1d\x6c\x5b\x72\xf8\xcc\x52\
\xe5\xc5\xe5\x1a\x3f\x25\x02\x79\x12\x17\x0e\x1d\xc2\x15\xaa\x8f\
\xb7\xa2\x59\x7f\x2d\xea\x4b\x4f\xff\x12\xd2\x18\xda\xe0\xb6\xbf\
\x3b\x58\xca\xdd\x33\x23\xe1\xd4\xfe\xa9\x09\x8e\x53\x44\x2c\xea\
\x2c\x06\x1e\x01\x17\xa3\x77\x09\x46\xdf\xdd\xe3\x9e\x26\x7c\x70\
\xcd\xdb\x47\xbe\x0f\x64\xc6\xc5\xd0\x1e\xa0\x36\x12\x4e\x1d\x9b\
\xba\x62\x1a\x00\xb1\xa8\xf3\x20\xf0\x13\x84\xee\x68\x99\x67\xa9\
\xf9\xa4\x0e\xd5\xda\x34\xe2\x0d\xa9\x80\xe2\x6c\xfd\x5c\xcc\x1c\
\xad\x2b\xad\x8b\x84\x53\xf3\x22\xe1\xd4\x60\x10\x1b\x2a\xd2\xff\
\xb6\x2d\xd7\x67\x00\xff\x04\xbe\x38\x24\xd9\xd4\x90\x6b\x8c\xa1\
\x59\xaf\xa2\x5a\xcf\x01\x43\x3f\xd0\x2d\x5e\x50\x4f\x63\xbd\x6a\
\x03\x77\x47\xc2\xa9\xf5\x95\x58\xbb\xa2\xff\x6a\xd0\xb6\x5c\x5f\
\x0a\xac\x1d\xb1\x78\xcc\x42\xdf\xbf\xb9\xd9\xf1\xa4\xdf\xb8\xe8\
\x8a\x9e\x4c\xa5\xd6\x54\x2a\x49\x20\x16\x75\xd6\x33\xf4\x6b\xfe\
\x8f\x46\x19\x2f\x60\xf1\x82\xfa\x65\xaa\x46\x75\x25\x8d\xaf\xb8\
\x07\xc6\x78\x43\x07\xce\x93\x12\xf3\xfc\x59\x46\xcf\xc3\xf7\x0c\
\xf6\xf0\x7f\x8c\xc7\x7f\x00\xf4\xc5\x17\xbc\x3a\x13\xef\x97\x00\
\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\
"
qt_resource_name = b"\
\x00\x03\
\x00\x00\x70\x37\
\x00\x69\
\x00\x6d\x00\x67\
\x00\x0c\
\x09\x57\x90\xa7\
\x00\x75\
\x00\x64\x00\x73\x00\x2d\x00\x69\x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\
"
qt_resource_struct_v1 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
"
qt_resource_struct_v2 = b"\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\
\x00\x00\x00\x00\x00\x00\x00\x00\
\x00\x00\x00\x0c\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\
\x00\x00\x01\x6e\x86\x31\xef\xa3\
"
qt_version = [int(v) for v in QtCore.qVersion().split('.')]
if qt_version < [5, 8, 0]:
rcc_version = 1
qt_resource_struct = qt_resource_struct_v1
else:
rcc_version = 2
qt_resource_struct = qt_resource_struct_v2
def qInitResources():
QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
def qCleanupResources():
QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data)
qInitResources()

1
client Submodule

Submodule client added at 5b044bca34

View File

@@ -1,2 +0,0 @@
PYTHONPATH=./src:${PYTHONPATH}

View File

@@ -1,4 +0,0 @@
/bin
/udsclient*
/udsclient-*.tar.gz
/*.rpm

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>UDSclient</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
</natures>
</projectDescription>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/${PROJECT_DIR_NAME}/src</path>
</pydev_pathproperty>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">system-2.7</pydev_property>
</pydev_project>

View File

@@ -1,8 +0,0 @@
/udsclient-opensuse-[0-9]*.spec
/udsclient-[0-9]*.spec
/debian/udsclient
/targz
/UDSClientDir
/UDSClient*.AppImage
/appimage*
/UDSClient.desktop

View File

@@ -1,80 +0,0 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Version
# VERSION := 1.7.5
# Directories
SOURCEDIR := ../src
LIBDIR := $(DESTDIR)/usr/lib/UDSClient
BINDIR := $(DESTDIR)/usr/bin
SBINDIR = $(DESTDIR)/usr/sbin
APPSDIR := $(DESTDIR)/usr/share/applications
PYC := $(shell find $(SOURCEDIR) -name '*.py[co]')
CACHES := $(shell find $(SOURCEDIR) -name '__pycache__')
clean:
rm -rf $(PYC) $(CACHES) $(DESTDIR)
install:
rm -rf $(DESTDIR)
mkdir -p $(LIBDIR)
#mkdir -p $(BINDIR)
#mkdir -p $(SBINDIR)
mkdir -p $(APPSDIR)
mkdir $(LIBDIR)/uds
# Cleans up .pyc and cache folders
rm -f $(PYC) $(CACHES)
cp $(SOURCEDIR)/uds/*.py $(LIBDIR)/uds
cp $(SOURCEDIR)/UDS*.py $(LIBDIR)
# URL Catchers elements for gnome/kde
cp desktop/UDSClient.desktop $(APPSDIR)
chmod 755 $(LIBDIR)/UDSClient.py
ifeq ($(DISTRO),targz)
cp installer.sh $(DESTDIR)/install.sh
tar czvf ../udsclient3-$(VERSION).tar.gz -C $(DESTDIR) .
endif
ifeq ($(DISTRO),rh)
endif
uninstall:
rm -rf $(LIBDIR)
# rm -f $(BINDIR)/udsclient
# rm -rf $(CFGDIR)
build-appimage:
ifeq ($(DISTRO),x86_64)
cat udsclient-appimage-x86_64.recipe | sed -e s/"version: 0.0.0"/"version: $(VERSION)"/g > appimage.recipe
endif
ifeq ($(DISTRO),armf)
cat udsclient-appimage-x86_64.recipe | sed -e s/"version: 0.0.0"/"version: $(VERSION)"/g | sed -e s/amd64\\\|x86_64/armhf/g > appimage.recipe
endif
ifeq ($(DISTRO),i686)
cat udsclient-appimage-x86_64.recipe | sed -e s/"version: 0.0.0"/"version: $(VERSION)"/g | sed -e s/amd64/i386/g | sed -e s/x86_64/i686/g > appimage.recipe
endif
# Ensure all working folders are "clean"
-rm -rf appimage appimage-builder-cache /tmp/UDSClientDir
appimage-builder --recipe appimage.recipe
# Now create dist and move appimage
rm -rf $(DESTDIR)
mkdir -p $(DESTDIR)
cp UDSClient-$(VERSION)-$(DISTRO).AppImage $(DESTDIR)
# Generate the .desktop fixed for new path
cat desktop/UDSClient.desktop | sed -e s/".usr.lib.UDSClient.UDSClient.py"/"\/usr\/bin\/UDSClient-$(VERSION)-$(DISTRO).AppImage"/g > $(DESTDIR)/UDSClient.desktop
# And also, generater installer
cat installer-appimage-template.sh | sed -e s/"0.0.0"/"$(VERSION)"/g | sed -e s/x86_64/$(DISTRO)/g > $(DESTDIR)/installer.sh
chmod 755 $(DESTDIR)/installer.sh
tar czvf ../udsclient3-$(DISTRO)-$(VERSION).tar.gz -C $(DESTDIR) .
# cleanup
-rm -rf appimage appimage-builder-cache /tmp/UDSClientDir

View File

@@ -1,47 +0,0 @@
#!/bin/bash
VERSION=`cat ../../../VERSION`
RELEASE=1
# Debian based
dpkg-buildpackage -b
# Now rpm based
top=`pwd`
cat udsclient-template.spec |
sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
sed -e s/"release 1"/"release ${RELEASE}"/g > udsclient-$VERSION.spec
cat appimage-udsclient.recipe |
sed -e s/"version: 0.0.0"/"version: ${VERSION}"/g > appimage.recipe
# Now fix dependencies for opensuse
# Note: Right now, opensuse & rh seems to have same dependencies, only 1 package needed
# cat udsclient-template.spec |
# sed -e s/"version 0.0.0"/"version ${VERSION}"/g |
# sed -e s/"name udsclient3"/"name udsclient3-opensuse"/g > udsclient-opensuse-$VERSION.spec
# Right now, udsactor-xrdp-.spec is not needed
# for pkg in udsclient-$VERSION.spec udsclient-opensuse-$VERSION.spec; do
for pkg in udsclient-$VERSION.spec; do
rm -rf rpm
for folder in SOURCES BUILD RPMS SPECS SRPMS; do
mkdir -p rpm/$folder
done
rpmbuild -v -bb --clean --buildroot=$top/rpm/BUILD/$pkg-root --target noarch $pkg 2>&1
done
#rm udsclient-$VERSION
# Make .tar.gz with source
make DESTDIR=targz DISTRO=targz VERSION=${VERSION} install
# And make FULL CLIENT .tar.gz for x86 and raspberry
make DESTDIR=appimage DISTRO=x86_64 VERSION=${VERSION} build-appimage
make DESTDIR=appimage DISTRO=armhf VERSION=${VERSION} build-appimage
make DESTDIR=appimage DISTRO=i686 VERSION=${VERSION} build-appimage
rpm --addsign ../*rpm

Some files were not shown because too many files have changed in this diff Show More