LightBeam Documentation
Installer GuidesData SourcesPlaybooksInsightsPrivacyOpsGovernance
  • 💡What is LightBeam?
  • 🚀Getting Started
    • ⚙️Installer Guides
      • Pre-Requisites / Security Configurations
        • Firewall Requirements
        • Securing LightBeam on EKS with AWS Certificate Manager on Elastic Load Balancer
        • Configure HTTPS for LightBeam Endpoint FQDN Standalone deployment
        • Using Custom Certificates with LightBeam
        • Securing LightBeam on GKE with Google Certificate Manager and GCE Ingress
      • Core
        • LightBeam Deployment Instructions
        • LightBeam Installer
        • Web App Deployment
        • LightBeam Diagnostics
        • LightBeam Cluster Backup & Restore using Velero
      • Platform Specific
        • AWS
        • Microsoft Azure
        • Google Cloud (GKE)
        • Standalone Virtual Machine
        • Deployment on an Existing Managed Kubernetes Cluster
        • Azure Marketplace Deployment
      • Integration and Setup
        • Setting Up AWS PrivateLink for RDS-EKS Interaction
        • Twingate and LightBeam Integration Guide
        • Data Subject Request Web Application Server
        • Generate CSR for LightBeam
  • 🧠Core Features
    • 🔦Spectra AI
      • 🔗Data Sources
        • Cloud Platforms
          • AWS Auto Discovery
          • GCP Auto Discovery
        • Databases and Datalakes
          • PostgreSQL
          • Aurora (PostgreSQL)
          • Snowflake
          • MS SQL
          • MySQL
          • Aurora (MySQL)
          • BigQuery
          • AWS Redshift
          • Oracle
          • DynamoDB
          • MongoDB
          • CosmosDB (PostgreSQL)
          • CosmosDB (MongoDB)
          • CosmosDB (NoSQL)
          • Looker
          • AWS Glue
          • Databricks
          • SAP HANA
          • CSV Files as a Datasource
        • Messaging
          • Gmail
          • Slack
          • MS Teams
          • MS Outlook
        • Developer Tools
          • Zendesk
          • ServiceNow
          • Jira
          • GitHub
          • Confluence
        • File Repositories
          • NetDocuments
          • AWS S3
          • Azure Blob
          • Google Drive
          • OneDrive
          • SharePoint
          • Viva Engage
          • Dropbox
          • Box
          • SMB
        • CRM
          • Hubspot
          • Salesforce
          • Automated Data Processing (ADP)
          • Marketo
          • Iterable
          • MS Dynamics 365 Sales
          • Salesforce Marketing Cloud
      • 🔔PlayBooks
        • What is LightBeam Playbooks?
        • Policy and Alerts
          • Types of Policies
          • How to create a rule set
            • File Extension Filter
          • Configuring Retention Policies
          • Viewing Alerts
          • Sub Alerts
            • Reassigning Sub-Alerts
            • Sub-alert States
          • Levels of Actions on Alerts
          • User Roles and Permissions
            • Admin View
            • Alert Owner View
            • Onboarding New Users
              • User Management
              • Okta Integration
              • Alert Assignment Settings
              • Email Notifications
            • Planned Enhancements
          • Audit Logs
          • No Scan List
          • Permit List
          • Policy in read-only mode
      • 📊Insights
        • Entity Workflow
        • Document Classification
        • Attribute Management Overview
          • Attributes Page View
          • Attribute Sets
          • Creating Custom Attribute
          • Attributes List
        • Template Builder
        • Label Management
          • MIP Integration
          • Google Labels Integration
      • 🗃️Reporting
        • Delta Reporting
        • Executive Report
        • LightBeam Lens
      • Scanning and Redaction of Files
        • On-demand scanning
      • How-to Guides
        • Leveraging LightBeam insights for structured data sources
      • LightBeam Dashboard Outlay
      • Risk Score
    • 🏛️PrivacyOps
      • Data Subject Request (DSR)
        • What is DSR?
        • Accessing the DSR Module
        • DSR Form Builder (DPO View)
          • Creating a New DSR Form
            • Using a Predefined Template
            • Creating a Custom Form
          • Form Configuration
          • Form Preview and Publishing
          • Multi-Form Management
          • Messaging Templates
        • Form Submission & Email Verification (Data Subject View)
        • DSR Management Dashboard (DPO View)
        • Processing DSR Requests
          • Data Protection Officer (DPO) Workflow
          • Self Service Workflow (Direct Validation)
          • Data Source Owner (DSO) Workflow
        • DSR Report
      • 🚧Consent Management
        • Overview
        • Consent Logs
        • Preference Centre
        • Settings
      • 🍪Cookie Consent
        • Dashboard
        • Banners
        • Domains
        • Settings
        • CMP Deployment Guide for Google Tag Manager
        • FAQs
      • 🔏Privacy Impact Assessment (PIA)
        • PIA Templates
        • PIA Assessment Workflow
        • Collaborator View
        • Process Owner Login View (With Collaborator)
        • Filling questionnaire without collaborator
        • Submitting the assessment for DPO review
        • DPO review process
        • Marking the assessment as reviewed
        • Editing and resubmitting assessments after DPO review
        • Revoke review request
        • Edit Reviewer
        • PIA Reports
      • ⏺️Records of Processing Activity (RoPA)
        • Creating a RoPA Template
          • How to clone a template
          • How to use a template
        • How to create a process
          • Adding Process Details
          • Adding Data Elements
          • Adding Data Subjects
          • Adding Data Retention
          • Adding Safeguards
          • Adding Transfers
          • Adding a Custom Section
          • Setting a Review Schedule
          • Data Flow Diagram
        • How to add a collaborator
        • Overview Section
        • Generating a RoPA Report Using LightBeam
        • Collaborator working on a ticket
    • 🛡️Governance
      • Access
        • Dashboard
        • Users
        • Groups
        • Objects
        • Active Directory Settings
        • Access Governance at a Data Source Level
        • Policies and Alerting
        • Access Governance Statistics
        • Governance Module Dashboard
      • Privacy At Partners
  • 📊Tools & Resources
    • 🔀API Documentation
      • API to Create Reports for Structured Datasource
    • ❓Onboarding Assessments
      • Structured Datasource Onboarding Questionnaire
        • MongoDB/CosmosDB Questionnaire
        • Oracle Datasource Questionnaire
      • SMB Questionnaire
    • 🛠️Administration
      • Audit Logs
      • SMTP
        • Basic and oAuth Configuration
      • User Management
        • SAML Identity Providers
          • Okta
            • LightBeam Okta SAML Configuration Guide
          • Azure
            • Azure AD SAML Configuration for LightBeam
          • Google
            • Google IDP
        • Local User Management
          • Adding a User to the LightBeam Dashboard
          • Reset Default Admin Password
  • 📚Support & Reference
    • 📅Release Notes
      • LightBeam v2.2.0
      • Reporting Release Notes
      • Q1 2024 Key Enhancements
      • Q2 2024 Key Enhancements
      • Q3 2024 Key Enhancements
      • Q4 2024 Key Enhancements
    • 📖Glossary
