Commit Graph

827 Commits

Author SHA1 Message Date
Jared Goodwin
459c63ffbe Update ScriptRun/ScriptResult relationship. 2023-07-26 13:01:58 -07:00
Jared Goodwin
e70d083a3f Don't send the whole script result back from the API. 2023-07-26 12:52:15 -07:00
Jared Goodwin
ac6487c6c5 Another pass of nullable refactoring. 2023-07-26 11:31:34 -07:00
Jared Goodwin
0f9ea4957b Clean up errors and majority of warnings. 2023-07-25 14:05:59 -07:00
Jared Goodwin
28079f887a Refactor API controllers. 2023-07-25 11:34:35 -07:00
Jared Goodwin
8b341562bc Refactor OrganizationManagementController, ApiAuthorizationFilter, and ExpiringTokenFilter. 2023-07-25 07:18:34 -07:00
Jared Goodwin
b500f7e9e0 Refactor DataService for nullability. Need to refactor calling services next. 2023-07-24 16:11:43 -07:00
Jared Goodwin
e5470f9d5f First pass of nullable references. 2023-07-24 09:16:22 -07:00
Jared Goodwin
a164bcad69 Convert to file-scoped namespaces. 2023-07-21 10:16:29 -07:00
Jared Goodwin
4a7bf7c5ae Added missing await. 2023-07-18 08:50:43 -07:00
Jared Goodwin
066a1bdd4d Update DataCleanupService to also remove expired recordings. 2023-07-05 14:51:15 -07:00
Jared Goodwin
eff8985822 Implement remote control session recording. 2023-07-03 14:23:44 -07:00
Jared Goodwin
65f61eec82 Add FilterDevicesByOnlineStatus to AgentHubSessionCache. 2023-06-24 12:12:50 -07:00
Jared Goodwin
f1e83df87a Realign property name casing in DeviceClientDto. Move update check after reconnection, so these can be properly cased later. 2023-06-24 10:06:00 -07:00
Jared Goodwin
2cac4a59e6 Make dropdown widths match. 2023-06-23 09:35:58 -07:00
Jared Goodwin
7c8337146a Add DeviceClientDto for transfer from agent to server. Refactor to allow correct scoping of services in tests. 2023-06-23 07:51:47 -07:00
Jared Goodwin
fb0bfe4579 Update tests. 2023-06-23 04:20:25 -07:00
Jared Goodwin
593944f86d Change icon so it doesn't conflict with View Only. 2023-06-22 14:06:25 -07:00
Jared Goodwin
0b8123ad1e Add unit tests. 2023-06-22 13:40:05 -07:00
Jared Goodwin
3bb5098910 Make IMessenger scoped (which essentially becomes singleton per user). 2023-06-22 10:16:21 -07:00
Jared Goodwin
f5f11cac49 Add logging on the server for wake commands sent. 2023-06-22 09:52:24 -07:00
Jared Goodwin
7d7fa9f9cd Fix offline device logic error. 2023-06-22 09:16:08 -07:00
Jared Goodwin
c4a97ee6c7 Add mac addresses to displayed device info. 2023-06-22 09:00:49 -07:00
Jared Goodwin
0630b2e007 Account for null (need nullable references enabled). 2023-06-22 08:51:59 -07:00
Jared Goodwin
e8b428e733 Register WOL service in agent. Show toast after sending WOL commands. 2023-06-22 08:37:07 -07:00
Jared Goodwin
db421ce4b9 Initially load only one day of server logs. 2023-06-22 07:57:58 -07:00
Jared Goodwin
be8073d4d6 Add migrations. 2023-06-22 07:57:39 -07:00
Jared Goodwin
1794059822 Implement wake-on-lan. 2023-06-22 07:57:31 -07:00
Jared Goodwin
e5f16d2359 Update NuGet packages. 2023-06-15 08:43:33 -07:00
Jared Goodwin
2d73f74bd9 Fix device heartbeat. Move harnesses outside of AuthorizeView. 2023-06-15 05:35:19 -07:00
Jared Goodwin
b10cebccd6 Remove unneeded semicolon. 2023-06-15 05:13:28 -07:00
Jared Goodwin
bc690e8beb Create authorization policies for OrganizationAdmin and ServerAdmin. Use these within the routing system via Authorize attribute instead of directly checking on each page. 2023-06-14 15:06:13 -07:00
Jared Goodwin
73bd139710 Implement new IHubEventHandler methods. 2023-06-08 06:22:32 -07:00
Jared Goodwin
934bf9a14a Adjust load tester. Made AddOrUpdateDevice async. 2023-06-02 13:31:01 -07:00
Jared Goodwin
382a9a6c32 Implement submodule changes. Handle task cancellation in CpuUtilizationSampler. 2023-06-01 15:24:10 -07:00
Jared Goodwin
a2cea49c2f Update submodule. 2023-05-23 15:46:57 -07:00
Jared Goodwin
2c4269742b Add EF migrations. 2023-05-23 14:59:05 -07:00
Jared Goodwin
c647e03aea Refactor logging. Update submodule. 2023-05-23 14:46:20 -07:00
Jared Goodwin
db19e92823 Finish implementing Serilog, LogManager, and full-screen loader. 2023-05-22 15:43:45 -07:00
Jared Goodwin
d1c432efd9 Implement Serilog and LogsManager. 2023-05-22 10:27:02 -07:00
Jared Goodwin
509919179f Merge branch 'master' into jaredg-respect-httplogging-setting 2023-05-22 09:08:47 -07:00
Jared Goodwin
b418621244 Force dark theme until light theme is implemented on viewer. 2023-05-19 13:31:13 -07:00
Jared Goodwin
1909925e11 Merge branch 'master' into jaredg-viewer-design-update 2023-05-19 13:24:56 -07:00
Jared Goodwin
bea7a0c0f3 WIP on viewer design implementation. 2023-05-18 09:33:38 -07:00
Jared Goodwin
f3dd219e79
Merge pull request #636 from immense/jaredg-fix-remotecontrol-api
Fix SignalR call to start remote control session.
2023-05-17 07:32:26 -07:00
Jared Goodwin
543538ce44 Fix SignalR call to start remote control session. 2023-05-17 07:30:41 -07:00
Jared Goodwin
1a796500dd WIP on replacing DbLogger with Serilog. 2023-05-16 08:53:37 -07:00
Jared Goodwin
c1fffe26df Don't register HTTP logging services if option is disabled in appsettings. 2023-05-16 06:52:35 -07:00
Jared Goodwin
79d354084d Revert log level change, as it will be handled in another PR. 2023-05-16 06:49:52 -07:00
Jared Goodwin
eb7cfc1356 Use ExecuteDeleteAsync to speed up deletion of all server logs. 2023-05-15 17:47:48 -07:00
Jared Goodwin
9ea17adb4f Fix NRE in scripts page. Refactor logic. 2023-05-15 17:47:27 -07:00
Jared Goodwin
c96319d88b Comment out debug logging from EF Core. 2023-05-12 10:39:05 -07:00
Jared Goodwin
9324e6a1b5 Quiet some of the logs. 2023-05-12 07:05:26 -07:00
Jared Goodwin
80d3b3813b Implement changes to IViewerAuthorizer. 2023-05-10 09:29:09 -07:00
Jared Goodwin
0381742064 Merge master. 2023-05-04 11:43:22 -07:00
Jared Goodwin
7b69141355 Add healthcheck controller with loopback-only authorization filter. Add curl install to Dockerfile. 2023-05-03 12:31:10 -07:00
Jared Goodwin
f72d6dad02 Add capture metrics to viewer. 2023-05-03 11:23:03 -07:00
Jared Goodwin
4230ad784d Fix static services accessor (temporary). Create AppVersionHelper for getting app version. 2023-05-02 16:27:33 -07:00
Jared Goodwin
e2e92e9ab4 Fix scripts page "Creator" display field and public filter. 2023-05-02 12:21:44 -07:00
Jared Goodwin
9ee51e9da4 Add basic healthcheck. 2023-04-28 16:32:55 -07:00
Jared Goodwin
b401635902 Fix copy path. 2023-04-28 16:05:59 -07:00
Jared Goodwin
172a80a697 Pre-extract archive in CI/CD before Dockerfile. 2023-04-28 15:20:30 -07:00
Jared Goodwin
1a295a9813 Test multi-stage Dockerfile. 2023-04-28 14:41:15 -07:00
Jared Goodwin
02c08986a3 Implement submodule changes. 2023-04-28 10:14:59 -07:00
Jared Goodwin
4f98ab30e3 Remove dev appsettings. 2023-04-28 06:19:11 -07:00
Jared Goodwin
62edeabc5b Allow saving of appsettings from server config page when in dev. 2023-04-27 13:43:53 -07:00
Jared Goodwin
47fc7e88f7 Remove node in pipeline. 2023-04-27 13:06:12 -07:00
Jared Goodwin
12aef747d8 Update NUGet packages. Fix libman.json. 2023-04-27 12:03:45 -07:00
Jared Goodwin
0edbf4de3a Replace WindowsService.cs. 2023-04-27 10:50:06 -07:00
Jared Goodwin
339e552114 Update dotnet version in scripts and Dockerfile. 2023-04-27 07:53:02 -07:00
Jared Goodwin
e3cf287165 Fix session info state after reconnects. Use hosting for agent. Fix shutdown process. Fix idle timer when disconnected. 2023-04-26 15:10:33 -07:00
Jared Goodwin
bb2126bbab Sync Remotely with latest integration changes. 2023-04-25 15:09:57 -07:00
Jared Goodwin
cf39b88246 Update submodule. 2023-04-21 09:53:52 -07:00
Jared Goodwin
820cb53947 Update to .NET 7. 2023-04-21 06:50:14 -07:00
Jared Goodwin
9a538de5e5 Update submodule after namespace changes. 2023-04-19 07:29:09 -07:00
Jared Goodwin
c0b10ef93d Refactor to align with changes in submodule. 2023-04-18 14:40:32 -07:00
Jared Goodwin
d2dd852a83 Fix desktop reconnection. Fix crash in Wayland (though still not supported). 2023-04-15 15:15:40 -07:00
Jared Goodwin
16477e7f9e Register missing IMessageBoxViewModel in DI, organize MessageBox-related classes, add FakeMessageBoxViewModel, fix resolution of current Application in AvaloniaDispatcher, and remove unused dependency on libdgiplus. 2023-04-15 11:43:32 -07:00
Jared Goodwin
57e3d5220f Enable lockout when user is created from the registration page. 2023-02-14 20:47:58 -08:00
Jared Goodwin
564668f6cc Enable lockout on new accounts created on the organization page. 2023-02-14 20:46:36 -08:00
Jared Goodwin
0e62543b19 Enable account lockout. 2023-02-14 20:01:04 -08:00
Jared Goodwin
cef26f5ca7 Add form label color in darkly theme for Identity input labels. 2023-02-01 21:15:21 -08:00
Jared Goodwin
d5bb45a793 Restrict standard users from accessing device groups that don't have any users. 2023-02-01 21:01:19 -08:00
Jared Goodwin
eff1b634e4 Add "ForceClientHttps" application option. 2023-02-01 20:43:12 -08:00
Jared Goodwin
97e31b44fc
Fix NRE in ViewerPageDataProvider. (#571) 2023-01-20 07:32:36 -08:00
Jared Goodwin
c5a1a56bdf
Move HTTP logging above forwarded headers, so the unmodified headers are logged. (#566) 2023-01-17 18:52:33 -08:00
Jared Goodwin
6ddc20b322
Add UseHttpLogging option in appsettings. (#562)
* Add UseHttpLogging option.

* Default to false for UseHttpLogging.

* Fix log downloads.
2023-01-14 15:55:16 -08:00
Jared Goodwin
56ee561ca2
Bug - Proto forwarded header not being seen by ASP.NET Core. (#554)
* Set permissions on log file so non-elevated process can write to it.

* Replace more instances of static Logger with ILogger<T>.

* Add default Docker host to known proxies.

* Update Immense.RemoteControl

* Update Immense.RemoteControl
2023-01-06 16:48:03 -08:00
Jared Goodwin
95b9a45a0c
Fix regression bug related to agent reconnection. (#552)
* Update agent status on reconnect, without waiting for heartbeat.
2023-01-04 06:29:22 -08:00
Jared Goodwin
080aed5d7b
Installer and client download fixes. (#549)
* Check for empty ETag during install.  Update log path.

* Use effective theme in ClientDownloadsController.  Fix typo.

* Fix FileLogger pattern matching.

* Change log wording.
2023-01-02 14:03:09 -08:00
Jared Goodwin
f6984b4c34
Pattern match to IConfigurationRoot and reload. (#546) 2022-12-31 20:50:43 -08:00
Jared Goodwin
3f8d63c2c0
Azure Pipelines, Docker, and embedded server data. (#543)
* Add Azure Pipelines yml.

* Remove Server Installer.

* Update Release Build.yml for Azure Pipelines

* Update Release Build.yml

* Update Release Build.yml for Azure Pipelines

* Update Release Build.yml for Azure Pipelines

* Update Release Build.yml for Azure Pipelines

* Update Release Build.yml for Azure Pipelines

* Update signtool.exe

* Update Release Build.yml

* Update Publish.ps1

* Update pipeline and Dockerfile.

* Move docker files.

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Move files.

* Update Dockerfile

* Update Dockerfile

* Create RewritableStream.

* Finish implementation of rewritable stream and embedded data searcher.

* Remove RelayCode.

* Get branding from default org if orgId is missing.

* Update README.md

* Remove AppConstants.ServerUrl.  Fix main module file path.

* Update submodule.

* Extract embedded data in Program.cs.

* Add logging.  Update submodule.

* Remove size block.  BinaryWriter prefixes size.

* Remove unused async

* Update Immense.RemoteControl

* Update Release Build.yml for Azure Pipelines

* Update Release Build.yml for Azure Pipelines

* Use UpgradeService for determining out of date clients.
2022-12-31 19:10:40 -08:00
Jared Goodwin
3ef4cdf81a
Extract remote control functionality into separate library. (#539)
* Convert server to new single-file startup model.

* Add remote control implementations.

* Implement IViewerAuthorizer.

* Update hub endpoints.

* Implement HubEventHandler.

* Implement ViewerHubDataProvider.

* Implement page data provider.

* Implement RCL and refactor.

* Update submodule.

* Replace submodule with NuGet.

* Update copy URL.

* Update NuGet.

* Remove deprecated WebRTC.

* Remove deprecated WebRTC.

* Update Immense.RemoteControl

* Building out desktop projects.

* Bring more services into submodule.

* Update submodule.

* Update submodule.

* Refactoring for module.

* Update submodule.

* Update submodule

* Got Windows desktop app running.

* Refactor for submodule changes.

* FIx unattended session start.

* Switch desktop app out of console mode.

* Fix tests.

* Update publishing.

* Remove ClickOnce middleware.

* Remove ClickOnce remnants.

* Update submodule

* Add some logging.

* Update Linux path.

* Update submodule.

* Add cleanup service for unattended sessions that failed to start.

* Update submodule.

* Fix chat.

* Add ValidateExecutableReferencesMatchSelfContained property.

* Add other submodule projects.  Align checkbox.

* Update submodule.  Reduce deserialization in the browser, resulting in faster renders.

* Update submodule.

* Update submodule.

* Update submodule.

* Update submodule.

* Add orgId back for branding.

* Get branding loading in desktop apps.

* Update submodule.

* Create log dir.

* Refactor version check on config page.

* Update submodule.

* Update submodule.

* Change submodule URL.

* Correct namespace.

* Update submodule.

* Checkout submodules recursively.
2022-12-23 06:39:12 -08:00
Jared Goodwin
eae16cb3dc Update ASP.NET Core version in install scripts/services. Update GitHub URLs. Update Docker Ubuntu image to Jammy. 2022-09-16 10:06:39 -07:00
Jared Goodwin
377c32a33b Fix mouse move. 2022-08-01 18:41:53 -07:00
Jared Goodwin
3d15470d3d Move mouse at the start of touch scroll. Add deadzone before initiating scrolling. 2022-08-01 18:06:02 -07:00
Jared Goodwin
d4bdd57d15 Merge branch 'master' into remove-deprecated-webclient 2022-08-01 17:21:16 -07:00
Christopher Gebhardt
ec333a7a33 fix: Prevent invalid authorization headers from accessing the API
The API is secured by this authorization filter that should prevent access to the API when the auhorization header is invalid. Instead the filter just set the status to 403, but delivered the data anyway.

This commit fixes this by explicitly setting the result to an UnauthorizedResult, which prevents access to the API.

#495
2022-07-22 10:26:07 +02:00
Jared Goodwin
cedb8281cb Replace WebRequest in AgentSocket. 2022-07-18 19:34:20 -07:00
Jared Goodwin
a3a6094b97 Remove unused DownloadFile hub method. 2022-07-18 16:40:26 -07:00
Jared Goodwin
808c1f7593 Add two-finger touch scrolling. 2022-07-16 05:42:33 -07:00
Jared Goodwin
54a8726c29 Update packages. 2022-07-06 07:40:21 -07:00
Jared Goodwin
47378133d1 Replace System.Drawing with SkiaSharp. 2022-07-06 07:36:38 -07:00
Jared Goodwin
a096df3b5e Automatically refresh devices on update using a debouncer to avoid excessive CPU usage. 2022-07-06 06:38:44 -07:00
Steve Sobol
de799fdb27
Merge pull request #420 from fanuelsen/master
Add Dockerfile configured to not run Remotely as root
2022-01-17 22:36:52 -08:00
dkattan
bb90a33042
Merge pull request #417 from immense/feature/base64-encode-basic-auth
Base64 encode API Token
2021-12-15 06:07:42 -06:00
dkattan
c3e80e6635
Merge pull request #416 from immense/feature/device-group-api
Added Get route for device groups
2021-12-15 06:04:56 -06:00
Steve Sobol
846e5415b7 DeviceGroup(): return NotFound, instead of BadRequest 2021-12-14 17:28:20 -08:00
Steve Sobol
66d15a6d4e Ensure that auth payload includes both a key ID and a secret 2021-12-14 17:14:28 -08:00
Steve Sobol
539cf62b7c Check for a valid Authorization: header 2021-12-14 17:10:09 -08:00
dkattan
d506c8da34
Merge pull request #418 from immense/app-db-factory
Create AppDbFactory.
2021-12-09 18:12:52 -06:00
Per-Ole
0717cf8110
Running container as root is not best practice
Added rootless dockerfile option.
2021-12-09 12:53:01 +01:00
Christian Bankester
0d9d1c2321
Merge pull request #364 from FingerlessGlov3s/patch-1
Fix typo on user delete column
2021-12-03 15:25:24 -06:00
dkattan
4913535bc4 Made the authorization header require a Basic base64 encoded token instead of the literal key:secret as PowerShell 7 complains when you don't use a base64 encoded value. 2021-12-03 14:46:19 -06:00
dkattan
6176d966c0 Added Get route for device groups 2021-12-03 14:05:33 -06:00
Jared Goodwin
217138bdd0 Create AppDbFactory. 2021-12-03 07:09:20 -08:00
Jared Goodwin
295a5d1d9e Fix tests. 2021-12-02 16:13:16 -08:00
Jared Goodwin
f82bf69cee Fixed error when trying to save device back into group "None". 2021-12-02 12:40:35 -08:00
Jared Goodwin
4041c14cfc Enable compression in single-file publish. 2021-12-02 07:20:49 -08:00
Jared Goodwin
b62659f6f9 Update publish profiles. Fix API changes in SignalR. 2021-12-02 07:13:51 -08:00
Jared Goodwin
39044acb02 Update projects. 2021-12-02 06:10:03 -08:00
FingerlessGloves
20d1186ddb
Fix typo on user delete column
Currently the column name says delete group, but the action is for deleting users.
2021-10-16 22:20:56 +01:00
Jared Goodwin
ed1c9809d0 Add means of migrating devices to a new server URL. 2021-08-17 14:35:03 -07:00
Jared Goodwin
ec2ae45e88 Merged PR 9: Auto-quality tweaks.
Auto-quality updates.
2021-08-07 17:53:14 +00:00
Jared goodwin
af0884e260 Update NuGet packages. 2021-08-05 15:17:01 -07:00
Jared Goodwin
079bd5bfb0 Delete unused index model file. 2021-07-29 08:10:24 -07:00
Jared Goodwin
33ebb5302c Fix invite button. ClientId changed to CasterId. 2021-07-29 07:58:19 -07:00
Jared Goodwin
24eb298914 Remove AutoQuality and simplify caster throttling. 2021-07-29 07:58:19 -07:00
Jared Goodwin
ef27410b6c Fix font color in #blazor-error-ui. 2021-07-29 07:58:18 -07:00
Jared Goodwin
f570b8ab3f Reduce SignalR buffer size and max message size. Check for duplicate session ID. 2021-07-29 07:58:18 -07:00
Jared Goodwin
a4a6fd4f77 Return early if key is valid. 2021-07-29 07:58:18 -07:00
Jared Goodwin
8bcbd9bef5 Pass correct variable into CreateApiToken. 2021-07-29 07:58:18 -07:00
Jared Goodwin
cfbf8ec984 Update manifest. 2021-07-29 07:58:18 -07:00
Jared Goodwin
e3f2809bb7 Remove @msgpack/msgpack dependency. Use msgpack5 instead. 2021-07-29 07:58:18 -07:00
Jared Goodwin
5d79725c34 Don't delete script results when clearing logs. 2021-07-29 07:58:18 -07:00
Jared Goodwin
723b107c0a Update agent install script. 2021-07-29 07:58:18 -07:00
Jared Goodwin
4d82b67a4c Use libman for client-side libraries. 2021-07-29 07:58:17 -07:00
Jared Goodwin
44638a330f Update NuGet packages. 2021-07-29 07:58:17 -07:00
Jared Goodwin
04d1e0429a Remove unused condition of empty device groups. 2021-07-29 07:58:17 -07:00
Jared Goodwin
b3da075a7c Get user without org when creating user. Possible exception when subsequently calling UserManager. 2021-07-29 07:58:17 -07:00
Jared Goodwin
f6ba98896e Change field to property on ScriptsPage. 2021-07-29 07:58:17 -07:00
Jared Goodwin
a321f84a71 Move next call outside of try block. 2021-07-29 07:58:16 -07:00
Jared Goodwin
726b2fb5c4 Reduce number of iterations through collection while filtering. 2021-07-29 07:58:16 -07:00
Jared Goodwin
ea68d98e0d Cascade from user org name to default org name to "Remotely". 2021-07-29 07:58:16 -07:00
Jared Goodwin
233f8a43d0 Restart ExternalScriptingShell process if exited. Add Ctrl + Q shortcut to clear terminal output. 2021-07-29 07:58:16 -07:00
Jared Goodwin
34ead1e1ac Add active users indicator. Move sort. 2021-07-29 07:58:16 -07:00
Jared Goodwin
87b9fe4b92 Reduce default devices per page to 25. 2021-07-29 07:58:16 -07:00
Jared Goodwin
4ce20eb543 Don't update DevicesFrame on DeviceUpdated and DeviceWentOffline messages. Only update card. Add explicit Refresh button. 2021-07-29 07:58:16 -07:00
Jared Goodwin
166b72ffa6 Change DevicesForPage to field. 2021-07-29 07:58:16 -07:00
Jared Goodwin
c2b07180eb Change chat input from textarea back to input. 2021-07-29 07:58:15 -07:00