Admin: Azure SQL Managed Identity Configuration
Overview
This section describes how to prepare Azure SQL Managed Identity for use with RPI.
Prerequisites
Grant the VM access to Azure SQL Database.
Enable Azure AD authentication.
Create a contained user in the database that represents the VM's system assigned identity.
Get an access token using the VM identity and use it to query Azure SQL Database.
Additional details can be found at: https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azureresources/tutorial-windows-vm-access-sql
Steps
Log into SSMS using the AD account and run the following query in the primary data warehouse:
CREATE USER [<VMName-FQDN>] FROM EXTERNAL PROVIDER
Run this query for all VMs in the cluster. This will create the contained user for each VM.
Run the following query in the primary data warehouse:
ALTER ROLE db_datareader ADD MEMBER [<VMName-FQND>]
Again, repeat his query for all VMs in the cluster. This will grant the VM access to read the entire database.
Repeat steps 1 -4 for all RPI operational databases:
Interaction_XXX
InteractionAudit_XXX
Pulse
Pulse_Logging
Open the Node Manager config file:
C:\Program Files\RedPoint Global\RedPoint Interaction\Node Manager\Resonance.NodeManagerService.exeEdit the connection strings as per the following (replacing the server name):
XML<connectionStrings> <add name="LoggingDatabase" connectionString=" Server=<AzureSQLDBServer>; Database=Pulse_Logging; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10; " providerName="System.Data.SqlClient" /> <add name="OperationalDatabase" connectionString=" Server=<AzureSQLDBServer>; Database=Pulse; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10; " providerName="System.Data.SqlClient" /> </connectionStrings>
Open the Execution Service config file:
C:\Program Files\RedPoint Global\RedPoint Interaction\ExecutionService\Resonance.ExecutionService.exeEdit the connection strings as per the following (replacing the server name):
XML<connectionStrings> <add name="LoggingDatabase" connectionString=" Server=<AzureSQLDBServer>; Database=Pulse_Logging; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10; " providerName="System.Data.SqlClient" /> <add name="OperationalDatabase" connectionString=" Server=<AzureSQLDBServer>; Database=Pulse; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10; " providerName="System.Data.SqlClient" /> </connectionStrings>
Open the Interaction Web.config file: C:\inetpub\wwwrpi\Interaction\Web.config
Edit the connection strings as per the following (replacing the server name):
XML<connectionStrings> <add name="LoggingDatabase" connectionString=" Server=<AzureSQLDBServer>; Database=Pulse_Logging; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10;" providerName="System.Data.SqlClient" /> <add name="OperationalDatabase" connectionString=" Server=<AzureSQLDBServer>; Database=Pulse; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10;" providerName="System.Data.SqlClient" /> </connectionStrings>
Restart IIS, the Node Manager Service, and the Execution Service to pick up the changes.
Repeat steps 6-12 for all VMs on the cluster.
Log into Server Workbench and navigate to the Clients tab. Update the following connection strings (updating the server and databases):
Operational Database:
TEXTServer=<AzureSQLDBServer>; Database=<interaction DB>; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10
Auditing Database:
TEXTServer=<AzureSQLDBServer>; Database=<interaction audit DB>; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10
Data Warehouse Database:
TEXTServer=<AzureSQLDBServer>; Database=<data warehouse DB>; UID=AnyString; Encrypt=True; Authentication=Active Directory Interactive; ConnectRetryCount=12; ConnectRetryInterval=10
If applicable, update the Read-Only data warehouse database as well
Execute tests to validate that RPI can connect to the databases.
If applicable, update the connection strings for any services that are connecting to the databases, including the SendGrid Callback service, and Realtime Agent service.