Powered by GitBook
On this page
  • Overview
  • Onboarding MS SQL Data Source
  • APPENDIX
  • Troubleshooting
  • Supported authentication methods
  • Minimal permissions setup
  • Creating a Minimal Permission User in SQL Server Management Studio (SSMS)
  • Validate permissions to the database
  • About LightBeam
  1. Core Features
  2. Spectra AI
  3. Data Sources
  4. Databases and Datalakes

MS SQL

Connecting MS SQL to LightBeam

PreviousSnowflakeNextMySQL

Last updated 3 months ago


Overview

LightBeam Spectra users can connect various data sources to the LightBeam application and these data sources will be continuously monitored for PII, and PHI data.

Example: MS SQL, Snowflake, SMB, MySQL, etc.


Onboarding MS SQL Data Source

  1. Login to your LightBeam Instance.

  2. Click on DATASOURCES on the Top Navigation Bar.

  3. Click on “Add a data source”.

Figure 1. Connecting MS SQL - Add Data Source
  1. Search for “MS SQL”.

  1. Click on MS SQL.

  1. Fill in the details as shown below and click Next:

  • In the Basic Details section, enter the following information:

    • Instance Name: Provide a unique name for the MSSQL data source (e.g., MSSQL_Datasource).

    • Primary Owner: Enter the email address of the individual responsible for this data source.

    • Source of Truth (Optional): Toggle this option on if the data source acts as the definitive source for validating other data sources.

    • Description (Optional): Add a brief description of the data source (e.g., "MS-SQL Datasource Instance").

