Enterprise Recon 2.11.0
Enterprise Recon ODBC Reporting
PRO Enterprise Recon ODBC Reporting is only available in Enterprise Recon PRO and Enterprise Recon Cloud PRO. To find out more about upgrading your Enterprise Recon license, please contact Ground Labs Licensing. See Subscription License for more information.
Introduction
Enterprise Recon ODBC Reporting feature is a standard interface for integrating Enterprise Recon with ODBC-ready client applications, including Business Intelligence (BI) reporting tools such as Microsoft Power BI, Excel, SAP Crystal Reports, and more.
The ODBC Driver provides read-only connectivity to comprehensive data through a set of Data Tables that can be used to build tailored reports or dashboards to get valuable insight into the sensitive data risks across your organization. You also have the flexibility to programmatically extract Enterprise Recon data using your preferred ODBC command-line tools (e.g. Windows PowerShell).
The Enterprise Recon ODBC Reporting feature supports common SQL commands, allowing you to execute custom SQL queries to retrieve only the data that you need.
For information and instructions on using the ODBC Reporting feature, read the following topics:
- Requirements
- Downloading the ODBC Driver
- Installing the ODBC Driver
- Creating A User DSN
- Verifying the Enterprise Recon Data Source
- Testing the ODBC Connection
Requirements
The following requirements must be met to use the Enterprise Recon 2.11.1 ODBC Reporting feature to access Enterprise Recon data:
Requirement | Description |
---|---|
License | Enterprise Recon PRO license. For more information, refer to the Subscription License section. |
Master Server | Enterprise Recon (ER2) 2.2 and above; Enterprise Recon Cloud (ER Cloud) 2.11.1 and above. |
TCP Port Allowed Connections | Port 11117. Inbound connections must be allowed on the host where the ODBC Driver is installed to establish a connection to the Master Server. |
ODBC Drivers | Windows 32-bit and 64-bit only. Install the Enterprise Recon ODBC Driver on the same 64-bit Windows host where the client application that will be used to connect to Enterprise Recon is installed. For more information, refer to the Downloading the ODBC Driver section. |
ODBC Client Application | 32-bit or 64-bit applications running on a host with a 64-bit Windows operating system. |
Proprietary Client | Microsoft Visual C++ Redistributable package must be installed on the same host where the ODBC Driver is installed. |
User Account | The Enterprise Recon user account that is used for the ODBC login credentials must have either (i) Global Admin (Global) or (ii) Detailed Reporting (Resource) permissions for all Targets and Groups. For more information, refer to the User Permissions section. |
Downloading the ODBC Driver
To download the Enterprise Recon ODBC Driver:
- Log into the Enterprise Recon Web Console.
- From the top navigation bar, go to Settings > Analysis > ODBC Driver Downloads.
-
On the ODBC Driver Downloads page, download the 64-bit (recommended) or 32-bit Windows ODBC Driver installer.
Select the appropriate 64-/32-bit ODBC Driver installer based on the client application version. - (Optional) Verify the checksum of the downloaded ODBC Driver package file.
Verify Checksum for ODBC Driver Package File
Requires: OpenSSL package.
You can determine the integrity of the downloaded ODBC Driver MSI package by verifying the checksum before installing the ODBC Driver.
- Download the ODBC Driver MSI package.
- Run the commands in a terminal to generate the hash value for the ODBC Driver MSI package.
-
MD5 hash (128-bit)
# Syntax: openssl md5 <path to ODBC Driver MSI package> openssl md5 ./er2_2.2.0-windows-x64-odbc-driver.msi
Example MD5 hash: f65a2cd26570ddb7efb6a2a4318388ac -
SHA1 hash (160-bit)
# Syntax: openssl sha1 <path to ODBC Driver MSI package> openssl sha1 ./er2_2.2.0-windows-x64-odbc-driver.msi
Example SHA1 hash: 33bcd6678580ae38a03183e94b4038e72b8f18f4 -
SHA256 hash (256-bit)
# Syntax: openssl sha256 <path to ODBC Driver MSI package> openssl sha256 ./er2_2.2.0-windows-x64-odbc-driver.msi
Example SHA256 hash: 1ee094a222f7d9bae9015ab2c4ea37df71000556b3acd2632ee27013844c49da
-
- In the Enterprise Recon 2.11.1 Web Console, go to the Settings > Analysis > ODBC Driver Downloads page. The Hash column lists the expected hash values for each ODBC Driver MSI package.
-
Compare the generated hash values from Step 2 with the expected hash values listed in the Web Console; both hash values should be equal.
If the hash values do not match, check that your network connection is stable, download the ODBC Driver MSI package again from the Web Console, and verify the checksums again. If the issue still persists, contact Ground Labs Technical Support.
Installing the ODBC Driver
The default MSI installation package installs the Enterprise Recon ODBC Driver and constructs a System Data Source Name (DSN). The System DSN ("Enterprise Recon 64 System" or "Enterprise Recon 32 System") sets the driver path but does not pre-configure the Master Server address, user account login name or password.
See Creating A User DSN for more information on pre-configuring the connecting string parameters for the Enterprise Recon data source.
To install the Enterprise Recon ODBC Driver:
- If there is a previous version of the ODBC Driver installed, remove it first.
- Run the downloaded 64-/32-bit ODBC Driver installer on the 64-bit Windows host and click Next.
- In the Choose Setup Type screen, click Install.
- In the Ready to Install screen, click Install to begin the installation.
- Click Finish to complete the installation.
You are now ready to Connect to Enterprise Recon Data Source.
Creating A User DSN
You can create a User DSN to pre-configure the Master Server hostname or IP address, Enterprise Recon user account login name, and Enterprise Recon user account password.
To create a User DSN to connect to Enterprise Recon:
- Install the ODBC Driver.
-
Run the following command in the Windows Command Prompt window:
# Syntax: "C:\Program Files (x86)\Ground Labs\Enterprise Recon 2\ODBC64\er2_odbcinst.exe" -add <data source name> -server <Master Server hostname or IP address> -username <Enterprise Recon user account login name> -password <Enterprise Recon user account password> "C:\Program Files (x86)\Ground Labs\Enterprise Recon 2\ODBC64\er2_odbcinst.exe" -add "ER2 64 User DSN" -server "10.52.100.230" -username "admin" -password "adminPassword123"
Option Description add Specify a name for the User DSN. server Optional parameter. Specify the Master Server hostname or IP address. username Optional parameter. Specify the Enterprise Recon user account login name. password Optional parameter. Specify the Enterprise Recon user account password.
You are now ready to Connect to Enterprise Recon Data Source.
Verifying the Enterprise Recon Data Source
You can verify that the Enterprise Recon System or User DSN is created successfully on the client application host machine.
- From the Start menu, search for "ODBC Data Sources" to launch the 64-/32-bit ODBC Data Source Administrator. Make sure to use the ODBC Data Source Administrator with the same bitness (64-/32-bit) as the installed ODBC Driver.
- Click on the System DSN tab.
- Check that "Enterprise Recon 64 System" or "Enterprise Recon 32 System" is listed under System Data Sources.
- (Optional) Click on the User DSN tab and check that the created User DSN is listed under User Data Sources.
Alternatively, you can use Windows PowerShell commands to check the installation.
- Launch Windows PowerShell.
-
In the Windows PowerShell console, run the following command to get the name and the platform (64-/32-bit) of the installed driver:
# Get-OdbcDriver -Name "<default System DSN or newly created User DSN>" Get-OdbcDriver -Name "Enterprise Recon*"
Testing the ODBC Connection
Once the ODBC Driver has been installed, you can test the ODBC connectivity to the Enterprise Recon Master Server using the Windows PowerShell commands below.
- Launch the Windows PowerShell console.
-
Initialize a new instance of the OdbcConnection class.
$masterServerConnection = New-Object System.Data.Odbc.OdbcConnection
-
Specify the connection string to connect to the Enterprise Recon data source:
# $masterServerConnection.connectionstring = "DSN=<System or User DSN>;SRV=<Master Server hostname or IP address>;UID=<User account login name>;PWD=<User account password>" $masterServerConnection.connectionstring = "DSN=Enterprise Recon 64 System;SRV=10.52.100.230;UID=admin;PWD=admin123456"
See Connection Requirements for more information about the data source name and connection string. -
Open a connection to the Enterprise Recon data source with the connection string properties defined in the previous step.
$masterServerConnection.Open()
-
Get the Enterprise Recon data source properties. The State property should be "Open".
Write-Output $masterServerConnection
-
Execute a SQL query to retrieve the DATA_GROUP table. The response should return the Group ID, name, and comments for all the Groups available on the Master Server.
$sqlCommand = New-Object System.Data.Odbc.OdbcCommand("SELECT * FROM DATA_GROUP",$masterServerConnection) $dataTable = New-Object System.Data.DataTable $dataTableAdapter = New-Object System.Data.Odbc.OdbcDataAdapter($sqlCommand) $numRecords = $dataTableAdapter.fill($dataTable) Write-Output "Number of Groups: ${numRecords}" Write-Output $dataTable
-
Close the connection to the Enterprise Recon data source.
$masterServerConnection.Close()
Alternatively, you can check the Enterprise Recon ODBC data source connection by executing the commands as a Windows PowerShell script.
$masterServerConnection = New-Object System.Data.Odbc.OdbcConnection
Write-Output ""
Write-Output "Getting Enterprise Recon Master Server connection information . . ."
Write-Output ""
$dsn = Read-Host 'Data source name (e.g. Enterprise Recon 64 System) '
$server = Read-Host 'Hostname or IP address '
$userid = Read-Host 'Username '
$password = Read-Host 'Password ' -AsSecureString
$BSTR = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)
$unsecurePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)
$masterServerConnection.connectionstring = "DSN=$dsn;SRV=$server;UID=$userid;PWD=$unsecurePassword"
$masterServerConnection.Open()
if ($masterServerConnection.State -eq 0) {
Write-Output "Not connected to Enterprise Recon Master Server."
Write-Output "Check that you have provided the correct IP address, ODBC driver bit value, user name and password."
Write-Output "Exiting . . ."
Write-Output ""
$masterServerConnection.Close()
Exit
}
Write-Output $masterServerConnection
$sqlCommand = New-Object System.Data.Odbc.OdbcCommand("SELECT * FROM DATA_GROUP",$masterServerConnection)
$dataTable = New-Object System.Data.DataTable
$dataTableAdapter = New-Object System.Data.Odbc.OdbcDataAdapter($sqlCommand)
$numRecords = $dataTableAdapter.fill($dataTable)
Write-Output "Number of Groups: ${numRecords}"
Write-Output $dataTable
$masterServerConnection.Close()