Security Console - 7

Configuration Panel Overview

Last updated on: 2/5/2013 5:13 PM 
Created on: 11/2/2016 2:22 PM 

When dealing with a complex application such as SC-7, it is known ahead of time that many components will have additional settings that need to be configured. In addition to being able to set user customizable settings, the framework must also conform to the settings specified by an administrator. In addition to having administrator specified and user customizable settings, several aspects of the framework and its applets are encourage to self configure.

The SC-7 framework exposes a configuration class as part of its global pointers. This configuration class handles all the overhead tasks of setting compliance and propagating optional administrator settings. For the applet developer, the overhead work of maintaining the settings is handled by the framework. In general, the configuration is a streamlined version of the Microsoft Windows Registry. The configuration itself is a collection of Settings. A Setting is then broken down into one or more keys. Each key can then contain any number of attribute value pairs. Keys can not however contain subkeys. Each level of keys must be split into its own Setting.

The ISCApplet interface exposes a method called OnBuildInitialSettings(). When the framework's configuration manager has determined that the application is being run for the first time, this method is invoked. Initial settings are required anytime the user.xml file is not present. Simply removing the user.xml file will cause OnBuildInitialSettings() to be called again even if the framework has already been executed. The OnBuildInitialSettings() method must create the user side settings that will be needed in order for the Applet to run. If a setting is required to be set to an initial folder location, this is the method in which that location must be set. It is important to note that at this time, Administrator side settings are not involved. It is important to then consider that settings established in this method may be the unchanged default for a long period of time and may be permanently under user control if administrator settings are not in use within the environment.

Settings in general should always be treated by the applet developer as if the setting is not going to be present. The framework is setup in such a way that not all settings are required and that additional settings may be recorded during the execution, not just those created during the OnBuildInitialSettings() call. This allows for added flexibility between versions while sharing the same settings document or Administrator configuration.

For settings the user can modify, a common area called the configuration panel has been created. Applets must implement the ISCConfigPanelExtension interface in order to add items to the configuration panel. This interface provides three methods: one for enumerating a panel item, one that performs the action when the user selects the enumerated panel and one that cleans up all needed resources when the user closes the enumerated panel item.

In SC-7, the resource that must be created (and destroyed) must be derived from the SCSettingsComplyDialog class. Note that this class is not an interface but instead provides basic functionality to allow the user customizable settings to be synced with the framework's configuration class. The constructor of the SCSettingsComplyDialog takes the setting name. Additional SetControl() methods then associated an attribute value with either a Combo Box, Spin Box, Edit Box, Check Box, Slider or Push Button. The programmer can simply assign a setting's attribute value to a control. The range of possible values as well as its enabled state are determined by the information returned by the framework. This class also provides automatic logging of changes to the controls when the user selects the OK button. If additional settings are required to be configured in the same dialog, or a setting requires a control outside the list of basic controls already mentioned, the programmer can implement the virtual OnSaveCustomSetting() method. The parameter to this method is a LogEntryConfigurationChange class instance that has methods to add additional information to the event being written to the logs about these setting modifications.

Therefore, to take full advantage of the framework's configuration capabilities and automatic handling, programming the user customizable settings will require the OnBuildInitialSettings() method in ISCAppet, the ISCConfigPanelExtension interface and the SCSettingsComplyDialog. However using these methods as documented will handle all the overhead related to the setting management.



Developer's Historical Persepctive Why A Platform Standards The User Experience


ISCApplet ISCTaskListExtension ISCConfigPanelExtension ISCErrorReporterExtension ISCLogConnector/ISCLogEntry ISCCertificateStoreExtension ISCSystemTrayExtension ISCAppletWindowExtension ISCSecureObjectExtension

Applet Building Steps

Step 1: Create The Applet Step 2: Adding Action Items Step 3: Adding Configuration Panels Step 4: Adding Custom Error Text Step 5: Startup/Shutdown Step 6: Adding Main Window Support Step 7: Adding Obejct Window Support