Initialize the platform preferences in CAST Management Studio

On this page:

Target audience:

CAST AI Administrator

Summary: this section explains how to initialize the CAST Management Studio  - i.e. configure a CAST license key and define the source code Delivery and Deployment folders.

Introduction

Once the CAST Security schemas have been successfully created (see previous step: Create CAST Security schemas) you now need to initialize the CAST Management Studio. You can do this in two ways:

  • Via the CAST Management Studio GUI - this method is best used in small deployments where only a handful of Applications (and therefore a small number of "combined installation" CAST schemas) require initialization. This option requires that you open the CAST Management Studio, connect to EACH Management Service schema and then configure the required settings for EACH.
  • Via the CAST Management Studio CLI - this method is best used in large scale deployments where many dozens of Applications require initialization. This method allows the settings to be configured via a batch script file and therefore does not require that the CAST Management Studio is opened for EACH Management Service schema.

Prerequisites

(tick)Access to the CAST Management Service schema and any associated schemas is governed by a global license key. You must have a valid license key in your possession before you begin.

Via the CAST Management Studio GUI

When using this method, you must repeat the instructions for each Management Service schema that you have installed. The CAST Management Studio should be run from the machine used to run the CAST Security setup.

Launch the CAST Management Studio

  • The CAST Management Studio can be launched as follows:
    • Either by selecting the CAST Management Studio shortcut location in the Windows Start menu (created when running the CAST Security setup)
    • Or by navigating to the CAST Security installation folder and double clicking the CAST-MS.exe application
  • The Database Connection Manager will then be displayed:

  • During a combined installation process (simultaneous installation of all CAST Security schemas - see Create CAST Security schemas), CAST Server Manager will automatically create a connection profile to the Management Service schema (<prefix>_MNGT) you have created. 
  • Select the connection profile in the list, and then click Connect.
  • The Startup Wizard will then be displayed.
Please note that only one single instance of the CAST Management Studio should be used with one single Management Service schema. CAST does not recommend using multiple instances of the CAST Management Studio (on different workstations for example) to interact with the same Management Service schema: data corruption is highly likely and cannot be repaired.

Using the Startup wizard to define the license key and delivery/deployment folders

The Startup wizard is only launched the very first time you launch the CAST Management Studio. In subsequent launches, the wizard will not be displayed.
  • The Startup wizard guides you through the configuration of various mandatory settings. These settings are vital to the CAST Management Studio and without them you cannot use CAST Security:

  • Click the Next button to start the wizard.
  • This page prompts you to enter your CAST license key:

  • Enter the license key provided to you by CAST, the license key is now registered and valid for ALL end-user applications. Note that future Licence Key registration and activation can either be handled using the Help > License Key menu in the CAST Management Studio or by running the ConfigurePlatformPreferences CLI option as discussed below.
  • Click Next to move to the next page in the wizard:

Click to enlarge

  • In order to function correctly, CAST Security requires various folders that are used to store source code, logs and temporary files. The location of each folder is particularly important, in particular, the CAST AIC Portal must also be able to access the Source Code Delivery Folder.
    • Source Code Delivery Folder - a central location for storing successive and compressed versions of an application's source code as packaged by the Delivery Manager(s)
    • Source Code Deployment Folder - a location used exclusively by the CAST Management Studio to store the most recent version of the application's source code for analysis in uncompressed format
    • Logs folder - a location used to store logs of all interaction with the Analysis or Dashboard Services.
    • LISA (Large intermediate storage area) / LTSA (Large temporary storage area) - location to store temporary files generated during the analysis process
  • By default, the paths listed in the table below will be preloaded into each field - you are free to leave the paths at their defaults or customize them as required.
  • Make your choice and then click Finish to complete the Startup Wizard.
  • The CAST Management Studio will then be displayed.