Enter Connection Details

  • In the Connection section, provide the following details:

    • Username: The MSSQL user account name (e.g., sql_admin).

    • Password: The password for the specified username.

    • Host: The hostname or IP address of the MSSQL server.

    • Port (Optional): Specify the port number for MSSQL (default: 1433).

    • Microsoft Entra Authentication: Enable this option if using Entra (Azure AD) authentication.

    • Default Database: Specify the name of the database to connect to (e.g., AdventureWorks).

    • Encryption:

      • Select Encrypted if the connection requires SSL. When selected, an option to Upload SSL Certificate will appear.

        • SSL Certificate (Optional): Upload the SSL certificate file to establish a secure connection. (This option is displayed only when Encrypted is selected.

      • Select Unencrypted if SSL is not required.

Default database: LightBeam connects to the master database in your SQL Server instance to verify the connection details provided during the connection setup. This approach generally works if you have a user account with read access to all databases in your instance. However, if you are using a restricted user account that only has access to a specific database, enter that database name here. This allows LightBeam to connect to the specified database and verify the connection details.

  1. Click on Test Connection.

  2. Verify that you get the message “Connection Success!” on the screen. Click on Next.

On the next screen, verify that the test database created for the PoC is showing up in the list of databases.

Now we are ready to connect to the test database and proceed.


APPENDIX

Troubleshooting

If you notice that data is not being scanned properly, and you encounter errors, it could be due to a permission problem. Follow these steps to troubleshoot the issue:

  1. Run a SELECT * query on a table in your database to attempt to view the data.

  2. If you receive a "permission denied" error message, it indicates that the user account you are using to connect to the database lacks the necessary permissions to access the data.

Troubleshooting Named Instances:

If you are getting errors in test connection when onboarding datasource, consider doing following:

  1. Check Machine's firewall settings.

  2. Make sure that the TCP/IP corresponding to the instance in SSCM is enabled.

  3. Make sure SQL Browser service is running on the server.

Supported authentication methods

  • Basic Authentication: LightBeam supports local database users with a username and password for connecting to the database.

  • Microsoft Entra Authentication: LightBeam supports Microsoft Entra ID (also known as Microsoft Active Directory) users with a username and password for connecting to Azure SQL databases (Only Azure SQL DBs are supported, On-prem Active Directory or on-prem SQL server is not supported). When registering the data source with Microsoft Entra authentication, tick the checkboxes for Microsoft Entra authentication and Encrypted.

Minimal permissions setup

To configure minimal permissions for scanning a subset of databases on the instance, the following permissions are needed:

  1. Connect Permissions:

    • Allow users to connect to the database instance.

  2. Database-Level Permissions:

    • For each database in the subset, grant:

      • CONNECT permission: Allows users to connect to the specific database.

      • SELECT permission: Enables users to read data from the tables within the database.

Use the following script to create a user with such permissions. In this example, we are creating a user with permissions to connect to the customerdb database.

User with restricted permissions for a single database

CREATE LOGIN lightbeam WITH PASSWORD = 'lbadmin12345';
USE customerdb;
CREATE USER lightbeamuser FOR LOGIN lightbeam;
GRANT SELECT ON SCHEMA::dbo TO lightbeamuser;
GRANT SELECT ON SCHEMA::information_schema TO lightbeamuser;
GRANT CONNECT ON DATABASE::customerdb TO lightbeamuser;
GRANT SELECT ON DATABASE::customerdb TO lightbeamuser;

When registering the Microsoft SQL data source, use the login you created (not the user) to provide the connection details

Full permissions setup

If you want to scan all the databases and can allow a wider scope of permissions, we recommend creating a full read-only user who can access a list of databases in the SYS database, connect to every database, and read data.


Creating a Minimal Permission User in SQL Server Management Studio (SSMS)

  1. Open SQL Server Management Studio (SSMS) and connect to the SQL Server instance that needs to be onboarded with LightBeam.

  2. Right-click on the server instance in the Object Explorer and select "Properties" from the context menu.

  3. In the Server Properties window, navigate to the "Security" page.

  1. Ensure that the "SQL Server and Windows Authentication mode" option is selected under "Server authentication". This enables SQL Server authentication.

  1. Expand the "Security" folder in the Object Explorer and right-click on the "Logins" subfolder. Select "New Login" from the context menu.

  1. In the "New Login" window, switch to the "General" page.

    Enter a login name and provide a strong password in the required fields.

Note: Keep a record of the login name and password, as they will be used when onboarding the SQL Server instance with LightBeam.

  1. Switch to the "User Mapping" page in the "New Login" window.

  2. In the "Users mapped to this login" section, select the databases that need to be scanned by LightBeam.

  3. Check the "db_datareader" role in the "Database role membership" list. This grants the user read-only access to the selected databases.

  1. Click on the "OK" button to create the new login with the specified permissions.

The SQL server instance is ready to be onboarded with LightBeam with the credentials of the newly created login.


Validate permissions to the database

Next, the user needs to validate these permissions to the database. This ensures authorized access to the database by the credentials provided by the user. After validating the permissions to the database, the user can configure LightBeam Spectra on the system.

Prerequisites

The following tools need to be installed on the system in order to verify database permissions:

  • Git

  • sqlcmd command-line tool

Steps

  1. Go into the sql_user_check_sql_server/ directory

  2. Run the following command:

SERVER='<HOSTNAME>,<PORT_NUMBER>' SS_USERNAME=<USERNAME> SS_DATABASE=<DATABASE TO CONNECT> bash run.sh

The command will prompt for the password of the database instance.

User Credentials

* HOSTNAME: Hostname or IP address of your instance.

* USERNAME: Username for the database instance.

* PORT NUMBER: Port number of your database instance.

* DATABASE TO CONNECT: Name of the database to which you wish to establish a connection and validate the permissions.

To validate whether the commands were successful, check the output of the file generated from the command. The output file should contain a few rows of data in a JSON format. By following these steps, you can validate the permissions granted to the user account, ensuring that LightBeam Spectra has the necessary access to scan and process data from your databases.


About LightBeam

LightBeam automates Privacy, Security, and AI Governance, so businesses can accelerate their growth in new markets. Leveraging generative AI, LightBeam has rapidly gained customers’ trust by pioneering a unique privacy-centric and automation-first approach to security. Unlike siloed solutions, LightBeam ties together sensitive data cataloging, control, and compliance across structured and unstructured data applications providing 360-visibility, redaction, self-service DSRs, and automated ROPA reporting ensuring ultimate protection against ransomware and accidental exposures while meeting data privacy obligations efficiently. LightBeam is on a mission to create a secure privacy-first world helping customers automate compliance against a patchwork of existing and emerging regulations.

Figure 2. Connecting MS SQL - Search for MS SQL
Figure 2.1. Connecting MS SQL - MS SQL Icon

Named instances: Host field would be <Hostname/IP of the machine>\<Instance name>.For example, if hostname is sqlserver.com and INST1 is the name of an instance that needs to be onboarded, then put sqlserver.com\INST1in Host field. Keep Port field empty in this case.

Figure 3.3. Connecting MS SQL - MS SQL Configuration - Select Database

First, clone the repository:

For any questions or suggestions, please get in touch with us at: .

🧠
🔦
🔗
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/database-engine-instances-sql-server?view=sql-server-ver16
https://github.com/lightbeamai/lb-installer
support@lightbeam.ai
Figure 3. Connecting MS SQL - MS SQL Configuration - Basic Information
Figure 3.1 Connecting MS SQL - MS SQL Configuration - Connection
Figure 4. Connecting with Entra/AD authentication
Figure 5. SQL server instance properties
Figure 6. SQL Server Authentication mode
Figure 6. 1 New Login
Figure 7. Login Name and Password
Figure 8. Role Assignment