|
> Deploying Licensed Software > Windows Permissions and Security Considerations Windows Permissions and Security ConsiderationsWindows Permissions and Security Considerations on Windows 95, 98, and ME are virtually nonexistent since these operating systems do not support Access Control. On all other versions, there are three primary areas for consideration regarding how the Windows operating system security can potentially affect your licensed software.
If your target audience is guaranteed to have at least default "Power User" permissions, Windows permissions becomes a non-issue since they will have permission to read and write to any location the ClientProtector may need. On the other hand if your target audience may have only "restricted user" or less access - you must carefully consider the following: Virgin Registry DataVirgin registry data can be located in one of four different root keys in the Windows registry. The only one that you have virtually guaranteed access to under all levels of user permissions is the HKEY_CURRENT_USER root key. There is however, a significant drawback to using this key: Its values are only relative to the currently logged in user, so switching users will effectively cause any values under this key to "disappear" for any user but the "writer". However, this is usually not an issue since Virgin Registry Data is (generally) only written the first time the ClientProtector is started for a particular license. As long as the first time your software starts the ClientProtector for a particular license the user has sufficient privileges to write to the chosen key, there should be no problems. You should however, be aware of it since if the time comes that the ClientProtector needs to write to the Virgin Key again and it cannot your license may fail. Registry Alias FilesRegistry Alias Files can be located in one of three root keys in the windows registry. Like the Virgin Registry Data, the only one that you have virtually guaranteed access to under all levels of user permissions is the HKEY_CURRENT_USER root key. There is however, a major drawback to using this key: Its values are only relative to the currently logged in user, so switching users will effectively cause any values under this key to "disappear" for any user but the "writer". Unlike the Virgin Key - Registry Alias Files are read and written continuously as the license is manipulated - so you must ensure that you have guaranteed access to any Registry Alias Files you create. Hidden Alias FilesSince you have the option of placing hidden alias files in several different directories, you must consider if your user will have the necessary Windows permissions to write to these directories. By default, some versions of Windows (2000 / NT / XP) may need administrator rights to be able to write files to some system folders. If they do not have the permissions needed to write to these folders, and you choose to store alias files there, your license will fail. SolutionsThe
topic of Access Control under Windows is an extremely vast subject and
well beyond the scope of this help file. We recommend if in doubt, always
refer to the source - the MSDN. Please see: "Access
Control" at the MSDN for more information. The best way to deal with these potential problems is:
In order to successfully set ACLs, you will of course need all the path and key information of the resources that intend on manipulating permissions for. It is critically important that if you do decide to manipulate the ACL of the registry that you set the permissions on the correct key but do not create the sub-key value names themselves. Example:
For more detailed information on where registry Alias Files are written, please see Virgin Registry Data and Registry Alias Files. We recognize that manipulating the ACLs in this way may be undesirable in some circumstances, or beyond your project time budget since doing so correctly requires a fair amount of Windows security programming knowledge and must be done correctly or you could impair the operating system. So, as an alternative, we suggest a simpler way to deal with this potential Windows permissions problem with a minimum of effort and time. This simpler approach is not as secure, but is trivial to implement and requires no manipulation of ACLs.
Using this simpler method, as long as your software has write access to the Main License File Folder (probably one you explicitly created), there will be no Windows permissions problems at all. As always, make sure you thoroughly test your software relative to all the levels of users you anticipate will have to use your programs.
|