OptionDefault PathsNotes
Source Delivery%SystemDrive%\CASTMS\Delivery
You must define the EXACT SAME Delivery Folder location as defined when you installed the CAST AIC Portal (see Installing and configuring the CAST AIC Portal from the CAST AIP documentation). You can find out more information about the configuration of the Delivery folders in Where should the Delivery folder be located (from the CAST AIP documentation).
  • If the CAST AIC Portal and the CAST Management Studio are deployed on the same workstation, then the folder can also be defined on the same machine (a "local" folder).
    • You can use the following syntax D:\CAST\DELIVERY (folder local to the host machine) - please use this syntax when the CAST AIC Portal and the CAST Management Studio are located on the SAME machine. In this situation, always enter an absolute path to the local drive containing the Delivery folder (for example D:\ CAST\DELIVERY).
    • Please DO NOT use a mapped drive path (created using the Windows GUI or the subst Windows command) that points to a folder on the local machine or to a remote network share - doing so can cause an error that will prevent the CAST AIC Portal/CAST Management Studio from functioning.
  • If the CAST AIC Portal and the CAST Management Studio are deployed on different workstations, then the folder must be available to both. You can use the following syntax: \\HOST\CAST\DELIVERY (folder on a remote network share) - note that forward slashes will also function. Please use this syntax only when the CAST AIC Portal and the CAST Management Studio are located on different machines. For example:
    • a network drive
    • a folder "local" to the CAST Management Studio that can be shared and accessed by the CAST AIC Portal 
    • a folder "local" to the CAST AIC Portal that can be shared and accessed by the CAST Management Studio
  • The CAST AIC Portal must be able to access the Delivery folder path
  • Any user that wishes to interact with the Delivery folder from the CAST Management Studio (for example, when Accepting a delivery, using the Set as current version option or when running the CAST Delivery Manager Tool from the CAST Management Studio) will require read/write access permissions on the Delivery folder
Source Deployment%SystemDrive%\CASTMS\DeployA storage location that is only accessed by the CAST Management Studio, as such CAST recommends the use of a "local" folder on the CAST Administration workstation (i.e. the machine on which the CAST Management is installed).
Logs%PROGRAMDATA%\CAST\CAST\Log

Use this option to define a log directory in which to store logs of all interaction with the Analysis or Dashboard Services. Once defined, the following log files are generated:

  • one folder (named with a unique ID) per Application will be generated when you use the CAST Delivery Manager Tool, run an analysis or generate a snapshot. Its contents include the analysis logs and Delivery Manager Tool specific logs (such as Validation/Selection/Discovery):
  • a log file called "CAST_MainTask_SummaryLog_<date>.txt" will be generated when you interact with the Analysis/Dashboard Service (i.e. run an analysis or generate a snapshot)
  • a log file called "DssEngine.<date>.log.txt" will be generated when you generate a snapshot - this logs the snapshot generation process
  • a log file called "RunCSV-<date>.castlog" will be generated when you generate a snapshot - this logs the update of the CAST System Views

Notes

  • If this field is changed to blank, the Log Root Directory will default to:
    • %TEMP%\CAST\CAST\<version_number>
  • Changes made here will not affect the location of the specific CAST Management Studio log (CAST-MSXX.log.txt), which is displayed in the Log view window.
LISA%PROGRAMDATA%\CAST\CAST\CASTMS

This option enables you to define a location (i.e. a folder) on your local hard drive that can be designated for use by the CAST Management Studio to store miscellaneous files generated during the analysis process. These files will still exist once the analysis is complete.

Once a location is selected using the browse option, a sub-folder called LISA will automatically be created. Generated files will then be stored in the LISA folder.

Notes

  • If this field is left blank, the CAST temporary folder will be used, i.e.:
    • %TEMP%\CAST\CAST\<version_number>\LISA
  • This location is used more particularly in the J2EE and .NET technologies to store data generated when the User Input Data Flow Security Analysis feature is activated.
  • Note that the location must be capable of receiving a large amount of data (several hundred MB).
  • This folder stores miscellaneous files - it is similar in nature to a browser cache.
LTSA%PROGRAMDATA%\CAST\CAST\CASTMS

This option enables you to define a location (i.e. a folder) on your local hard drive that can be designated for use by the CAST Management Studio to store temporary files generated during the analysis process. These files will be removed once the analysis is complete.

Once a location is selected using the browse option, a sub-folder called LTSA will automatically be created. Generated files will then be stored in the LTSA folder.

Notes

  • If this field is left blank, the CAST temporary folder will be used, i.e.:
    • %TEMP%\CAST\CAST\<version_number>\LTSA
  • This folder stores temporary files - it is similar in nature to the Windows %TEMP% folder.

