Panel | ||||
---|---|---|---|---|
| ||||
On this page:
|
...
Info |
---|
Summary: this page describes the CAST Report Generator Corefor Dashboards release. |
Introduction
CAST Report Generator is now provided as an cross-platform ZIP file alongside the traditional Microsoft Windows GUI "installable" release. In other words this release can run on both Microsoft Windows and Linux operating systems and can be simply unzipped to the install location (no installer is provided). The tool has two main uses:
- the primary goal of this
...
- tool is to provide reporting capabilities to the CAST RestAPI - this integration is first and foremost used by the CAST dashboards to generate Standard Compliance reports from within the dashboard interface (see
...
...
...
- and Security Dashboard - Report Generation).
- The tool can also be used in CLI mode to generate reports, if required.
Where can I obtain the CAST Report Generator
...
for Dashboards?
≥ 1.10.0
You can obtain the Report Generator for Dashboards from CAST Report Generator Core Extend:
A ZIP file will be downloaded. Extract the ZIP and deploy the files as described below in Installation process.
1.9.0
You can obtain the CAST Report Generator for Dashboards from the CAST Product Center - this requires a CAST login. Download the latest release, unpack the ZIP, and you will find another ZIP called ReportGeneratorCLIforAllOS.zip alongside the traditional GUI based ReportGeneratorSetup.exe:
...
Extract the ZIP called ReportGeneratorCLIforAllOS.zip and deploy the files as described below in Installation process.
Limitations
- The tool has no GUI - it is designed to be used primarily when generating reports from within the CAST Dashboard interface (see Engineering Dashboard - Report Generation and Security Dashboard - Report Generation) and also in CLI mode.
- No PDF export capabilities .No GUI, CLI onlyin CLI mode.
Installation prerequisites
To install and use the CAST Report Generator for Dashboards, the following is required:
.NET / .NET Core
CAST Report Generator for Dashboards requires the .NET / .NET Core runtime/SDK as follows:
Report Generator release | Minimum .NET / .NET Core release | Download | Notes |
---|---|---|---|
≥ 1.24.x | .NET Core 6.0 SDK | https://dotnet.microsoft.com/en-us/download/dotnet/6.0 | - |
1.14.x | .NET Core 3.1.x SDK | https://dotnet.microsoft.com/download/dotnet-core/3.1 | A change to the SDK rather than the runtime to match the requirements for Report Generator GUI. |
1.13.x | .NET Core |
...
3. |
...
0.x runtime | https://dotnet.microsoft.com/download/dotnet-core/3.0 | Future releases of CAST Report Generator |
...
will require .NET Core 3.1.x due to the end-of-life of .NET Core 3.0.x scheduled for 3rd March 2020, therefore CAST recommends installing .NET Core 3.1.x to avoid the need to re-install .NET Core in the future. | |||
1.9.x - 1.12.x | .NET Core 2.2.x runtime | https://dotnet.microsoft.com/download/dotnet-core/2.2 | - |
This runtime/SDK is available for both Microsoft Windows and for Linux operating systems depending on the Operating System used to host Apache Tomcat:
Microsoft Windows | The runtime .NET Core can be downloaded as an installer from https://dotnet.microsoft.com/download/dotnet - core/2.2 - choose the .NET Core Installer for the 2.2.x runtime runtime/SDK that matches your Windows environment: | ||
---|---|---|---|
Linux | Package manager instructions are provided for many different Linux distributions at https://dotnet.microsoft.com/download/dotnet-core/2.2 - choose the Package Manager Instructions option here: Then select the relevant Linux distribution to view the installation instructions:
|
Info | ||
---|---|---|
You can determine if .NET Core is already installed and what version using the following command on either Microsoft Windows (in a Powershell session) or in Linux terminal:
|
Supported Operating Systems
CAST Report Generator Core for Dashboards only requires that .NET Core runtime is present on the operating system. Therefore any operating system that supports the installation of .NET Core can be used for the CAST Report Generator Corefor Dashboards. CAST has tested Microsoft Windows and CentOS (Linux).
CAST RestAPI
≥ 1.9.x |
---|
Folder access permissions
The user that Apache Tomcat is running as must have read/write access to the following locations:
- folder into which the Report Generator Core for Dashboards is unzipped
- "Logs" sub-folder.
Info |
---|
In Linux environments, typically the "rw-" permission is sufficient. |
Anchor | ||||
---|---|---|---|---|
|
Step 1 - Deploy
...
files
Installing CAST Report Generator Core for Dashboards consists only of unzipping the downloaded ReportGeneratorCLIforAllOS.zip file ZIP file to a location on the target server, for example:
Microsoft Windows | D:\data\CAST\ReportGeneratorCoreReportGeneratorforDashboards |
---|---|
Linux | /opt/reportgeneratorcore |
Restart Apache Tomcat
...
eportgeneratorfordashboards |
If you:
- need to use the tool to generate Standard Compliance reports in the CAST Engineering or Security Dashboards, you should deploy the tool on the Apache Tomcat server which hosts your dashboards and then complete Step 2 below.
- simply want to use the tool via CLI to generate reports (see below) you can deploy the tool on any server providing it has network access to a CAST RestAPI interface (i.e. a dashboard). There is nothing further to do in this case.
Anchor | ||||
---|---|---|---|---|
|
If you need to use the tool to generate Standard Compliance reports in the CAST Engineering or Security Dashboards, a further configuration process is required:
Edit .properties file
Edit the following file with a text editor:
Code Block | ||
---|---|---|
| ||
WAR 1.x
CATALINA_HOME\webapps\<deployed_war>\WEB-INF\report.properties
WAR ≥ 2.x
CATALINA_HOME\webapps\<deployed_war>\WEB-INF\classses\application.properties
ZIP ≥ 2.x
<unpacked_zip>\application.properties
JAR ≥ 2.5
%PROGRAMDATA%\CAST\Dashboards\<dashboard>\application.properties |
Find the following options and modify as explained below:
Code Block | ||
---|---|---|
| ||
## REPORT CONFIGURATION
# Set the Report Generator path
# If this variable is not set then the document generation is considered as disabled.
# The path is probably something such as (Linux/Windows):
#report.reportGenerator=dotnet /opt/report-generator/CastReporting.Console.Core.dll
report.reportGenerator=dotnet D:\\data\\CAST\\ReportGeneratorforDashboards\\CastReporting.Console.Core.dll
# Set the directory of reports
#report.directory=/tmp/reports
report.directory=D:\\temp\\reports
# Set the current Web Service URL. The current REST API called back by the Report Generator.
report.webServiceURL=http://localhost:8080/rest
# Set the maximum number of concurrent Report Generator processes to limit the CPU and memory consumption
report.maxConcurrentProcesses=4
# set a delay to determine never ending ReportGenerator processing
# After this delay the Report Generator process will be killed
# 600 = 10 minutes
report.maxDelayInSeconds=600 |
report.reportGenerator=dotnet | Add a new line pointing to the location of the
| |||||||
---|---|---|---|---|---|---|---|---|
report.directory= | Add a new line pointing to the temporary folder where the reports will be generated on the server hosting Apache Tomcat/the deployed ZIP file. You can also uncomment and modify an example line. For example:
| |||||||
report.webServiceURL= | Modify the existing line to point to the RestAPI in your CAST Engineering Dashboard or CAST-RESTAPI-integrated.war deployment. This is used by CAST Report Generator for Dashboards. For example:
|
Enable and configure security.apikey (optional for SAML/LDAP authentication mode)
If you are using the Dashboards embedded in AIP Console (integrated RestAPI) or standalone CAST Dashboards AND you have LDAP / SAML authentication enabled in AIP Console/standalone CAST Dashboards, you must enable and configure the security.apikey option with a random string of characters. Using this option allows the CAST Report Generator for Dashboards to authenticate correctly. To do so see the Configuration section in RestAPI authentication using an API key.
Restart the application
Restart the web application to ensure the changes are taken into account.
Anchor | ||||
---|---|---|---|---|
|
...
for Dashboards in CLI mode
As mentioned previously, the primary goal of this release is to provide reporting capabilities to the CAST RestAPI - this integration is first and foremost used by the CAST dashboards to generate reports from within the dashboard interface (see CAST Dashboard Package - Release Notes - 1.9.0). for the CAST Dashboards (Engineering and Security) - However, it is also possible to use CAST Report Generator Core for Dashboards yourself via its CLI. The CLI instructions are identical to those provided for the standard CAST Report Generator GUI - see here for more instructions.
You must specify run the CAST Report Generator Core for Dashboards in a specific way when used in CLI mode. The CastReporting.Console.Core.dll
is provided with the tool:
Code Block | ||
---|---|---|
| ||
dotnet %path_to_CastReporting.Console.Core.dll% -webservice %webservice% %webservice% -username %username% -password %password% -application %application% -domain %domain% -template %template% -file %file% |
...
Code Block | ||
---|---|---|
| ||
dotnet "D:\data\CAST\ReportGeneratorCore\CastReporting.Console.Core.dll" -webservice "http://<server>:<port>/CAST-RESTAPI/rest/" -username cio -password cast -application "Jurassic Park" -domain "AED" -template "Executive-summary.docx" -file "D:\temp\Core_Report.docx" |
Anchor | ||||
---|---|---|---|---|
|
Info |
---|
Available in v. ≥ 1.11.0. |
If you are using the Dashboards embedded in AIP Console (integrated RestAPI) or standalone CAST Dashboards AND you have LDAP / SAML authentication enabled in AIP Console/standalone CAST Dashboards, you will need to use an API Key instead of a password. To do so see the Configuration section in RestAPI authentication using an API key. Then modify the command line as follows:
- add the -apikey true option
- enter the API Key in the -password option
For example:
Code Block | ||
---|---|---|
| ||
dotnet "D:\data\CAST\ReportGeneratorCore\CastReporting.Console.Core.dll" -webservice "http://<server>:<port>/CAST-RESTAPI/rest/" -username cio -password myapikey -apikey true -application "Jurassic Park" -domain "AED" -template "Executive-summary.docx" -file "D:\temp\Core_Report.docx" |
Log files
The CAST Report Generator Core for Dashboards saves a log of all interactions in the folder into the Logs folder (located in the folder in to which you have unzipped the CAST Report Generator Corefor Dashboards). One log file per day is generated:
...
For example ReportGenerator_20190328.log.
Return codes
One of the following codes will be returned on completion of the CLI:
0 | Report successfully generated |
---|---|
1 | Bad arguments given to the Report Generator |
2 | Web service cannot be accessed or is badly configured |
3 | Report failed |
...