1
0
mirror of https://github.com/dkmstr/openuds.git synced 2024-12-22 13:34:04 +03:00
Commit Graph

5687 Commits

Author SHA1 Message Date
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