github LAB02-Research/HASS.Agent v2022.1.17

latest releases: 2022.14.0, 2022.14.0-beta1, 2022.13.0...
2 years ago

TL;DR

This update removes the (need for a) scheduled task. From now on, HASS.Agent will run without elevated privileges. If you use the installer, all will be done for you. If you update manually, this time only, open an elevated command prompt and run HASS.Agent.exe update to perform the transition.

Extended version

Had some time to kill while flying, so developed this update to help transition away from elevated execution.

Previously, HASS.Agent used a scheduled task to run with elevated privileges. This allowed easy registering of the notifications API port (among some other things), but also imposed a security risk. This update will remove the task, and from now on HASS.Agent will run without any special privileges. To launch, HASS.Agent uses the registry to execute on login (HKCU). This can be enabled/disabled from the Configuration window. If you currently have a scheduled task, this will be enabled automatically.

Your custom commands will now execute without elevation, but I don't think that'll be a problem (if anything, another security aspect that's improved). However, if your command requires elevation, you can create a run-on-demand scheduled task, make sure it's set to run elevated, and then use schtasks /run /tn '{taskname}' as your custom command to execute the task. Don't hesitate to ask for help!

HASS.Agent tries to make the transition as seamless as possible. If you use the installer, all will be done for you (theoretically ..). If you update manually, this time only, open an elevated command prompt in the installation directory and run HASS.Agent.exe update to perform the transition.

From now on, whenever HASS.Agent has to perform something elevated, it'll show a one-time UAC prompt. This will only happen on demand (for instance, when you change the notification port).

There are no new features in this update, as I first want to make sure this works well for everyone so HASS.Agent has a stable and secure foundation to build on. If something doesn't work as intended, even if it's a minor inconvenience, please open a ticket to let me know.

Don't worry, next update will be more fun :)

Thanks @mitchcapper for opening the discussion about this.

Small improvement: removed the grouping points in port values [#21] (thanks @Syntoxr)

Don't miss a new HASS.Agent release

NewReleases is sending notifications on new releases.