Advanced Configuration

Fine-tuning Rights in the Authorization Policy Database

As outlined in the chapter The First Launch of the Application, Hardware Monitor Remote integrates into the security environment of macOS to fulfill the guidelines for high-end system applications. If necessary, experienced administrators can fine-tune the policy by which macOS decides to ask or not to ask for user credentials whenever Hardware Monitor Remote has to perform a privileged operation. For example, authorization can be passed to a fingerprint reader when certain rights are requested.

Hardware Monitor Remote itself cannot assist you in modifying the Authorization Policy Database because this is a chicken and egg problem: Accessing the database requires privileged rights managed by the database. The application could easily lose the rights to change the rights stored in the file which defines the rights.


Administrators who like to change the authorization policy should have read and understood the following documentation available from Apple:

Authorization Services Programming Guide

Displaying and Modifying an Authorization Right

Apple’s command-line program security must be used to show or modify definitions in the authorization policy database. Information on this program is available after entering the command man security in Terminal.

The definition of each right can be retrieved or modified in form of an macOS property list, specified in XML format. An introduction to macOS property lists and the individual definition of records for authorization rights specified by Apple are beyond the scope of this manual, however. For further reference, please consult Apple’s official documentation on these topics.

To retrieve a right definition from the authorization policy database, use a command of the following pattern:

security authorizationdb read "right-identification" > "filename".plist

Here, “right-identification” must be replaced by the name of the right and “filename” must be replaced by a Unix file path of the property list to which the right definition should be saved. The identification names used by Hardware Monitor Remote are specified in the next section. As an example, the command

security authorizationdb read com.bresink.hwm.delete-files > ~/delete-files.plist

causes macOS to retrieve the current authorization policy for the application’s right to delete files, and writes the policy data to the property list file delete-files.plist in the user’s home folder.

To modify a right definition, edit your intended changes in the created property list file as needed, then write the definition back into the authorization policy database. This is done by a command of the pattern

sudo security authorizationdb write "right-identification" < "filename".plist

which can only be executed by an administrative user. macOS will automatically ask for your password. Assuming you have made modifications to the property list file delete-files.plist from the previous example, you would write these changes back with the command

sudo security authorizationdb write com.bresink.hwm.delete-files < ~/delete-files.plist

Definition of Authorization Rights

All authorization rights possibly used by Hardware Monitor Remote are prefixed with the identifier com.bresink.hwm. The tables below define the names of all rights and their meanings. In initial configuration, all rights are configured to follow the authorization policy rule named default, with exception of the rights marked as always allow.

By default, the authorization rule named default is preconfigured by Apple and establishes the following policy:

Administrative and diagnostic operations
Right Identification Meaning
com.bresink.hwm.nop an empty command, just to test communication with the security subsystem (always allow)
com.bresink.hwm.discard-auth discard the current authorization immediately (always allow)
com.bresink.hwm.delete-files delete one or more file system objects with known path names
com.bresink.hwm.prepare-uninstall prepare the system to remove the security component of Hardware Monitor Remote
Other operations
Right Identification Meaning
com.bresink.hwm.delete-fileobjects delete a list of file system objects
com.bresink.hwm.modify-preferences modify a preference setting
com.bresink.hwm.execute-utility run a trusted utility program of the operating system