Please note the following additional information:

  • The folders defined in the startup wizard are set on a "per Management Service schema basis". This means that the folders should be used only for the Management Service schema that you connect to. If you connect to a different Management Service schema, you will be required to set new folder locations - and these should NOT be set to the same location.
  • You must ensure that:
    • a different location is used for each folder (i.e. the Delivery folder should not be a sub-folder of the Deployment folder or vice-versa)
    • each folder is completely separate from the location used to store your source code - i.e. errors will arise if you configure the Delivery and Deployment folders to be located in sub-folders of a source code storage location
  • For custom paths, you can use the following syntax:
    • D:\CAST\DELIVERY (folder local to the host machine) - always enter an absolute path. Please DO NOT use a mapped drive path (created using the Windows GUI or the subst Windows command) that points to a folder on the local machine or to a remote network share - doing so can cause an error that will prevent the CAST AIC Portal/CAST Management Studio from functioning.
    • \\HOST\CAST\DELIVERY (folder on a remote network share). Note that forward slashes will also function.
  • The default paths that are pre-populated into the fields are taken from the CASTGlobalSettings.ini file (a file located at the root of the CAST AIP installation folder) - changing the location in the CASTGlobalSettings.ini file will not affect the settings defined in the GUI.

Via the CAST Management Studio CLI

When using this method, you must repeat the instructions for each Management Service schema that you have installed - however, you can combine the instructions for each Management Service schema in one batch file and then run that batch file to configure all settings on one go.

To use this method, CAST recommends creating an empty batch file and placing the required commands in the batch file - the batch file can then be executed simply by double clicking it. To execute the action via the command line, you must specify the CAST-MS-CLI.exe executable (rather than the CAST-MS.exe executable). The syntax required is as follows:

CAST-MS-CLI.exe ConfigurePlatformPreferences -connectionProfile "<profile_name>" -licenseKey "<license_key>" -sourceDeliveryFolder "<path_to_delivery_folder>" -sourceDeploymentFolder "<path_to_deployment_folder" -temporaryWorkingPath "<path_to_parent_folder_for_LISA>" -storageWorkingPath "<path_to_parent_folder_for_LTSA>" -logRootPath "<path_to_logs_folder>"
OptionDescription

-connectionProfile

Specifies the name of connection profile to use to connect to the chosen CAST Management Service schema. You can obtain this information from the Connection Profile dialog box in the CAST Management Studio - note that Connection Profiles can include white space, in which case, please ensure that you surround the name with quote marks:

During a combined installation process (simultaneous installation of all CAST Security schemas - see Create CAST Security schemas) CAST Server Manager will automatically create a connection profile or profiles to the Management Service(s) (<prefix>_MNGT) you have installed.

-licenseKey

Enter the license key provided to you by CAST.
-sourceDeliveryFolderEnter the location for the Source Code Delivery Folder and Source Code Deployment Folder. Please see the section above for more information about the path syntax that can be used.
-sourceDeploymentFolder
-temporaryWorkingPathEnter the location for the LISA (Large Intermediate Storage Area). A LISA sub folder will be created in the chosen location.
-storageWorkingPathEnter the location for the LTSA (Large Temporary Storage Area). A LTSA sub folder will be created in the chosen location.
-logRootPathEnter the location for the Logs folder. An absolute path is required. You can use either back or forward slashes. By default all log files generated by the CAST Management Studio will be date stamped.

Output codes

The CLI will return two output codes:

  • 0 = No error (successful execution)
  • 2 = Error exists (for example the license key may be in the wrong format)

Logging

By default (if no logging option is used in the CLI), the CLI will use the following location to store the log file relating to this process:

%TEMP%\CAST\CAST\<version_number>\CAST-MS<number>.log.txt

You can override the default log location using the following syntax enclosing the string in double quotes if it contains white space. The specified folder does not need to exist already:

-logRootPath <string>

Example

The following example updates one Management Service schema with a license key, a Delivery folder path, a Deployment folder path and includes a log file location:

CAST-MS-CLI.exe ConfigurePlatformPreferences -connectionProfile "v830_mngt on CastStorageService _ NEFYN:2280"-licenseKey "xxxxx" -sourceDeliveryFolder "D:\CAST\Delivery" -sourceDeploymentFolder "D:\CAST\Deploy" -storageWorkingPath "D:\CAST\Storage" -temporaryWorkingPath "D:\CAST\Storage" "-logRootPath "C:\CAST\Log"

Notes

  • Once the settings have been successfully initialized using the command line interface, opening the CAST Management Studio and connecting to the Management Service in question for the first time will NOT cause the Startup wizard to be displayed.
  • It is possible to use the CLI interface to update all settings EXCEPT -sourceDeliveryFolder and -sourceDeploymentFolder once they have already been set either via the Startup wizard or via the CLI.

Next steps?

See Deploy the CAST Security Dashboard.