Create registry key to force secure mode#15049
Conversation
Qchristensen
left a comment
There was a problem hiding this comment.
Good work, this will be very useful for some of our corporate users
LeonarddeR
left a comment
There was a problem hiding this comment.
I'm pretty sure this registry key gets lost after an update. To prevent this, you probably need to adapt installer.install in the same way as this has been done for the configInLocalAppData flag. So you'd also need adding an extra parameter to installer.registerInstallation.
Also, while I Really like this change, I'm pretty sure globalVars.appArgs.secure is treated by add-ons as a way of checking whether the add-on is running on a secure screen. Pretty sure NVDA Remote uses it like this. My NVDA Remote Desktop add-on uses systemutils._isSecureDesktop, but as the name of that function implies, it's meant as a private API. I'm not saying this should hold this change back, but it must be carefully considered that both add-ons and NVDA Core doesn't assume globalVars.appArgs.secure and secure desktop are the same.
I'd suggest going forward as follows:
- Do a scan of NVDA Internals for the secure flag. Ensure that there's no logic using this that expects a secure desktop instead of just a secure copy.
- Provide a public API to find out whether we're on a secure desktop, preferably a read-only flag that doesn't have to get the current desktop every time.
- Clearly communicate to add-on authors that they should change from globalVars.appArgs.secure to the new API to check whether running on a secure desktop.
|
Thanks for the pointers surrounding preventing the registry key from being lost during an update.
This is unexpected usage, and has been incorrect for a long time. The
As this underlying assumption has been incorrect for a long time, and with recent security focused rewrites, I am fairly confident that this sort of logic does not exist. The way secure mode is defined has always been based on being a secure mode, the CLI parameter has existed for 10+ years , and should not be conflated with secure screens.
This should be covered by the gain focus event for
Again, I am surprised by this assumption, but we can always remind API consumers of the difference between secure mode, secure screens, etc. |
|
@seanbudd, you write:
IMO, the website should be updated after the stable release instead. |
|
Also note that NVDA Remote uses |
I'm afraid you're mixing up two things here. The
As per above, I'm slightly in doubt of that. Furthermore, just a git grep for
To clarify, I'm talking about the copy that runs on the secure desktop itself, not the user copy. |
|
@LeonarddeR - ah thanks I see that NVDARemote does indeed rely on |
|
@seanbudd , while at it, may you put
|
See test results for failed build of commit 9a7c58cfa0 |
|
@LeonarddeR - I've done a review of The disabled JAB handler code encompassed setting a flag to let Java know we are using a11y. In 2a24b14 I also changed |
Qchristensen
left a comment
There was a problem hiding this comment.
This will be of benefit to many corporate users wanting to roll out NVDA securely, great work!
michaelDCurran
left a comment
There was a problem hiding this comment.
All good, with just one suggestion fix for a typo in user guide.
Link to issue number:
Fixes #10018
Summary of the issue:
System administrators may wish to configure NVDA to restrict unauthorized system access.
Secure mode can be forced through the
--secureCLI parameter, however, forcing this parameter is not easily done for system administrators.In a corporate environment where application usage is restricted, NVDA should be forced into secure mode via a registry key parameter, rather than a CLI parameter
Description of user facing changes
Added a registry key parameter to force secure mode of NVDA.
Improved documentation for system administrators on secure mode.
Description of development approach
Added a registry key parameter to force secure mode of NVDA.
make isRunningOnSecureDesktop and isLockScreenModeActive part of public API
Testing strategy:
Tested setting the reg key parameter.
Known issues with pull request:
None
Change log entries:
After 2023.2 release, relevant info should be added to the NV Access corporate page
New features
A system wide parameter has been added to allow users and system administrators to force NVDA to start in secure mode.
Deprecations
config.CONFIG_IN_LOCAL_APPDATA_SUBKEY is deprecated. Instead use config.RegistryKey.CONFIG_IN_LOCAL_APPDATA_SUBKEY.
Code Review Checklist: